From: Bing Zhao <bingz@nvidia.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
Olivier Matz <olivier.matz@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
Haiyue Wang <haiyue.wang@intel.com>,
Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [dpdk-dev] [RFC] net: make eCPRI header host network order
Date: Sat, 28 Nov 2020 03:18:25 +0000 [thread overview]
Message-ID: <CY4PR1201MB00729BBC5D0B62DD161B59BAD0F70@CY4PR1201MB0072.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20201127190920.3312280-1-ferruh.yigit@intel.com>
Hi Ferruh & Haiyue,
Have you checked other headers? Like:
rte_ipv4_hdr
rte_ipv6_hdr
rte_tcp_hdr
...
Also
[ITEM_UDP_SRC] = {
.name = "src",
.help = "UDP source port",
.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
hdr.src_port)),
},
[ITEM_UDP_DST] = {
.name = "dst",
.help = "UDP destination port",
.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
hdr.dst_port)),
},
Or did I get sth. wrong?
BR. Bing
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Saturday, November 28, 2020 3:09 AM
> To: Olivier Matz <olivier.matz@6wind.com>
> Cc: Ferruh Yigit <ferruh.yigit@intel.com>; dev@dpdk.org; Haiyue Wang
> <haiyue.wang@intel.com>; Stephen Hemminger
> <stephen@networkplumber.org>; Bing Zhao <bingz@nvidia.com>
> Subject: [RFC] net: make eCPRI header host network order
>
> External email: Use caution opening links or attachments
>
>
> Other protocol structs are in the host byte order, having eCPRI in
> network byte order is insistent and error prone.
>
> Making eCPRI protocol header host byte order.
>
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Cc: Bing Zhao <bingz@nvidia.com>
> Cc: Olivier Matz <olivier.matz@6wind.com>
> ---
> lib/librte_net/rte_ecpri.h | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/lib/librte_net/rte_ecpri.h b/lib/librte_net/rte_ecpri.h
> index 1cbd6d813363..67bf9186ff6f 100644
> --- a/lib/librte_net/rte_ecpri.h
> +++ b/lib/librte_net/rte_ecpri.h
> @@ -60,21 +60,20 @@ extern "C" {
> RTE_STD_C11
> struct rte_ecpri_common_hdr {
> union {
> - rte_be32_t u32; /**< 4B common
> header in BE */
> + uint32_t u32; /**< 4B common
> header in host byte order */
> struct {
> #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
> - uint32_t size:16; /**< Payload Size */
> - uint32_t type:8; /**< Message Type */
> uint32_t c:1; /**< Concatenation
> Indicator */
> uint32_t res:3; /**< Reserved */
> uint32_t revision:4; /**< Protocol
> Revision */
> + uint32_t type:8; /**< Message Type */
> #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
> uint32_t revision:4; /**< Protocol
> Revision */
> uint32_t res:3; /**< Reserved */
> uint32_t c:1; /**< Concatenation
> Indicator */
> uint32_t type:8; /**< Message Type */
> - uint32_t size:16; /**< Payload Size */
> #endif
> + uint32_t size:16; /**< Payload Size */
> };
> };
> };
> --
> 2.26.2
next prev parent reply other threads:[~2020-11-28 3:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-27 19:09 Ferruh Yigit
2020-11-28 3:18 ` Bing Zhao [this message]
2020-11-28 3:55 ` Wang, Haiyue
2020-11-28 5:31 ` Wang, Haiyue
2020-11-28 9:07 ` Bing Zhao
2020-11-30 1:15 ` Wang, Haiyue
2023-06-14 21:57 ` Stephen Hemminger
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=CY4PR1201MB00729BBC5D0B62DD161B59BAD0F70@CY4PR1201MB0072.namprd12.prod.outlook.com \
--to=bingz@nvidia.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=haiyue.wang@intel.com \
--cc=olivier.matz@6wind.com \
--cc=stephen@networkplumber.org \
/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).