Projet

Général

Profil

DPDK » Historique » Version 113

Matthieu Herrb, 18/10/2018 16:49
slides snabb ripe77

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 16 Laurent GUERBY
* GIT http://chiliproject.tetaneutral.net/projects/git-tetaneutral-net/repository/dpdk
12 16 Laurent GUERBY
<pre>
13 16 Laurent GUERBY
$ git clone ssh://git@git.tetaneutral.net/dpdk.git
14 16 Laurent GUERBY
</pre>
15 16 Laurent GUERBY
16 17 Laurent GUERBY
* Nerim Antoine https://twitter.com/nerim_net/status/517592380841930752
17 17 Laurent GUERBY
** Du code maison fondé sur #DPDK en prod dans le réseau : première étape vers l'élimination des systèmes propriétaires ?
18 2 Laurent GUERBY
19 108 Laurent GUERBY
* https://fd.io/wp-content/uploads/sites/34/2017/07/FDioVPPwhitepaperJuly2017.pdf
20 108 Laurent GUERBY
** FD.io - Vector Packet Processing One Terabit Software Router
21 108 Laurent GUERBY
22 2 Laurent GUERBY
h2. Misc
23 2 Laurent GUERBY
24 112 Laurent GUERBY
* https://www.linuxjournal.com/content/userspace-networking-dpdk
25 111 Laurent GUERBY
* https://lwn.net/Articles/738912/ Reports from Netconf and Netdev 2017
26 110 Laurent GUERBY
* https://labs.ripe.net/Members/santiago_r_r_/a-software-based-approach-to-identify-heavy-hitters-in-dns-traffic
27 109 Laurent GUERBY
* https://medium.com/netflix-techblog/serving-100-gbps-from-an-open-connect-appliance-cdb51dda3b99
28 104 Laurent GUERBY
* http://lists.ceph.com/pipermail/ceph-users-ceph.com/2017-May/017814.html
29 104 Laurent GUERBY
** processor C-state tuning for ceph
30 103 Laurent GUERBY
* https://www.solid-run.com/marvell-armada-family/armada-8040-community-board/
31 102 Laurent GUERBY
* http://dtrace.org/blogs/rm/2016/09/15/turtles-on-the-wire-understanding-how-the-os-uses-the-modern-nic/
32 97 Laurent GUERBY
* https://fd.io/
33 66 Laurent GUERBY
* http://developerblog.redhat.com/2015/06/02/can-you-run-intels-data-plane-development-kit-dpdk-in-a-docker-container-yep/
34 66 Laurent GUERBY
** DPDK like
35 62 Laurent GUERBY
* http://www.intel.fr/content/dam/www/public/us/en/documents/datasheets/xl710-10-40-controller-datasheet.pdf
36 45 Laurent GUERBY
* http://www.intel.fr/content/dam/www/public/us/en/documents/datasheets/82599-10-gbe-controller-datasheet.pdf
37 45 Laurent GUERBY
* http://www.intel.fr/content/dam/www/public/us/en/documents/datasheets/82598-10-gbe-controller-datasheet.pdf
38 44 Laurent GUERBY
* MoonGen: A Scriptable High-Speed Packet Generator
39 44 Laurent GUERBY
** http://arxiv.org/pdf/1410.3322.pdf
40 44 Laurent GUERBY
** http://www.net.in.tum.de/fileadmin/bibtex/publications/papers/MoonGen_IMC2015.pdf
41 44 Laurent GUERBY
** https://github.com/emmericp/MoonGen
42 26 Laurent GUERBY
* https://www.kernel.org/doc/Documentation/networking/switchdev.txt
43 25 Laurent GUERBY
* https://www.usenix.org/conference/osdi14/technical-sessions/presentation/belay
44 25 Laurent GUERBY
** IX: A Protected Dataplane Operating System for High Throughput and Low Latency
45 25 Laurent GUERBY
** http://www.linuxfoundation.org/images/1/1c/Network_data_flow_through_kernel.png
46 25 Laurent GUERBY
** http://www.linuxfoundation.org/collaborate/workgroups/networking/kernel_flow
47 23 Laurent GUERBY
* https://blog.cloudflare.com/how-to-receive-a-million-packets/
48 23 Laurent GUERBY
** How to receive a million packets per second
49 24 Laurent GUERBY
* https://blog.cloudflare.com/how-to-achieve-low-latency/
50 21 Laurent GUERBY
* http://www.cs.cmu.edu/~dongz/papers/cuckooswitch.pdf
51 22 Laurent GUERBY
** We show that CUCKOOSWITCH can process 92.22 million minimum sized packets per second on a commodity server equipped with eight 10 Gbps Ethernet interfaces while maintaining a forwarding table of one billion forwarding entries.
52 18 Laurent GUERBY
* Improving Linux networking performance https://lwn.net/Articles/629155/
53 18 Laurent GUERBY
** https://www.youtube.com/watch?v=3XG9-X777Jo
54 19 Laurent GUERBY
** http://people.netfilter.org/hawk/presentations/LCA2015/net_stack_challenges_100G_LCA2015.pdf
55 20 Laurent GUERBY
* http://www.bigswitch.com/sites/default/files/presentations/onug-baremetal-2014-final.pdf
56 2 Laurent GUERBY
* Intel PCI id http://www.intel.com/support/network/sb/cs-012904.htm
57 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
58 3 Laurent GUERBY
* Intel Pro/1000 PT vs CT http://hardforum.com/showthread.php?t=1386042
59 4 Laurent GUERBY
* http://images.ncix.com/forumimages/C9864B87-583B-10FB-B0DE80742781CE07.jpg
60 4 Laurent GUERBY
* http://www.intel.com/content/www/us/en/ethernet-controllers/ethernet-controllers.html#s1=all&s2=82572EI&s3=all
61 4 Laurent GUERBY
* http://www.intel.com/content/www/us/en/ethernet-controllers/ethernet-controllers.html#s1=all&s2=82574L&s3=all
62 5 Laurent GUERBY
* https://github.com/Pktgen/Pktgen-DPDK
63 6 Laurent GUERBY
* Evaluating the Suitability of Server Network Cards for Software Routers http://kfall.net/ucbpage/papers/snc.pdf
64 13 Laurent GUERBY
* http://www.intel.fr/content/dam/www/public/us/en/documents/guides/intel-dpdk-sample-applications-user-guide.pdf
65 13 Laurent GUERBY
*  rte_eth_rx_burst
66 13 Laurent GUERBY
** http://dpdk.org/doc/api/rte__ethdev_8h.html#a5ac93faa0f3f69545ca121dcfd9433f5
67 13 Laurent GUERBY
** http://dpdk.info/ml/archives/dev/2014-January/001223.html
68 14 Laurent GUERBY
* http://www.intel.fr/content/dam/www/public/us/en/documents/white-papers/aes-ipsec-performance-linux-paper.pdf
69 15 Laurent GUERBY
* http://networkbuilders.intel.com/docs/Network_Builders_RA_vBRAS_Final.pdf
70 101 Laurent GUERBY
* https://reannz.co.nz/news/ruru-visualise-international-traffic-flows-real-time/
71 15 Laurent GUERBY
* https://github.com/SnabbCo/snabbswitch
72 99 Laurent GUERBY
** https://github.com/snabbco/snabb/
73 99 Laurent GUERBY
** https://lwn.net/Articles/713918/
74 15 Laurent GUERBY
** https://github.com/SnabbCo/snabbswitch/blob/master/src/apps/intel/intel10g.lua
75 15 Laurent GUERBY
** http://blog.ipspace.net/2014/06/snabb-switch-and-nfv-on-openstack-in.html
76 15 Laurent GUERBY
** https://github.com/SnabbCo/snabbswitch/wiki/Snabb-Lab
77 15 Laurent GUERBY
** https://twitter.com/lukego/status/327714050219847680
78 113 Matthieu Herrb
** https://ripe77.ripe.net/presentations/55-ripe77-2018-snabb-open-source-slides.pdf
79 7 Mehdi Abaakouk
80 98 Laurent GUERBY
* http://www.lagopus.org/
81 98 Laurent GUERBY
82 7 Mehdi Abaakouk
h2. Note sileht dpdk:
83 7 Mehdi Abaakouk
84 7 Mehdi Abaakouk
Extract from: http://www.intel.com/content/dam/www/public/us/en/documents/guides/intel-dpdk-getting-started-guide.pdf
85 7 Mehdi Abaakouk
86 7 Mehdi Abaakouk
h3. configuration hugepages: 
87 7 Mehdi Abaakouk
88 7 Mehdi Abaakouk
* 2M (1024*2k): hugepages=1024 (at runtime: echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages)
89 7 Mehdi Abaakouk
* 4G (4x1G): default_hugepagesz=1G hugepagesz=1G hugepages=4 (only works at boot time via grub)
90 7 Mehdi Abaakouk
91 7 Mehdi Abaakouk
<pre>
92 7 Mehdi Abaakouk
mkdir /mnt/huge
93 7 Mehdi Abaakouk
mount -t hugetlbfs nodev /mnt/huge
94 7 Mehdi Abaakouk
</pre>
95 7 Mehdi Abaakouk
96 7 Mehdi Abaakouk
h3. Compile and load modules: 
97 7 Mehdi Abaakouk
98 7 Mehdi Abaakouk
_Note: source tools/setup.sh is a helper tools for this but works only with IGB driver not e1000e_
99 7 Mehdi Abaakouk
100 1 Laurent GUERBY
<pre>
101 8 Mehdi Abaakouk
# apt-get install make gcc linux-headers-amd64
102 8 Mehdi Abaakouk
# make config T=x86_64-default-linuxapp-gcc
103 7 Mehdi Abaakouk
# make T=x86_64-default-linuxapp-gcc
104 7 Mehdi Abaakouk
..
105 7 Mehdi Abaakouk
Build complete
106 7 Mehdi Abaakouk
107 7 Mehdi Abaakouk
# modprobe uio  (I think this is not useful)
108 7 Mehdi Abaakouk
# insmod build/kmod/rte_kni.ko (I think this is not useful)
109 7 Mehdi Abaakouk
# insmod build/kmod/igb_uio.ko (I think this is not useful)
110 7 Mehdi Abaakouk
# ./tools/pci_unbind.py --status
111 7 Mehdi Abaakouk
112 7 Mehdi Abaakouk
Network devices using IGB_UIO driver
113 7 Mehdi Abaakouk
====================================
114 7 Mehdi Abaakouk
<none>
115 7 Mehdi Abaakouk
116 7 Mehdi Abaakouk
Network devices using kernel driver
117 7 Mehdi Abaakouk
===================================
118 9 Mehdi Abaakouk
0000:00:19.0 '82579LM Gigabit Network Connection' if=eth1 drv=e1000e unused=<none>
119 9 Mehdi Abaakouk
0000:01:00.0 '82599EB 10-Gigabit SFI/SFP+ Network Connection' if=eth6 drv=ixgbe unused=igb_uio *Active*
120 9 Mehdi Abaakouk
0000:01:00.1 '82599EB 10-Gigabit SFI/SFP+ Network Connection' if=eth7 drv=ixgbe unused=igb_uio
121 9 Mehdi Abaakouk
0000:04:00.0 '82571EB Gigabit Ethernet Controller' if=eth2 drv=e1000e unused=igb_uio *Active*
122 9 Mehdi Abaakouk
0000:04:00.1 '82571EB Gigabit Ethernet Controller' if=eth3 drv=e1000e unused=igb_uio
123 9 Mehdi Abaakouk
0000:05:00.0 '82571EB Gigabit Ethernet Controller' if=eth4 drv=e1000e unused=igb_uio
124 9 Mehdi Abaakouk
0000:05:00.1 '82571EB Gigabit Ethernet Controller' if=eth5 drv=e1000e unused=igb_uio
125 9 Mehdi Abaakouk
0000:06:00.0 'RTL8111/8168B PCI Express Gigabit Ethernet controller' if=eth0 drv=r8169 unused=<none> *Active*
126 1 Laurent GUERBY
127 1 Laurent GUERBY
Other network devices
128 1 Laurent GUERBY
=====================
129 1 Laurent GUERBY
<none>
130 9 Mehdi Abaakouk
</pre>
131 7 Mehdi Abaakouk
132 9 Mehdi Abaakouk
test sur eth7:
133 9 Mehdi Abaakouk
134 9 Mehdi Abaakouk
<pre>
135 9 Mehdi Abaakouk
# ip link set eth7 down
136 9 Mehdi Abaakouk
# ./tools/pci_unbind.py --bind=igb_uio 0000:01:00.1
137 7 Mehdi Abaakouk
</pre>
138 7 Mehdi Abaakouk
139 7 Mehdi Abaakouk
h3. Prepare examples programs:
140 7 Mehdi Abaakouk
141 7 Mehdi Abaakouk
<pre>
142 7 Mehdi Abaakouk
# export RTE_SDK=/root/sileht/dpdk-1.6.0r1
143 7 Mehdi Abaakouk
# export RTE_TARGET=build
144 7 Mehdi Abaakouk
# cd /root/sileht/
145 7 Mehdi Abaakouk
# cp -r $RTE_SDK/examples/helloworld my_rte_app
146 7 Mehdi Abaakouk
# cd my_rte_app
147 7 Mehdi Abaakouk
# make
148 7 Mehdi Abaakouk
</pre>
149 7 Mehdi Abaakouk
150 7 Mehdi Abaakouk
151 7 Mehdi Abaakouk
h3. Tests
152 7 Mehdi Abaakouk
153 7 Mehdi Abaakouk
<pre>
154 1 Laurent GUERBY
</pre>
155 10 Mehdi Abaakouk
156 105 Laurent GUERBY
h2. Limitation SFP carte intel:
157 10 Mehdi Abaakouk
158 11 Mehdi Abaakouk
Une fois le module igb_uio changé sur les:
159 10 Mehdi Abaakouk
160 10 Mehdi Abaakouk
<pre>
161 10 Mehdi Abaakouk
01:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
162 10 Mehdi Abaakouk
</pre>
163 10 Mehdi Abaakouk
164 11 Mehdi Abaakouk
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:
165 10 Mehdi Abaakouk
166 10 Mehdi Abaakouk
<pre>
167 10 Mehdi Abaakouk
[  563.069683] ixgbe 0000:01:00.0: failed to load because an unsupported SFP+ or QSFP module type was detected.
168 10 Mehdi Abaakouk
[  563.069786] ixgbe 0000:01:00.0: Reload the driver after installing a supported module.
169 10 Mehdi Abaakouk
</pre>
170 10 Mehdi Abaakouk
171 10 Mehdi Abaakouk
Pour contourner le problème:
172 10 Mehdi Abaakouk
173 10 Mehdi Abaakouk
<pre>
174 10 Mehdi Abaakouk
modprobe ixgbe allow_unsupported_sfp=1 # allow_any_sfp=1 suivant le kernel
175 10 Mehdi Abaakouk
</pre>
176 10 Mehdi Abaakouk
177 10 Mehdi Abaakouk
ou 
178 10 Mehdi Abaakouk
179 1 Laurent GUERBY
<pre>
180 1 Laurent GUERBY
echo "options ixgbe allow_unsupported_sfp=1" > /etc/modprobe.d/ixgbe_any_sfp.conf
181 1 Laurent GUERBY
update-initramfs -u -k all
182 11 Mehdi Abaakouk
</pre>
183 11 Mehdi Abaakouk
184 11 Mehdi Abaakouk
La carte fonctionnera à nouveau avec le message suivant:
185 11 Mehdi Abaakouk
186 11 Mehdi Abaakouk
<pre>
187 11 Mehdi Abaakouk
[  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.
188 10 Mehdi Abaakouk
</pre>
189 12 Laurent GUERBY
190 27 Laurent GUERBY
h2. Packet Journey
191 1 Laurent GUERBY
192 27 Laurent GUERBY
https://www.gandi.net/news/en/2015-12-16/6308-packet-journey_a_free_software_router_for_linux_based_on_dpdk/
193 27 Laurent GUERBY
https://github.com/gandi/packet-journey
194 27 Laurent GUERBY
195 27 Laurent GUERBY
h2. Atelier 2016
196 27 Laurent GUERBY
197 55 Laurent GUERBY
h3. Atelier Hardware
198 54 Laurent GUERBY
199 95 Laurent GUERBY
En salle milieu a Myrys.
200 67 Laurent GUERBY
201 67 Laurent GUERBY
http://pad.tetaneutral.net/p/dpdk
202 67 Laurent GUERBY
203 1 Laurent GUERBY
<pre>
204 28 Laurent GUERBY
core i7 2600 @ 3.40GHz
205 31 Laurent GUERBY
 fpu vme de pse tsc msr pae mce cx8 
206 31 Laurent GUERBY
 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 
207 31 Laurent GUERBY
 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl 
208 31 Laurent GUERBY
 xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 
209 31 Laurent GUERBY
 cx16 xtpr pdcm pcid sse4_1 sse4_2 
210 31 Laurent GUERBY
 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
211 28 Laurent GUERBY
16G RAM
212 56 Laurent GUERBY
SSD 250G
213 56 Laurent GUERBY
</pre>
214 56 Laurent GUERBY
215 95 Laurent GUERBY
http://www.intel.fr/content/dam/www/public/us/en/documents/guides/gbe-server-selection-guide.pdf
216 29 Laurent GUERBY
217 60 Laurent GUERBY
<pre>
218 63 Laurent GUERBY
h7   82599ES 8086:10fb 8086:7a11 
219 63 Laurent GUERBY
g1   82599ES (VM maposmatic)
220 60 Laurent GUERBY
g2   X520    8086:154d 8086:7b11
221 60 Laurent GUERBY
g3   82599ES
222 60 Laurent GUERBY
g4   X520 
223 60 Laurent GUERBY
g5   X520
224 60 Laurent GUERBY
g6   X520
225 63 Laurent GUERBY
n7   X520 (VM openstack)
226 60 Laurent GUERBY
g8   X520
227 60 Laurent GUERBY
g9   82598EB 8086:10f1 8086:a21f
228 60 Laurent GUERBY
g10  X520
229 60 Laurent GUERBY
g11  82598EB
230 60 Laurent GUERBY
g12  82598EB
231 1 Laurent GUERBY
stri X520
232 1 Laurent GUERBY
233 1 Laurent GUERBY
t1   82598EB 
234 1 Laurent GUERBY
t2   82598EB 
235 1 Laurent GUERBY
t3   82598EB 
236 1 Laurent GUERBY
237 1 Laurent GUERBY
stock 82598EB
238 1 Laurent GUERBY
stock 82598EB
239 1 Laurent GUERBY
stock X520
240 67 Laurent GUERBY
</pre>
241 67 Laurent GUERBY
242 67 Laurent GUERBY
old obsolete:
243 67 Laurent GUERBY
<pre>
244 67 Laurent GUERBY
host eth DHCP          10G-a                                           10G-b
245 67 Laurent GUERBY
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)
246 67 Laurent GUERBY
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)
247 67 Laurent GUERBY
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)
248 67 Laurent GUERBY
249 67 Laurent GUERBY
1G e1000e
250 67 Laurent GUERBY
t1 00:15:17:a6:cb:19
251 67 Laurent GUERBY
t3 00:15:17:16:bd:de
252 60 Laurent GUERBY
</pre>
253 60 Laurent GUERBY
254 55 Laurent GUERBY
h3. Atelier Liens
255 54 Laurent GUERBY
256 33 Laurent GUERBY
https://github.com/Gandi/packet-journey
257 30 Laurent GUERBY
http://dpdk.org/doc/guides/linux_gsg/build_dpdk.html
258 40 Laurent GUERBY
http://dpdk.org/doc/quick-start
259 50 Laurent GUERBY
http://dpdk.org/browse/apps/pktgen-dpdk/tree/README.md
260 1 Laurent GUERBY
http://dpdk.org/doc/guides/testpmd_app_ug/index.html
261 47 Laurent GUERBY
http://dpdk.readthedocs.org/en/v2.2.0/
262 54 Laurent GUERBY
https://github.com/emmericp/MoonGen
263 29 Laurent GUERBY
http://www.slideshare.net/movilforum/7-hands-on
264 33 Laurent GUERBY
http://p4.org/wp-content/uploads/2015/11/Princeton-Demo-Poster.pdf
265 59 Laurent GUERBY
http://dpdk.org/ml/archives/users/
266 59 Laurent GUERBY
http://dpdk.org/ml/archives/dev/
267 59 Laurent GUERBY
http://openvswitch.org/support/ovscon2015/
268 64 Laurent GUERBY
https://events.ccc.de/congress/2015/Fahrplan/events/7523.html lecture: DDoS mitigation EPIC FAIL collection
269 65 Laurent GUERBY
https://github.com/aragua/libpacket
270 96 Laurent GUERBY
https://github.com/groud/dpdkcap
271 96 Laurent GUERBY
272 54 Laurent GUERBY
h3. Atelier Issues
273 1 Laurent GUERBY
274 1 Laurent GUERBY
* Issues opened
275 33 Laurent GUERBY
** https://github.com/Gandi/packet-journey/issues/20 
276 1 Laurent GUERBY
** https://github.com/pktgen/Pktgen-DPDK/issues/52
277 1 Laurent GUERBY
** https://github.com/emmericp/MoonGen/issues/106
278 58 Laurent GUERBY
** http://dpdk.org/ml/archives/dev/2015-December/030798.html
279 1 Laurent GUERBY
** http://dpdk.org/ml/archives/dev/2016-April/037331.html
280 106 Laurent GUERBY
** https://github.com/Gandi/packet-journey/pull/36
281 106 Laurent GUERBY
** https://github.com/Gandi/packet-journey/pull/38
282 106 Laurent GUERBY
283 1 Laurent GUERBY
284 54 Laurent GUERBY
h3. Atelier Build
285 54 Laurent GUERBY
286 92 Laurent GUERBY
http://pad.tetaneutral.net/p/dpdk
287 92 Laurent GUERBY
288 1 Laurent GUERBY
<pre>
289 91 Laurent GUERBY
# From debian jessie basic install
290 91 Laurent GUERBY
291 87 Laurent GUERBY
# Packages
292 87 Laurent GUERBY
293 79 Laurent GUERBY
apt-get -y build-dep linux-image-amd64
294 80 Laurent GUERBY
apt-get -y install linux-headers-$(uname -r)
295 1 Laurent GUERBY
apt-get -y install git linux-tools emacs-nox libpcap-dev tcpdump iperf iperf3 screen rsync socat bzip2 xz-utils cmake python-sphinx tcpdump
296 54 Laurent GUERBY
297 87 Laurent GUERBY
# huge pages, dans /etc/rc.local par exemple
298 87 Laurent GUERBY
299 1 Laurent GUERBY
modprobe uio_pci_generic
300 29 Laurent GUERBY
mkdir -p /mnt/huge
301 1 Laurent GUERBY
mount -t hugetlbfs nodev /mnt/huge
302 91 Laurent GUERBY
# or GRUB_CMDLINE_LINUX="default_hugepagesz=1G hugepagesz=1G hugepages=4" :
303 1 Laurent GUERBY
echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
304 49 Laurent GUERBY
305 54 Laurent GUERBY
# Sources
306 54 Laurent GUERBY
307 1 Laurent GUERBY
mkdir ftp
308 1 Laurent GUERBY
cd ftp
309 1 Laurent GUERBY
wget http://dpdk.org/browse/dpdk/snapshot/dpdk-2.2.0.tar.gz
310 78 Laurent GUERBY
wget http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-2.9.12.tar.gz
311 78 Laurent GUERBY
312 1 Laurent GUERBY
cd ..
313 61 Laurent GUERBY
git clone https://github.com/Gandi/packet-journey.git
314 61 Laurent GUERBY
git clone http://dpdk.org/git/apps/pktgen-dpdk
315 61 Laurent GUERBY
git clone http://dpdk.org/git/dpdk-stable
316 61 Laurent GUERBY
git clone https://github.com/emmericp/MoonGen.git
317 1 Laurent GUERBY
318 52 Laurent GUERBY
319 91 Laurent GUERBY
# Build DPDK
320 1 Laurent GUERBY
321 88 Laurent GUERBY
tar xf ftp/dpdk-2.2.0.tar.gz
322 30 Laurent GUERBY
cd dpdk-2.2.0
323 1 Laurent GUERBY
make config T=x86_64-native-linuxapp-gcc
324 94 Laurent GUERBY
make install T=x86_64-native-linuxapp-gcc  # about 2mn40s on core i7 2.6 GHz, 4m35s on Celeron 3205U 1.5 GHz
325 76 Laurent GUERBY
export RTE_SDK=/root/dpdk-2.2.0
326 38 Laurent GUERBY
export RTE_TARGET=x86_64-native-linuxapp-gcc
327 77 Laurent GUERBY
/root/dpdk-2.2.0/tools/dpdk_nic_bind.py -s
328 77 Laurent GUERBY
/root/dpdk-2.2.0/tools/dpdk_nic_bind.py --bind=uio_pci_generic 0000:01:00.0
329 77 Laurent GUERBY
/root/dpdk-2.2.0/tools/dpdk_nic_bind.py --bind=uio_pci_generic 0000:01:00.1
330 90 Laurent GUERBY
/root/dpdk-2.2.0/x86_64-native-linuxapp-gcc/app/testpmd -c 7 -n 2 -- -i
331 1 Laurent GUERBY
332 1 Laurent GUERBY
# http://www.intel.fr/content/dam/www/public/us/en/documents/guides/dpdk-testpmd-application-user-guide.pdf
333 1 Laurent GUERBY
334 91 Laurent GUERBY
# Build pktgen (2.9.13+ doesn't compile)
335 91 Laurent GUERBY
336 78 Laurent GUERBY
cd ..
337 78 Laurent GUERBY
tar xf ftp/pktgen-2.9.12.tar.gz
338 78 Laurent GUERBY
cd pktgen-2.9.12
339 83 Laurent GUERBY
make # about 24s
340 84 Laurent GUERBY
./app/app/x86_64-native-linuxapp-gcc/pktgen -c 7 -n 2   --proc-type auto -- -P  -N -m '1.0,2.1'
341 85 Laurent GUERBY
# save toto, edit toto and change both dst.mac start N xxxx and add start 0 and start 1 at the end of the file
342 1 Laurent GUERBY
./app/app/x86_64-native-linuxapp-gcc/pktgen -c 7 -n 2   --proc-type auto -- -P  -N -m '1.0,2.1' -f toto
343 1 Laurent GUERBY
344 91 Laurent GUERBY
# Build MoonGen
345 91 Laurent GUERBY
346 86 Laurent GUERBY
cd ..
347 86 Laurent GUERBY
cd MoonGen
348 86 Laurent GUERBY
git submodule update --init
349 86 Laurent GUERBY
./build.sh # about 42 seconds
350 1 Laurent GUERBY
./build/MoonGen ./examples/benchmark/udp-throughput.lua 1:1
351 1 Laurent GUERBY
352 91 Laurent GUERBY
# TODO
353 91 Laurent GUERBY
354 78 Laurent GUERBY
cd ../packet-journey
355 78 Laurent GUERBY
make
356 1 Laurent GUERBY
357 33 Laurent GUERBY
cd ../pktgen-dpdk
358 41 Laurent GUERBY
make
359 41 Laurent GUERBY
cd docs
360 41 Laurent GUERBY
make html
361 29 Laurent GUERBY
</pre>
362 100 Matthieu Herrb
363 100 Matthieu Herrb
Patch pour packet journey sur dpdk 16.11: https://github.com/Gandi/packet-journey/pull/36