[PATCH v2 2/7] net/intel: remove redundant Rx offload check
Ciara Loftus
ciara.loftus at intel.com
Wed Oct 15 12:07:18 CEST 2025
Four Intel drivers use a common vector compatibility function to
determine if certain characteristics about a given rxq are compatible
with vector rx paths. The function checks if the buffer split offload is
enabled and disqualifies the rxq if it is, because that offload is not
available on any vector path. However, this check is redundant because
three of the drivers that use that function now use the common rx path
selection framework which performs essentially the same validation when
ensuring the requested offloads are available on the rx path to be
selected. The fourth driver does not support buffer split at all, so the
rx queue will never have that offload enabled as initialisation would
fail before getting to the path selection step. The redundant check is
removed in this commit.
Signed-off-by: Ciara Loftus <ciara.loftus at intel.com>
---
drivers/net/intel/common/rx.h | 6 +-----
drivers/net/intel/i40e/i40e_rxtx_vec_common.h | 2 +-
drivers/net/intel/iavf/iavf_rxtx.c | 2 +-
drivers/net/intel/ice/ice_rxtx_vec_common.h | 2 +-
drivers/net/intel/ixgbe/ixgbe_rxtx_vec_common.c | 2 +-
5 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/net/intel/common/rx.h b/drivers/net/intel/common/rx.h
index d3e4492ff1..5012e4fced 100644
--- a/drivers/net/intel/common/rx.h
+++ b/drivers/net/intel/common/rx.h
@@ -228,17 +228,13 @@ ci_rxq_mbuf_initializer(uint16_t port_id)
* Individual drivers may have other further tests beyond this.
*/
static inline bool
-ci_rxq_vec_capable(uint16_t nb_desc, uint16_t rx_free_thresh, uint64_t offloads)
+ci_rxq_vec_capable(uint16_t nb_desc, uint16_t rx_free_thresh)
{
if (!rte_is_power_of_2(nb_desc) ||
rx_free_thresh < CI_RX_MAX_BURST ||
(nb_desc % rx_free_thresh) != 0)
return false;
- /* no driver supports buffer split on vector path */
- if (offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT)
- return false;
-
return true;
}
diff --git a/drivers/net/intel/i40e/i40e_rxtx_vec_common.h b/drivers/net/intel/i40e/i40e_rxtx_vec_common.h
index 39c9d2ee10..14651f2f06 100644
--- a/drivers/net/intel/i40e/i40e_rxtx_vec_common.h
+++ b/drivers/net/intel/i40e/i40e_rxtx_vec_common.h
@@ -62,7 +62,7 @@ i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
struct ci_rx_queue *rxq = dev->data->rx_queues[i];
if (!rxq)
continue;
- if (!ci_rxq_vec_capable(rxq->nb_rx_desc, rxq->rx_free_thresh, rxq->offloads))
+ if (!ci_rxq_vec_capable(rxq->nb_rx_desc, rxq->rx_free_thresh))
return -1;
}
diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
index 775fb4a66f..f500ba030f 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.c
+++ b/drivers/net/intel/iavf/iavf_rxtx.c
@@ -727,7 +727,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
#if defined RTE_ARCH_X86 || defined RTE_ARCH_ARM
/* check vector conflict */
- if (ci_rxq_vec_capable(rxq->nb_rx_desc, rxq->rx_free_thresh, rxq->offloads) &&
+ if (ci_rxq_vec_capable(rxq->nb_rx_desc, rxq->rx_free_thresh) &&
iavf_rxq_vec_setup(rxq)) {
PMD_DRV_LOG(ERR, "Failed vector rx setup.");
return -EINVAL;
diff --git a/drivers/net/intel/ice/ice_rxtx_vec_common.h b/drivers/net/intel/ice/ice_rxtx_vec_common.h
index 07996ab2b7..a7cc4736cf 100644
--- a/drivers/net/intel/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/intel/ice/ice_rxtx_vec_common.h
@@ -78,7 +78,7 @@ ice_rx_vec_queue_default(struct ci_rx_queue *rxq)
if (!rxq)
return -1;
- if (!ci_rxq_vec_capable(rxq->nb_rx_desc, rxq->rx_free_thresh, rxq->offloads))
+ if (!ci_rxq_vec_capable(rxq->nb_rx_desc, rxq->rx_free_thresh))
return -1;
if (rxq->proto_xtr != PROTO_XTR_NONE)
diff --git a/drivers/net/intel/ixgbe/ixgbe_rxtx_vec_common.c b/drivers/net/intel/ixgbe/ixgbe_rxtx_vec_common.c
index 94fbde1de2..eb7c79eaf9 100644
--- a/drivers/net/intel/ixgbe/ixgbe_rxtx_vec_common.c
+++ b/drivers/net/intel/ixgbe/ixgbe_rxtx_vec_common.c
@@ -131,7 +131,7 @@ ixgbe_rx_vec_dev_conf_condition_check(struct rte_eth_dev *dev)
struct ci_rx_queue *rxq = dev->data->rx_queues[i];
if (!rxq)
continue;
- if (!ci_rxq_vec_capable(rxq->nb_rx_desc, rxq->rx_free_thresh, rxq->offloads))
+ if (!ci_rxq_vec_capable(rxq->nb_rx_desc, rxq->rx_free_thresh))
return -1;
}
return 0;
--
2.34.1
More information about the dev
mailing list