DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/ice: set pkt prepare to dummy instead of NULL
@ 2025-11-10 12:24 skori
  2025-11-11  1:48 ` Xu, HailinX
  2025-11-12 14:10 ` [PATCH v2 0/3] fix null packet prepare function pointers Bruce Richardson
  0 siblings, 2 replies; 6+ messages in thread
From: skori @ 2025-11-10 12:24 UTC (permalink / raw)
  To: Bruce Richardson, Anatoly Burakov; +Cc: dev, Sunil Kumar Kori

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

Signed-off-by: Sunil Kumar Kori <skori@marvell.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 fd0b3a7532..18077aca78 100644
--- a/drivers/net/intel/ice/ice_rxtx.c
+++ b/drivers/net/intel/ice/ice_rxtx.c
@@ -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;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] net/ice: set pkt prepare to dummy instead of NULL
  2025-11-10 12:24 [PATCH] net/ice: set pkt prepare to dummy instead of NULL skori
@ 2025-11-11  1:48 ` Xu, HailinX
  2025-11-12 14:10 ` [PATCH v2 0/3] fix null packet prepare function pointers Bruce Richardson
  1 sibling, 0 replies; 6+ messages in thread
From: Xu, HailinX @ 2025-11-11  1:48 UTC (permalink / raw)
  To: skori, Richardson, Bruce, Burakov, Anatoly; +Cc: dev

> -----Original Message-----
> From: skori@marvell.com <skori@marvell.com>
> Sent: Monday, November 10, 2025 8:25 PM
> To: Richardson, Bruce <bruce.richardson@intel.com>; Burakov, Anatoly
> <anatoly.burakov@intel.com>
> Cc: dev@dpdk.org; Sunil Kumar Kori <skori@marvell.com>
> Subject: [PATCH] net/ice: set pkt prepare to dummy instead of NULL
> 
> 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
> 
> Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
> ---
Tested-by: Xu, HailinX <hailinx.xu@intel.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 0/3] fix null packet prepare function pointers
  2025-11-10 12:24 [PATCH] net/ice: set pkt prepare to dummy instead of NULL skori
  2025-11-11  1:48 ` Xu, HailinX
@ 2025-11-12 14:10 ` Bruce Richardson
  2025-11-12 14:10   ` [PATCH v2 1/3] net/ice: fix null packet prepare function Bruce Richardson
                     ` (2 more replies)
  1 sibling, 3 replies; 6+ messages in thread
From: Bruce Richardson @ 2025-11-12 14:10 UTC (permalink / raw)
  To: dev; +Cc: Sunil Kumar Kori, 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

 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/3] net/ice: fix null packet prepare function
  2025-11-12 14:10 ` [PATCH v2 0/3] fix null packet prepare function pointers Bruce Richardson
@ 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; 6+ 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] 6+ messages in thread

* [PATCH v2 2/3] net/ixgbe: fix null packet prepare function
  2025-11-12 14:10 ` [PATCH v2 0/3] fix null packet prepare function pointers Bruce Richardson
  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; 6+ 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] 6+ messages in thread

* [PATCH v2 3/3] net/fm10k: fix null packet prepare function
  2025-11-12 14:10 ` [PATCH v2 0/3] fix null packet prepare function pointers Bruce Richardson
  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; 6+ 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] 6+ messages in thread

end of thread, other threads:[~2025-11-12 14:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-10 12:24 [PATCH] net/ice: set pkt prepare to dummy instead of NULL skori
2025-11-11  1:48 ` Xu, HailinX
2025-11-12 14:10 ` [PATCH v2 0/3] fix null packet prepare function pointers Bruce Richardson
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   ` [PATCH v2 3/3] net/fm10k: " Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).