From patchwork Sun Apr 4 09:49:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salem Sol X-Patchwork-Id: 90546 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9B97AA0547; Sun, 4 Apr 2021 11:49:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0581140E7A; Sun, 4 Apr 2021 11:49:26 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id 7E0C9140E0D for ; Sun, 4 Apr 2021 11:49:19 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from salems@nvidia.com) with SMTP; 4 Apr 2021 12:49:18 +0300 Received: from nvidia.com ([10.228.128.224]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 1349nDQG018750; Sun, 4 Apr 2021 12:49:18 +0300 From: Salem Sol To: dev@dpdk.org Cc: Salem Sol , Xiaoyun Li Date: Sun, 4 Apr 2021 12:49:09 +0300 Message-Id: <20210404094910.95413-7-salems@nvidia.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210404094910.95413-1-salems@nvidia.com> References: <20210404094910.95413-1-salems@nvidia.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v4 6/7] doc: update sample actions support in testpmd guide X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Update documentation for sample action usage in testpmd utilizing rte_flow_action_vxlan_encap and rte_flow_action_nvgre_encap and show the command line example. Signed-off-by: Salem Sol --- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index 2b407a3e9a..36f0a328a5 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -4893,6 +4893,30 @@ encapsulation header and sent to port id 0. 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 +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 + BPF Functions --------------