From: Rongwei Liu <rongweil@nvidia.com>
To: <dev@dpdk.org>, <matan@nvidia.com>, <viacheslavo@nvidia.com>,
<orika@nvidia.com>, <thomas@monjalon.net>
Cc: <rasland@nvidia.com>, Aman Singh <aman.deep.singh@intel.com>,
Yuying Zhang <yuying.zhang@intel.com>
Subject: [PATCH v4 3/3] app/testpmd: add IPv6 routing extension header in raw encap
Date: Tue, 31 Jan 2023 11:36:57 +0200 [thread overview]
Message-ID: <20230131093657.2240006-4-rongweil@nvidia.com> (raw)
In-Reply-To: <20230131093657.2240006-1-rongweil@nvidia.com>
Add IPv6 routing extension header support in raw_encap command.
1. No TLV support now.
2. Assume header length equals to the current segment_left.
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
app/test-pmd/cmdline_flow.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index b8156ebca2..1340cf3a9b 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -10926,6 +10926,13 @@ flow_item_default_mask(const struct rte_flow_item *item)
{
const void *mask = NULL;
static rte_be32_t gre_key_default_mask = RTE_BE32(UINT32_MAX);
+ static struct rte_flow_item_ipv6_routing_ext ipv6_routing_ext_default_mask = {
+ .hdr = {
+ .next_hdr = 0xff,
+ .type = 0xff,
+ .segments_left = 0xff,
+ },
+ };
switch (item->type) {
case RTE_FLOW_ITEM_TYPE_ANY:
@@ -11028,6 +11035,9 @@ flow_item_default_mask(const struct rte_flow_item *item)
case RTE_FLOW_ITEM_TYPE_METER_COLOR:
mask = &rte_flow_item_meter_color_mask;
break;
+ case RTE_FLOW_ITEM_TYPE_IPV6_ROUTING_EXT:
+ mask = &ipv6_routing_ext_default_mask;
+ break;
default:
break;
}
@@ -11182,6 +11192,7 @@ cmd_set_raw_parsed(const struct buffer *in)
for (i = n - 1 ; i >= 0; --i) {
const struct rte_flow_item_gtp *gtp;
const struct rte_flow_item_geneve_opt *opt;
+ struct rte_flow_item_ipv6_routing_ext *ext;
item = in->args.vc.pattern + i;
if (item->spec == NULL)
@@ -11202,6 +11213,18 @@ cmd_set_raw_parsed(const struct buffer *in)
size = sizeof(struct rte_ipv6_hdr);
proto = RTE_ETHER_TYPE_IPV6;
break;
+ case RTE_FLOW_ITEM_TYPE_IPV6_ROUTING_EXT:
+ ext = (struct rte_flow_item_ipv6_routing_ext *)(uintptr_t)item->spec;
+ if (!ext->hdr.hdr_len) {
+ size = sizeof(struct rte_ipv6_routing_ext) +
+ (ext->hdr.segments_left << 4);
+ ext->hdr.hdr_len = ext->hdr.segments_left << 1;
+ } else {
+ size = sizeof(struct rte_ipv6_routing_ext) +
+ (ext->hdr.hdr_len << 3);
+ }
+ proto = IPPROTO_ROUTING;
+ break;
case RTE_FLOW_ITEM_TYPE_UDP:
size = sizeof(struct rte_udp_hdr);
proto = 0x11;
--
2.27.0
next prev parent reply other threads:[~2023-01-31 9:37 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 8:42 [RFC 0/9] support ipv6 routing header matching Rongwei Liu
2022-12-21 8:42 ` [RFC 1/9] ethdev: add IPv6 routing extension header definition Rongwei Liu
2023-01-16 16:15 ` Ori Kam
2023-01-17 2:50 ` Rongwei Liu
2023-01-19 3:11 ` [PATCH v2 0/8] add IPv6 routing extension support Rongwei Liu
2023-01-19 3:11 ` [PATCH v2 1/8] ethdev: add IPv6 routing extension header definition Rongwei Liu
2023-01-20 9:20 ` Andrew Rybchenko
2023-01-30 3:46 ` Rongwei Liu
2023-01-30 3:59 ` [PATCH v3 0/8] add IPv6 routing extension support Rongwei Liu
2023-01-30 3:59 ` [PATCH v3 1/8] ethdev: add IPv6 routing extension header definition Rongwei Liu
2023-01-30 16:47 ` Stephen Hemminger
2023-01-31 2:03 ` Rongwei Liu
2023-01-31 2:27 ` Rongwei Liu
2023-01-31 2:55 ` Stephen Hemminger
2023-01-31 3:20 ` Rongwei Liu
2023-01-30 16:50 ` Stephen Hemminger
2023-01-31 2:05 ` Rongwei Liu
2023-01-31 3:02 ` Stephen Hemminger
2023-01-31 3:24 ` Rongwei Liu
2023-01-31 9:18 ` Rongwei Liu
2023-01-31 9:42 ` Thomas Monjalon
2023-01-31 11:42 ` Ori Kam
2023-01-31 9:36 ` [PATCH v4 0/3] add IPv6 routing extension support Rongwei Liu
2023-01-31 9:36 ` [PATCH v4 1/3] ethdev: add IPv6 routing extension header definition Rongwei Liu
2023-02-01 9:21 ` Andrew Rybchenko
2023-02-01 9:27 ` Rongwei Liu
2023-02-01 9:31 ` Andrew Rybchenko
2023-02-01 11:35 ` [PATCH v5 0/3] add IPv6 routing extension support Rongwei Liu
2023-02-01 11:35 ` [PATCH v5 1/3] ethdev: add IPv6 routing extension header definition Rongwei Liu
2023-02-01 11:39 ` Andrew Rybchenko
2023-02-01 13:44 ` Thomas Monjalon
2023-02-02 10:00 ` [PATCH v6 0/3] add IPv6 routing extension support Rongwei Liu
2023-02-02 10:00 ` [PATCH v6 1/3] ethdev: add IPv6 routing extension header definition Rongwei Liu
2023-02-02 10:00 ` [PATCH v6 2/3] ethdev: add modify IPv6 protocol field Rongwei Liu
2023-02-02 10:00 ` [PATCH v6 3/3] app/testpmd: add IPv6 routing extension header in raw encap Rongwei Liu
2023-02-03 18:36 ` [PATCH v6 0/3] add IPv6 routing extension support Ferruh Yigit
2023-02-01 11:35 ` [PATCH v5 2/3] ethdev: add modify IPv6 protocol field Rongwei Liu
2023-02-01 11:39 ` Andrew Rybchenko
2023-02-01 16:55 ` Stephen Hemminger
2023-02-02 2:12 ` Rongwei Liu
2023-02-01 11:35 ` [PATCH v5 3/3] app/testpmd: add IPv6 routing extension header in raw encap Rongwei Liu
2023-01-31 9:36 ` [PATCH v4 2/3] ethdev: add modify IPv6 protocol field Rongwei Liu
2023-02-01 9:14 ` Andrew Rybchenko
2023-01-31 9:36 ` Rongwei Liu [this message]
2023-01-30 3:59 ` [PATCH v3 2/8] net/mlx5: adopt IPv6 routing extension prm definition Rongwei Liu
2023-01-30 3:59 ` [PATCH v3 3/8] net/mlx5/hws: Definer, add mlx5dr context to definer_conv_data Rongwei Liu
2023-01-30 3:59 ` [PATCH v3 4/8] net/mlx5/hws: add IPv6 routing extension matching support Rongwei Liu
2023-01-30 3:59 ` [PATCH v3 5/8] app/testpmd: add IPv6 routing extension header in raw encap Rongwei Liu
2023-01-30 3:59 ` [PATCH v3 6/8] ethdev: add modify IPv6 protocol field Rongwei Liu
2023-01-30 3:59 ` [PATCH v3 7/8] net/mlx5: add modify IPv6 protocol implementation Rongwei Liu
2023-01-30 3:59 ` [PATCH v3 8/8] doc/mlx5: add IPv6 routing extension matching docs Rongwei Liu
2023-01-19 3:11 ` [PATCH v2 2/8] net/mlx5: adopt IPv6 routing extension prm definition Rongwei Liu
2023-01-19 3:11 ` [PATCH v2 3/8] net/mlx5/hws: Definer, add mlx5dr context to definer_conv_data Rongwei Liu
2023-01-19 3:11 ` [PATCH v2 4/8] net/mlx5/hws: add IPv6 routing extension matching support Rongwei Liu
2023-01-19 3:11 ` [PATCH v2 5/8] app/testpmd: add IPv6 routing extension header in raw encap Rongwei Liu
2023-01-19 3:11 ` [PATCH v2 6/8] ethdev: add modify IPv6 protocol field Rongwei Liu
2023-01-19 3:11 ` [PATCH v2 7/8] net/mlx5: add modify IPv6 protocol implementation Rongwei Liu
2023-01-19 3:11 ` [PATCH v2 8/8] doc/mlx5: add IPv6 routing extension matching docs Rongwei Liu
2022-12-21 8:42 ` [RFC 2/9] app/testpmd: add IPv6 routing extension header support Rongwei Liu
2022-12-21 8:42 ` [RFC 3/9] net/mlx5: adopt new flex item definition Rongwei Liu
2022-12-21 8:42 ` [RFC 4/9] net/mlx5/hws: Definer, add mlx5dr context to definer_conv_data Rongwei Liu
2022-12-21 8:43 ` [RFC 5/9] net/mlx5/hws: add IPv6 routing extension matching support Rongwei Liu
2022-12-21 8:43 ` [RFC 6/9] app/testpmd: add IPv6 routing extension header in raw encap Rongwei Liu
2022-12-21 8:43 ` [RFC 7/9] ethdev: add modify IPv6 protocol field Rongwei Liu
2023-01-16 16:20 ` Ori Kam
2022-12-21 8:43 ` [RFC 8/9] app/testpmd: add modify IPv6 protocol command line Rongwei Liu
2022-12-21 8:43 ` [RFC 9/9] net/mlx5/hws: add modify IPv6 protocol implementation Rongwei Liu
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=20230131093657.2240006-4-rongweil@nvidia.com \
--to=rongweil@nvidia.com \
--cc=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.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).