From: Rongwei Liu <rongweil@nvidia.com>
To: Rongwei Liu <rongweil@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>,
Matan Azrad <matan@nvidia.com>,
Slava Ovsiienko <viacheslavo@nvidia.com>,
Ori Kam <orika@nvidia.com>,
"NBU-Contact-Thomas Monjalon (EXTERNAL)" <thomas@monjalon.net>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Cc: Aman Singh <aman.deep.singh@intel.com>,
Yuying Zhang <yuying.zhang@intel.com>,
Olivier Matz <olivier.matz@6wind.com>
Subject: RE: [PATCH v2] app/testpmd: set srv6 header without any TLV
Date: Fri, 26 May 2023 03:21:52 +0000 [thread overview]
Message-ID: <BN9PR12MB52738B05B6B8B3E771B5D411AB479@BN9PR12MB5273.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20230328122742.738048-1-rongweil@nvidia.com>
HI @Ori Kam @NBU-Contact-Thomas Monjalon (EXTERNAL) @Andrew Rybchenko
Can you share some comments on this?
Thanks.
BR
Rongwei
> -----Original Message-----
> From: Rongwei Liu <rongweil@nvidia.com>
> Sent: Tuesday, March 28, 2023 20:28
> To: dev@dpdk.org; Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; NBU-Contact-
> Thomas Monjalon (EXTERNAL) <thomas@monjalon.net>
> Cc: Aman Singh <aman.deep.singh@intel.com>; Yuying Zhang
> <yuying.zhang@intel.com>; Olivier Matz <olivier.matz@6wind.com>
> Subject: [PATCH v2] app/testpmd: set srv6 header without any TLV
>
> External email: Use caution opening links or attachments
>
>
> When the type field of the IPv6 routing extension is 4, it means segment
> routing header.
>
> In this case, set the last_entry to be segment_left minus 1 if the user doesn't
> specify the header length explicitly.
>
> Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
>
> v2: add macro definition for segment routing header.
> ---
> app/test-pmd/cmdline_flow.c | 3 +++
> lib/net/rte_ip.h | 3 +++
> 2 files changed, 6 insertions(+)
>
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index 5fbc450849..09f417b76e 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -12817,6 +12817,9 @@ cmd_set_raw_parsed(const struct buffer *in)
> size = sizeof(struct rte_ipv6_routing_ext) +
> (ext->hdr.segments_left << 4);
> ext->hdr.hdr_len = ext->hdr.segments_left << 1;
> + /* Srv6 without TLV. */
> + if (ext->hdr.type == RTE_IPV6_SRCRT_TYPE_4)
> + ext->hdr.last_entry =
> + ext->hdr.segments_left - 1;
> } else {
> size = sizeof(struct rte_ipv6_routing_ext) +
> (ext->hdr.hdr_len << 3); diff --git a/lib/net/rte_ip.h
> b/lib/net/rte_ip.h index 337fad15d7..cfdbfb86ba 100644
> --- a/lib/net/rte_ip.h
> +++ b/lib/net/rte_ip.h
> @@ -540,6 +540,9 @@ struct rte_ipv6_hdr {
> uint8_t dst_addr[16]; /**< IP address of destination host(s). */ }
> __rte_packed;
>
> +/* IPv6 routing extension type definition. */ #define
> +RTE_IPV6_SRCRT_TYPE_4 4
> +
> /**
> * IPv6 Routing Extension Header
> */
> --
> 2.27.0
next prev parent reply other threads:[~2023-05-26 3:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 9:36 [PATCH v1] " Rongwei Liu
2023-03-28 10:18 ` Thomas Monjalon
2023-03-28 12:27 ` [PATCH v2] " Rongwei Liu
2023-05-26 3:21 ` Rongwei Liu [this message]
2023-05-28 14:39 ` Ori Kam
2023-06-02 18:15 ` 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=BN9PR12MB52738B05B6B8B3E771B5D411AB479@BN9PR12MB5273.namprd12.prod.outlook.com \
--to=rongweil@nvidia.com \
--cc=aman.deep.singh@intel.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=olivier.matz@6wind.com \
--cc=orika@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).