[v4] net/iavf: fix mbuf release API selection

Message ID 20231109045836.814164-1-kaiwenx.deng@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v4] net/iavf: fix mbuf release API selection |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS

Commit Message

Kaiwen Deng Nov. 9, 2023, 4:58 a.m. UTC
  When AVX2 is forcibly selected and outer checksum
offload is configured, the basic Tx path will be
selected. Also, the txq mbuf release API is incorrectly
set to iavf_tx_queue_release_mbufs_sse. This causes
coredump.

This commit selects release_txq_mbufs to releasing
txq mbufs when selecting the basic Tx path.

Fixes: 22f1e7608ebc ("net/iavf: fix AVX2 Tx selection")
Cc: stable@dpdk.org

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
  

Comments

Qi Zhang Nov. 9, 2023, 12:23 p.m. UTC | #1
> -----Original Message-----
> From: Kaiwen Deng <kaiwenx.deng@intel.com>
> Sent: Thursday, November 9, 2023 12:59 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Zhou, YidingX
> <yidingx.zhou@intel.com>; Deng, KaiwenX <kaiwenx.deng@intel.com>; Wu,
> Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Zeng,
> ZhichaoX <zhichaox.zeng@intel.com>
> Subject: [PATCH v4] net/iavf: fix mbuf release API selection
> 
> When AVX2 is forcibly selected and outer checksum offload is configured, the
> basic Tx path will be selected. Also, the txq mbuf release API is incorrectly set
> to iavf_tx_queue_release_mbufs_sse. This causes coredump.
> 
> This commit selects release_txq_mbufs to releasing txq mbufs when selecting
> the basic Tx path.
> 
> Fixes: 22f1e7608ebc ("net/iavf: fix AVX2 Tx selection")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 45f638c1d2..f19aa14646 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -4018,11 +4018,9 @@  iavf_set_tx_function(struct rte_eth_dev *dev)
 				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);
+					"AVX2 does not support outer checksum offload.");
+				goto normal;
 			} else {
 				dev->tx_pkt_burst = iavf_xmit_pkts_vec_avx2_offload;
 				dev->tx_pkt_prepare = iavf_prep_pkts;