Skip to content

Cannot find buffers/rings values #183

Closed

Description

@leleobhz

Hello.

I'm trying to use netmap with my X520 and a capture software that uses multithreaded capture to get the data (And this software uses multithread). If i use the default values, i get this result:

[ 5407.665455] ixgbe 0000:04:00.0 eth0: Intel(R) 10 Gigabit Network Connection
[ 5407.665511] net eth0: netmap queues/slots: TX 12/512, RX 12/512


Netmap Ring size: 36864
Netmap admode: 1
Netmap verbose: 0
Netmap ring_num: 200
Netmap buf_num: 163840
Netmap buf_size: 2048

[ 5556.870017] 180.273439 [ 834] netmap_obj_malloc         netmap_ring request size 65792 too large
[ 5556.870024] 180.273447 [1736] netmap_mem2_rings_create  Cannot allocate RX_ring

If i set the ring_size to 65792,

Netmap Ring size: 65792
Netmap admode: 1
Netmap verbose: 0
Netmap ring_num: 200
Netmap buf_num: 163840
Netmap buf_size: 2048

[ 5646.855462] 270.264326 [ 840] netmap_obj_malloc         no more netmap_buf objects
[ 5646.855469] 270.264334 [1005] netmap_new_bufs           no more buffers after 2046 of 4096
[ 5646.855483] 270.264348 [1759] netmap_mem2_rings_create  Cannot allocate buffers for RX_ring

Increasing buf_size to 16384:

Netmap Ring size: 65792
Netmap admode: 1
Netmap verbose: 0
Netmap ring_num: 200
Netmap buf_num: 163840
Netmap buf_size: 16384

[ 5722.815373] 346.228830 [ 840] netmap_obj_malloc         no more netmap_buf objects
[ 5722.815380] 346.228839 [1005] netmap_new_bufs           no more buffers after 4094 of 4096
[ 5722.815401] 346.228859 [1759] netmap_mem2_rings_create  Cannot allocate buffers for RX_ring

So what is the math I need to do to make this work and what variables I need to know?

Thanks!

Activity

  1. leleobhz commented on May 24, 2016

    @leleobhz
    Author

    Append: With verbose:

    [ 6952.953312] 576.441151 [ 734] netmap_update_config      stored config eth0: txring 12 x 512, rxring 12 x 512
    [ 6952.953319] 576.441160 [ 736] netmap_update_config      new config eth0: txring 12 x 4096, rxring 12 x 4096
    [ 6952.953323] 576.441164 [ 739] netmap_update_config      configuration changed (but fine)
    [ 6952.953328] 576.441168 [1746] netmap_interp_ringid      eth0: tx [0,12) rx [0,12) id 0
    [ 6952.953332] 576.441172 [ 587] nm_mem_assign_group       iommu_group 0
    [ 6952.953347] 576.441188 [1183] netmap_config_obj_allocator objsize 1024 clustsize 4096 objects 4
    [ 6952.953351] 576.441192 [1183] netmap_config_obj_allocator objsize 65792 clustsize 1052672 objects 16
    [ 6952.953367] 576.441208 [1183] netmap_config_obj_allocator objsize 2048 clustsize 4096 objects 2
    [ 6952.953393] 576.441234 [1305] netmap_finalize_obj_allocator Pre-allocated 25 clusters (4/100KB) for 'netmap_if'
    [ 6952.956124] 576.443962 [1305] netmap_finalize_obj_allocator Pre-allocated 13 clusters (1028/13364KB) for 'netmap_ring'
    [ 6952.960778] 576.448617 [1305] netmap_finalize_obj_allocator Pre-allocated 8192 clusters (4/32768KB) for 'netmap_buf'
    [ 6952.960786] 576.448627 [1441] netmap_mem_finalize_all   interfaces 100 KB, rings 13364 KB, buffers 32 MB
    [ 6952.960789] 576.448631 [1444] netmap_mem_finalize_all   Free buffers: 16382
    [ 6952.961101] 576.448941 [ 840] netmap_obj_malloc         no more netmap_buf objects
    [ 6952.961105] 576.448946 [1005] netmap_new_bufs           no more buffers after 4094 of 4096
    [ 6952.961127] 576.448968 [1759] netmap_mem2_rings_create  Cannot allocate buffers for RX_ring
    [ 6952.961317] 576.449158 [1879] netmap_mem_global_deref   active = 0
    
  2. vmaffione commented on May 24, 2016

    @vmaffione
    Collaborator

    The problem is that netmap is being asked to allocate an insane number of buffers, and so it fails.

    Why are you setting ring_size to such a huge value?
    What does "ethtool -g" say (e.g. the ring sizes of your physical card)?
    Why are you setting admode to 1? It should be 0, since you don't have a native netmap adapter.

  3. leleobhz commented on May 24, 2016

    @leleobhz
    Author

    @vmaffione - the application is who asks for these number of buffers?

    Why are you setting ring_size to such a huge value?

    Just a test to see if someone got fixed. I did this test before try to read the source code to find what happens.

    What does "ethtool -g" say (e.g. the ring sizes of your physical card)?

    Ring parameters for eth0:
    Pre-set maximums:
    RX:             4096
    RX Mini:        0
    RX Jumbo:       0
    TX:             4096
    Current hardware settings:
    RX:             4096
    RX Mini:        0
    RX Jumbo:       0
    TX:             4096
    
    Ring parameters for eth1:
    Pre-set maximums:
    RX:             4096
    RX Mini:        0
    RX Jumbo:       0
    TX:             4096
    Current hardware settings:
    RX:             4096
    RX Mini:        0
    RX Jumbo:       0
    TX:             4096
    
    CPU Profile: performance
    Netmap admode: 0
    Netmap verbose: 1
    Netmap ring_size: 65792
    Netmap ring_num: 800
    Netmap buf_size: 32768
    Netmap buf_num: 327680
    

    Why are you setting admode to 1? It should be 0, since you don't have a native netmap adapter.

    I guessed its about the mode the interface is set, not about the interface being a native netmap adapter. Changed this.

    And with the configuration pasted before, the dmesg goes this way:

    [41523.762079] 149.392361 [ 734] netmap_update_config      stored config eth0: txring 12 x 512, rxring 12 x 512
    [41523.762089] 149.392372 [ 736] netmap_update_config      new config eth0: txring 12 x 4096, rxring 12 x 4096
    [41523.762093] 149.392377 [ 739] netmap_update_config      configuration changed (but fine)
    [41523.762098] 149.392382 [1746] netmap_interp_ringid      eth0: tx [0,12) rx [0,12) id 0
    [41523.762102] 149.392386 [ 587] nm_mem_assign_group       iommu_group 0
    [41523.762106] 149.392390 [1183] netmap_config_obj_allocator objsize 1024 clustsize 4096 objects 4
    [41523.762110] 149.392394 [1183] netmap_config_obj_allocator objsize 65792 clustsize 1052672 objects 16
    [41523.762114] 149.392398 [1183] netmap_config_obj_allocator objsize 2048 clustsize 4096 objects 2
    [41523.762135] 149.392418 [1305] netmap_finalize_obj_allocator Pre-allocated 25 clusters (4/100KB) for 'netmap_if'
    [41523.772027] 149.402308 [1305] netmap_finalize_obj_allocator Pre-allocated 50 clusters (1028/51400KB) for 'netmap_ring'
    [41523.855085] 149.485371 [1305] netmap_finalize_obj_allocator Pre-allocated 163840 clusters (4/655360KB) for 'netmap_buf'
    [41523.855094] 149.485383 [1441] netmap_mem_finalize_all   interfaces 100 KB, rings 51400 KB, buffers 640 MB
    [41523.855098] 149.485388 [1444] netmap_mem_finalize_all   Free buffers: 327678
    [41523.857288] 149.487577 [2013] netmap_do_regif           lut ffffc90002a78000 bufs 327680 size 2048
    [41523.943806] 149.574099 [3098] netmap_reset              eth0 TX0 hwofs 0 -> 0, hwtail 4095 -> 4095
    [41523.945842] 149.576136 [3098] netmap_reset              eth0 TX1 hwofs 0 -> 0, hwtail 4095 -> 4095
    [41523.947879] 149.578173 [3098] netmap_reset              eth0 TX2 hwofs 0 -> 0, hwtail 4095 -> 4095
    [41523.949915] 149.580209 [3098] netmap_reset              eth0 TX3 hwofs 0 -> 0, hwtail 4095 -> 4095
    [41523.951193] 149.581487 [3098] netmap_reset              eth0 TX4 hwofs 0 -> 0, hwtail 4095 -> 4095
    [41523.953230] 149.583525 [3098] netmap_reset              eth0 TX5 hwofs 0 -> 0, hwtail 4095 -> 4095
    [41523.955267] 149.585562 [3098] netmap_reset              eth0 TX6 hwofs 0 -> 0, hwtail 4095 -> 4095
    [41523.957303] 149.587597 [3098] netmap_reset              eth0 TX7 hwofs 0 -> 0, hwtail 4095 -> 4095
    [41523.959338] 149.589632 [3098] netmap_reset              eth0 TX8 hwofs 0 -> 0, hwtail 4095 -> 4095
    [41523.961369] 149.591664 [3098] netmap_reset              eth0 TX9 hwofs 0 -> 0, hwtail 4095 -> 4095
    [41523.963405] 149.593700 [3098] netmap_reset              eth0 TX10 hwofs 0 -> 0, hwtail 4095 -> 4095
    [41523.965442] 149.595737 [3098] netmap_reset              eth0 TX11 hwofs 0 -> 0, hwtail 4095 -> 4095
    [41523.967496] 149.597791 [3098] netmap_reset              eth0 RX0 hwofs 0 -> 0, hwtail 0 -> 0
    [41523.967502] 149.597798 [ 473] ixgbe_netmap_configure_srrctl bufsz: 2048 srrctl: 2
    [41523.969568] 149.599863 [3098] netmap_reset              eth0 RX1 hwofs 0 -> 0, hwtail 0 -> 0
    [41523.969574] 149.599870 [ 473] ixgbe_netmap_configure_srrctl bufsz: 2048 srrctl: 2
    [41523.971639] 149.601935 [3098] netmap_reset              eth0 RX2 hwofs 0 -> 0, hwtail 0 -> 0
    [41523.971645] 149.601942 [ 473] ixgbe_netmap_configure_srrctl bufsz: 2048 srrctl: 2
    [41523.973710] 149.604006 [3098] netmap_reset              eth0 RX3 hwofs 0 -> 0, hwtail 0 -> 0
    [41523.973716] 149.604013 [ 473] ixgbe_netmap_configure_srrctl bufsz: 2048 srrctl: 2
    [41523.975784] 149.606079 [3098] netmap_reset              eth0 RX4 hwofs 0 -> 0, hwtail 0 -> 0
    [41523.975789] 149.606086 [ 473] ixgbe_netmap_configure_srrctl bufsz: 2048 srrctl: 2
    [41523.977857] 149.608153 [3098] netmap_reset              eth0 RX5 hwofs 0 -> 0, hwtail 0 -> 0
    [41523.977863] 149.608160 [ 473] ixgbe_netmap_configure_srrctl bufsz: 2048 srrctl: 2
    [41523.979933] 149.610229 [3098] netmap_reset              eth0 RX6 hwofs 0 -> 0, hwtail 0 -> 0
    [41523.979939] 149.610236 [ 473] ixgbe_netmap_configure_srrctl bufsz: 2048 srrctl: 2
    [41523.982012] 149.612308 [3098] netmap_reset              eth0 RX7 hwofs 0 -> 0, hwtail 0 -> 0
    [41523.982018] 149.612315 [ 473] ixgbe_netmap_configure_srrctl bufsz: 2048 srrctl: 2
    [41523.984086] 149.614382 [3098] netmap_reset              eth0 RX8 hwofs 0 -> 0, hwtail 0 -> 0
    [41523.984091] 149.614389 [ 473] ixgbe_netmap_configure_srrctl bufsz: 2048 srrctl: 2
    [41523.986163] 149.616459 [3098] netmap_reset              eth0 RX9 hwofs 0 -> 0, hwtail 0 -> 0
    [41523.986168] 149.616466 [ 473] ixgbe_netmap_configure_srrctl bufsz: 2048 srrctl: 2
    [41523.988241] 149.618538 [3098] netmap_reset              eth0 RX10 hwofs 0 -> 0, hwtail 0 -> 0
    [41523.988247] 149.618544 [ 473] ixgbe_netmap_configure_srrctl bufsz: 2048 srrctl: 2
    [41523.990314] 149.620611 [3098] netmap_reset              eth0 RX11 hwofs 0 -> 0, hwtail 0 -> 0
    [41523.990320] 149.620618 [ 473] ixgbe_netmap_configure_srrctl bufsz: 2048 srrctl: 2
    [41524.092213] 149.722516 [3150] netmap_common_irq         received TX queue 0
    [41524.092223] 149.722527 [3150] netmap_common_irq         received RX queue 0
    [41524.113439] 149.743744 [3150] netmap_common_irq         received TX queue 8
    [41524.113447] 149.743752 [3150] netmap_common_irq         received RX queue 8
    [41524.113524] 149.743829 [3150] netmap_common_irq         received TX queue 2
    [41524.153534] ixgbe 0000:04:00.0 eth0: detected SFP+: 5
    [41524.396150] ixgbe 0000:04:00.0 eth0: NIC Link is Up 10 Gbps, Flow Control: RX
    [41524.493256] 150.123582 [3150] netmap_common_irq         received TX queue 11                                                                                                        [15/6737]
    [41524.493268] 150.123582 [3150] netmap_common_irq         received TX queue 5
    [41524.493271] 150.123582 [3150] netmap_common_irq         received TX queue 4
    [41524.493272] 150.123582 [3150] netmap_common_irq         received TX queue 10
    [41524.493274] 150.123598 [3150] netmap_common_irq         received RX queue 5
    [41524.493275] 150.123600 [3150] netmap_common_irq         received RX queue 4
    [41524.493289] 150.123602 [3150] netmap_common_irq         received RX queue 10
    [41524.493292] 150.123603 [3150] netmap_common_irq         received TX queue 3
    [41524.493294] 150.123603 [3150] netmap_common_irq         received TX queue 8
    [41524.493296] 150.123603 [3150] netmap_common_irq         received TX queue 2
    [41524.493297] 150.123603 [3150] netmap_common_irq         received TX queue 9
    [41525.409097] 151.039479 [3150] netmap_common_irq         received TX queue 7
    [41525.409101] 151.039484 [3150] netmap_common_irq         received TX queue 11
    [41525.409102] 151.039486 [3150] netmap_common_irq         received RX queue 11
    [41525.409105] 151.039487 [3150] netmap_common_irq         received TX queue 8
    [41525.409106] 151.039490 [3150] netmap_common_irq         received RX queue 8
    [41526.099086] 151.729510 [ 735] netmap_get_monitor_na     flags 304
    [41526.099106] 151.729532 [ 755] netmap_get_monitor_na     found parent: eth0
    [41526.099110] 151.729536 [1746] netmap_interp_ringid      eth0: tx [0,1) rx [0,1) id 0
    [41526.099115] 151.729541 [ 863] netmap_get_monitor_na     monitor ok
    [41526.099118] 151.729544 [1746] netmap_interp_ringid      eth0-0/rt: tx [0,1) rx [0,1) id 0
    [41526.099122] 151.729548 [ 587] nm_mem_assign_group       iommu_group 0
    [41526.100174] 151.730599 [2013] netmap_do_regif           lut ffffc90002a78000 bufs 327680 size 2048
    [41526.100191] 151.730616 [ 255] netmap_monitor_add        eth0-0/rt RX0: intercept callbacks on eth0 RX0
    [41526.100540] 151.730965 [ 735] netmap_get_monitor_na     flags 304
    [41526.100543] 151.730969 [ 755] netmap_get_monitor_na     found parent: eth0
    [41526.100546] 151.730972 [1746] netmap_interp_ringid      eth0: tx [1,2) rx [1,2) id 1
    [41526.100550] 151.730976 [ 863] netmap_get_monitor_na     monitor ok
    [41526.100552] 151.730979 [1746] netmap_interp_ringid      eth0-1/rt: tx [0,1) rx [1,2) id 1
    [41526.100556] 151.730982 [ 587] nm_mem_assign_group       iommu_group 0
    [41526.101831] 151.732256 [2013] netmap_do_regif           lut ffffc90002a78000 bufs 327680 size 2048
    [41526.101835] 151.732261 [ 255] netmap_monitor_add        eth0-1/rt RX1: intercept callbacks on eth0 RX1
    [41526.101965] 151.732391 [ 735] netmap_get_monitor_na     flags 304
    [41526.101968] 151.732395 [ 755] netmap_get_monitor_na     found parent: eth0
    [41526.101971] 151.732397 [1746] netmap_interp_ringid      eth0: tx [2,3) rx [2,3) id 2
    [41526.101975] 151.732401 [ 863] netmap_get_monitor_na     monitor ok
    [41526.101977] 151.732403 [1746] netmap_interp_ringid      eth0-2/rt: tx [0,1) rx [2,3) id 2
    [41526.101981] 151.732407 [ 587] nm_mem_assign_group       iommu_group 0
    [41526.103278] 151.733704 [2013] netmap_do_regif           lut ffffc90002a78000 bufs 327680 size 2048
    [41526.103282] 151.733709 [ 255] netmap_monitor_add        eth0-2/rt RX2: intercept callbacks on eth0 RX2
    [41526.103396] 151.733822 [ 735] netmap_get_monitor_na     flags 304
    [41526.103399] 151.733826 [ 755] netmap_get_monitor_na     found parent: eth0
    [41526.103402] 151.733828 [1746] netmap_interp_ringid      eth0: tx [3,4) rx [3,4) id 3
    [41526.103406] 151.733832 [ 863] netmap_get_monitor_na     monitor ok
    [41526.103408] 151.733835 [1746] netmap_interp_ringid      eth0-3/rt: tx [0,1) rx [3,4) id 3
    [41526.103412] 151.733838 [ 587] nm_mem_assign_group       iommu_group 0
    [41526.104145] 151.734571 [ 840] netmap_obj_malloc         no more netmap_buf objects
    [41526.104150] 151.734576 [1005] netmap_new_bufs           no more buffers after 4094 of 4096
    [41526.104173] 151.734599 [1759] netmap_mem2_rings_create  Cannot allocate buffers for RX_ring
    [41526.104333] 151.734759 [1879] netmap_mem_global_deref   active = 4
    [41526.105407] 151.735832 [ 299] netmap_monitor_del        eth0-2/rt RX2: restoring sync on eth0 RX2: ffffffffa0765a40
    [41526.105412] 151.735839 [ 304] netmap_monitor_del        eth0-2/rt RX2: restoring notify on eth0 RX2: ffffffffa06de6f0
    [41526.105416] 151.735843 [ 933] netmap_do_unregif         deleting last instance for eth0-2/rt
    [41526.105674] 151.736101 [1879] netmap_mem_global_deref   active = 3
    [41526.105678] 151.736105 [ 299] netmap_monitor_del        eth0-1/rt RX1: restoring sync on eth0 RX1: ffffffffa0765a40
    [41526.105694] 151.736109 [ 304] netmap_monitor_del        eth0-1/rt RX1: restoring notify on eth0 RX1: ffffffffa06de6f0
    [41526.105698] 151.736125 [ 933] netmap_do_unregif         deleting last instance for eth0-1/rt
    [41526.105942] 151.736368 [1879] netmap_mem_global_deref   active = 2
    [41526.105945] 151.736371 [ 299] netmap_monitor_del        eth0-0/rt RX0: restoring sync on eth0 RX0: ffffffffa0765a40
    [41526.105949] 151.736375 [ 304] netmap_monitor_del        eth0-0/rt RX0: restoring notify on eth0 RX0: ffffffffa06de6f0
    [41526.105952] 151.736379 [ 933] netmap_do_unregif         deleting last instance for eth0-0/rt
    [41526.106251] 151.736677 [1879] netmap_mem_global_deref   active = 1
    [41526.341082] 151.971519 [ 933] netmap_do_unregif         deleting last instance for eth0
    [41526.344342] 151.974782 [1879] netmap_mem_global_deref   active = 0
    [41526.396326] ixgbe 0000:04:00.0 eth0: detected SFP+: 5
    [41526.639063] ixgbe 0000:04:00.0 eth0: NIC Link is Up 10 Gbps, Flow Control: RX
    

    What can I do now? May this be a issue with my application and the way it instantiate the packet filter?

  4. zhangwei1984 commented on May 25, 2016

    @zhangwei1984

    I have the same problem. #185

    Hi,

    I want to create more than 18 pipes when using lb application. After 18 (for example lb -i p2p2 -p 20), I got this error:261.135269 nm_open [847] NIOCREGIF failed: Cannot allocate memory p2p2{18
    261.135276 main [456] cannot open netmap:p2p2{18
    It seems that there is some limitation. There is a macro NM_MAXPIPES 64, but I can't make more than 18. It seems here is not the limitation. My question is that if I want to create more than 18 pipes, eg 100 pipes, where should I change to make it work?

    From the error "Cannot allocate memory", inside function netmap_get_pipe_na()
    here will allocate memory which is related to the number of pipes
    https://github.com/luigirizzo/netmap/blob/master/sys/dev/netmap/netmap_pipe.c#L102.
    But I do not think it was caused by here.

    Dmesg shows the error:
    [88943.459956] 112.380834 [ 840] netmap_obj_malloc no more netmap_ring objects
    [88943.471745] ixgbe 0000:07:00.1 p2p2: NIC Link is Up 10 Gbps, Flow Control: RX/TX
    [88943.481829] 112.402705 [1736] netmap_mem2_rings_create Cannot allocate TX_ring
    [88943.852137] ixgbe 0000:07:00.1 p2p2: detected SFP+: 4
    [88944.091797] ixgbe 0000:07:00.1 p2p2: NIC Link is Up 10 Gbps, Flow Control: RX/TX
    Thanks

  5. giuseppelettieri commented on May 25, 2016

    @giuseppelettieri
    Collaborator

    Hi all. Netmap preallocates rings and buffers from the kernel, then distributes them as required to NICs, VALE ports, pipes etc. You are running out of preallocated rings and/or buffers. In /sys/module/netmap/parameters there are a few variables that you can change to tune the preallocation (beware: the new values will be picked only when no application is using netmap). The one you are interested in are ring_num and buf_num. ring_size and buf_size, on the other end, set the size in bytes of each individual ring and buffer, respectively, which is probably not what you want. Note that the preallocation may partially fail: ring_curr_num and buf_curr_num will tell you how many rings and buffers have been actually preallocated. Each pipe needs 8 rings, with 4 of them actually unused and essentially empty (an unfortunate compatibility constraint that I hope to remove someday). You also need enough buffers to fill the 4 true rings of each pipe.

  6. zhangwei1984 commented on May 27, 2016

    @zhangwei1984

    Thanks so much for your guidance! My aim is to run the load distributor, then it can distribute the traffic to other apps (I have tried lb + pkt-gen rx), then test the throughput and latency. I use MoonGen test the throughput and latency. If so, I have to make the apps can send the traffic to MoonGen which runs on another machine. lb + pkt-gen rx will not work which I can only test the throughput from the netmap machine. I thought lb + bridge (bridge: I thought one port will be the lb pipe output, the other port will be physical port p2p2. I would change the bridge code slightly to make different bridge apps write the packets to different queues) will be a good match. But if even I directly run bridge, the

    zhangwei1984@nimbnode21:~/netmap/examples$ sudo ./bridge -i p2p2 
    ./bridge built May 24 2016 14:05:05
    929.111807 main [225] same interface, endpoint 0 goes to host
    929.111829 main [233] cannot open p2p2^
    

    Dmesg does not show useful information:

    [67449.503730] ixgbe 0000:07:00.1: irq 134 for MSI/MSI-X
    [67449.503817] ixgbe 0000:07:00.1: Multiqueue Enabled: Rx Queue count = 24, Tx Queue count = 24
    [67449.503950] ixgbe 0000:07:00.1: PCI Express bandwidth of 32GT/s available
    [67449.503953] ixgbe 0000:07:00.1: (Speed:5.0GT/s, Width: x8, Encoding Loss:20%)
    [67449.504039] ixgbe 0000:07:00.1: MAC: 2, PHY: 9, SFP+: 4, PBA No: E68793-006
    [67449.504042] ixgbe 0000:07:00.1: 90:e2:ba:5b:eb:75
    [67449.505774] ixgbe 0000:07:00.1: Intel(R) 10 Gigabit Network Connection
    [67449.505791] net eth0: netmap queues/slots: TX 24/512, RX 24/512
    [67449.526876] systemd-udevd[30350]: renamed network interface eth0 to p2p2
    [67466.093158] ixgbe 0000:07:00.1: registered PHC device on p2p2
    [67466.196289] IPv6: ADDRCONF(NETDEV_UP): p2p2: link is not ready
    [67466.260125] ixgbe 0000:07:00.1 p2p2: detected SFP+: 4
    [67466.499301] ixgbe 0000:07:00.1 p2p2: NIC Link is Up 10 Gbps, Flow Control: RX/TX
    [67466.499459] IPv6: ADDRCONF(NETDEV_CHANGE): p2p2: link becomes ready
    

    If run the command

    sudo ./bridge -i netmap:p2p2 
    

    The server will crash. Can you give some guidance how to achieve my goal: lb + apps, which apps can send the packets to the physical port, then MoonGen server can receives the packets measure the latency.

  7. leleobhz commented on May 30, 2016

    @leleobhz
    Author

    Hello @giuseppelettieri

    How can I do the math with (ring|buf)_(size|num) relationed to number of capture threads? I read the comment you wrote about number of ring/buf size, but I did not undestand how pragmatically I can get these numbers. Can you explain this?

    Thanks!

  8. gureedo commented on Jan 11, 2017

    @gureedo
    Contributor

    Looks like option ring_size doesn't work.

    [ 1964.674152] 442.620893 [ 756] netmap_update_config      configuration changed (but fine)
    [ 1964.674222] 442.620965 [ 847] netmap_obj_malloc         netmap_ring request size 65792 too large
    [ 1964.674272] 442.621016 [1705] netmap_mem2_rings_create  Cannot allocate RX_ring
    

    I've encountered this problem a year ago and asked for help in #139, this helped me, I've increased value of ring_size and error is gone.
    Today I've update netmap to latest master source and changing value of ring_size didn't help me.

  9. vmaffione commented on Sep 16, 2017

    @vmaffione
    Collaborator

    It looks more like a misconfiguration. The ring_size is for physical NICs. Try to change priv_ring_size if you are using VALE ports.

  10. gureedo commented on Sep 18, 2017

    @gureedo
    Contributor

    It was a bug in master branch. Not actual anymore.

  11. Winters123 commented on Mar 23, 2020

    @Winters123

    Followed the instructions given by @giuseppelettieri , I changed the buf_num from 163840 to 1000000 to adapt it to my application on top. But it failed since I observed buf_cur_num became 0. I'm wondering if there is a legal range that I can play with buf_num?

  12. Winters123 commented on Mar 23, 2020

    @Winters123

    Addition: Just noticed that the change of buf_num took effect finally. However, when I ran my application on top of netmap, the address sanitizer reported:

    ==21093==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f09d744d882 bp 0x000000001000 sp 0x62100001c538 T0)
    

    Is this a sign that the modification of buf_num didn't actually work? or I missed some steps before I can make sure that the buf_num is actually changed.

    Cheers,

  13. davidmpc commented on Sep 14, 2021

    @davidmpc

    I've encountered this problem with the latest code, the linux kernel version of my host is 18.04, and it's a virtual machine in the cloud. I only use netmap.ko, and nm_open failed.
    Aug 31 13:48:42 VZ202106150501 kernel: [ 2658.237950] 922.350033 [1017] netmap_obj_malloc netmap_ring request size 65792 too large Aug 31 13:48:42 VZ202106150501 kernel: [ 2658.239627] 922.351709 [1918] netmap_mem2_rings_create Cannot allocate RX_ring Aug 31 13:48:42 VZ202106150501 aiwan.sh[18885]: 922.353520 nm_open [946] NIOCREGIF failed: Cannot allocate memory netmap:eth0
    I've changed ring_size, ring_num parameters and whatever I do it didn't work.
    Then I build netmap.ko on the host running netmap application instead of coyping netmap.ko from other host with the same kernel version, and the error above is gone.
    So netmap.ko has something to do with the compiling host, hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions