[PATCH v3 05/10] net/cpfl: prevent Rx path selection after device start

Ciara Loftus
2026-02-18T09:50:39Z

To fall in line with other drivers using the Rx path selection
infrastructure, prevent Rx path selection after the device has started.

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
* Fix unused label error for non x86 arch
---
drivers/net/intel/cpfl/cpfl_rxtx.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/intel/cpfl/cpfl_rxtx.c b/drivers/net/intel/cpfl/cpfl_rxtx.c
index 11451e1666..dc729d31af 100644
--- a/drivers/net/intel/cpfl/cpfl_rxtx.c
+++ b/drivers/net/intel/cpfl/cpfl_rxtx.c
@@ -1446,11 +1446,17 @@ cpfl_set_rx_function(struct rte_eth_dev *dev)
#ifdef RTE_ARCH_X86
struct cpfl_rx_queue *cpfl_rxq;
int i;
+#endif
+
+ /* If the device has started the function has already been selected. */
+ if (dev->data->dev_started)
+ goto out;

+#ifdef RTE_ARCH_X86
if (cpfl_rx_vec_dev_check_default(dev) == CPFL_VECTOR_PATH &&
rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256)
req_features.simd_width = cpfl_get_max_simd_bitwidth();
-#endif /* RTE_ARCH_X86 */
+#endif

req_features.single_queue = (vport->rxq_model == VIRTCHNL2_QUEUE_MODEL_SINGLE);
req_features.scattered = dev->data->scattered_rx;
@@ -1479,6 +1485,7 @@ cpfl_set_rx_function(struct rte_eth_dev *dev)
}
#endif

+out:
dev->rx_pkt_burst = idpf_rx_path_infos[ad->rx_func_type].pkt_burst;
PMD_DRV_LOG(NOTICE, "Using %s Rx (port %d).",
idpf_rx_path_infos[ad->rx_func_type].info, dev->data->port_id);
--
2.43.0