From: "Ding, Xuan" <xuan.ding@intel.com>
To: "Wang, YuanX" <yuanx.wang@intel.com>,
"Yang, Qiming" <qiming.yang@intel.com>,
"Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "Tang, Yaqi" <yaqi.tang@intel.com>
Subject: RE: [PATCH] net/ice: fix the judgment order of buffer split
Date: Mon, 17 Oct 2022 08:40:18 +0000 [thread overview]
Message-ID: <BN9PR11MB5513289B0A0FFBD626BF7395E7299@BN9PR11MB5513.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20221017160021.773879-1-yuanx.wang@intel.com>
Hi Yuan,
> -----Original Message-----
> From: Wang, YuanX <yuanx.wang@intel.com>
> Sent: Tuesday, October 18, 2022 12:00 AM
> To: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Ding, Xuan <xuan.ding@intel.com>; Tang, Yaqi
> <yaqi.tang@intel.com>; Wang, YuanX <yuanx.wang@intel.com>
> Subject: [PATCH] net/ice: fix the judgment order of buffer split
>
> proto_hdr defines a bit mask of the protocol sequence as RTE_PTYPE_*, The
> last RTE_PTYPE* in the mask indicates the split position.
>
> To get the split position from hdr_proto, the order of judgement should be
The hdr_proto here should be proto_hdr?
Thanks,
Xuan
> from inner to outer layer, so for tunneling packets the tunnel header should
> be placed at the end of the judgement condition.
>
> Fixes: 629dad3ef325 ("net/ice: support buffer split in scalar Rx")
>
> Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
> ---
> drivers/net/ice/ice_rxtx.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index
> 953ff217df..7a2d5829c0 100644
> --- a/drivers/net/ice/ice_rxtx.c
> +++ b/drivers/net/ice/ice_rxtx.c
> @@ -324,13 +324,6 @@ ice_program_hw_rx_queue(struct ice_rx_queue
> *rxq)
> goto set_hsplit_finish;
> }
>
> - switch (proto_hdr & RTE_PTYPE_TUNNEL_MASK) {
> - case RTE_PTYPE_TUNNEL_GRENAT:
> - rx_ctx.dtype = ICE_RX_DTYPE_HEADER_SPLIT;
> - rx_ctx.hsplit_1 =
> ICE_RLAN_RX_HSPLIT_1_SPLIT_ALWAYS;
> - goto set_hsplit_finish;
> - }
> -
> switch (proto_hdr & RTE_PTYPE_INNER_L4_MASK) {
> case RTE_PTYPE_INNER_L4_TCP:
> case RTE_PTYPE_INNER_L4_UDP:
> @@ -358,6 +351,13 @@ ice_program_hw_rx_queue(struct ice_rx_queue
> *rxq)
> goto set_hsplit_finish;
> }
>
> + switch (proto_hdr & RTE_PTYPE_TUNNEL_MASK) {
> + case RTE_PTYPE_TUNNEL_GRENAT:
> + rx_ctx.dtype = ICE_RX_DTYPE_HEADER_SPLIT;
> + rx_ctx.hsplit_1 =
> ICE_RLAN_RX_HSPLIT_1_SPLIT_ALWAYS;
> + goto set_hsplit_finish;
> + }
> +
> PMD_DRV_LOG(ERR, "Buffer split protocol is not supported");
> return -EINVAL;
>
> --
> 2.25.1
next prev parent reply other threads:[~2022-10-17 8:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 16:00 Yuan Wang
2022-10-17 8:40 ` Ding, Xuan [this message]
2022-10-17 8:50 ` Wang, YuanX
2022-10-17 17:04 ` [PATCH v2] " Yuan Wang
2022-10-17 9:34 ` Tang, Yaqi
2022-10-18 7:01 ` Zhang, Qi Z
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=BN9PR11MB5513289B0A0FFBD626BF7395E7299@BN9PR11MB5513.namprd11.prod.outlook.com \
--to=xuan.ding@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=yaqi.tang@intel.com \
--cc=yuanx.wang@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).