Re: Regarding Netmap internal memory allocation.

2015-01-05 Thread Carlos Ferreira
First of all, Happy New Year :) Now, to more serious developments.. I was unable to reduce the netmap memory usage by manipulating the buf_num value. The lowest I could get was around the 20MB which is still high. I'm going to change the strategy and try to directly mmap the RX and TX buffers from

Re: Regarding Netmap internal memory allocation.

2014-12-30 Thread Carlos Ferreira
Well... due to budget constraints I'm using USB 100Mb ports :) This is for experimental purposes only for now. Btw, can netmap work with wireless interfaces? I believe you once answered this question, but I could not find it in the mail list. On 30 December 2014 at 18:40, Luigi Rizzo wrote: > O

Re: Regarding Netmap internal memory allocation.

2014-12-30 Thread Luigi Rizzo
On Tue, Dec 30, 2014 at 6:38 PM, Carlos Ferreira wrote: > Ok, I'm having some trouble in tuning the amount of memory for netmap. > > I have been following the man page from FreeBSD in other to understand the > values at /sys/modules/netmap/parameters for linux but I'm having some > trouble in unde

Re: Regarding Netmap internal memory allocation.

2014-12-30 Thread Carlos Ferreira
Ok, I'm having some trouble in tuning the amount of memory for netmap. I have been following the man page from FreeBSD in other to understand the values at /sys/modules/netmap/parameters for linux but I'm having some trouble in under

Re: Regarding Netmap internal memory allocation.

2014-12-30 Thread Luigi Rizzo
you can #undefine WITH_VALE. But it is only 20K of code (and 150K of data structures, which you can further reduce by lowering NM_BRIDGS). The saving is probably not worth the effort. cheers luigi On Tue, Dec 30, 2014 at 5:08 PM, Carlos Ferreira wrote: > By the way, another question. > Is there

Re: Regarding Netmap internal memory allocation.

2014-12-30 Thread Luigi Rizzo
you don't need to recompile, on linux those values are accessible under /sys/modules/netmal_lin/parameters (on FreeBSD they are sysctl variables) cheers luigi On Tue, Dec 30, 2014 at 4:43 PM, Carlos Ferreira wrote: > Ok thanks. I was hoping not having to recompile the module, but it's ok. > Tha

Re: Regarding Netmap internal memory allocation.

2014-12-30 Thread Carlos Ferreira
By the way, another question. Is there a way to not compile the code regarding the VALE switch? I'm only interested in using netmap with Tap Devices and NICs, so I was hoping to save some memory. On 30 December 2014 at 15:47, Carlos Ferreira wrote: > You mean netmap_mem2.c ? It was there where I

Re: Regarding Netmap internal memory allocation.

2014-12-30 Thread Carlos Ferreira
You mean netmap_mem2.c ? It was there where I found the NETMAP_BUF_MAX_NUM define. On 30 December 2014 at 15:43, Carlos Ferreira wrote: > Ok thanks. I was hoping not having to recompile the module, but it's ok. > Thank you for the info! > > > On 30 December 2014 at 15:38, Luigi Rizzo wrote: >

Re: Regarding Netmap internal memory allocation.

2014-12-30 Thread Carlos Ferreira
Ok thanks. I was hoping not having to recompile the module, but it's ok. Thank you for the info! On 30 December 2014 at 15:38, Luigi Rizzo wrote: > you can reduce the amount of ram (buffers, mostly) by > tweaking the values in netmap_mem2.c :: > struct netmap_obj_params netmap_params[NETMAP_POO

Re: Regarding Netmap internal memory allocation.

2014-12-30 Thread Luigi Rizzo
you can reduce the amount of ram (buffers, mostly) by tweaking the values in netmap_mem2.c :: struct netmap_obj_params netmap_params[NETMAP_POOLS_NR] = { ... } or you can simply modify the constant netmap_mem2.h:#define NETMAP_BUF_MAX_NUM 20*4096*2 to something smaller that suits an openwrt box

Re: Regarding Netmap internal memory allocation.

2014-12-30 Thread Carlos Ferreira
Update: I noticed that the netmap module was still crashing, after changing the OpenWRT VM ram to 256MB. I now raised to 1GB and it no longer crashed. The netmap module is now consuming about 350MB of Ram, which for my objectives is just too much... On 30 December 2014 at 14:06, Carlos Ferreira

Regarding Netmap internal memory allocation.

2014-12-30 Thread Carlos Ferreira
To Luigi and to whom may be able to help Hello all. Is it possible to reduce the size of the memory buffer allocated by the netmap module? I'm asking this because I was implementing some testing code, using NICs and a Tap device in an OpenWRT VM with 64MB of RAM. Because of the small RAM amount,