- net/hns3: fix unrelease some resources on reset case - net/hns3: fix divide by zero - net/hns3: fix incorrect failed rollback - net/hns3: fix memory leakage for indirect action - net/hns3: fix extra waiting for link up - net/hns3: fix variable overflow - net/hns3: fix memory leakage in failure path - devtools: fix symbol listing - net/hns3: remove weak symbols - net/hns3: fix reset timeout - net/hns3: fix copper port inialization - net/hns3: rename RAS module - net/hns3: remove PVID info dump for VF - net/hns3: fix mbuf freeing in simple Tx path Signed-off-by: Dengdui Huang <huangdengdui@huawei.com> (cherry picked from commit 4f2a5e819346fb5bf12b9de68352782319e4a2a6)
36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
From 3a8ddbaac26d919b6ca0b249faeb0ef1f3af9fd0 Mon Sep 17 00:00:00 2001
|
|
From: Dengdui Huang <huangdengdui@huawei.com>
|
|
Date: Mon, 30 Dec 2024 14:54:03 +0800
|
|
Subject: [PATCH] net/hns3: fix mbuf freeing in simple Tx path
|
|
|
|
[ upstream commit d78c76dbeffbd2994d77236c403281b34612e024 ]
|
|
|
|
When RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE offload is not set,
|
|
use rte_pktmbuf_free_seg() to free the mbuf.
|
|
|
|
Fixes: 7ef933908f04 ("net/hns3: add simple Tx path")
|
|
Cc: stable@dpdk.org
|
|
|
|
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
|
|
Signed-off-by: Jie Hai <haijie1@huawei.com>
|
|
---
|
|
drivers/net/hns3/hns3_rxtx.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
|
|
index 0203bde..53d086a 100644
|
|
--- a/drivers/net/hns3/hns3_rxtx.c
|
|
+++ b/drivers/net/hns3/hns3_rxtx.c
|
|
@@ -4090,7 +4090,7 @@ hns3_tx_free_buffer_simple(struct hns3_tx_queue *txq)
|
|
for (i = 0; i < txq->tx_rs_thresh; i++)
|
|
rte_prefetch0((tx_entry + i)->mbuf);
|
|
for (i = 0; i < txq->tx_rs_thresh; i++, tx_entry++) {
|
|
- rte_mempool_put(tx_entry->mbuf->pool, tx_entry->mbuf);
|
|
+ rte_pktmbuf_free_seg(tx_entry->mbuf);
|
|
tx_entry->mbuf = NULL;
|
|
}
|
|
|
|
--
|
|
2.25.1
|
|
|