f5e2af361b4efbd2eb56675183263d74d50d5ab1
[samplevnf.git] / docs / UDP_Replay / README.rst
1 .. this work is licensed under a creative commons attribution 4.0 international
2 .. license.
3 .. http://creativecommons.org/licenses/by/4.0
4 .. (c) opnfv, national center of scientific research "demokritos" and others.
5
6 ========================================================
7 UDP_Replay
8 ========================================================
9
10 1 Introduction
11 ==============
12 This application implements UDP_Replay. The UDP Replay application is a simple example of 
13 packet processing using the DPDK. The application performs UDP replay. This application
14 is based on l3fwd application from dpdk. Packets are replayed back over the same port as
15 received. This application is used in VNF approximation.
16
17 2 Compiling the Application
18 ===========================
19
20 To compile the application:
21
22 Go to the sample application directory: 
23 cd samplevnf/VNF's/UDP_Replay
24
25 export RTE_SDK=/path/to/rte_sdk
26 cd ${RTE_SDK}/examples/l3fwd
27 Set the target (a default target is used if not specified). For example:
28
29 export RTE_TARGET=x86_64-native-linuxapp-gcc
30 See the DPDK Getting Started Guide for possible RTE_TARGET values.
31
32 Build the application:
33 make
34
35 3 Running the Application
36 ===========================
37
38 The application has a number of command line options:
39
40 ./build/UDP_Replay [EAL options] -- -p PORTMASK
41                                  --config(port,queue,lcore)[,(port,queue,lcore)]
42
43 -p PORTMASK: Hexadecimal bitmask of ports to configure
44 --config (port,queue,lcore)[,(port,queue,lcore)]: Determines which queues from 
45 which ports are mapped to which cores.
46
47 For e.g
48
49 For single port
50 ./build/UDP_Replay -c 0xf -n 4 -- -p 0x1 --config="(0,0,1)"
51
52 For dual port
53 ./build/UDP_Replay -c 0xf -n 4 -- -p 0x3 --config="(0,0,1),(1,0,2)"
54
55 In this command:
56
57 The -l option enables cores 1, 2
58 The -p option enables ports 0 and 1
59 The â€“config option enables one queue on each port and maps each (port,queue) 
60 pair to a specific core. The following table shows the mapping in 
61 this example:
62
63 Port    Queue   lcore           Description
64  0                0               1         Map queue 0 from port 0 to lcore 1.
65  1                0               2         Map queue 0 from port 1 to lcore 2.
66
67 For ARP/ICMP support
68 use the sample config provided under samplevnf/VNFs/UDP_Replay/sample.cfg
69
70 For e.g
71 ./build/UDP_Replay -c 0xf -n 4 -- -s sample_ipv4.cfg -p 0x1 --config="(0,0,1),(1,0,2)"