djwmarks / netmap

Automatically exported from code.google.com/p/netmap
1 stars 0 forks source link

netmap_if's size (1096) exceeds its object size (1024) #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In a Linux box, Load netmap.ko and ixgbe/ixgbe.ko
2. run 'pkt-gen -i <netif> -f rx'

What is the expected output? What do you see instead?
Rather than normally starting, it failed to run with the kernel message:
[ 1029.613780] 092.131683 [ 501] netmap_obj_malloc         netmap_if request 
size 1096 (objsize=1024) too large

What version of the product are you using? On what operating system?
Using a recent commit as of 04 Nov 2014 (7e9e5e7602f5c620ade)
Linux kernel version 3.14
Ubuntu 12.04 LTS

Please provide any additional information below.
I am actually using it by applying the following patch:
diff --git a/sys/dev/netmap/netmap_mem2.c b/sys/dev/netmap/netmap_mem2.c
index e869bf9..474d06e 100644
--- a/sys/dev/netmap/netmap_mem2.c
+++ b/sys/dev/netmap/netmap_mem2.c
@@ -164,7 +164,7 @@ netmap_mem_get_bufsize(struct netmap_mem_d *nmd)

 struct netmap_obj_params netmap_params[NETMAP_POOLS_NR] = {
        [NETMAP_IF_POOL] = {
-               .size = 1024,
+               .size = 2048,
                .num  = 100,
        },
        [NETMAP_RING_POOL] = {

Original issue reported on code.google.com by hwand...@gmail.com on 4 Nov 2014 at 5:38

GoogleCodeExporter commented 9 years ago
the issue happens only when pkt-gen is started if the specified interface is 
down. when the interface is correctly up, the above issue doesn't take place.

Original comment by hwand...@gmail.com on 4 Nov 2014 at 6:12

GoogleCodeExporter commented 9 years ago
No need to touch the source. You can increase the default sizes and number of 
buffers rings etc. by using the sysctl or sysfs entries.

Original comment by rizzo.un...@gmail.com on 17 Nov 2014 at 12:20