summaryrefslogtreecommitdiff
path: root/doc/quick-start.html
blob: 85551fa4c508ddbd0ffd4ee31295799015001807 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name=viewport content="width=device-width, initial-scale=1" />
		<title>DPDK doc</title>
		<link rel="stylesheet" href="/reset.css" />
		<link rel="stylesheet" href="/layout.css" />
		<link rel="stylesheet" href="/content.css" />
		<script type="text/javascript">
			var _gaq = _gaq || [];
			_gaq.push(['_setAccount', 'UA-39229303-1']);
			_gaq.push(['_setDomainName', 'dpdk.org']);
			_gaq.push(['_setAllowLinker', true]);
			_gaq.push(['_trackPageview']);
			(function() {
				var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
				ga.src = '//www.google-analytics.com/ga.js';
				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
			})();
		</script>
	</head>
	<body>
		<header>
			<h1><a href="//dpdk.org/"><img src="/logos/dpdk.png"
				alt="DPDK: Data Plane Development Kit"></a></h1>
			<nav>
				<ul>
					<li><a href="/">Home</a></li>
					<li><a href="/download">Download</a></li>
					<li><a href="/doc" id="current">Documentation</a></li>
					<li><a href="/dev">Development</a></li>
					<li><a href="/ml">Mailing Lists</a></li>
					<li><a href="/events">Events</a></li>
					<li><a href="/news">News</a></li>
					<li><a href="/about">About</a></li>
				</ul>
			</nav>
		</header>
		<section>
			<h2>Quick start</h2>
			<p><em>"A simple forwarding test with pcap PMD which works with any NIC (with performance penalties)"</em></p>
			<p>Extract sources.</p>
			<pre>
tar xf dpdk.tar.gz
cd dpdk</pre>
			<p>Enable pcap (libpcap headers are required).</p>
			<pre>
make config T=x86_64-native-linuxapp-gcc
sed -ri 's,(PMD_PCAP=).*,\1y,' build/.config</pre>
			<p>Build libraries and test application (Linux headers may be needed with default config).</p>
			<pre>
make</pre>
			<p>Reserve huge pages memory.</p>
			<pre>
mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge
echo 64 &gt; /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages</pre>
			<p>Run poll-mode driver test (with a cable between ports).</p>
			<pre>
build/app/testpmd -c7 -n3 --vdev=net_pcap0,iface=eth0 --vdev=net_pcap1,iface=eth1 --
                  -i --nb-cores=2 --nb-ports=2 --total-num-mbufs=2048

testpmd&gt; show port stats all

  ######################## NIC statistics for port 0  ########################
  RX-packets: 0          RX-errors: 0         RX-bytes: 0
  TX-packets: 0          TX-errors: 0         TX-bytes: 0
  ############################################################################

  ######################## NIC statistics for port 1  ########################
  RX-packets: 0          RX-errors: 0         RX-bytes: 0
  TX-packets: 0          TX-errors: 0         TX-bytes: 0
  ############################################################################

testpmd&gt; start tx_first

testpmd&gt; stop

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 2377688        RX-dropped: 0             RX-total: 2377688
  TX-packets: 2007009        TX-dropped: 0             TX-total: 2007009
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 2006977        RX-dropped: 0             RX-total: 2006977
  TX-packets: 2377720        TX-dropped: 0             TX-total: 2377720
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 4384665        RX-dropped: 0             RX-total: 4384665
  TX-packets: 4384729        TX-dropped: 0             TX-total: 4384729
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</pre>

			<p>Some sample applications can be tested after building them.</p>
			<pre>
make -C examples RTE_SDK=$(pwd) RTE_TARGET=build O=$(pwd)/build/examples</pre>
		</section>
		<footer></footer>
	</body>
</html>