Date: Thu, 11 Sep 2014 12:13:35 -0600 From: David <dajose22@gmail.com> To: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: netmap and jumbo packets Message-ID: <CAHYV_8zfb8CfSp5RrK%2BZvV3kbe%2BUnj25SNRTN4dqOPuffSMyJw@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi, I am learning to use netmap. Currently I got pkt-gen working (without drivers). When I try to set packet size above 2048 I got an error. Searching through the code I found in sys/dev/netmap/netmap_mem2.c the size constrain. I change it like this: diff --git a/sys/dev/netmap/netmap_mem2.c b/sys/dev/netmap/netmap_mem2.c index a15a8c7..8c561cb 100644 --- a/sys/dev/netmap/netmap_mem2.c +++ b/sys/dev/netmap/netmap_mem2.c @@ -25,6 +25,7 @@ #ifdef linux #include "bsd_glue.h" +#include <linux/vmalloc.h> #endif /* linux */ #ifdef __APPLE__ @@ -54,7 +55,7 @@ __FBSDID("$FreeBSD: head/sys/dev/netmap/netmap.c 241723 2012-1 #include <dev/netmap/netmap_kern.h> #include "netmap_mem2.h" -#define NETMAP_BUF_MAX_NUM 20*4096*2 /* large machine */ +#define NETMAP_BUF_MAX_NUM 10*4096*2 /* large machine */ #define NETMAP_POOL_MAX_NAMSZ 32 @@ -183,7 +184,7 @@ struct netmap_obj_params netmap_params[NETMAP_POOLS_NR] =3D { .num =3D 200, }, [NETMAP_BUF_POOL] =3D { - .size =3D 2048, + .size =3D 8192, .num =3D NETMAP_BUF_MAX_NUM, }, }; (first change is not related) I had to change NETMAP_BUF_MAX_NUM because of the amount of memory needed. This way I can send packets as big as 8192 (which is what I need). Is there any problems this will bring on? (maybe decrease the performance or any other side effect) thanks --=20 David D=C3=ADaz Barquero Ingenier=C3=ADa en Computadores Tecnol=C3=B3gico de Costa Rica
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHYV_8zfb8CfSp5RrK%2BZvV3kbe%2BUnj25SNRTN4dqOPuffSMyJw>