patch 'net/iavf: fix data path selection' has been queued to stable release 21.11.2

Kevin Traynor ktraynor at redhat.com
Thu Jun 9 13:36:42 CEST 2022


Hi,

FYI, your patch has been queued to stable release 21.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/83d787cc30f2114c8a8686f7fbe7b31d6bfbfb89

Thanks.

Kevin

---
>From 83d787cc30f2114c8a8686f7fbe7b31d6bfbfb89 Mon Sep 17 00:00:00 2001
From: Yiding Zhou <yidingx.zhou at intel.com>
Date: Sun, 8 May 2022 03:52:39 +0800
Subject: [PATCH] net/iavf: fix data path selection

[ upstream commit 865df516f931827580f00e65f246f49838c722bb ]

If PF driver don't support a flex Rx descriptor that required by VF,
legacy descriptor format will be negotiated to configure the hardware
queue.

The patch fixes the issue that an Rx data path that handle flexible
descriptor  (e.g.:
iavf_recv_scattered_pkts_vec_avx512_flex_rxd) is selected while the
actual hardware queues are configured as legacy due to above scenario,
which will cause following coredump.

Fixes: 12b435bf8f2f ("net/iavf: support flex desc metadata extraction")

Signed-off-by: Yiding Zhou <yidingx.zhou at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index ede6c21668..4c8007043a 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2797,12 +2797,25 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
 		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
-
-#ifdef RTE_ARCH_X86
-	struct iavf_rx_queue *rxq;
 	int i;
+	struct iavf_rx_queue *rxq;
+	bool use_flex = true;
+
+	for (i = 0; i < dev->data->nb_rx_queues; i++) {
+		rxq = dev->data->rx_queues[i];
+		if (rxq->rxdid <= IAVF_RXDID_LEGACY_1) {
+			PMD_DRV_LOG(NOTICE, "request RXDID[%d] in Queue[%d] is legacy, "
+				"set rx_pkt_burst as legacy for all queues", rxq->rxdid, i);
+			use_flex = false;
+		} else if (!(vf->supported_rxdid & BIT(rxq->rxdid))) {
+			PMD_DRV_LOG(NOTICE, "request RXDID[%d] in Queue[%d] is not supported, "
+				"set rx_pkt_burst as legacy for all queues", rxq->rxdid, i);
+			use_flex = false;
+		}
+	}
+
+#ifdef RTE_ARCH_X86
 	int check_ret;
 	bool use_avx2 = false;
 	bool use_avx512 = false;
-	bool use_flex = false;
 
 	check_ret = iavf_rx_vec_dev_check(dev);
@@ -2821,8 +2834,4 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
 #endif
 
-		if (vf->vf_res->vf_cap_flags &
-			VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC)
-			use_flex = true;
-
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
 			rxq = dev->data->rx_queues[i];
@@ -2928,5 +2937,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
 		PMD_DRV_LOG(DEBUG, "Using a Scattered Rx callback (port=%d).",
 			    dev->data->port_id);
-		if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC)
+		if (use_flex)
 			dev->rx_pkt_burst = iavf_recv_scattered_pkts_flex_rxd;
 		else
@@ -2939,5 +2948,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
 		PMD_DRV_LOG(DEBUG, "Using Basic Rx callback (port=%d).",
 			    dev->data->port_id);
-		if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC)
+		if (use_flex)
 			dev->rx_pkt_burst = iavf_recv_pkts_flex_rxd;
 		else
-- 
2.34.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-06-09 12:34:31.025932177 +0100
+++ 0055-net-iavf-fix-data-path-selection.patch	2022-06-09 12:34:29.772980687 +0100
@@ -1 +1 @@
-From 865df516f931827580f00e65f246f49838c722bb Mon Sep 17 00:00:00 2001
+From 83d787cc30f2114c8a8686f7fbe7b31d6bfbfb89 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 865df516f931827580f00e65f246f49838c722bb ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 345f6aeebc..d3b1a58b27 100644
+index ede6c21668..4c8007043a 100644
@@ -29 +30 @@
-@@ -2900,12 +2900,25 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
+@@ -2797,12 +2797,25 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
@@ -59 +60 @@
-@@ -2924,8 +2937,4 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
+@@ -2821,8 +2834,4 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
@@ -68 +69 @@
-@@ -3031,5 +3040,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
+@@ -2928,5 +2937,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
@@ -75 +76 @@
-@@ -3042,5 +3051,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev)
+@@ -2939,5 +2948,5 @@ iavf_set_rx_function(struct rte_eth_dev *dev)



More information about the stable mailing list