From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id A1916A0A0C;
	Wed,  7 Apr 2021 13:51:31 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 8943E406A3;
	Wed,  7 Apr 2021 13:51:31 +0200 (CEST)
Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])
 by mails.dpdk.org (Postfix) with ESMTP id C74104013F
 for <dev@dpdk.org>; Wed,  7 Apr 2021 13:51:29 +0200 (CEST)
Received: from Internal Mail-Server by MTLPINE1 (envelope-from
 salems@nvidia.com) with SMTP; 7 Apr 2021 14:51:29 +0300
Received: from nvidia.com ([10.228.128.224])
 by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 137BpTgE023054;
 Wed, 7 Apr 2021 14:51:29 +0300
From: Salem Sol <salems@nvidia.com>
To: dev@dpdk.org
Cc: Salem Sol <salems@nvidia.com>, Xiaoyun Li <xiaoyun.li@intel.com>
Date: Wed,  7 Apr 2021 14:51:25 +0300
Message-Id: <20210407115126.2930-1-salems@nvidia.com>
X-Mailer: git-send-email 2.21.0
In-Reply-To: <20210404094910.95413-7-salems@nvidia.com>
References: <20210404094910.95413-7-salems@nvidia.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-dev] [v5 6/6] 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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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 <salems@nvidia.com>
---
 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
 --------------
 
-- 
2.21.0