DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ciara Loftus <ciara.loftus@intel.com>
To: dev@dpdk.org
Cc: Ciara Loftus <ciara.loftus@intel.com>
Subject: [PATCH v2 3/4] net/i40e: remove redundant vector Rx queue setup code
Date: Tue,  2 Sep 2025 10:48:58 +0000	[thread overview]
Message-ID: <20250902104859.2100141-4-ciara.loftus@intel.com> (raw)
In-Reply-To: <20250902104859.2100141-1-ciara.loftus@intel.com>

Some assignments were being done twice:
1. Marking each rxq as a vector queue
2. Marking the device as vector allowed

This commit makes sure that these are only performed once.

Fixes: 052ae311091c ("net/i40e: use the common Rx path selection infrastructure")

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
 drivers/net/intel/i40e/i40e_rxtx.c | 29 ++++-------------------------
 1 file changed, 4 insertions(+), 25 deletions(-)

diff --git a/drivers/net/intel/i40e/i40e_rxtx.c b/drivers/net/intel/i40e/i40e_rxtx.c
index 434959e1c0..e22233daae 100644
--- a/drivers/net/intel/i40e/i40e_rxtx.c
+++ b/drivers/net/intel/i40e/i40e_rxtx.c
@@ -3338,7 +3338,7 @@ i40e_set_rx_function(struct rte_eth_dev *dev)
 		.rx_offloads = dev->data->dev_conf.rxmode.offloads,
 		.simd_width = RTE_VECT_SIMD_DISABLED,
 	};
-	uint16_t vector_rx, i;
+	uint16_t i;
 	enum rte_vect_max_simd rx_simd_width = i40e_get_max_simd_bitwidth();
 
 	/* The primary process selects the rx path for all processes. */
@@ -3367,11 +3367,13 @@ i40e_set_rx_function(struct rte_eth_dev *dev)
 						&i40e_rx_path_infos[0],
 						RTE_DIM(i40e_rx_path_infos),
 						I40E_RX_DEFAULT);
-	if (i40e_rx_path_infos[ad->rx_func_type].features.simd_width >= RTE_VECT_SIMD_128)
+	if (i40e_rx_path_infos[ad->rx_func_type].features.simd_width >= RTE_VECT_SIMD_128) {
 		/* Vector function selected. Prepare the rxq accordingly. */
 		for (i = 0; i < dev->data->nb_rx_queues; i++)
 			if (dev->data->rx_queues[i])
 				i40e_rxq_vec_setup(dev->data->rx_queues[i]);
+		ad->rx_vec_allowed = true;
+	}
 
 	if (i40e_rx_path_infos[ad->rx_func_type].features.simd_width >= RTE_VECT_SIMD_128 &&
 			i40e_rx_path_infos[ad->rx_func_type].features.simd_width <
@@ -3382,29 +3384,6 @@ i40e_set_rx_function(struct rte_eth_dev *dev)
 	dev->rx_pkt_burst = i40e_rx_path_infos[ad->rx_func_type].pkt_burst;
 	PMD_DRV_LOG(NOTICE, "Using %s (port %d).",
 			i40e_rx_path_infos[ad->rx_func_type].info, dev->data->port_id);
-
-	/* Propagate information about RX function choice through all queues. */
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
-		vector_rx =
-			(dev->rx_pkt_burst == i40e_recv_scattered_pkts_vec ||
-			 dev->rx_pkt_burst == i40e_recv_pkts_vec ||
-#ifdef CC_AVX512_SUPPORT
-			 dev->rx_pkt_burst == i40e_recv_scattered_pkts_vec_avx512 ||
-			 dev->rx_pkt_burst == i40e_recv_pkts_vec_avx512 ||
-#endif
-			 dev->rx_pkt_burst == i40e_recv_scattered_pkts_vec_avx2 ||
-			 dev->rx_pkt_burst == i40e_recv_pkts_vec_avx2);
-
-		for (i = 0; i < dev->data->nb_rx_queues; i++) {
-			struct ci_rx_queue *rxq = dev->data->rx_queues[i];
-
-			if (rxq)
-				rxq->vector_rx = vector_rx;
-		}
-	}
-
-	ad->rx_vec_allowed = i40e_rx_path_infos[ad->rx_func_type].features.simd_width >=
-				RTE_VECT_SIMD_128;
 }
 
 int
-- 
2.34.1


  parent reply	other threads:[~2025-09-02 10:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-01  9:59 [PATCH] net/i40e: fix supported offloads for Rx vector path Ciara Loftus
2025-09-02  8:08 ` David Marchand
2025-09-02 10:24   ` Loftus, Ciara
2025-09-02 10:48 ` [PATCH v2 0/4] Fixes for net/intel Rx Path Selection Ciara Loftus
2025-09-02 10:48   ` [PATCH v2 1/4] net/i40e: fix supported offloads for Rx vector path Ciara Loftus
2025-09-02 10:48   ` [PATCH v2 2/4] net/i40e: fix vector Rx queue set up logic Ciara Loftus
2025-09-02 10:48   ` Ciara Loftus [this message]
2025-09-02 10:48   ` [PATCH v2 4/4] net/iavf: remove duplicate in scalar offload list Ciara Loftus

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=20250902104859.2100141-4-ciara.loftus@intel.com \
    --to=ciara.loftus@intel.com \
    --cc=dev@dpdk.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).