docs: Fix create memif cli
[vpp.git] / extras / libmemif / docs / devperftest_doc.md
1 ## Development performance test    {#libmemif_devperftest_doc}
2
3 Simle test cases using ICMP. icmpr-epoll example app generates and transmits packets over memif interface.
4
5 #### TC1: LIB-VPP
6
7 Start icmpr-epoll example app and VPP.
8
9 VPP-side config:
10 ```
11 DBGvpp# create interface memif id 0 master
12 DBGvpp# set int state memif0/0 up
13 DBGvpp# set int ip address memif0/0 192.168.1.1/24
14 ```
15 icmpr-epoll:
16 ```
17 conn 0 0 1
18 ```
19 > Last argument specifies interrupt function to use. This function only responds to ARP requests. This is important because, packet generation and transmitting is handled by a separate thread. Calling memif_tx_burst from multiple threads writing on same queue could transmit uninitialized buffers.
20 Once connection is established, you can send ping from VPP to icmpr-epoll app to learn its mac address.
21 ```
22 DBGvpp# ping 192.168.1.2
23 ```
24 > There should be no ICMP response. Only ARP response.
25 Now send ICMP requests from icmpr-epoll:
26 ```
27 send <index> <num-of-packets> <ip_daddr> <hw_daddr>
28 send 0 5 192.168.1.1 02:fe:ff:ff:ff:ff
29 ```
30 this command will create new thread which will generate icmp packets and transmit them over memif connection with specified index. Once the sequence is finished status will be printed.
31
32 ###### Example results (owerview of test data)
33
34 (This test was run with modofication in VPP-memif plugin. The modification disallows memif tx node to allocate last ring buffer)
35 lib-tx: 200M (if ring full don't drop packets)
36 vpp-rx: 200M
37 vpp-tx: 200M - 50K (if ring full drop packets)
38 lib-rx: =vpp-tx
39 drop: ~0.025% (full ring)
40 pps: ~650K
41 multiple interfaces:
42 pps: divided
43 drop: constant
44
45 #### TC2: LIB-LIB
46
47 This test case will not drop packets if memif ring is full. Instead it will loop until all required packets have been sent.
48
49 Start two instances of icmpr-epoll example app.
50 instance 1:
51 ```
52 conn 0 1 0
53 ```
54 instance 2:
55 ```
56 conn 0 0 1
57 send 0 5 192.168.1.1 aa:aa:aa:aa:aa:aa
58 ```
59 > icmpr-epoll example app doesn't check ip or mac address so as long as the format is correct you can type anything as ip_daddr and hw_daddr arguments.
60
61 ###### Example results (owerview of test data)
62
63 lib1-tx: 200M (if ring full don't drop packets)
64 lib2-rx: 200M
65 lib2-tx: 200M (if ring full don't drop packets)
66 lib1-rx: 200M
67 drop: obsolete
68 pps: 4.5M
69 multiple interfaces:
70 not tested (excpected same as TC1)
71
72 #### TC3: LIB-LIB
73
74 Start two instances of icmpr-epoll example app.
75 instance 1:
76 ```
77 conn 0 1
78 ```
79 instance 2:
80 ```
81 conn 0 0 1
82 send 0 5 192.168.1.1 aa:aa:aa:aa:aa:aa
83 ```
84
85 ###### Example results (owerview of test data)
86
87 lib1-tx: 200M (if ring full don't drop packets)
88 lib2-rx: 200M
89 lib2-tx: 169626182 (if ring full drop packets)
90 lib1-rx: =lib2-tx
91 drop: ~15%
92 pps: ~6M
93 multiple interfaces:
94 not tested (excpected same as TC1)