[PATCH 2/3] net/hns3: fix can't use vector for Tx when not set fast free
Dengdui Huang
huangdengdui at huawei.com
Mon Jun 9 15:06:50 CEST 2025
Currently, select Tx vector algorithm only when tx_offload is
RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE. Actually, this algorithm
already supported the case that tx_offload isn't fast free.
Fixes: e31f123db06b ("net/hns3: support NEON Tx")
Cc: stable at dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
---
drivers/net/hns3/hns3_rxtx_vec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c
index bf37ce51b1..9fb66ea2de 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.c
+++ b/drivers/net/hns3/hns3_rxtx_vec.c
@@ -16,11 +16,11 @@
int
hns3_tx_check_vec_support(struct rte_eth_dev *dev)
{
- struct rte_eth_txmode *txmode = &dev->data->dev_conf.txmode;
+ uint64_t tx_offloads = dev->data->dev_conf.txmode.offloads;
struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
- /* Only support RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE */
- if (txmode->offloads != RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE)
+ /* Only support when Tx offloads is RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE or 0. */
+ if (tx_offloads != RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE && tx_offloads != 0)
return -ENOTSUP;
/*
--
2.33.0
More information about the dev
mailing list