-
Notifications
You must be signed in to change notification settings - Fork 66
Documents
NUSE can choose variety of underlying network interface, called virtual interface (vif), to communicate with the other nodes/processes.
By default, a raw socket (AF_PACKET) is used for vif. You need a root privilege with this vif.
sudo NUSECONF=nuse.conf ./nuse ping www.google.com
You need to build dpdk sdk first.
make dpdk-sdk ARCH=lib DPDK=yes
then build with the SDK for DPDK channel of NUSE.
make defconfig ARCH=lib
make library ARCH=lib OPT=no DPDK=yes
Additional DPDK configuration is needed, hugepage setup, make an interface DPDK mode.
./dpdk/tools/setup.sh
sudo insmod dpdk/build/kmod/igb_uio.ko
sudo ./dpdk/tools/dpdk_nic_bind.py -b igb_uio 0000:02:01.0
If you want to use nuse with dpdk, interface names of dpdk on nuse.conf must follow the dpdk%d format. The digit X of dpdkX indicates the dpdk port number. An example is shown below.
nuse1:net-next-nuse % cat nuse-dpdk.conf
interface dpdk0
address 172.16.0.1
netmask 255.255.255.0
macaddr 00:01:01:01:01:01
viftype DPDK
interface dpdk1
address 172.16.1.1
netmask 255.255.255.0
macaddr 00:01:01:01:01:02
viftype DPDK
nuse1:net-next-nuse % ./dpdk/tools/dpdk_nic_bind.py --status
Network devices using DPDK-compatible driver
============================================
0000:0a:00.0 'Ethernet 10G 2P X520 Adapter' drv=igb_uio unused=
0000:0a:00.1 'Ethernet 10G 2P X520 Adapter' drv=igb_uio unused=
~ snip ~
This set up means "use PCI 0000:0a:00.0 as dpdk0 and PCI 0000:0a:00.1 as dpdk1".
for a build with netmap,
make library ARCH=lib OPT=no NETMAP=yes
when viftype is PIPE, pipepath attribute must be specified. PIPE vif creates named pipe, and host stack applications can communicate with nuse processes through the FIFO pipe. When a nuse process sends a packet via a PIPE vif, a host stack application can receive the packet from the pipe using read system call, and the application can send packets using write system call.
# viftype PIPE example
interface pipe0
address 192.168.0.11
netmask 255.255.255.0
macaddr 00:01:01:01:01:11
viftype PIPE
pipepath /tmp/nuse-1-pipe0
(to be added)