DPDK patches and discussions
 help / color / mirror / Atom feed
* RE: [PATCH] net/ice: fix the judgment order of buffer split
  2022-10-17 16:00 [PATCH] net/ice: fix the judgment order of buffer split Yuan Wang
@ 2022-10-17  8:40 ` Ding, Xuan
  2022-10-17  8:50   ` Wang, YuanX
  2022-10-17 17:04 ` [PATCH v2] " Yuan Wang
  1 sibling, 1 reply; 6+ messages in thread
From: Ding, Xuan @ 2022-10-17  8:40 UTC (permalink / raw)
  To: Wang, YuanX, Yang, Qiming, Zhang, Qi Z; +Cc: dev, Tang, Yaqi

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] net/ice: fix the judgment order of buffer split
  2022-10-17  8:40 ` Ding, Xuan
@ 2022-10-17  8:50   ` Wang, YuanX
  0 siblings, 0 replies; 6+ messages in thread
From: Wang, YuanX @ 2022-10-17  8:50 UTC (permalink / raw)
  To: Ding, Xuan, Yang, Qiming, Zhang, Qi Z; +Cc: dev, Tang, Yaqi

Hi Xuan,

> -----Original Message-----
> From: Ding, Xuan <xuan.ding@intel.com>
> Sent: Monday, October 17, 2022 4:40 PM
> 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; Tang, Yaqi <yaqi.tang@intel.com>
> Subject: RE: [PATCH] net/ice: fix the judgment order of buffer split
> 
> 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?

Yes, it's proto_hdr. Thanks for the correction.
Will fix in new version.

Thanks,
Yuan.

[...]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH v2] net/ice: fix the judgment order of buffer split
  2022-10-17 17:04 ` [PATCH v2] " Yuan Wang
@ 2022-10-17  9:34   ` Tang, Yaqi
  2022-10-18  7:01   ` Zhang, Qi Z
  1 sibling, 0 replies; 6+ messages in thread
From: Tang, Yaqi @ 2022-10-17  9:34 UTC (permalink / raw)
  To: Wang, YuanX, Yang, Qiming, Zhang, Qi Z; +Cc: dev, Ding, Xuan


> -----Original Message-----
> From: Wang, YuanX <yuanx.wang@intel.com>
> Sent: Tuesday, October 18, 2022 1:05 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 v2] 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 proto_hdr, the order of judgement should be
> 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>
> 
> ---
> v2: fix typo
> 
> ---

Tested-by: Yaqi Tang <yaqi.tang@intel.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] net/ice: fix the judgment order of buffer split
@ 2022-10-17 16:00 Yuan Wang
  2022-10-17  8:40 ` Ding, Xuan
  2022-10-17 17:04 ` [PATCH v2] " Yuan Wang
  0 siblings, 2 replies; 6+ messages in thread
From: Yuan Wang @ 2022-10-17 16:00 UTC (permalink / raw)
  To: Qiming Yang, Qi Zhang; +Cc: dev, xuan.ding, yaqi.tang, Yuan Wang

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 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] net/ice: fix the judgment order of buffer split
  2022-10-17 16:00 [PATCH] net/ice: fix the judgment order of buffer split Yuan Wang
  2022-10-17  8:40 ` Ding, Xuan
@ 2022-10-17 17:04 ` Yuan Wang
  2022-10-17  9:34   ` Tang, Yaqi
  2022-10-18  7:01   ` Zhang, Qi Z
  1 sibling, 2 replies; 6+ messages in thread
From: Yuan Wang @ 2022-10-17 17:04 UTC (permalink / raw)
  To: Qiming Yang, Qi Zhang; +Cc: dev, xuan.ding, yaqi.tang, Yuan Wang

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 proto_hdr, the order of judgement should
be 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>

---
v2: fix typo

---
 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH v2] net/ice: fix the judgment order of buffer split
  2022-10-17 17:04 ` [PATCH v2] " Yuan Wang
  2022-10-17  9:34   ` Tang, Yaqi
@ 2022-10-18  7:01   ` Zhang, Qi Z
  1 sibling, 0 replies; 6+ messages in thread
From: Zhang, Qi Z @ 2022-10-18  7:01 UTC (permalink / raw)
  To: Wang, YuanX, Yang, Qiming; +Cc: dev, Ding, Xuan, Tang,  Yaqi



> -----Original Message-----
> From: Wang, YuanX <yuanx.wang@intel.com>
> Sent: Tuesday, October 18, 2022 1:05 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 v2] 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 proto_hdr, the order of judgement should be
> 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>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-24 15:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17 16:00 [PATCH] net/ice: fix the judgment order of buffer split Yuan Wang
2022-10-17  8:40 ` Ding, Xuan
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

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).