DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sean Zhang <xiazhang@nvidia.com>
To: Ori Kam <orika@nvidia.com>, Xiaoyun Li <xiaoyun.li@intel.com>,
	Aman Singh <aman.deep.singh@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>,
	"Thomas Monjalon" <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>
Cc: <dev@dpdk.org>, Jiawei Wang <jiaweiw@nvidia.com>
Subject: [v1 1/4] ethdev: add IPv4/IPv6 ECN header rewrite action
Date: Sat, 2 Apr 2022 10:11:47 +0300	[thread overview]
Message-ID: <20220402071150.9392-2-xiazhang@nvidia.com> (raw)
In-Reply-To: <20220402071150.9392-1-xiazhang@nvidia.com>

From: Jiawei Wang <jiaweiw@nvidia.com>

This patch introduces the IPv4/IPv6 ECN modify field support, and
adds the testpmd CLI commands support.

Usage:
	modify_field op set dst_type ipv4_ecn src_type ...

For example:

flow create 0 ingress group 1 pattern eth / ipv4 /  end actions
	modify_field op set dst_type ipv4_ecn src_type value src_value
	0x03 width 2 / queue index 0 / end

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
---
 app/test-pmd/cmdline_flow.c | 3 ++-
 lib/ethdev/rte_flow.h       | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index fc4a6d9cca..3250add834 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -795,7 +795,8 @@ static const char *const modify_field_ids[] = {
 	"tcp_seq_num", "tcp_ack_num", "tcp_flags",
 	"udp_port_src", "udp_port_dst",
 	"vxlan_vni", "geneve_vni", "gtp_teid",
-	"tag", "mark", "meta", "pointer", "value", NULL
+	"tag", "mark", "meta", "pointer", "value",
+	"ipv4_ecn", "ipv6_ecn", NULL
 };
 
 /** Maximum number of subsequent tokens and arguments on the stack. */
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index d8827dd184..1b56f23cba 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -3690,6 +3690,8 @@ enum rte_flow_field_id {
 	RTE_FLOW_FIELD_META,		/**< Metadata value. */
 	RTE_FLOW_FIELD_POINTER,		/**< Memory pointer. */
 	RTE_FLOW_FIELD_VALUE,		/**< Immediate value. */
+	RTE_FLOW_FIELD_IPV4_ECN,	/**< IPv4 ECN. */
+	RTE_FLOW_FIELD_IPV6_ECN,	/**< IPv6 ECN. */
 };
 
 /**
-- 
2.31.1


  reply	other threads:[~2022-04-02  7:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-02  7:11 [v1 0/4] Add support for modifying ECN in IPv4/IPv6 header Sean Zhang
2022-04-02  7:11 ` Sean Zhang [this message]
2022-06-01 18:51   ` [v1 1/4] ethdev: add IPv4/IPv6 ECN header rewrite action Ferruh Yigit
2022-06-02  5:48     ` Ori Kam
2022-06-02 11:44       ` Ferruh Yigit
2022-04-02  7:11 ` [v1 2/4] common/mlx5: add modify ECN capability check Sean Zhang
2022-06-06  8:05   ` Slava Ovsiienko
2022-04-02  7:11 ` [v1 3/4] net/mlx5: add support to modify ECN field Sean Zhang
2022-06-06  7:17   ` Slava Ovsiienko
2022-04-02  7:11 ` [v1 4/4] net/mlx5: add modify field support in meter Sean Zhang
2022-06-06  7:18   ` Slava Ovsiienko
2022-06-01 18:51 ` [v1 0/4] Add support for modifying ECN in IPv4/IPv6 header Ferruh Yigit
2022-06-02 11:44   ` Ferruh Yigit
2022-06-02 13:13     ` Sean Zhang (Networking SW)

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=20220402071150.9392-2-xiazhang@nvidia.com \
    --to=xiazhang@nvidia.com \
    --cc=aman.deep.singh@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jiaweiw@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=xiaoyun.li@intel.com \
    --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
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).