Skip to content

Commit 11d2e1c

Browse files
Venkata Ravichandra Mynidiakamaluddin
authored andcommitted
doc: update dao community lab section
The changeset adds documentation on DAO community lab usage for VPP and TLS usecases. Signed-off-by: Venkata Ravichandra Mynidi <vmynidi@marvell.com> Change-Id: I0ce6a6d5fef25a0a3663ed23e2f5a60adc8408f5 Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/dataplane/dpu-offload/+/142595 Reviewed-by: Abed Mohammad Kamaluddin <akamaluddin@marvell.com> Tested-by: Abed Mohammad Kamaluddin <akamaluddin@marvell.com>
1 parent 8e3d360 commit 11d2e1c

File tree

4 files changed

+222
-0
lines changed

4 files changed

+222
-0
lines changed

doc/guides/community_lab/index.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. SPDX-License-Identifier: Marvell-MIT
2+
Copyright (c) 2024 Marvell.
3+
4+
DAO Community Lab
5+
=================
6+
7+
.. toctree::
8+
:maxdepth: 1
9+
:numbered:
10+
11+
vpp_lab
12+
tls_lab

doc/guides/community_lab/tls_lab.rst

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
2+
.. SPDX-License-Identifier: Marvell-MIT
3+
Copyright (c) 2024 Marvell.
4+
5+
Running TLS applications
6+
========================
7+
8+
Prerequisites
9+
-------------
10+
a. Linux booted on Host and DPU
11+
12+
b. Login to your docker on host and DPU
13+
14+
c. Bind the pktio and crypto devices to vfio-pci
15+
16+
.. code-block:: console
17+
18+
source dao-env.sh
19+
20+
21+
DAO Environment Setup
22+
---------------------
23+
Following step is required to run only once after the first login to docker
24+
25+
.. code-block:: console
26+
27+
~# source /dao-env.sh
28+
29+
30+
OpenSSL Speed Application
31+
-------------------------
32+
a. Run speed application without engine
33+
34+
.. code-block:: console
35+
36+
~# cd /usr/lib/cn10k/openssl-1.1.1q/bin
37+
~# export LD_LIBRARY_PATH=/usr/lib/cn10k/openssl-1.1.1q/lib/
38+
~# ./openssl speed -elapsed -async_jobs +24 -evp aes-256-gcm
39+
~# ./openssl speed -elapsed rsa2048
40+
41+
b. Run speed application with engine
42+
43+
.. code-block:: console
44+
45+
~# OPENSSL_CONF=/opt/openssl.cnf ./openssl speed -elapsed -async_jobs +24 -evp aes-256-gcm
46+
~# OPENSSL_CONF=/opt/openssl.cnf ./openssl speed -elapsed -async_jobs +24 rsa2048
47+
48+
49+
Openssl server and client
50+
-------------------------
51+
c. Run openssl s_server on DPU
52+
53+
.. code-block:: console
54+
55+
~# OPENSSL_CONF=/opt/openssl.cnf ./openssl s_server -key certs/server.key.pem -cert certs/server.crt.pem -accept 4433 -tls1_2
56+
57+
d. Run openssl s_client on x86 host machine
58+
59+
.. code-block:: console
60+
61+
~# openssl s_client -connect <DUT_IP>:4433 -tls1_2
62+
63+
<DUT_IP> is the IP of s_server on DPU

doc/guides/community_lab/vpp_lab.rst

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
2+
.. SPDX-License-Identifier: Marvell-MIT
3+
Copyright (c) 2024 Marvell.
4+
5+
Running VPP applications
6+
========================
7+
8+
Prerequisites
9+
-------------
10+
a. Linux booted on Host and DPU
11+
12+
b. Login to your docker on host and DPU
13+
14+
c. Bind the pktio and crypto devices to vfio-pci
15+
16+
.. code-block:: console
17+
18+
source dao-env.sh
19+
20+
21+
DAO Environment Setup
22+
---------------------
23+
Following step is required to run only once after the first login to docker
24+
25+
.. code-block:: console
26+
27+
~# source /dao-env.sh
28+
29+
30+
L3 Router
31+
---------
32+
a. start vpp with config file at /etc/vpp/pktio_startup.conf
33+
34+
.. code-block:: console
35+
36+
~# vpp -c /etc/vpp/pktio_startup.conf
37+
38+
39+
b. start vppctl command on console
40+
41+
.. code-block:: console
42+
43+
~# vppctl
44+
45+
vpp# set int state eth0 up
46+
vpp# set int state eth1 up
47+
vpp# set int ip address eth0 10.29.10.1/24
48+
vpp# set int ip address eth1 10.29.20.2/24
49+
vpp# set ip neighbor eth0 10.29.10.10 00:00:00:01:01:01
50+
vpp# set ip neighbor eth1 10.29.20.20 00:00:00:02:01:01
51+
vpp# ip route add 10.29.10.10/24 via eth0
52+
vpp# ip route add 10.29.20.20/24 via eth1
53+
vpp# show int
54+
vpp# trace add eth0-rx 5
55+
56+
c. On host x86 machine, configure the IPs of the interfaces to send traffic
57+
58+
.. code-block:: console
59+
60+
~# ifconfig intf1 10.29.10.10/24
61+
~# ifconfig intf2 10.29.20.20/24
62+
63+
d. Run tshark capture on intf2
64+
65+
.. code-block:: console
66+
67+
~# tshark -i intf2 -Y "udp" -V
68+
69+
e. Run scapy and send traffic
70+
71+
.. code-block:: console
72+
73+
~# scapy
74+
75+
>>> sendp(Ether(dst="ba:7a:5a:ae:c7:ab",src="00:00:00:01:01:01")/IP(src="10.29.10.10",dst="10.29.20.20",len=60)/UDP(dport=4000,sport=4000,len=40)/Raw(RandString(size=32)), iface="intf1", return_packets=True, count=100)
76+
77+
f. Observe the traffic on tshark console on x86 host
78+
79+
g. On VPP console check the graph walk
80+
81+
.. code-block:: console
82+
83+
vpp# show trace
84+
85+
86+
VPP as IPsec Tunnel Originator
87+
------------------------------
88+
h. start vpp with config file at /etc/vpp/pktio_startup.conf
89+
90+
.. code-block:: console
91+
92+
~# vpp -c /etc/vpp/crypto_startup.conf
93+
94+
i. start vppctl command on console
95+
96+
.. code-block:: console
97+
98+
~# vppctl
99+
100+
vpp# set int ip address eth0 10.29.10.1/24
101+
vpp# set int state eth0 up
102+
vpp# set ip neighbor eth0 10.29.10.10 00:00:00:01:01:01
103+
vpp# set int promiscuous on eth0
104+
vpp# set int ip address eth1 192.168.1.1/24
105+
vpp# set ip neighbor eth1 192.168.1.2 00:00:00:02:01:01
106+
vpp# set int state eth1 up
107+
vpp# set int promiscuous on eth1
108+
vpp# set ipsec async mode on
109+
vpp# ipsec itf create
110+
vpp# ipsec sa add 10 spi 1001 esp crypto-key 4a506a794f574265564551694d653768 crypto-alg aes-gcm-128 tunnel src 192.168.1.1 dst 192.168.1.2 esp
111+
vpp# ipsec sa add 20 spi 2001 inbound crypto-alg aes-gcm-128 crypto-key 4d4662776d4d55747559767176596965 tunnel src 192.168.1.2 dst 192.168.1.1 esp
112+
vpp# ipsec tunnel protect sa-out 10 ipsec0
113+
vpp# set int state ipsec0 up
114+
vpp# set interface unnum ipsec0 use eth1
115+
vpp# ip route add 10.29.20.20/24 via ipsec0
116+
vpp# show int
117+
vpp# pcap trace tx intfc eth1 max 100 file outbound_enc.pcap
118+
vpp# trace add eth0-rx 5
119+
120+
j. On host x86 machine, configure the IPs of the interfaces to send traffic
121+
122+
.. code-block:: console
123+
124+
~# ifconfig intf1 10.29.10.10/24
125+
~# ifconfig intf2 10.29.20.20/24
126+
127+
k. Run tshark capture on intf2
128+
129+
.. code-block:: console
130+
131+
~# tshark -i intf2 -Y "esp" -V
132+
133+
l. Run scapy and send traffic
134+
135+
.. code-block:: console
136+
137+
~# scapy
138+
139+
>>> sendp(Ether(dst="ba:7a:5a:ae:c7:ab",src="00:00:00:01:01:01")/IP(src="10.29.10.10",dst="10.29.20.20",len=60)/UDP(dport=4000,sport=4000,len=40)/Raw(RandString(size=32)), iface="intf1", return_packets=True, count=5)
140+
141+
m. Observe the ESP traffic on tshark console on x86 host
142+
~# tshark -i intf2 -Y "esp" -V
143+
144+
n. On VPP console check the graph walk
145+
vpp# show trace
146+

doc/guides/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ Welcome to Data Accelerator Offload(DAO) Documentation
1414
howtoguides/index
1515
contributing/index
1616
rel_notes/index
17+
community_lab/index
1718
faq/index

0 commit comments

Comments
 (0)