net/ice: set pkt prepare to dummy instead of NULL
PATCH 1/1 net/ice: set pkt prepare to dummy instead of NULL
From: Sunil Kumar Kori <[email protected]>
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
--- drivers/net/intel/ice/ice_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/intel/ice/ice_rxtx.c +2 -2
@@ -4131,7 +4131,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 ) {
@@ -4177,7 +4177,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;
Signature · 1 line
2.43.0
Quoted 21 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, November 10, 2025 8:25 PM
To: Richardson, Bruce <[email protected]>; Burakov, Anatoly <[email protected]>
Cc: [email protected]; Sunil Kumar Kori <[email protected]>
Subject: [PATCH] net/ice: set pkt prepare to dummy instead of NULLFrom: Sunil Kumar Kori <[email protected]>
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 astx_pkt_preparewas set to NULL during initialization.Ensure
dev->tx_pkt_prepareis not NULL when vector or simple TX paths are selected, by assigningrte_eth_tx_pkt_prepare_dummy.
Quoted 6 lines
This aligns with expectations with above mentioned commit.
Bugzilla ID: 1795
Signed-off-by Sunil Kumar Kori <[email protected]>---
v2 cover fix null packet prepare function pointers
In reply to [email protected]Update all intel drivers to ensure that the packet prepare function pointer is non-null.
Bruce Richardson (2):
net/ixgbe: fix null packet prepare function
net/fm10k: fix null packet prepare function
Sunil Kumar Kori (1):
net/ice: fix null packet prepare function
drivers/net/intel/fm10k/fm10k_ethdev.c | 4 ++-- drivers/net/intel/ice/ice_rxtx.c | 4 ++-- drivers/net/intel/ixgbe/ixgbe_rxtx.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
--
2.48.1
PATCH v2 1/3 net/ice: fix null packet prepare function
From: Sunil Kumar Kori <[email protected]>
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
--- drivers/net/intel/ice/ice_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/intel/ice/ice_rxtx.c +2 -2
@@ -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;
Signature · 1 line
2.48.1
PATCH v2 2/3 net/ixgbe: fix null packet prepare function
In reply to Bruce RichardsonAs per recent change by the following commit:
commit 066f3d9cc21c ("ethdev: remove callback checks from fast path")
framework unconditionally invokes dev->tx_pkt_prepare. 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.
--- drivers/net/intel/ixgbe/ixgbe_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/intel/ixgbe/ixgbe_rxtx.c +1 -1
@@ -2653,7 +2653,7 @@ ixgbe_set_tx_function(struct rte_eth_dev *dev, struct ci_tx_queue *txq)#endif (txq->tx_rs_thresh >= IXGBE_TX_MAX_BURST)) {PMD_INIT_LOG (DEBUG ,"Using simple tx code path" ); - dev->tx_pkt_prepare =NULL ; + dev->tx_pkt_prepare = rte_eth_tx_pkt_prepare_dummy; if (txq->tx_rs_thresh <= IXGBE_TX_MAX_FREE_BUF_SZ && rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128 && (rte_eal_process_type() != RTE_PROC_PRIMARY ||
Signature · 1 line
2.48.1
PATCH v2 3/3 net/fm10k: fix null packet prepare function
In reply to Bruce RichardsonAs per recent change by the following commit:
commit 066f3d9cc21c ("ethdev: remove callback checks from fast path")
framework unconditionally invokes dev->tx_pkt_prepare. 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.
--- drivers/net/intel/fm10k/fm10k_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/intel/fm10k/fm10k_ethdev.c +2 -2
@@ -2955,7 +2955,7 @@ fm10k_set_tx_function(struct rte_eth_dev *dev) }else {PMD_INIT_LOG (DEBUG ,"Use vector Tx func" ); dev->tx_pkt_burst = fm10k_xmit_pkts_vec; - dev->tx_pkt_prepare =NULL ; + dev->tx_pkt_prepare = rte_eth_tx_pkt_prepare_dummy; }return ; }
@@ -2979,7 +2979,7 @@ fm10k_set_tx_function(struct rte_eth_dev *dev)fm10k_txq_vec_setup (txq); } dev->tx_pkt_burst = fm10k_xmit_pkts_vec; - dev->tx_pkt_prepare =NULL ; + dev->tx_pkt_prepare = rte_eth_tx_pkt_prepare_dummy; }else { dev->tx_pkt_burst = fm10k_xmit_pkts; dev->tx_pkt_prepare = fm10k_prep_pkts;
Signature · 1 line
2.48.1
Re: [PATCH v2 0/3] fix null packet prepare function pointers
In reply to Bruce RichardsonQuoted 10 lines · Bruce Richardson
Update all intel drivers to ensure that the packet prepare function pointer is non-null.
Bruce Richardson (2):
net/ixgbe: fix null packet prepare function
net/fm10k: fix null packet prepare functionSunil Kumar Kori (1):
net/ice: fix null packet prepare function
Quoted 6 lines
drivers/net/intel/fm10k/fm10k_ethdev.c | 4 ++-- drivers/net/intel/ice/ice_rxtx.c | 4 ++-- drivers/net/intel/ixgbe/ixgbe_rxtx.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)--
Series applied to dpdk-next-net-intel.
/Bruce