|
|
Subscribe / Log in / New account

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."

to post comments

Netmap for Linux

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

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] (5 responses)

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] (4 responses)

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

Netmap for Linux

Posted Jul 29, 2013 2:17 UTC (Mon) by els.a2013 (guest, #92123) [Link]

Hello, tahir.

I have the same problem when I'm trying to use pkt-gen as ping-pong test. Could you give me an advice what I should do to fix that problem?

I use Ubuntu 13.04 with 3.8.0 kernel

Regards
els.a2013

Netmap for Linux

Posted Mar 19, 2014 10:21 UTC (Wed) by matirahman (guest, #96058) [Link] (1 responses)

i am using netmap i am trying to run pcktgen program but i am getting this error "uable to register device"

can anyone help ?????

Netmap for Linux

Posted Jul 22, 2014 13:31 UTC (Tue) by emily (guest, #97984) [Link]

have a try

#ifconfig eth0 up //eth0 is your interface

Netmap for Linux

Posted Jul 2, 2014 7:07 UTC (Wed) by Sanuri (guest, #97701) [Link]

Hi Tahir,
I'm currently doing a research and need to use netmap in it. Unfortunately I am not a network student. So I am having difficulties in getting started.I am working on Ubuntu 12.04 LTS. And my wired NIC is
"Atheros AR8151 PCI-E Gigabit Ethernet Controller (NDIS 6.20)".
Wireless: "Atheros AR9002WB-1NG Wireless Network Adapter".

1.) Can netmap be used with my NIC (I didn't see it in the list tho :( )?
2.) Can it be used with wireless network? (Because I was trying to set up Intel DPDK before and found out that it only supports wired network. And it didn't have support for my NIC and that's how ended up here.)
3.) Could you please help me to set up netmap on my machine?

Netmap for Linux

Posted Aug 10, 2013 17:15 UTC (Sat) by benz (guest, #92303) [Link] (1 responses)

I found a problem when using netmap on linux kernel. When using netmap API to forward packets across kernel stack, if your nic open 'tx checksum offload', you could not create your TCP connection. This is because in 'netmap_sync_from_host', it do anything to sk_buff unless lieanr copy. Clearly it is not enough. What you should do is turn off the offload or else change the source code.

To turn off the offload, you should do
#ethtool -k port$
to check the port offload property.
#ethtool -K port$ tx
to turn off tx checksum offload

If you want to change the source code, you should leave a message for me, and i will send the patch to you.

Netmap for Linux

Posted Aug 10, 2013 17:20 UTC (Sat) by benz (guest, #92303) [Link]

I am sorry, It is 'netmap_start' not 'netmap_sync_from_host'

Netmap/VALE: how to bridge 2 eth?

Posted May 6, 2014 12:34 UTC (Tue) by upyzl (guest, #96973) [Link] (1 responses)

hi all

I now have 3 VMs on VMware vSphere
2 act as host
other 1 act as switch
all are ubuntu 12.04.4 x64

topo:
[host1] eth0 ----- eth0 [switch] eth1 ----- eth0 [host2]

switch eth0 & eth1: e1000 driver, iface inet "manual"
different VLAN ID, Promiscuous Mode on

I use 3.4.88 kernel and compiled kernel & netmap OK(netmap_lin.ko & patched e1000.ko)

after replace netmap's .ko(as README in netmap/LINUX)
I use
./vale-ctl -h vale0:eth0
./vale-ctl -h vale0:eth1
to bridge switch eth0 & eth1 for host1 ping to host2, but pinging get "Destination Host Unreachable"
deattached and use
./bridge -i netmap:eth0 -i netmap:eth1
is the same

please how to fix the issue act netmap as
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1
ifconfig br0 up
?
(if use brctl, pinging works fine)

Netmap/VALE: how to bridge 2 eth?

Posted May 19, 2014 12:51 UTC (Mon) by zays (guest, #97142) [Link]

I have a similar problem too...

Netmap for Linux

Posted Jul 22, 2014 13:26 UTC (Tue) by emily (guest, #97984) [Link]

hi,experts

Recently, I'm learning to use netmap API on the foundation of libpcap.
Now ,I had downloaded netmap.tar and libpcap-1.6.0.tar

I am having difficulties in getting started.

1) how to bulid the netmap with libpcap
2)and then hwo to test it ,could you give some examples.

3) Could you please help me to set up netmap on my machine?


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