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 CABE64321C; Sat, 28 Oct 2023 03:23:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 975D24029E; Sat, 28 Oct 2023 03:23:09 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id F39C140291 for ; Sat, 28 Oct 2023 03:23:07 +0200 (CEST) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SHM9F0ZvZzpWWh; Sat, 28 Oct 2023 09:18:09 +0800 (CST) Received: from [10.67.121.59] (10.67.121.59) by kwepemm000004.china.huawei.com (7.193.23.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Sat, 28 Oct 2023 09:23:03 +0800 Message-ID: <39046603-5e4b-9345-dab7-989fefff6d8e@huawei.com> Date: Sat, 28 Oct 2023 09:23:03 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v2 1/3] ethdev: introduce maximum Rx buffer size To: =?UTF-8?Q?Morten_Br=c3=b8rup?= , CC: , , , References: <20230808040234.12947-1-lihuisong@huawei.com> <20231027041523.14518-1-lihuisong@huawei.com> <20231027041523.14518-2-lihuisong@huawei.com> <98CBD80474FA8B44BF855DF32C47DC35E9EFA1@smartserver.smartshare.dk> From: "lihuisong (C)" In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9EFA1@smartserver.smartshare.dk> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.59] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm000004.china.huawei.com (7.193.23.18) 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 在 2023/10/27 15:40, Morten Brørup 写道: >> From: Huisong Li [mailto:lihuisong@huawei.com] >> Sent: Friday, 27 October 2023 06.15 >> >> The "min_rx_bufsize" in struct rte_eth_dev_info stands for the minimum >> Rx buffer size supported by hardware. Actually, some engines also have >> the maximum Rx buffer specification, like, hns3. If mbuf data room size >> in mempool is greater then the maximum Rx buffer size supported by HW, >> the data size application used in each mbuf is just as much as the >> maximum >> Rx buffer size supported by HW instead of the whole data room size. >> >> So introduce maximum Rx buffer size which is not enforced just to >> report user to avoid memory waste. In addition, fix the comment for >> the "min_rx_bufsize" to make it be more specific. >> >> Signed-off-by: Huisong Li >> --- > [...] > >> --- a/lib/ethdev/rte_ethdev.h >> +++ b/lib/ethdev/rte_ethdev.h >> @@ -1723,7 +1723,14 @@ struct rte_eth_dev_info { >> uint16_t min_mtu; /**< Minimum MTU allowed */ >> uint16_t max_mtu; /**< Maximum MTU allowed */ >> const uint32_t *dev_flags; /**< Device flags */ >> - uint32_t min_rx_bufsize; /**< Minimum size of Rx buffer. */ >> + /**< Minimum Rx buffer size per descriptor supported by HW. */ >> + uint32_t min_rx_bufsize; > The comment was moved above min_rx_bufsize, so you must use "/** " instead of "/**< ". You are right. will fix it in next version. > >> + /** >> + * Maximum Rx buffer size per descriptor supported by HW. >> + * The value is not enforced, information only to application to >> + * optimize mbuf size. >> + */ >> + uint32_t max_rx_bufsize; > The comment should mention that the value is UINT32_MAX when not specified by the driver. Ack > > With those to changes, > > Acked-by: Morten Brørup > > > .