DPDK patches and discussions
 help / color / mirror / Atom feed
From: Zhichao Zeng <zhichaox.zeng@intel.com>
To: dev@dpdk.org
Cc: qi.z.zhang@intel.com, ke1.xu@intel.com,
	Zhichao Zeng <zhichaox.zeng@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Beilei Xing <beilei.xing@intel.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>
Subject: [PATCH] net/iavf: fix AVX2 path selection
Date: Thu,  6 Jul 2023 11:20:23 +0800	[thread overview]
Message-ID: <20230706032023.1053203-1-zhichaox.zeng@intel.com> (raw)

The AVX2 path does not support outer checksum offload, when AVX2 is
forcibly selected and outer checksum offload is configured, the basic
Tx path will be selected to ensure proper functionality.

Fixes: 5712bf9d6e14 ("net/iavf: add Tx AVX2 offload path")
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index bf7e4546a8..f7df4665d1 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -3950,6 +3950,12 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
 				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx2;
 				PMD_DRV_LOG(DEBUG, "Using AVX2 Vector Tx (port %d).",
 					    dev->data->port_id);
+			} else if (check_ret == IAVF_VECTOR_CTX_OFFLOAD_PATH) {
+				dev->tx_pkt_burst = iavf_xmit_pkts;
+				dev->tx_pkt_prepare = iavf_prep_pkts;
+				PMD_DRV_LOG(DEBUG,
+					"AVX2 does not support outer checksum offload, using Basic Tx (port %d).",
+					dev->data->port_id);
 			} else {
 				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx2_offload;
 				dev->tx_pkt_prepare = iavf_prep_pkts;
-- 
2.34.1


             reply	other threads:[~2023-07-06  3:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06  3:20 Zhichao Zeng [this message]
2023-07-06  3:52 ` Xu, Ke1
2023-07-06  6:06   ` Zhang, Qi Z
  -- strict thread matches above, loose matches on Subject: below --
2023-07-06  3:15 [PATCH] net/iavf: fix avx2 " Zhichao Zeng

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=20230706032023.1053203-1-zhichaox.zeng@intel.com \
    --to=zhichaox.zeng@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=ke1.xu@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=wenzhuo.lu@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).