Projet

Général

Profil

DPDK » Historique » Version 30

« Précédent - Version 30/113 (diff) - Suivant » - Version actuelle
Laurent GUERBY, 23/12/2015 19:29


DPDK

Traitement haute performance en logiciel, 10 Gbit/s en petit paquets line rate

Liens

Misc

Note sileht dpdk:

Extract from: http://www.intel.com/content/dam/www/public/us/en/documents/guides/intel-dpdk-getting-started-guide.pdf

configuration hugepages:

  • 2M (1024*2k): hugepages=1024 (at runtime: echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages)
  • 4G (4x1G): default_hugepagesz=1G hugepagesz=1G hugepages=4 (only works at boot time via grub)
mkdir /mnt/huge
mount -t hugetlbfs nodev /mnt/huge

Compile and load modules:

Note: source tools/setup.sh is a helper tools for this but works only with IGB driver not e1000e

# apt-get install make gcc linux-headers-amd64
# make config T=x86_64-default-linuxapp-gcc
# make T=x86_64-default-linuxapp-gcc
..
Build complete

# modprobe uio  (I think this is not useful)
# insmod build/kmod/rte_kni.ko (I think this is not useful)
# insmod build/kmod/igb_uio.ko (I think this is not useful)
# ./tools/pci_unbind.py --status

Network devices using IGB_UIO driver
====================================
<none>

Network devices using kernel driver
===================================
0000:00:19.0 '82579LM Gigabit Network Connection' if=eth1 drv=e1000e unused=<none>
0000:01:00.0 '82599EB 10-Gigabit SFI/SFP+ Network Connection' if=eth6 drv=ixgbe unused=igb_uio *Active*
0000:01:00.1 '82599EB 10-Gigabit SFI/SFP+ Network Connection' if=eth7 drv=ixgbe unused=igb_uio
0000:04:00.0 '82571EB Gigabit Ethernet Controller' if=eth2 drv=e1000e unused=igb_uio *Active*
0000:04:00.1 '82571EB Gigabit Ethernet Controller' if=eth3 drv=e1000e unused=igb_uio
0000:05:00.0 '82571EB Gigabit Ethernet Controller' if=eth4 drv=e1000e unused=igb_uio
0000:05:00.1 '82571EB Gigabit Ethernet Controller' if=eth5 drv=e1000e unused=igb_uio
0000:06:00.0 'RTL8111/8168B PCI Express Gigabit Ethernet controller' if=eth0 drv=r8169 unused=<none> *Active*

Other network devices
=====================
<none>

test sur eth7:

# ip link set eth7 down
# ./tools/pci_unbind.py --bind=igb_uio 0000:01:00.1

Prepare examples programs:

# export RTE_SDK=/root/sileht/dpdk-1.6.0r1
# export RTE_TARGET=build
# cd /root/sileht/
# cp -r $RTE_SDK/examples/helloworld my_rte_app
# cd my_rte_app
# make

Tests



	

Limitation SPF carte intel:

Une fois le module igb_uio changé sur les:

01:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)

Un flags de l'eeprom change et le module ixgbe ne charge plus les ports de la carte qui n'ont pas des SFP+ intel avec le message d'erreur suivant:

[  563.069683] ixgbe 0000:01:00.0: failed to load because an unsupported SFP+ or QSFP module type was detected.
[  563.069786] ixgbe 0000:01:00.0: Reload the driver after installing a supported module.

Pour contourner le problème:

modprobe ixgbe allow_unsupported_sfp=1 # allow_any_sfp=1 suivant le kernel

ou

echo "options ixgbe allow_unsupported_sfp=1" > /etc/modprobe.d/ixgbe_any_sfp.conf
update-initramfs -u -k all

La carte fonctionnera à nouveau avec le message suivant:

[  908.361767] ixgbe 0000:01:00.0 (unregistered net_device): WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics.  Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter.  Intel Corporation is not responsible for any harm caused by using untested modules.

Packet Journey

https://www.gandi.net/news/en/2015-12-16/6308-packet-journey_a_free_software_router_for_linux_based_on_dpdk/
https://github.com/gandi/packet-journey

Atelier 2016

core i7 2600 @ 3.40GHz
16G RAM
SSD 250G
host eth DHCP          10G-a                                           10G-b
t1   54:04:a6:ef:a8:c7 00:1b:21:d9:28:55 fe80::21b:21ff:fed9:2855(t2b) 00:1b:21:d9:28:54 fe80::21b:21ff:fed9:2854(t3b)
t2   e0:69:95:2e:e6:a2 00:1b:21:d9:1a:e1 fe80::21b:21ff:fed9:1ae1(t3a) 00:1b:21:d9:1a:e0 fe80::21b:21ff:fed9:1ae0(t1a)
t3   bc:ae:c5:e1:b2:6d 00:1b:21:d9:df:3d fe80::21b:21ff:fed9:df3d(t2a) 00:1b:21:d9:df:3c fe80::21b:21ff:fed9:df3c(t1b)

http://dpdk.org/doc/guides/linux_gsg/build_dpdk.html

modprobe uio_pci_generic
wget http://dpdk.org/browse/dpdk/snapshot/dpdk-2.2.0.tar.gz
git clone https://github.com/Gandi/packet-journey.git
git clone http://dpdk.org/git/apps/pktgen-dpdk
git clone http://dpdk.org/git/dpdk-stable
tar xf dpdk-2.2.0.tar.gz
cd dpdk-2.2.0
make config T=x86_64-native-linuxapp-gcc
make install T=x86_64-native-linuxapp-gcc