From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 71FB645F79; Mon, 30 Dec 2024 08:06:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF38D402E9; Mon, 30 Dec 2024 08:06:17 +0100 (CET) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 0991540288 for ; Mon, 30 Dec 2024 08:06:13 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4YM6WT6xjGz2Djd9; Mon, 30 Dec 2024 15:03:17 +0800 (CST) Received: from kwepemf500004.china.huawei.com (unknown [7.202.181.242]) by mail.maildlp.com (Postfix) with ESMTPS id B6B201A016C; Mon, 30 Dec 2024 15:06:07 +0800 (CST) Received: from localhost.localdomain (10.28.79.22) by kwepemf500004.china.huawei.com (7.202.181.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 30 Dec 2024 15:06:07 +0800 From: Jie Hai To: , , , , , Chengwen Feng , "Wei Hu (Xavier)" , Huisong Li CC: , Subject: [PATCH 1/3] net/hns3: fix simple Tx path incorrect free the mbuf Date: Mon, 30 Dec 2024 14:54:03 +0800 Message-ID: <20241230065405.18552-2-haijie1@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20241230065405.18552-1-haijie1@huawei.com> References: <20241230065405.18552-1-haijie1@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemf500004.china.huawei.com (7.202.181.242) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Dengdui Huang 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 Signed-off-by: Jie Hai --- 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 03bbbc435fac..09e39cb673cb 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -4006,7 +4006,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.22.0