DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Xiaoyu Min <jackmin@mellanox.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	John McNamara <john.mcnamara@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 1/3] app/testpmd: support raw encap/decap actions
Date: Tue, 16 Jul 2019 18:41:37 +0100	[thread overview]
Message-ID: <7dfd0a52-40ca-0d3f-a991-49760c99d3e1@intel.com> (raw)
In-Reply-To: <89bad2e391ed6275fcfc89e43cc27106107bfbd9.1562754908.git.jackmin@mellanox.com>

On 7/10/2019 11:43 AM, Xiaoyu Min wrote:
> This patch intend to support
> action_raw_encap/decap [1] in a generic and convenient way.
> 
> Two new commands - set raw_encap, set raw_decap are introduced just
> like the other commands for encap/decap, i.e. set vxlan.
> 
> These two commands have corresponding global buffers
> which can be used by PMD as the input buffer for raw encap/decap.
> 
> The commands use the rte_flow pattern syntax to help user build the
> raw buffer in a convenient way.
> 
> A common way to use it:
> 
> - encap matched egress packet with VxLAN tunnel:
> testpmd> set raw_encap eth src is 10:11:22:33:44:55 / vlan tci is 1
> 	 inner_type is 0x0800 / ipv4 / udp dst is 4789 / vxlan vni
> 	 is 2 / end_set
> testpmd> flow create 0 egress pattern eth / ipv4 / end actions
> 	 raw_encap / end
> 
> - decap l2 header and encap GRE tunnel on matched egress packet:
> testpmd> set raw_decap eth / end_set
> testpmd> set raw_encap eth dst is 10:22:33:44:55:66 / ipv4 / gre
> 	 protocol is 0x0800 / end_set
> testpmd> flow create 0 egress pattern eth / ipv4 / end actions
> 	 raw_decap / raw_encap / end
> 
> - decap VxLAN tunnel and encap l2 header on matched ingress packet:
> testpmd> set raw_encap eth src is 10:11:22:33:44:55 type is 0x0800 /
> 	 end_set
> testpmd> set raw_decap eth / ipv4 / udp / vxlan / end_set
> testpmd> flow create 0 ingress pattern eth / ipv4 / udp dst is 250 /
>          vxlan vni is 0x1234 / ipv4 / end actions raw_decap /
>          raw_encap / queue index 1 / mark id 0x1234 / end
> 
> [1] http://mails.dpdk.org/archives/dev/2018-October/116092.html
> 
> Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
> ---
>  app/test-pmd/cmdline.c                      |   7 +
>  app/test-pmd/cmdline_flow.c                 | 535 +++++++++++++++++++-
>  app/test-pmd/testpmd.h                      |   2 +
>  doc/guides/testpmd_app_ug/testpmd_funcs.rst |  48 ++
>  4 files changed, 591 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 01dd45f27c..69c5d9e8f6 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -760,6 +760,12 @@ static void cmd_help_long_parsed(void *parsed_result,
>  			" eth-src (eth-src) eth-dst (eth-dst)\n"
>  			"       Configure the NVGRE encapsulation for flows.\n\n"
>  
> +			"raw_encap {flow items}"
> +			"	Configure the encapsulation with raw data.\n\n"
> +
> +			"raw_decap {flow items}"
> +			"	Configure the decapsulation with raw data.\n\n"
> +
>  			, list_pkt_forwarding_modes()
>  		);
>  	}

I think the exact command is "set raw_encap {flow items}" && "set raw_decap
{flow items}", also can you please move them "filters" section, from current
"config" section?

Overall these dynamic commands nice from user perspective, thanks to Adrien, but
the amount of code it brings and complexity a little worries me for long term...


  reply	other threads:[~2019-07-16 17:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 15:37 [dpdk-dev] [PATCH 0/2] " Xiaoyu Min
2019-06-24 15:37 ` [dpdk-dev] [PATCH 1/2] " Xiaoyu Min
2019-06-24 15:37 ` [dpdk-dev] [PATCH 2/2] app/testpmd: support MPLS's TC and S bits Xiaoyu Min
2019-07-02 13:53 ` [dpdk-dev] [PATCH v2 0/3] app/testpmd: support raw encap/decap actions Xiaoyu Min
2019-07-02 13:53   ` [dpdk-dev] [PATCH v2 1/3] " Xiaoyu Min
2019-07-08 17:41     ` Ferruh Yigit
2019-07-09  4:25       ` Jack Min
2019-07-02 13:53   ` [dpdk-dev] [PATCH v2 2/3] app/testpmd: support MPLS's TC and S bits Xiaoyu Min
2019-07-02 13:53   ` [dpdk-dev] [PATCH v2 3/3] app/testpmd: add GRE key for raw encap/decap Xiaoyu Min
2019-07-10 10:43 ` [dpdk-dev] [PATCH v3 0/3] app/testpmd: support raw encap/decap actions Xiaoyu Min
2019-07-10 10:43   ` [dpdk-dev] [PATCH v3 1/3] " Xiaoyu Min
2019-07-16 17:41     ` Ferruh Yigit [this message]
2019-07-17  1:24       ` Jack Min
2019-07-17  8:20         ` Ferruh Yigit
2019-07-17  9:18           ` Jack Min
2019-07-10 10:43   ` [dpdk-dev] [PATCH v3 2/3] app/testpmd: support MPLS's TC and S bits Xiaoyu Min
2019-07-10 10:43   ` [dpdk-dev] [PATCH v3 3/3] app/testpmd: add GRE key for raw encap/decap Xiaoyu Min
2019-07-17 12:27 ` [dpdk-dev] [PATCH v4 0/4] app/testpmd: support raw encap/decap actions Xiaoyu Min
2019-07-17 12:27   ` [dpdk-dev] [PATCH v4 1/4] app/testpmd: put set vxlan/nvgre help in filters section Xiaoyu Min
2019-07-17 12:27   ` [dpdk-dev] [PATCH v4 2/4] app/testpmd: support raw encap/decap actions Xiaoyu Min
2019-07-17 12:27   ` [dpdk-dev] [PATCH v4 3/4] app/testpmd: support MPLS's TC and S bits Xiaoyu Min
2019-07-17 12:27   ` [dpdk-dev] [PATCH v4 4/4] app/testpmd: add GRE key for raw encap/decap Xiaoyu Min
2019-07-17 16:31   ` [dpdk-dev] [PATCH v4 0/4] app/testpmd: support raw encap/decap actions Ferruh Yigit

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=7dfd0a52-40ca-0d3f-a991-49760c99d3e1@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=jackmin@mellanox.com \
    --cc=jingjing.wu@intel.com \
    --cc=john.mcnamara@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=wenzhuo.lu@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
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).