Skip to contentSkip to conversation

net/iavf: fix select wrong scan hw ring by rxdid

PATCH Applied Steve Yang 4 participants 4 messages Mar 14, 2022 – Mar 24, 2022 Network drivers

lore
Share & tools
lore

Steve Yang

author
#0 lore raw

PATCH 1/1 net/iavf: fix select wrong scan hw ring by rxdid

When setup RX queue, the rxdid would be changed if it's "IAVF_RXDID_LEGACY_0/1", that caused the scan hw ring used the wrong function 'iavf_rx_scan_hw_ring_flex_rxd()'.

Ignore the rxdid changed when equals "IAVF_RXDID_LEGACY_0/1".

Fixes 0ed16e01313e ("net/iavf: fix function pointer in multi-process")
---
 drivers/net/iavf/iavf_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/iavf/iavf_rxtx.c +4 -0
index 16e8d021f9..3b16609f7d 100644
@@ -477,6 +477,8 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct iavf_rx_queue *rxq,
 
 static const
 iavf_rxd_to_pkt_fields_t rxd_to_pkt_fields_ops[IAVF_RXDID_LAST + 1] = {
+	[IAVF_RXDID_LEGACY_0] = iavf_rxd_to_pkt_fields_by_comms_ovs,
+	[IAVF_RXDID_LEGACY_1] = iavf_rxd_to_pkt_fields_by_comms_ovs,
 	[IAVF_RXDID_COMMS_AUX_VLAN] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
 	[IAVF_RXDID_COMMS_AUX_IPV4] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
 	[IAVF_RXDID_COMMS_AUX_IPV6] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
@@ -521,6 +523,8 @@ iavf_select_rxd_to_pkt_fields_handler(struct iavf_rx_queue *rxq, uint32_t rxdid)
 			rte_pmd_ifd_dynflag_proto_xtr_ipsec_crypto_said_mask;
 		break;
 	case IAVF_RXDID_COMMS_OVS_1:
+	case IAVF_RXDID_LEGACY_0:
+	case IAVF_RXDID_LEGACY_1:
 		break;
 	default:
 		/* update this according to the RXDID for FLEX_DESC_NONE */
Signature · 1 line
2.27.0
Acked-by on v1 1/1
#1 lore raw
Quoted 53 lines

-----Original Message-----
From: Yang, SteveX <[email protected]>
Sent: Monday, March 14, 2022 5:32 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>; Yang, SteveX <[email protected]>; [email protected]
Subject: [PATCH v1] net/iavf: fix select wrong scan hw ring by rxdid

When setup RX queue, the rxdid would be changed if it's "IAVF_RXDID_LEGACY_0/1", that caused the scan hw ring used the wrong function 'iavf_rx_scan_hw_ring_flex_rxd()'.

Ignore the rxdid changed when equals "IAVF_RXDID_LEGACY_0/1".

Fixes 0ed16e01313e ("net/iavf: fix function pointer in multi-process")
---
 drivers/net/iavf/iavf_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/iavf/iavf_rxtx.c index renamed from drivers/net/iavf/iavf_rxtx.c +0 -0

16e8d021f9..3b16609f7d 100644

drivers/net/iavf/iavf_rxtx.c +2 -0
@@ -477,6 +477,8 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct
 iavf_rx_queue *rxq,
 
 static const
 iavf_rxd_to_pkt_fields_t rxd_to_pkt_fields_ops[IAVF_RXDID_LAST + 1] = {
+	[IAVF_RXDID_LEGACY_0] = iavf_rxd_to_pkt_fields_by_comms_ovs,
+	[IAVF_RXDID_LEGACY_1] = iavf_rxd_to_pkt_fields_by_comms_ovs,
 	[IAVF_RXDID_COMMS_AUX_VLAN] =
 iavf_rxd_to_pkt_fields_by_comms_aux_v1,

[IAVF_RXDID_COMMS_AUX_IPV4] =
iavf_rxd_to_pkt_fields_by_comms_aux_v1,
[IAVF_RXDID_COMMS_AUX_IPV6] =
iavf_rxd_to_pkt_fields_by_comms_aux_v1,

drivers/net/iavf/iavf_rxtx.c +2 -0
@@ -521,6 +523,8 @@ iavf_select_rxd_to_pkt_fields_handler(struct
 iavf_rx_queue *rxq, uint32_t rxdid)
 
 	rte_pmd_ifd_dynflag_proto_xtr_ipsec_crypto_said_mask;
 		break;
 	case IAVF_RXDID_COMMS_OVS_1:
+	case IAVF_RXDID_LEGACY_0:
+	case IAVF_RXDID_LEGACY_1:
 		break;
drivers/net/iavf/iavf_rxtx.c +0 -0
 	default:
 		/* update this according to the RXDID for FLEX_DESC_NONE
Quoted 3 lines

*/
--
2.27.0

Applied
#2 lore raw
Quoted 66 lines

-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Wednesday, March 16, 2022 4:12 PM
To: Yang, SteveX <[email protected]>; [email protected]
Cc: Wu, Jingjing <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: RE: [PATCH v1] net/iavf: fix select wrong scan hw ring by rxdid

Quoted 51 lines

-----Original Message-----
From: Yang, SteveX <[email protected]>
Sent: Monday, March 14, 2022 5:32 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>; Yang, SteveX <[email protected]>; [email protected]
Subject: [PATCH v1] net/iavf: fix select wrong scan hw ring by rxdid

When setup RX queue, the rxdid would be changed if it's "IAVF_RXDID_LEGACY_0/1", that caused the scan hw ring used the wrong function 'iavf_rx_scan_hw_ring_flex_rxd()'.

Ignore the rxdid changed when equals "IAVF_RXDID_LEGACY_0/1".

Fixes 0ed16e01313e ("net/iavf: fix function pointer in

multi-process")
Cc: [email protected]

---
 drivers/net/iavf/iavf_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)
(quoted diff) +0 -0

b/drivers/net/iavf/iavf_rxtx.c index 16e8d021f9..3b16609f7d 100644

drivers/net/iavf/iavf_rxtx.c +2 -0
@@ -477,6 +477,8 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct
 iavf_rx_queue *rxq,
 
 static const
 iavf_rxd_to_pkt_fields_t rxd_to_pkt_fields_ops[IAVF_RXDID_LAST + 1] =
 {
+	[IAVF_RXDID_LEGACY_0] = iavf_rxd_to_pkt_fields_by_comms_ovs,
+	[IAVF_RXDID_LEGACY_1] = iavf_rxd_to_pkt_fields_by_comms_ovs,
 	[IAVF_RXDID_COMMS_AUX_VLAN] =

iavf_rxd_to_pkt_fields_by_comms_aux_v1,
[IAVF_RXDID_COMMS_AUX_IPV4] =
iavf_rxd_to_pkt_fields_by_comms_aux_v1,
[IAVF_RXDID_COMMS_AUX_IPV6] =
iavf_rxd_to_pkt_fields_by_comms_aux_v1,

drivers/net/iavf/iavf_rxtx.c +2 -0
@@ -521,6 +523,8 @@ iavf_select_rxd_to_pkt_fields_handler(struct
 iavf_rx_queue *rxq, uint32_t rxdid)
 
 	rte_pmd_ifd_dynflag_proto_xtr_ipsec_crypto_said_mask;
 		break;
 	case IAVF_RXDID_COMMS_OVS_1:
+	case IAVF_RXDID_LEGACY_0:
+	case IAVF_RXDID_LEGACY_1:
 		break;

drivers/net/iavf/iavf_rxtx.c

Quoted 2 lines
drivers/net/iavf/iavf_rxtx.c +0 -0
 	default:
 		/* update this according to the RXDID for FLEX_DESC_NONE

*/

Quoted 4 lines
Quoted 2 lines

--
2.27.0

Applied to dpdk-next-net-intel.

Thanks
Qi

#3 lore raw

Tested okay on N1SDP and on Intel(R) Xeon(R) Platinum 8268 CPU @ 2.90GHz

Quoted 78 lines

-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Thursday, March 24, 2022 3:52 AM
To: Xing, Beilei <[email protected]>; Yang, SteveX <[email protected]>; [email protected]
Cc: Wu, Jingjing <[email protected]>; [email protected]
Subject: RE: [PATCH v1] net/iavf: fix select wrong scan hw ring by rxdid

Quoted 68 lines

-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Wednesday, March 16, 2022 4:12 PM
To: Yang, SteveX <[email protected]>; [email protected]
Cc: Wu, Jingjing <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]
Subject: RE: [PATCH v1] net/iavf: fix select wrong scan hw ring by rxdid

Quoted 52 lines

-----Original Message-----
From: Yang, SteveX <[email protected]>
Sent: Monday, March 14, 2022 5:32 PM
To: [email protected]
Cc: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>; Yang, SteveX <[email protected]>; [email protected]
Subject: [PATCH v1] net/iavf: fix select wrong scan hw ring by rxdid

When setup RX queue, the rxdid would be changed if it's "IAVF_RXDID_LEGACY_0/1", that caused the scan hw ring used the wrong function 'iavf_rx_scan_hw_ring_flex_rxd()'.

Ignore the rxdid changed when equals "IAVF_RXDID_LEGACY_0/1".

Fixes 0ed16e01313e ("net/iavf: fix function pointer in

multi-process")
Cc: [email protected]

---
 drivers/net/iavf/iavf_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)
(quoted diff) +0 -0

b/drivers/net/iavf/iavf_rxtx.c index 16e8d021f9..3b16609f7d 100644

drivers/net/iavf/iavf_rxtx.c +2 -0
@@ -477,6 +477,8 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct
 iavf_rx_queue *rxq,
 
 static const
 iavf_rxd_to_pkt_fields_t rxd_to_pkt_fields_ops[IAVF_RXDID_LAST + 1]
 = {
+ [IAVF_RXDID_LEGACY_0] = iavf_rxd_to_pkt_fields_by_comms_ovs,
+ [IAVF_RXDID_LEGACY_1] = iavf_rxd_to_pkt_fields_by_comms_ovs,
  [IAVF_RXDID_COMMS_AUX_VLAN] =

iavf_rxd_to_pkt_fields_by_comms_aux_v1,
[IAVF_RXDID_COMMS_AUX_IPV4] =
iavf_rxd_to_pkt_fields_by_comms_aux_v1,
[IAVF_RXDID_COMMS_AUX_IPV6] =
iavf_rxd_to_pkt_fields_by_comms_aux_v1,

drivers/net/iavf/iavf_rxtx.c +2 -0
@@ -521,6 +523,8 @@ iavf_select_rxd_to_pkt_fields_handler(struct
 iavf_rx_queue *rxq, uint32_t rxdid)
 
  rte_pmd_ifd_dynflag_proto_xtr_ipsec_crypto_said_mask;
          break;
  case IAVF_RXDID_COMMS_OVS_1:
+ case IAVF_RXDID_LEGACY_0:
+ case IAVF_RXDID_LEGACY_1:
          break;

default:

Quoted 1 line
          /* update this according to the RXDID for FLEX_DESC_NONE

*/

Quoted 2 lines

--
2.27.0

Quoted 6 lines
Quoted 1 line

Applied to dpdk-next-net-intel.

Thanks
Qi

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.