NameDateSize

..13-Mar-2018256

.gitignoreH A D13-Mar-20181.3 KiB

.gitreviewH A D13-Mar-201854

build-data/H13-Mar-201859

build-root/H13-Mar-2018199

doxygen/H13-Mar-2018285

dpdk/H13-Mar-2018110

extras/H13-Mar-201860

gmod/H13-Mar-201857

LICENSEH A D13-Mar-201811.1 KiB

MAINTAINERSH A D13-Mar-20183.2 KiB

MakefileH A D13-Mar-201815 KiB

odp/H13-Mar-201839

README.mdH A D13-Mar-20183.8 KiB

README.vppodpH A D13-Mar-201810 KiB

RELEASE.mdH A D13-Mar-201813.1 KiB

src/H13-Mar-20184 KiB

test/H13-Mar-20184 KiB

README.md

1Vector Packet Processing
2========================
3
4## Introduction
5
6The VPP platform is an extensible framework that provides out-of-the-box
7production quality switch/router functionality. It is the open source version
8of Cisco's Vector Packet Processing (VPP) technology: a high performance,
9packet-processing stack that can run on commodity CPUs.
10
11The benefits of this implementation of VPP are its high performance, proven
12technology, its modularity and flexibility, and rich feature set.
13
14For more information on VPP and its features please visit the
15[FD.io website](http://fd.io/) and
16[What is VPP?](https://wiki.fd.io/view/VPP/What_is_VPP%3F) pages.
17
18
19## Changes
20
21Details of the changes leading up to this version of VPP can be found under
22@ref release_notes.
23
24
25## Directory layout
26
27Directory name         | Description
28---------------------- | -------------------------------------------
29     build-data        | Build metadata
30     build-root        | Build output directory
31     doxygen           | Documentation generator configuration
32     dpdk              | DPDK patches and build infrastructure
33@ref src               | VPP source code
34@ref src/plugins       | VPP bundled plugins directory
35@ref src/svm           | Shared virtual memory allocation library
36     src/tests         | Unit tests
37     src/vat           | VPP API test program
38@ref src/vlib          | VPP application library
39@ref src/vlibapi       | VPP API library
40@ref src/vlibmemory    | VPP Memory management
41@ref src/vlibsocket    | VPP Socket I/O
42@ref src/vnet          | VPP networking
43@ref src/vpp           | VPP application
44@ref src/vpp-api       | VPP application API bindings
45@ref src/vppinfra      | VPP core library
46     test              | Unit tests
47@ref src/vpp/api       | Not-yet-relocated API bindings
48@ref src/examples      | VPP example code
49
50## Getting started
51
52In general anyone interested in building, developing or running VPP should
53consult the [VPP wiki](https://wiki.fd.io/view/VPP) for more complete
54documentation.
55
56In particular, readers are recommended to take a look at [Pulling, Building,
57Running, Hacking, Pushing](https://wiki.fd.io/view/VPP/Pulling,_Building,_Run
58ning,_Hacking_and_Pushing_VPP_Code) which provides extensive step-by-step
59coverage of the topic.
60
61For the impatient, some salient information is distilled below.
62
63
64### Quick-start: On an existing Linux host
65
66To install system dependencies, build VPP and then install it, simply run the
67build script. This should be performed a non-privileged user with `sudo`
68access from the project base directory:
69
70    ./extras/vagrant/build.sh
71
72If you want a more fine-grained approach because you intend to do some
73development work, the `Makefile` in the root directory of the source tree
74provides several convenience shortcuts as `make` targets that may be of
75interest. To see the available targets run:
76
77    make
78
79
80### Quick-start: Vagrant
81
82The directory `extras/vagrant` contains a `VagrantFile` and supporting
83scripts to bootstrap a working VPP inside a Vagrant-managed Virtual Machine.
84This VM can then be used to test concepts with VPP or as a development
85platform to extend VPP. Some obvious caveats apply when using a VM for VPP
86since its performance will never match that of bare metal; if your work is
87timing or performance sensitive, consider using bare metal in addition or
88instead of the VM.
89
90For this to work you will need a working installation of Vagrant. Instructions
91for this can be found [on the Setting up Vagrant wiki page]
92(https://wiki.fd.io/view/DEV/Setting_Up_Vagrant).
93
94
95## More information
96
97Several modules provide documentation, see @subpage user_doc for more
98information.
99
100Visit the [VPP wiki](https://wiki.fd.io/view/VPP) for details on more
101advanced building strategies and development notes.
102
103
104## Test Framework
105
106There is PyDoc generated documentation available for the VPP test framework. See @subpage test_framework_doc for details.
107

README.vppodp

1
2##odp4vpp:
3
4#Introduction:
5--------------
6odp4vpp project aims to provide VPP with an additional vnet device based on OpenDataPlane
7(ODP is similar yet different from DPDK), with provisions for hardware acceleration
8of packet paths. It envisions three deployment scenarios:
9
10-Server + NICs
11-Systems on a Chip
12-SmartNIC with low to very high core count
13
14#Build Procedure:
15----------------
16The source code add support to build VPP with either odp-dpdk or modified odp-linux.
17Generic odp-linux is not supported as it keeps user area outside packet buffer.
18VPP requires the user area (used to store vlib_buffer_t) to be located just before packet data.
19
20
211)Build vpp with odp-linux:
22---------------------------
23Build the odp linux package by compiling odp from odp git repository:
24
25git clone https://git.linaro.org/lng/odp.git
26
27This release was tested with v1.17.0.0 version and with three additional patches.
28Patches can be found in odp/odp-linux directory:
290001-linux-generic-pool-Return-address-range-in-pool-info.patch
300002-linux-generic-Place-userdata-before-packet-data.patch
31
32If ODP IPsec will be tested in inline mode, using dpdk/socket pktio respectively
330003-inline-HACK-in-dpdk-pktio.patch
340004-inline-HACK-in-socket-pktio.patch
35
36
37Follow the README steps for complete build.
38
39- default pktio
40cd odp
41./bootstrap
42./configure --prefix=<odp-install-path>
43make install
44
45- dpdk pktio
46use scripts/build-pktio-dpdk to compile odp-linux with dpdk pktio
47
48
49Build vpp:
50Follow the README steps for complete build.
51
52Set the environment variables with ODP config:
53export PLATFORM=odp
54export ODP_INST_PATH=<odp-install-path>
55export ODP_PLATFORM_PARAMS="-m 400"
56
57- default pktio
58Adjust odp_odp_libs in build-data/platforms/odp.mk:
59odp_odp_libs = -lodp-linux -lodphelper -lpcap
60
61- dpdk pktio 
62export LIBRARY_PATH=<dpdk-install-path>/lib/
63Adjust odp_odp_libs in build-data/platforms/odp.mk:
64odp_odp_libs = -lodp-linux -ldpdk -lodphelper -lpcap
65
66cd vpp
67make install-dep
68make build
69make run
70
71
722)Build vpp with odp-dpdk:
73--------------------------
74Build the odp-dpdk package by compiling odp-dpdk from odp-dpdk git repository:
75
76git clone https://git.linaro.org/lng/odp-dpdk.git
77
78This release was tested on master branch with commit e78e28ea32d5 with three
79additional patches.  Patches can be found in odp/odp-dpdk directory:
800001-linux-dpdk-pool-Return-address-range-in-pool-info.patch
81
82When using odp_crypto based IPsec the fixes below are necessary
830002-linux-dpdk-crypto-Change-queue-amount.patch
840003-Changed-the-digest-size-of-SHA256_HMAC.patch
85
86If ODP IPsec will be tested in inline mode, this is also needed
870004-HACK-enable-inline-for-odp-dpdk.patch
88
89
90Follow the odp-dpdk/README.DPDK steps for complete build with dpdk.
91
92git clone --single-branch --branch=v17.08 http://dpdk.org/git/dpdk
93cd dpdk
94make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc
95sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_OPENSSL=).*,\1y,' x86_64-native-linuxapp-gcc/.config
96sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' x86_64-native-linuxapp-gcc/.config
97make O=x86_64-native-linuxapp-gcc EXTRA_CFLAGS="-fPIC"
98
99cd odp-dpdk
100./bootstrap
101./configure --prefix=<odp-dpdk-install-path> --with-dpdk-path=<dpdk-dir>/x86_64-native-linuxapp-gcc
102make install
103
104Set the environment variables with ODP config:
105
106export PLATFORM=odp
107export ODP_INST_PATH=<odp-dpdk-install-path>
108export LIBRARY_PATH=<dpdk-dir>/x86_64-native-linuxapp-gcc/lib/
109export ODP_PLATFORM_PARAMS="-m 400 --vdev crypto_openssl"
110
111
112Build vpp:
113Follow the README steps for complete build.
114
115cd odp4vpp
116make install-dep
117make build
118make run
119
120#Test Steps:
121------------
122Below is a basic verification test.
123
124Note :For odp-dpdk the port has to bound with dpdk driver prior to test and interface name is passed as 0,1..etc.
125
1261)Configure odp packet interface with Rx/Tx mode and number of queues.
127  Rx mode can be set to 0-burst (default), 1-queue, 2-schedule-atomic,
128      3-schedule-ordered, 4-schedule-parallel
129  Tx mode can be set to 0-burst (default), 1-queue (forced for schedule-ordered)
130  Number of Rx queues can be 1 or more. It will determine number of threads and enable RSS (default is 1).
131  Number of Tx queues can be 0 (equal to number of threads, default) or 1 (single shared queue).
132
133-create pktio-interface name <int name> hw-addr <mac> rx-mode <0/1/2> rx-queues <num queues> tx-mode <0/1> tx-queues <num queues>
134-set int ip address odp-<int name> X.X.X.X/24
135-set int state odp-<int name> up
136
1372)Check the interface state:
138-sh int
139
1403)Ping the configured interface from host machine and check the ARP and ipv4 FIB table:
141-sh ip arp
142-sh ip fib
143
1444)Check the interface counters:
145-sh int
146
1475)Check the statistics:
148-show run
149
1506)Packet trace can be enabled using :
151-trace add odp-packet-input 10
152-show trace
153
1547)Delete the interface:
155-delete pktio-interface name <int name>
156
157
158Example:
159--------
160Below is example config logs:
161
162with odp-linux:
163
164DBGvpp# create pktio-interface name enp0s8 hw-addr 08:00:27:1b:5e:48
165odp-enp0s8
166DBGvpp# set int ip address odp-enp0s8 192.168.1.4/24
167DBGvpp# set int state odp-enp0s8 up
168DBGvpp# sh int
169              Name               Idx       State          Counter          Count
170local0                            0        down
171odp-enp0s8                        1         up       rx packets                     1
172                                                     rx bytes                      60
173                                                     drops                          1
174DBGvpp# sh int addr
175local0 (dn):
176odp-enp0s8 (up):
177  192.168.1.4/24
178DBGvpp# sh int
179              Name               Idx       State          Counter          Count
180local0                            0        down      drops                          1
181odp-enp0s8                        1         up       rx packets                    12
182                                                     rx bytes                     902
183                                                     tx packets                     5
184                                                     tx bytes                     324
185                                                     drops                          4
186                                                     punts                          3
187                                                     ip4                            7
188DBGvpp# sh ip arp
189    Time           IP4       Flags      Ethernet              Interface
190    171.7151   192.168.1.1     D    c8:3a:35:19:ea:f0        odp-enp0s8
191    185.0099   192.168.1.3     D    48:45:20:11:41:ad        odp-enp0s8
192DBGvpp#
193
194with odp-dpdk:
195
196sreejith@sreejith-VirtualBox:~/vppdodp/vpp_odp_dpdk/dpdk$ sudo ./usertools/dpdk-devbind.py --status
197
198Network devices using DPDK-compatible driver
199============================================
2000000:00:08.0 '82540EM Gigabit Ethernet Controller' drv=igb_uio unused=e1000
2010000:00:09.0 '82540EM Gigabit Ethernet Controller' drv=igb_uio unused=e1000
202
203
204DBGvpp# create pktio-interface name 0 hw-addr 08:00:27:1b:5e:48
205odp-0
206DBGvpp# sh int
207              Name               Idx       State          Counter          Count
208local0                            0        down
209odp-0                             1        down
210
211DBGvpp# set int ip address odp-0 192.168.1.4/24
212DBGvpp# set int state odp-0 up
213DBGvpp# sh int
214              Name               Idx       State          Counter          Count
215local0                            0        down
216odp-0                             1         up       rx packets                    13
217                                                     rx bytes                    1960
218                                                     tx packets                     1
219                                                     tx bytes                      42
220                                                     drops                         13
221                                                     ip4                            7
222                                                     ip6                            4
223
224
225# VPP startup configuration
226---------------------------
227Default configuration of ODP plugin, IPSec nodes and automatic creation of
228interfaces can be specified in startup.conf file.
229More details are in template: src/vpp/conf/startup.conf
230
231To use customized startup configuration:
232copy default config from src/vpp/conf/startup.conf
233add 'interactive' to 'unix' section and remove 'api-segment'
234uncomment and adjust 'odp' section
235export STARTUP_CONF=<path-to-startup.conf>
236
237
238# ODP based ipsec nodes
239-----------------------
240With the development of the odp4vpp project IPsec nodes have been added,
241making use of the ODP APIs. In hope that in the future it will enable
242accelerated IPsec tunnels.
243
244There are two pairs of new nodes, one making use of ODP crypto API, and
245one making use of the ODP IPsec API.
246
247In order to make use of the ODP crypto API version of IPsec nodes,
248put `enable-odp-crypto` in the odp section of the startup.conf file,
249while to use the IPsec API version, put `enable-odp-ipsec` in that file.
250The options should not be used simultaneously. By the time being these
251are global options and it is not possible to configure different
252IPsec nodes for different ports.
253
254odp {
255	enable-odp-crypto
256}
257
258or,
259
260odp {
261	enable-odp-ipsec
262}
263
264By default all the operations are done synchronously. In order
265to change that, `async` needs to be put in the odp section of the
266startup.conf file.
267
268odp {
269	enable-odp-crypto
270	async
271}
272
273IPsec API also provieds inline mode (for details see odp user guide),
274to make use of that, put `inline` in the odp section of the startup.conf
275file. That option _can_ be combined with the `async` option.
276
277odp {
278	enable-odp-ipsec
279	inline
280	async
281}
282
283The IPsec inline mode is only supported on the loopback pktio in odp-linux,
284though it has not been tested with this pktio. It has been tested with modified
285versions of dpdk/socket pktio. The last two patches for odp-linux enable
286testing it with dpdk and socket based pktio on odp-linux. The last of the
287odp-dpdk patches enable inline mode in odp-dpdk. Those patches are not needed
288if no IPsec is planed to be ran in inline mode. Also these changes should soon
289be integrated in the odp and odp-dpdk repositories, and then these patches will
290no longer be needed.
291