DPDK patches and discussions
 help / color / mirror / Atom feed
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>,
	Aman Singh <aman.deep.singh@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>
Subject: [PATCH 07/13] doc: revisit outdated flow rule examples in testpmd tutorial
Date: Fri, 12 Aug 2022 22:18:21 +0300
Message-ID: <20220812191827.3187441-8-ivan.malov@oktetlabs.ru> (raw)
In-Reply-To: <20220812191827.3187441-1-ivan.malov@oktetlabs.ru>

There are testpmd examples which demonstrate flow alteration
and steering between endpoints using outdated action PORT_ID.
Revisit these examples to make use of new port-based actions.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 48 +++++----------------
 1 file changed, 11 insertions(+), 37 deletions(-)

diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 330e34427d..c105200fe7 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -5098,49 +5098,23 @@ and 50% packets are duplicated and marked with 0x1234 and sent to queue 0.
  testpmd> flow create 0 ingress group 1 pattern eth / end actions
         sample ratio 2 index 0 / queue index 1 / end
 
-Mirroring rule with port representors (with "transfer" attribute), the matched
-ingress packets with encapsulation header are sent to port id 0, and also
-mirrored the packets and sent to port id 2.
+Match packets coming from a VM which is referred to by means of
+its representor ethdev (port 1), mirror 50% of them to the
+said representor (for bookkeeping) as well as encapsulate
+all the packets and steer them to the physical port:
 
 ::
 
- testpmd> set sample_actions 0 port_id id 2 / end
- testpmd> flow create 1 ingress transfer pattern eth / end actions
-        sample ratio 1 index 0  / raw_encap / port_id id 0 / end
+   testpmd> set sample_actions 0 port_representor ethdev_port_id 1 / end
 
-Mirroring rule with port representors (with "transfer" attribute), the matched
-ingress packets are sent to port id 2, and also mirrored the packets with
-encapsulation header and sent to port id 0.
+   testpmd> set vxlan ip-version ipv4 vni 4 udp-src 32 udp-dst 4789 ip-src 127.0.0.1
+      ip-dst 127.0.0.2 eth-src 11:11:11:11:11:11 eth-dst 22:22:22:22:22:22
 
-::
-
- testpmd> set sample_actions 0 raw_encap / port_id id 0 / end
- testpmd> flow create 0 ingress transfer pattern eth / end actions
-        sample ratio 1 index 0  / port_id id 2 / end
+   testpmd> flow create 0 transfer pattern represented_port ethdev_port_id is 1 / end
+      actions sample ratio 2 index 0 / vxlan_encap /
+      represented_port ethdev_port_id 0 / end
 
-Mirroring rule with port representors (with "transfer" attribute), the matched
-ingress packets are sent to port id 2, and also mirrored the packets with
-VXLAN encapsulation header and sent to port id 0.
-
-::
-
- testpmd> set vxlan ip-version ipv4 vni 4 udp-src 4 udp-dst 4 ip-src 127.0.0.1
-        ip-dst 128.0.0.1 eth-src 11:11:11:11:11:11 eth-dst 22:22:22:22:22:22
- testpmd> set sample_actions 0 vxlan_encap / port_id id 0 / end
- testpmd> flow create 0 ingress transfer pattern eth / end actions
-        sample ratio 1 index 0  / port_id id 2 / end
-
-Mirroring rule with port representors (with "transfer" attribute), the matched
-ingress packets are sent to port id 2, and also mirrored the packets with
-NVGRE encapsulation header and sent to port id 0.
-
-::
-
- testpmd> set nvgre ip-version ipv4 tni 4 ip-src 127.0.0.1 ip-dst 128.0.0.1
-        eth-src 11:11:11:11:11:11 eth-dst 22:22:22:22:22:22
- testpmd> set sample_actions 0 nvgre_encap / port_id id 0 / end
- testpmd> flow create 0 ingress transfer pattern eth / end actions
-        sample ratio 1 index 0  / port_id id 2 / end
+The rule is inserted via port 0 (assumed to have "transfer" privilege).
 
 Sample integrity rules
 ~~~~~~~~~~~~~~~~~~~~~~
-- 
2.30.2


  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 ` Ivan Malov [this message]
2022-08-12 19:18 ` [PATCH 08/13] doc: add new port items and actions to switch representation Ivan Malov
2022-08-12 19:18 ` [PATCH 09/13] doc: rework VF-related explanations in " 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-8-ivan.malov@oktetlabs.ru \
    --to=ivan.malov@oktetlabs.ru \
    --cc=aman.deep.singh@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=elibr@nvidia.com \
    --cc=i.maximets@ovn.org \
    --cc=jerinj@marvell.com \
    --cc=orika@nvidia.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    --cc=yuying.zhang@intel.com \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git