Projet

Général

Profil

DPDK » Historique » Version 8

Mehdi Abaakouk, 02/05/2014 16:45

1 1 Laurent GUERBY
{{>toc}}
2 1 Laurent GUERBY
3 1 Laurent GUERBY
h1. DPDK
4 1 Laurent GUERBY
5 1 Laurent GUERBY
Traitement haute performance en logiciel, 10 Gbit/s en petit paquets line rate
6 1 Laurent GUERBY
7 1 Laurent GUERBY
h2. Liens
8 1 Laurent GUERBY
9 1 Laurent GUERBY
* http://dpdk.org
10 1 Laurent GUERBY
* [[AtelierPPS2012]]
11 2 Laurent GUERBY
12 2 Laurent GUERBY
h2. Misc
13 2 Laurent GUERBY
14 2 Laurent GUERBY
* Intel PCI id http://www.intel.com/support/network/sb/cs-012904.htm
15 3 Laurent GUERBY
* http://www.intel.com/content/www/us/en/ethernet-controllers/ethernet-products.html?iid=embed_portal+hdprod_ethernet#s1=Gigabit%20Ethernet&s2=all&s3=all
16 3 Laurent GUERBY
* Intel Pro/1000 PT vs CT http://hardforum.com/showthread.php?t=1386042
17 4 Laurent GUERBY
* http://images.ncix.com/forumimages/C9864B87-583B-10FB-B0DE80742781CE07.jpg
18 4 Laurent GUERBY
* http://www.intel.com/content/www/us/en/ethernet-controllers/ethernet-controllers.html#s1=all&s2=82572EI&s3=all
19 4 Laurent GUERBY
* http://www.intel.com/content/www/us/en/ethernet-controllers/ethernet-controllers.html#s1=all&s2=82574L&s3=all
20 5 Laurent GUERBY
* https://github.com/Pktgen/Pktgen-DPDK
21 6 Laurent GUERBY
* Evaluating the Suitability of Server Network Cards for Software Routers http://kfall.net/ucbpage/papers/snc.pdf
22 7 Mehdi Abaakouk
23 7 Mehdi Abaakouk
24 7 Mehdi Abaakouk
h2. Note sileht dpdk:
25 7 Mehdi Abaakouk
26 7 Mehdi Abaakouk
Extract from: http://www.intel.com/content/dam/www/public/us/en/documents/guides/intel-dpdk-getting-started-guide.pdf
27 7 Mehdi Abaakouk
28 7 Mehdi Abaakouk
h3. configuration hugepages: 
29 7 Mehdi Abaakouk
30 7 Mehdi Abaakouk
* 2M (1024*2k): hugepages=1024 (at runtime: echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages)
31 7 Mehdi Abaakouk
* 4G (4x1G): default_hugepagesz=1G hugepagesz=1G hugepages=4 (only works at boot time via grub)
32 7 Mehdi Abaakouk
33 7 Mehdi Abaakouk
<pre>
34 7 Mehdi Abaakouk
mkdir /mnt/huge
35 7 Mehdi Abaakouk
mount -t hugetlbfs nodev /mnt/huge
36 7 Mehdi Abaakouk
</pre>
37 7 Mehdi Abaakouk
38 7 Mehdi Abaakouk
h3. Compile and load modules: 
39 7 Mehdi Abaakouk
40 7 Mehdi Abaakouk
_Note: source tools/setup.sh is a helper tools for this but works only with IGB driver not e1000e_
41 7 Mehdi Abaakouk
42 1 Laurent GUERBY
<pre>
43 8 Mehdi Abaakouk
# apt-get install make gcc linux-headers-amd64
44 8 Mehdi Abaakouk
# make config T=x86_64-default-linuxapp-gcc
45 7 Mehdi Abaakouk
# make T=x86_64-default-linuxapp-gcc
46 7 Mehdi Abaakouk
..
47 7 Mehdi Abaakouk
Build complete
48 7 Mehdi Abaakouk
49 7 Mehdi Abaakouk
# modprobe uio  (I think this is not useful)
50 7 Mehdi Abaakouk
# insmod build/kmod/rte_kni.ko (I think this is not useful)
51 7 Mehdi Abaakouk
# insmod build/kmod/igb_uio.ko (I think this is not useful)
52 7 Mehdi Abaakouk
# ./tools/pci_unbind.py --status
53 7 Mehdi Abaakouk
54 7 Mehdi Abaakouk
Network devices using IGB_UIO driver
55 7 Mehdi Abaakouk
====================================
56 7 Mehdi Abaakouk
<none>
57 7 Mehdi Abaakouk
58 7 Mehdi Abaakouk
Network devices using kernel driver
59 7 Mehdi Abaakouk
===================================
60 7 Mehdi Abaakouk
0000:00:19.0 'Ethernet Connection I217-LM' if=eth1 drv=e1000e unused=<none> *Active*
61 7 Mehdi Abaakouk
0000:04:00.0 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller' if=eth0 drv=r8169 unused=<none> 
62 7 Mehdi Abaakouk
63 7 Mehdi Abaakouk
Other network devices
64 7 Mehdi Abaakouk
=====================
65 7 Mehdi Abaakouk
<none>
66 7 Mehdi Abaakouk
67 7 Mehdi Abaakouk
# ip link set eth1 down
68 7 Mehdi Abaakouk
# lspci|grep -i 'Ethernet.*Intel'
69 7 Mehdi Abaakouk
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-LM (rev 05)
70 7 Mehdi Abaakouk
# ./tools/pci_unbind.py --bind=e1000e 00:19.0
71 7 Mehdi Abaakouk
</pre>
72 7 Mehdi Abaakouk
73 7 Mehdi Abaakouk
h3. Prepare examples programs:
74 7 Mehdi Abaakouk
75 7 Mehdi Abaakouk
<pre>
76 7 Mehdi Abaakouk
# export RTE_SDK=/root/sileht/dpdk-1.6.0r1
77 7 Mehdi Abaakouk
# export RTE_TARGET=build
78 7 Mehdi Abaakouk
# cd /root/sileht/
79 7 Mehdi Abaakouk
# cp -r $RTE_SDK/examples/helloworld my_rte_app
80 7 Mehdi Abaakouk
# cd my_rte_app
81 7 Mehdi Abaakouk
# make
82 7 Mehdi Abaakouk
</pre>
83 7 Mehdi Abaakouk
84 7 Mehdi Abaakouk
85 7 Mehdi Abaakouk
h3. Tests
86 7 Mehdi Abaakouk
87 7 Mehdi Abaakouk
<pre>
88 7 Mehdi Abaakouk
</pre>