Skip to contentSkip to conversation

net/ice: set pkt prepare to dummy instead of NULL

PATCH In review [email protected] 3 participants 7 messages Nov 10, 2025 – Nov 13, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

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
index fd0b3a7532..18077aca78 100644
@@ -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
Tested-by on v1 1/1
#1 lore raw
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 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.

Quoted 6 lines

This aligns with expectations with above mentioned commit.

Bugzilla ID: 1795

---

#2 lore raw

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

#3 lore raw

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

Fixes 6eac0b7fde95 ("net/ice: support advance Rx/Tx")
---
 drivers/net/intel/ice/ice_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/intel/ice/ice_rxtx.c +2 -2
index 2673e885c3..74db0fbec9 100644
@@ -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
#4 lore raw

PATCH v2 2/3 net/ixgbe: fix null packet prepare function

In reply to Bruce Richardson

As 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.

Fixes 7829b8d52be0 ("net/ixgbe: add Tx preparation")
---
 drivers/net/intel/ixgbe/ixgbe_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/intel/ixgbe/ixgbe_rxtx.c +1 -1
index 897ee2b671..a7583c178a 100644
@@ -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
#5 lore raw

PATCH v2 3/3 net/fm10k: fix null packet prepare function

In reply to Bruce Richardson

As 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.

Fixes 9b134aa39716 ("net/fm10k: add Tx preparation")
---
 drivers/net/intel/fm10k/fm10k_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/intel/fm10k/fm10k_ethdev.c +2 -2
index 82c0f1a1ad..97f61afec2 100644
@@ -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
#6 lore raw

Re: [PATCH v2 0/3] fix null packet prepare function pointers

In reply to Bruce Richardson
Quoted 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 function

Sunil 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