From: Ivan Malov <ivan.malov@oktetlabs.ru>
To: dev@dpdk.org
Cc: Ori Kam <orika@nvidia.com>, Eli Britstein <elibr@nvidia.com>,
Ilya Maximets <i.maximets@ovn.org>,
Thomas Monjalon <thomas@monjalon.net>,
Stephen Hemminger <stephen@networkplumber.org>,
Jerin Jacob <jerinj@marvell.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Ferruh Yigit <ferruh.yigit@xilinx.com>
Subject: [PATCH 08/13] doc: add new port items and actions to switch representation
Date: Fri, 12 Aug 2022 22:18:22 +0300 [thread overview]
Message-ID: <20220812191827.3187441-9-ivan.malov@oktetlabs.ru> (raw)
In-Reply-To: <20220812191827.3187441-1-ivan.malov@oktetlabs.ru>
Items PORT_REPRESENTOR and REPRESENTED_PORT as well as their
action counterparts have been a part of the flow library for
a year already. However, these haven't been described in the
switch representation guide. Provide the missing description.
Also, update relevant testpmd flow rule examples accordingly.
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
.../prog_guide/switch_representation.rst | 126 +++++++++++++-----
1 file changed, 89 insertions(+), 37 deletions(-)
diff --git a/doc/guides/prog_guide/switch_representation.rst b/doc/guides/prog_guide/switch_representation.rst
index 4f2532a91e..9369e6e04c 100644
--- a/doc/guides/prog_guide/switch_representation.rst
+++ b/doc/guides/prog_guide/switch_representation.rst
@@ -538,8 +538,8 @@ exist between them and their represented resources. These may be immutable.
In this case, traffic is received by default through the representor and
neither the "transfer" attribute nor traffic origin in flow rule patterns
are necessary. They simply have to be created on the representor port
-directly and may target a different representor as described in `PORT_ID
-action`_.
+directly and may target a different representor as described
+in `PORT_REPRESENTOR Action`_.
Implicit traffic flow with port representor
@@ -575,6 +575,36 @@ Implicit traffic flow with port representor
Pattern Items And Actions
~~~~~~~~~~~~~~~~~~~~~~~~~
+PORT_REPRESENTOR Pattern Item
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Matches traffic entering the embedded switch from the given ethdev.
+
+- Matches **A**, **B** or **C** in `traffic steering`_.
+
+PORT_REPRESENTOR Action
+^^^^^^^^^^^^^^^^^^^^^^^
+
+At embedded switch level, sends matching traffic to the given ethdev.
+
+- Targets **A**, **B** or **C** in `traffic steering`_.
+
+REPRESENTED_PORT Pattern Item
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Matches traffic entering the embedded switch from
+the entity represented by the given ethdev.
+
+- Matches **D**, **E** or **F** in `traffic steering`_.
+
+REPRESENTED_PORT Action
+^^^^^^^^^^^^^^^^^^^^^^^
+
+At embedded switch level, send matching traffic to
+the entity represented by the given ethdev.
+
+- Targets **D**, **E** or **F** in `traffic steering`_.
+
PORT Pattern Item
^^^^^^^^^^^^^^^^^
@@ -672,7 +702,7 @@ with (e.g. ``VXLAN_ENCAP``) and using specific parameters (e.g. VNI for
VXLAN).
While they modify traffic and can be used multiple times (order matters),
-unlike `PORT_ID action`_ and friends, they have no impact on steering.
+unlike `PORT_REPRESENTOR Action`_ and friends, they don't impact on steering.
As described in `actions order and repetition`_ this means they are useless
if used alone in an action list, the resulting traffic gets dropped unless
@@ -771,22 +801,15 @@ their representors
::
- flow create 3 ingress pattern / end actions port_id id 4 / end
- flow create 4 ingress pattern / end actions port_id id 3 / end
-
-More practical example with MAC address restrictions
-
-::
-
- flow create 3 ingress
- pattern eth dst is {VF 1 MAC} / end
- actions port_id id 4 / end
+ flow create 3 transfer
+ pattern represented_port ethdev_port_id is 3 / end
+ actions represented_port ethdev_port_id 4 / end
::
- flow create 4 ingress
- pattern eth src is {VF 1 MAC} / end
- actions port_id id 3 / end
+ flow create 3 transfer
+ pattern represented_port ethdev_port_id is 4 / end
+ actions represented_port ethdev_port_id 3 / end
Sharing Broadcasts
@@ -796,32 +819,58 @@ From outside to PF and VFs
::
- flow create 3 ingress
- pattern eth dst is ff:ff:ff:ff:ff:ff / end
- actions port_id id 3 / port_id id 4 / port_id id 5 / end
-
-Note ``port_id id 3`` is necessary otherwise only VFs would receive matching
+ flow create 3 transfer
+ pattern
+ represented_port ethdev_port_id is 3 /
+ eth dst is ff:ff:ff:ff:ff:ff /
+ end
+ actions
+ port_representor ethdev_port_id 3 /
+ represented_port ethdev_port_id 4 /
+ represented_port ethdev_port_id 5 /
+ end
+
+Note ``port_representor ethdev_port_id 3`` is necessary otherwise only VFs would receive matching
traffic.
From PF to outside and VFs
::
- flow create 3 egress
- pattern eth dst is ff:ff:ff:ff:ff:ff / end
- actions port / port_id id 4 / port_id id 5 / end
+ flow create 3 transfer
+ pattern
+ port_representor ethdev_port_id is 3 /
+ eth dst is ff:ff:ff:ff:ff:ff /
+ end
+ actions
+ represented_port ethdev_port_id 3 /
+ represented_port ethdev_port_id 4 /
+ represented_port ethdev_port_id 5 /
+ end
From VFs to outside and PF
::
- flow create 4 ingress
- pattern eth dst is ff:ff:ff:ff:ff:ff src is {VF 1 MAC} / end
- actions port_id id 3 / port_id id 5 / end
-
- flow create 5 ingress
- pattern eth dst is ff:ff:ff:ff:ff:ff src is {VF 2 MAC} / end
- actions port_id id 4 / port_id id 4 / end
+ flow create 3 transfer
+ pattern
+ represented_port ethdev_port_id is 4 /
+ eth dst is ff:ff:ff:ff:ff:ff /
+ end
+ actions
+ represented_port ethdev_port_id 3 /
+ port_representor ethdev_port_id 3 /
+ end
+
+ flow create 3 transfer
+ pattern
+ represented_port ethdev_port_id is 5 /
+ eth dst is ff:ff:ff:ff:ff:ff /
+ end
+ actions
+ represented_port ethdev_port_id 3 /
+ port_representor ethdev_port_id 3 /
+ end
Similar ``33:33:*`` rules based on known MAC addresses should be added for
IPv6 traffic.
@@ -852,10 +901,13 @@ endpoint might not be supported and action list must provide one
::
- flow create 5 ingress
- pattern eth src is {VF 2 MAC} / end
- actions vxlan_encap vni 42 / port_id id 3 / end
+ flow create 3 transfer
+ pattern represented_port ethdev_port_id is 5 / end
+ actions vxlan_encap vni 42 / represented_port ethdev_port_id 3 / end
- flow create 3 ingress
- pattern vxlan vni is 42 / end
- actions vxlan_decap / port_id id 5 / end
+ flow create 3 transfer
+ pattern
+ represented_port ethdev_port_id is 3 /
+ vxlan vni is 42 /
+ end
+ actions vxlan_decap / represented_port ethdev_port_id 5 / end
--
2.30.2
next prev parent reply other threads:[~2022-08-12 19:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-12 19:18 [PATCH 00/13] ethdev: proceed with flow subsystem rework Ivan Malov
2022-08-12 19:18 ` [PATCH 01/13] ethdev: strip experimental tag off Rx metadata negotiate API Ivan Malov
2022-08-12 19:18 ` [PATCH 02/13] ethdev: strip experimental tag off port ID items and actions Ivan Malov
2022-08-15 12:59 ` Ori Kam
2022-08-12 19:18 ` [PATCH 03/13] ethdev: remove experimental tag from flow transfer proxy API Ivan Malov
2022-08-15 12:58 ` Ori Kam
2022-08-12 19:18 ` [PATCH 04/13] net/dpaa2: support represented port flow action Ivan Malov
2022-08-12 19:18 ` [PATCH 05/13] net/cnxk: " Ivan Malov
2022-08-12 19:18 ` [PATCH 06/13] app/testpmd: add port steering targets to sample " Ivan Malov
2022-08-12 19:18 ` [PATCH 07/13] doc: revisit outdated flow rule examples in testpmd tutorial Ivan Malov
2022-08-12 19:18 ` Ivan Malov [this message]
2022-08-12 19:18 ` [PATCH 09/13] doc: rework VF-related explanations in switch representation Ivan Malov
2022-08-12 19:18 ` [PATCH 10/13] ethdev: remove deprecated flow item PF Ivan Malov
2022-08-22 5:32 ` Ori Kam
2022-08-12 19:18 ` [PATCH 11/13] ethdev: remove deprecated flow item VF Ivan Malov
2022-08-22 5:50 ` Ori Kam
2022-08-12 19:18 ` [PATCH 12/13] ethdev: remove deprecated flow item PHY PORT Ivan Malov
2022-08-22 5:33 ` Ori Kam
2022-09-27 7:08 ` Thomas Monjalon
2022-09-27 16:18 ` Ajit Khaparde
2022-08-12 19:18 ` [PATCH 13/13] ethdev: remove deprecated flow action " Ivan Malov
2022-08-22 5:33 ` Ori Kam
2022-09-27 8:32 ` [PATCH 00/13] ethdev: proceed with flow subsystem rework Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220812191827.3187441-9-ivan.malov@oktetlabs.ru \
--to=ivan.malov@oktetlabs.ru \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=elibr@nvidia.com \
--cc=ferruh.yigit@xilinx.com \
--cc=i.maximets@ovn.org \
--cc=jerinj@marvell.com \
--cc=orika@nvidia.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).