examples/netmap_compat: import netmap compatibility example
authorBruce Richardson <bruce.richardson@intel.com>
Tue, 11 Feb 2014 13:47:39 +0000 (13:47 +0000)
committerDavid Marchand <david.marchand@6wind.com>
Wed, 26 Feb 2014 09:47:59 +0000 (10:47 +0100)
commit06371afe394d465e588392c045dd2be74b7cc2ac
treec5fff2bf6263896c745c2e7a5fbd01f09878bbda
parent6aa497249172337378cfb6de616b1dfc63636379
examples/netmap_compat: import netmap compatibility example

This provides a sample application and library showing how to use the
Intel(R) DPDK with basic netmap applications.

The Netmap compatibility library provides a minimal set of APIs to give the ability to
programs written against the Netmap APIs to be run with minimal changes to their
source code, using the Intel® DPDK to perform the actual packet I/O.
Since Netmap applications use regular system calls, like open(), ioctl() and
mmap() to communicate with the Netmap kernel module performing the packet I/O,
the compat_netmap library provides a set of similar APIs to use in place of those
system calls, effectively turning a Netmap application into a Intel(R) DPDK one.
The provided library is currently minimal and doesn’t support all the features that
Netmap supports, but is enough to run simple applications, such as the
bridge example included.

The application requires a single command line option:
 -i INTERFACE is the number of a valid Intel(R) DPDK port to use.
If a single -i parameter is given, the interface will send back all the traffic it
receives. If two -i parameters are given, the two interfaces form a bridge, where
traffic received on one interface is replicated and sent by the other interface.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
examples/netmap_compat/Makefile [new file with mode: 0644]
examples/netmap_compat/bridge/Makefile [new file with mode: 0644]
examples/netmap_compat/bridge/bridge.c [new file with mode: 0644]
examples/netmap_compat/lib/compat_netmap.c [new file with mode: 0644]
examples/netmap_compat/lib/compat_netmap.h [new file with mode: 0644]
examples/netmap_compat/netmap/netmap.h [new file with mode: 0644]
examples/netmap_compat/netmap/netmap_user.h [new file with mode: 0644]