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 6D864A0032; Tue, 16 Nov 2021 02:24:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C6F140141; Tue, 16 Nov 2021 02:24:59 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id D704540040 for ; Tue, 16 Nov 2021 02:24:57 +0100 (CET) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4HtSsZ2KGQzbhw8; Tue, 16 Nov 2021 09:20:02 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.20; Tue, 16 Nov 2021 09:24:56 +0800 Subject: Re: [PATCH 1/2] net/hns3: optimized Tx performance by mbuf fast free To: Ferruh Yigit , CC: References: <20211111133859.13705-1-humin29@huawei.com> <20211111133859.13705-2-humin29@huawei.com> <91dc58ee-64fc-b520-9716-d7e0fc9d34d9@intel.com> From: "Min Hu (Connor)" Message-ID: <6e77c623-4657-5c53-ea85-5f17d8ed5105@huawei.com> Date: Tue, 16 Nov 2021 09:24:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <91dc58ee-64fc-b520-9716-d7e0fc9d34d9@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected 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 Hi, Ferruh, fixed in v2, thanks. 在 2021/11/16 1:30, Ferruh Yigit 写道: > On 11/11/2021 1:38 PM, Min Hu (Connor) wrote: >> From: Chengwen Feng >> >> Currently the vector and simple xmit algorithm don't support multi_segs, >> so if Tx offload support MBUF_FAST_FREE, driver could invoke >> rte_mempool_put_bulk() to free Tx mbufs in this situation. >> >> In the testpmd single core MAC forwarding scenario, the performance is >> improved by 8% at 64B on Kunpeng920 platform. >> > > 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' seems already announced in > 'tx_offload_capa', >  was it wrong? > >> Cc: stable@dpdk.org >> >> Signed-off-by: Chengwen Feng >> Signed-off-by: Min Hu (Connor) >> --- >>   drivers/net/hns3/hns3_rxtx.c     | 11 +++++++++++ >>   drivers/net/hns3/hns3_rxtx.h     |  2 ++ >>   drivers/net/hns3/hns3_rxtx_vec.h |  9 +++++++++ >>   3 files changed, 22 insertions(+) >> > > Can you please update 'doc/guides/nics/features/hns3.ini' to announce > "Free Tx mbuf on demand" feature. > >> diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c >> index d26e262335..78227a139f 100644 >> --- a/drivers/net/hns3/hns3_rxtx.c >> +++ b/drivers/net/hns3/hns3_rxtx.c >> @@ -3059,6 +3059,8 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, >> uint16_t idx, uint16_t nb_desc, >>       txq->min_tx_pkt_len = hw->min_tx_pkt_len; >>       txq->tso_mode = hw->tso_mode; >>       txq->udp_cksum_mode = hw->udp_cksum_mode; >> +    txq->mbuf_fast_free_en = !!(dev->data->dev_conf.txmode.offloads & >> +                    DEV_TX_OFFLOAD_MBUF_FAST_FREE); > > Can you please use updated macro name, 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE'? > .