patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	stable@dpdk.org,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	Ian Stokes <ian.stokes@intel.com>,
	Qi Zhang <qi.z.zhang@intel.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Yiding Zhou <yidingx.zhou@intel.com>,
	Zhichao Zeng <zhichaox.zeng@intel.com>
Subject: [PATCH] net/iavf: remove reset of Tx prepare function ptr
Date: Fri, 13 Dec 2024 14:33:19 +0000	[thread overview]
Message-ID: <20241213143319.686365-1-bruce.richardson@intel.com> (raw)

The iavf driver only contains a single Tx prepare function, so when
selecting the Tx path, there is no need to reset and reassign the
function pointer in the ethdev structure. This fixes an issue where the
pointer was reset to NULL, but never assigned back later on function
selection.

Fixes: 5712bf9d6e14 ("net/iavf: add Tx AVX2 offload path")
Fixes: 08eb6a9cc2e1 ("net/iavf: fix Tx L4 checksum")
Fixes: 4f8259df563a ("net/iavf: enable Tx outer checksum offload on AVX512")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 6a093c6746..98a1d3f69d 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -4173,7 +4173,6 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
 		if (!use_sse && !use_avx2 && !use_avx512)
 			goto normal;
 
-		dev->tx_pkt_prepare = NULL;
 		if (use_sse) {
 			PMD_DRV_LOG(DEBUG, "Using Vector Tx (port %d).",
 				    dev->data->port_id);
@@ -4190,7 +4189,6 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
 				goto normal;
 			} else {
 				tx_burst_type = IAVF_TX_AVX2_OFFLOAD;
-				dev->tx_pkt_prepare = iavf_prep_pkts;
 				PMD_DRV_LOG(DEBUG, "Using AVX2 OFFLOAD Vector Tx (port %d).",
 					    dev->data->port_id);
 			}
@@ -4203,17 +4201,14 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
 					    dev->data->port_id);
 			} else if (check_ret == IAVF_VECTOR_OFFLOAD_PATH) {
 				tx_burst_type = IAVF_TX_AVX512_OFFLOAD;
-				dev->tx_pkt_prepare = iavf_prep_pkts;
 				PMD_DRV_LOG(DEBUG, "Using AVX512 OFFLOAD Vector Tx (port %d).",
 					    dev->data->port_id);
 			} else if (check_ret == IAVF_VECTOR_CTX_PATH) {
 				tx_burst_type = IAVF_TX_AVX512_CTX;
-				dev->tx_pkt_prepare = iavf_prep_pkts;
 				PMD_DRV_LOG(DEBUG, "Using AVX512 CONTEXT Vector Tx (port %d).",
 						dev->data->port_id);
 			} else {
 				tx_burst_type = IAVF_TX_AVX512_CTX_OFFLOAD;
-				dev->tx_pkt_prepare = iavf_prep_pkts;
 				PMD_DRV_LOG(DEBUG, "Using AVX512 CONTEXT OFFLOAD Vector Tx (port %d).",
 					    dev->data->port_id);
 			}
@@ -4251,7 +4246,6 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
 	PMD_DRV_LOG(DEBUG, "Using Basic Tx callback (port=%d).",
 		    dev->data->port_id);
 	tx_burst_type = IAVF_TX_DEFAULT;
-	dev->tx_pkt_prepare = iavf_prep_pkts;
 
 	if (no_poll_on_link_down) {
 		adapter->tx_burst_type = tx_burst_type;
-- 
2.43.0


                 reply	other threads:[~2024-12-13 14:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241213143319.686365-1-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ian.stokes@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=vladimir.medvedkin@intel.com \
    --cc=wenzhuo.lu@intel.com \
    --cc=yidingx.zhou@intel.com \
    --cc=zhichaox.zeng@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).