LWN.net Logo

Netmap for Linux

Netmap is a framework for packet generation and capture from user space; it claims to be efficient to a point where it can saturate a 10Gb line with minimal system load. It is available under the BSD license. A version for Linux is now available alongside the FreeBSD port. "This is a preliminary version supporting the ixgbe and e1000/e1000e driver. Patches for other devices (igb, r8169, forcedeth) are untested and probably not working yet. Netmap relies on a kernel module (netmap_lin.ko) and slightly modified device drivers. Userspace programs can use the native API (documented in netmap.4) or a libpcap emulation library."
(Log in to post comments)

Netmap for Linux

Posted Mar 3, 2012 11:45 UTC (Sat) by ajb (subscriber, #9694) [Link]

Sounds like a duplication of PF_RING, no?

Netmap for Linux

Posted Mar 12, 2012 7:58 UTC (Mon) by lrizzo (guest, #83442) [Link]

netmap is completely different from PF_RING/PF_PACKET. The only common part is that they all use memory mapped buffers, but in addition to that, netmap uses many additional techniques (preallocation of buffers, getting rid of skbufs, much leaner inner loops in device drivers) to get a ten-fold speedup compared to PF_RING/PF_PACKET on the same hardware.
In terms of performance only PF_RING/DNA matches netmap, but at the price of unprotected access to the card (userspace directly plays with the NIC registers) and device-specific libraries.

Netmap for Linux

Posted Mar 11, 2013 12:36 UTC (Mon) by ashokar (guest, #89812) [Link]

Does ping-pong in pkt-gen.c example code work in linux environment?
Ref: http://info.iet.unipi.it/~luigi/doc/20120813-netmap.tgz

I am trying to measure the netmap performance by having the interace
doing both tx and rx. I thought ping-pong test will help. Unfortunately,
that doesn't work in linux environment. Btw, I am using Ubuntu 12.4 LTS.
Is there any latest netmap code for linux?

Netmap for Linux

Posted Mar 19, 2013 13:59 UTC (Tue) by tahir (guest, #89931) [Link]

Dear Ashokar,

I am also using Ubuntu 12.4 LTS with linux kernel version 3.2.0-32.51. I wrote some sample programs for testing the transmission and Receiving of packets. Although, my transmit function works fine, there are few problems with Rx function. On debugging, I found that issue lies withing netmap code (not my example code).

I think that your ping pong does not work because of the same problem (However, it is just a guess). I might be able to help you, if you can send me the details of problem.

Regards
Tahir Rauf

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds