Skip to content

Commit 4cd6aa3

Browse files
committed
doc: application: update ovs-offload guide
Documenting different use cases - plain/vlan/vxlan traffic with a running demo. Signed-off-by: Harman Kalra <hkalra@marvell.com> Change-Id: I5c220382285f981736bd58dc0a479c71813e02d5 Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/dataplane/dpu-offload/+/135905
1 parent d160ada commit 4cd6aa3

File tree

9 files changed

+12459
-0
lines changed

9 files changed

+12459
-0
lines changed

doc/guides/_static/demo/ood/plain.cast

Lines changed: 9846 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<! SPDX-License-Identifier: Marvell-MIT>
2+
<! Copyright (c) 2023 Marvell.>
3+
4+
<!DOCTYPE html>
5+
<html>
6+
<head>
7+
<link rel="stylesheet" type="text/css" href="../../_static/css/player.css" />
8+
<style>
9+
#plain{
10+
margin-left: 0;
11+
width: 80ch;
12+
height: 32em;
13+
}
14+
</style>
15+
</head>
16+
<body>
17+
<div id="plain"></div>
18+
<script src="https://github.com/asciinema/asciinema-player/releases/download/v3.7.1/asciinema-player.min.js"></script>
19+
<script>
20+
AsciinemaPlayer.create('../../_static/demo/ood/plain.cast', document.getElementById('plain'), {
21+
fit: "height",
22+
autoplay: true,
23+
markers: [
24+
[13, 'Launching OVS'],
25+
[24, 'Launching dao-ovs-offload'],
26+
[34, 'Setting up host and peer machine'],
27+
[85, 'Performance measurement'],
28+
]
29+
});
30+
</script>
31+
</body>
32+
</html>

doc/guides/_static/demo/ood/vlan.cast

Lines changed: 2349 additions & 0 deletions
Large diffs are not rendered by default.

doc/guides/_static/demo/ood/vlan.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<! SPDX-License-Identifier: Marvell-MIT>
2+
<! Copyright (c) 2023 Marvell.>
3+
4+
<!DOCTYPE html>
5+
<html>
6+
<head>
7+
<link rel="stylesheet" type="text/css" href="../../_static/css/player.css" />
8+
<style>
9+
#vlan{
10+
margin-left: 0;
11+
width: 80ch;
12+
height: 32em;
13+
}
14+
</style>
15+
</head>
16+
<body>
17+
<div id="vlan"></div>
18+
<script src="https://github.com/asciinema/asciinema-player/releases/download/v3.7.1/asciinema-player.min.js"></script>
19+
<script>
20+
AsciinemaPlayer.create('../../_static/demo/ood/vlan.cast', document.getElementById('vlan'), {
21+
fit: "height",
22+
autoplay: true,
23+
markers: [
24+
[21, 'Launching OVS'],
25+
[50, 'Launching dao-ovs-offload'],
26+
[67, 'Setting up host and peer machine'],
27+
[214, 'Performance Measurement'],
28+
]
29+
});
30+
</script>
31+
</body>
32+
</html>
Loading
Loading
87.5 KB
Loading
Loading

doc/guides/applications/ovs-offload.rst

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ Create VFs, check for device ID ``0xa064`` viz RPM (NIX) VF and bind to vfio-pci
162162
# dpdk-devbind.py -b vfio-pci 0002:02:00.1
163163
# dpdk-devbind.py -b vfio-pci 0002:02:00.2
164164
165+
.. _launching_ovs_offload:
166+
165167
Launching the application
166168
=========================
167169

@@ -319,3 +321,201 @@ Understanding different nodes
319321
* ``vxlan_encap``: This node performs VxLAN tunnel encapsulation to all the received packets.
320322

321323
* ``tunnel_decap``: This node performs tunnel decapsulation to all the received packets.
324+
325+
Various Packet Flow Scenarios (with demo)
326+
=========================================
327+
328+
There are various use cases for switching traffic, including VM-to-VM communication, VM-to-wire
329+
connections where the traffic flowing can be plain or VLAN tagged, and VxLAN tunnelled.
330+
331+
Before launching any use case, ensure that the octep_cp_agent is running to facilitate smooth
332+
communication between the Octeon device and host-side drivers:
333+
334+
:ref:`Launching octep_agent<octep_cp_agent>`
335+
336+
Setting up the environment for OVS
337+
338+
:ref:`Setting up OVS environment<setting_up_ovs_env>`
339+
340+
Wire-VM Communication
341+
---------------------
342+
343+
A use case where VMs communicate across different hosts.
344+
345+
Setting up the host machine and launching the VM - it is a common step across various types of
346+
traffic.
347+
348+
:ref:`Setting up host machine<sdp_host_kernel_modules>`
349+
350+
Assign an IP to the host SDP PF internface
351+
352+
.. code-block:: console
353+
354+
# ifconfig <pf-iface> <ip addr>
355+
Ex.
356+
# ifconfig enp1s0f0 30.0.0.3
357+
358+
Plain Traffic
359+
`````````````
360+
361+
* **Setup Detail**
362+
363+
.. figure:: ./img/ood_plain_traffic.png
364+
365+
* **Launching OVS as per use case**
366+
367+
:ref:`Launching OVS<launching_ovs>`
368+
369+
Steps to create bridge and attach ports
370+
371+
:ref:`Setting up bridge and attaching ports<creating_bridge>`
372+
373+
* **Setting up the peer machine**
374+
375+
Peer machine can be another host machine which is connected to the octeon board over ethernet link.
376+
377+
Assign IP to one of the host's netdev which is connected to octeon board
378+
379+
.. code-block:: console
380+
381+
# ifconfig <eth-iface> <ip addr>
382+
Ex.
383+
# ifconfig eth0 30.0.0.11
384+
385+
* **Launching dao-ovs-offload**
386+
387+
:ref:`Launch ovs-offload<launching_ovs_offload>`
388+
389+
* Ping from host interface to peer machine or vice versa
390+
391+
.. code-block:: console
392+
393+
# ping 30.0.0.11
394+
PING 20.11 (30.0.0.11) 56(84) bytes of data.
395+
64 bytes from 30.0.0.11: icmp_seq=1 ttl=64 time=0.367 ms
396+
64 bytes from 30.0.0.11: icmp_seq=2 ttl=64 time=0.217 ms
397+
64 bytes from 30.0.0.11: icmp_seq=3 ttl=64 time=0.186 ms
398+
64 bytes from 30.0.0.11: icmp_seq=4 ttl=64 time=0.237 ms
399+
64 bytes from 30.0.0.11: icmp_seq=5 ttl=64 time=0.132 ms
400+
401+
* **Running Demo**
402+
403+
.. raw:: html
404+
:file: ../_static/demo/ood/plain.html
405+
406+
VLAN Traffic
407+
````````````
408+
409+
* **Setup Detail**
410+
411+
.. figure:: ./img/ood_vlan_traffic.png
412+
413+
* **Launching OVS as per use case**
414+
415+
:ref:`Launching OVS<launching_ovs>`
416+
417+
Steps to create bridge and attach ports
418+
419+
:ref:`Setting up bridge and attaching ports<creating_bridge>`
420+
421+
Configuring VLAN
422+
423+
:ref:`Configure VLAN<configure_vlan>`
424+
425+
* **Setting up the peer machine**
426+
427+
Create VLAN interface on the peer machine to send packets with tag 100
428+
429+
.. code-block:: console
430+
431+
# ip link add link <eth-iface> name <vlan-iface> type vlan id 100
432+
# ifconfig <vlan-iface> <ip addr>
433+
Ex.
434+
# ip link add link eth0 name eth0.100 type vlan id 100
435+
# ifconfig eth0 30.0.0.11
436+
437+
Delete the VLAN interface
438+
439+
.. code-block:: console
440+
441+
# ip link delete <vlan-iface>
442+
Ex.
443+
# ip link delete eth0.100
444+
445+
* **Launching dao-ovs-offload**
446+
447+
:ref:`Launch ovs-offload<launching_ovs_offload>`
448+
449+
* **Ping from host interface to peer machine or vice versa**
450+
451+
.. code-block:: console
452+
453+
# ping 30.0.0.11
454+
PING 20.11 (30.0.0.11) 56(84) bytes of data.
455+
64 bytes from 30.0.0.11: icmp_seq=1 ttl=64 time=0.367 ms
456+
64 bytes from 30.0.0.11: icmp_seq=2 ttl=64 time=0.217 ms
457+
64 bytes from 30.0.0.11: icmp_seq=3 ttl=64 time=0.186 ms
458+
64 bytes from 30.0.0.11: icmp_seq=4 ttl=64 time=0.237 ms
459+
64 bytes from 30.0.0.11: icmp_seq=5 ttl=64 time=0.132 ms
460+
461+
* **Running Demo**
462+
463+
.. raw:: html
464+
:file: ../_static/demo/ood/vlan.html
465+
466+
VxLAN Traffic
467+
`````````````
468+
469+
* **Setup Detail**
470+
471+
.. figure:: ./img/ood_vxlan_traffic.png
472+
473+
* **Launching OVS as per use case**
474+
475+
:ref:`Launching OVS<launching_ovs>`
476+
477+
Steps to create bridge and attach ports
478+
479+
:ref:`Setting up bridge and attaching ports<creating_bridge>`
480+
481+
Configuring VxLAN
482+
483+
:ref:`Configure VxLAN<configure_vxlan>`
484+
485+
* **Setting up the peer machine**
486+
487+
Create VxLAN endpoint on the peer machine to send packets with VNI 5001
488+
489+
.. code-block:: console
490+
491+
# ip link add <vxlan-intf> type vxlan id <vni> remote <remote-ip> local <local-ip> dev <eth-iface> dstport 4789
492+
# ifconfig <eth-iface> <ip addr>
493+
# ifconfig <vxlan-intf> <ip addr>
494+
Ex.
495+
# ip link add vxlan-demo type vxlan id 5001 remote 172.168.1.20 local 172.168.1.10 dev eth0 dstport 4789
496+
# ifconfig eth0 172.168.1.10/24 up
497+
# ifconfig vxlan-demo 30.0.0.11/24 up
498+
499+
Delete the VxLAN interface
500+
501+
.. code-block:: console
502+
503+
# ip link delete <vxlan-intf>
504+
Ex.
505+
# ip link delete vxlan-demo
506+
507+
* **Launching dao-ovs-offload**
508+
509+
:ref:`Launch ovs-offload<launching_ovs_offload>`
510+
511+
* **Ping from host interface to peer machine or vice versa**
512+
513+
.. code-block:: console
514+
515+
# ping 30.0.0.11
516+
PING 20.11 (30.0.0.11) 56(84) bytes of data.
517+
64 bytes from 30.0.0.11: icmp_seq=1 ttl=64 time=0.367 ms
518+
64 bytes from 30.0.0.11: icmp_seq=2 ttl=64 time=0.217 ms
519+
64 bytes from 30.0.0.11: icmp_seq=3 ttl=64 time=0.186 ms
520+
64 bytes from 30.0.0.11: icmp_seq=4 ttl=64 time=0.237 ms
521+
64 bytes from 30.0.0.11: icmp_seq=5 ttl=64 time=0.132 ms

0 commit comments

Comments
 (0)