numam-dpdk/doc/guides
Gregory Etelson 1b9f274623 app/testpmd: add commands for tunnel offload
Tunnel Offload API provides hardware independent, unified model
to offload tunneled traffic. Key model elements are:
 - apply matches to both outer and inner packet headers
   during entire offload procedure;
 - restore outer header of partially offloaded packet;
 - model is implemented as a set of helper functions.

Implementation details:

* Create application tunnel:
flow tunnel create <port> type <tunnel type>
On success, the command creates application tunnel object and returns
the tunnel descriptor. Tunnel descriptor is used in subsequent flow
creation commands to reference the tunnel.

* Create tunnel steering flow rule:
tunnel_set <tunnel descriptor> parameter used with steering rule
template.

* Create tunnel matching flow rule:
tunnel_match <tunnel descriptor> used with matching rule template.

* If tunnel steering rule was offloaded, outer header of a partially
offloaded packet is restored after miss.

Example:
test packet=
<Ether  dst=24:8a:07:8d:ae:d6 src=50:6b:4b:cc:fc:e2 type=IPv4 |
<IP  version=4 ihl=5 proto=udp src=1.1.1.1 dst=1.1.1.10 |
<UDP  sport=4789 dport=4789 len=58 chksum=0x7f7b |
<VXLAN  NextProtocol=Ethernet vni=0x0 |
<Ether  dst=24:aa:aa:aa:aa:d6 src=50:bb:bb:bb:bb:e2 type=IPv4 |
<IP  version=4 ihl=5 proto=icmp src=2.2.2.2 dst=2.2.2.200 |
<ICMP  type=echo-request code=0 chksum=0xf7ff id=0x0 seq=0x0 |>>>>>>>
>>> len(packet)
92

testpmd> flow flush 0
testpmd> port 0/queue 0: received 1 packets
src=50:6B:4B:CC:FC:E2 - dst=24:8A:07:8D:AE:D6 - type=0x0800 -
length=92

testpmd> flow tunnel 0 type vxlan
port 0: flow tunnel #1 type vxlan
testpmd> flow create 0 ingress group 0 tunnel_set 1
         pattern eth /ipv4 / udp dst is 4789 / vxlan / end
         actions  jump group 0 / end
Flow rule #0 created
testpmd> port 0/queue 0: received 1 packets
tunnel restore info: - vxlan tunnel - outer header present # <--
  src=50:6B:4B:CC:FC:E2 - dst=24:8A:07:8D:AE:D6 - type=0x0800 -
length=92

testpmd> flow create 0 ingress group 0 tunnel_match 1
         pattern eth / ipv4 / udp dst is 4789 / vxlan / eth / ipv4 /
         end
         actions set_mac_dst mac_addr 02:CA:FE:CA:FA:80 /
         queue index 0 / end
Flow rule #1 created
testpmd> port 0/queue 0: received 1 packets
  src=50:BB:BB:BB:BB:E2 - dst=02:CA:FE:CA:FA:80 - type=0x0800 -
length=42

* Destroy flow tunnel
flow tunnel destroy <port> id <tunnel id>

* Show existing flow tunnels
flow tunnel list <port>

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
2020-10-16 19:48:19 +02:00
..
bbdevs doc: remove orphan bbdev PMD feature table 2020-10-14 21:30:10 +02:00
compressdevs compress/qat: support IM buffer too small operation 2020-04-19 17:15:14 +02:00
contributing doc: remove references to python 2 2020-10-05 10:24:12 +02:00
cryptodevs crypto/bcmfs: fix features documentation 2020-10-16 14:41:32 +02:00
eventdevs event/sw: improve performance 2020-10-15 23:09:58 +02:00
faq doc: refer to default directory for hugepages 2020-07-31 01:32:54 +02:00
freebsd_gsg doc: remove references to make from FreeBSD guide 2020-10-01 16:51:24 +02:00
howto eal: simplify exit functions 2020-10-15 22:33:47 +02:00
linux_gsg kernel/linux: remove igb_uio 2020-10-06 14:50:13 +02:00
mempool doc: add stack mempool guide 2020-10-08 09:34:58 +02:00
nics doc: add sample flow limitation in mlx5 guide 2020-10-16 19:48:18 +02:00
platform regex/octeontx2: introduce REE driver 2020-10-14 10:41:21 +02:00
prog_guide ethdev: add tunnel offload model 2020-10-16 19:48:19 +02:00
rawdevs raw/ioat: add fill operation 2020-10-08 14:33:20 +02:00
regexdevs usertools: add OCTEON TX2 REE device binding 2020-10-14 10:41:26 +02:00
rel_notes ethdev: add tunnel offload model 2020-10-16 19:48:19 +02:00
sample_app_ug examples/fips_validation: support scatter gather list 2020-10-14 22:22:06 +02:00
testpmd_app_ug app/testpmd: add commands for tunnel offload 2020-10-16 19:48:19 +02:00
tools doc: remove references to python 2 2020-10-05 10:24:12 +02:00
vdpadevs doc: remove trailing white space 2020-10-06 00:42:21 +02:00
windows_gsg doc: reword ABI policy for Windows 2020-07-08 12:28:21 +02:00
conf.py doc: make sphinx errors more visible 2020-10-16 15:01:54 +02:00
custom.css doc: improve HTML spacing in release notes 2018-02-14 00:23:25 +01:00
index.rst regex/mlx5: introduce driver for BlueField 2 2020-07-21 19:04:05 +02:00
meson.build doc: make sphinx comply with meson werror option 2020-10-05 23:52:02 +02:00