[PATCH v2 1/3] net/ice: fix null packet prepare function
Bruce Richardson
bruce.richardson at intel.com
Wed Nov 12 15:10:57 CET 2025
From: Sunil Kumar Kori <skori at marvell.com>
As per recent change by the following commit:
commit 066f3d9cc21c ("ethdev: remove callback checks from fast path")
framework unconditionally invokes dev->tx_pkt_prepare.
Due to this, ICE driver gets crashed as tx_pkt_prepare
was set to NULL during initialization.
Ensure dev->tx_pkt_prepare is not NULL when vector or simple
TX paths are selected, by assigning rte_eth_tx_pkt_prepare_dummy.
This aligns with expectations with above mentioned commit.
Bugzilla ID: 1795
Fixes: 6eac0b7fde95 ("net/ice: support advance Rx/Tx")
Cc: stable at dpdk.org
Signed-off-by: Sunil Kumar Kori <skori at marvell.com>
Tested-by: Hailin Xu <hailinx.xu at intel.com>
---
drivers/net/intel/ice/ice_rxtx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/intel/ice/ice_rxtx.c b/drivers/net/intel/ice/ice_rxtx.c
index 2673e885c3..74db0fbec9 100644
--- a/drivers/net/intel/ice/ice_rxtx.c
+++ b/drivers/net/intel/ice/ice_rxtx.c
@@ -4129,7 +4129,7 @@ ice_set_tx_function(struct rte_eth_dev *dev)
}
if (ad->tx_vec_allowed) {
- dev->tx_pkt_prepare = NULL;
+ dev->tx_pkt_prepare = rte_eth_tx_pkt_prepare_dummy;
if (ad->tx_simd_width == RTE_VECT_SIMD_512) {
#ifdef CC_AVX512_SUPPORT
if (tx_check_ret == ICE_VECTOR_OFFLOAD_PATH) {
@@ -4175,7 +4175,7 @@ ice_set_tx_function(struct rte_eth_dev *dev)
if (ad->tx_simple_allowed) {
PMD_INIT_LOG(DEBUG, "Simple tx finally be used.");
dev->tx_pkt_burst = ice_xmit_pkts_simple;
- dev->tx_pkt_prepare = NULL;
+ dev->tx_pkt_prepare = rte_eth_tx_pkt_prepare_dummy;
} else {
PMD_INIT_LOG(DEBUG, "Normal tx finally be used.");
dev->tx_pkt_burst = ice_xmit_pkts;
--
2.48.1
More information about the dev
mailing list