* [PATCH v2 1/3] net/ice: fix null packet prepare function
[not found] ` <20251112141059.1576919-1-bruce.richardson@intel.com>
@ 2025-11-12 14:10 ` Bruce Richardson
2025-11-12 14:10 ` [PATCH v2 2/3] net/ixgbe: " Bruce Richardson
2025-11-12 14:10 ` [PATCH v2 3/3] net/fm10k: " Bruce Richardson
2 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2025-11-12 14:10 UTC (permalink / raw)
To: dev; +Cc: Sunil Kumar Kori, stable, Hailin Xu
From: Sunil Kumar Kori <skori@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@dpdk.org
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Tested-by: Hailin Xu <hailinx.xu@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
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH v2 2/3] net/ixgbe: fix null packet prepare function
[not found] ` <20251112141059.1576919-1-bruce.richardson@intel.com>
2025-11-12 14:10 ` [PATCH v2 1/3] net/ice: fix null packet prepare function Bruce Richardson
@ 2025-11-12 14:10 ` Bruce Richardson
2025-11-12 14:10 ` [PATCH v2 3/3] net/fm10k: " Bruce Richardson
2 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2025-11-12 14:10 UTC (permalink / raw)
To: dev; +Cc: Sunil Kumar Kori, Bruce Richardson, stable
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")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/ixgbe/ixgbe_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/intel/ixgbe/ixgbe_rxtx.c b/drivers/net/intel/ixgbe/ixgbe_rxtx.c
index 897ee2b671..a7583c178a 100644
--- a/drivers/net/intel/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/intel/ixgbe/ixgbe_rxtx.c
@@ -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 ||
--
2.48.1
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH v2 3/3] net/fm10k: fix null packet prepare function
[not found] ` <20251112141059.1576919-1-bruce.richardson@intel.com>
2025-11-12 14:10 ` [PATCH v2 1/3] net/ice: fix null packet prepare function Bruce Richardson
2025-11-12 14:10 ` [PATCH v2 2/3] net/ixgbe: " Bruce Richardson
@ 2025-11-12 14:10 ` Bruce Richardson
2 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2025-11-12 14:10 UTC (permalink / raw)
To: dev; +Cc: Sunil Kumar Kori, Bruce Richardson, stable
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")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/fm10k/fm10k_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/intel/fm10k/fm10k_ethdev.c b/drivers/net/intel/fm10k/fm10k_ethdev.c
index 82c0f1a1ad..97f61afec2 100644
--- a/drivers/net/intel/fm10k/fm10k_ethdev.c
+++ b/drivers/net/intel/fm10k/fm10k_ethdev.c
@@ -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;
--
2.48.1
^ permalink raw reply [flat|nested] 3+ messages in thread