luigirizzo / netmap

Automatically exported from code.google.com/p/netmap
BSD 2-Clause "Simplified" License
1.84k stars 534 forks source link

The max ports in a vale should be 254 #398

Open nanjj opened 6 years ago

nanjj commented 6 years ago

Steps to reproduce the problem:

  1. create and attach 252 ports in valea:
    #bash
    for ((i=0; i<252; i++)); do
    vale-ctl -n a$i
    vale-ctl -a valea:a$i
    done
  2. create and attach the 253 port
    vale-ctl -n a252
    vale-ctl -a valea:a252

=> valea:a252: Cannot allocate memory

Why?

The max ports in a vale should be 254 according NM_BDG_MAXPORTS in netmap_kern.h.

giuseppelettieri commented 6 years ago

Memory allocation may fail for other reasons. What is the error logged to dmesg?

snowcherry commented 6 years ago

... ... [ 116.513050] 148.545852 [ 676] netmap_vi_create returning nr_arg2 250 [ 116.515913] 148.548714 [ 680] netmap_vi_create created a248 [ 116.520359] 148.553157 [2286] netmap_vp_create nr_arg2 0 [ 116.523191] 148.555987 [ 676] netmap_vi_create returning nr_arg2 251 [ 116.526044] 148.558839 [ 680] netmap_vi_create created a249 [ 116.530388] 148.563179 [2286] netmap_vp_create nr_arg2 0 [ 116.533194] 148.565985 [ 676] netmap_vi_create returning nr_arg2 252 [ 116.536046] 148.568836 [ 680] netmap_vi_create created a250 [ 116.540528] 148.573314 [2286] netmap_vp_create nr_arg2 0 [ 116.543352] 148.576136 [ 676] netmap_vi_create returning nr_arg2 253 [ 116.546207] 148.578990 [ 680] netmap_vi_create created a251 [ 173.993979] 205.992647 [ 757] netmap_get_bdg_na bridge full 252, cannot create new port