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 9ED8C43212; Fri, 27 Oct 2023 09:40:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 692B04029A; Fri, 27 Oct 2023 09:40:19 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 0305840272 for ; Fri, 27 Oct 2023 09:40:17 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id C7F8020723; Fri, 27 Oct 2023 09:40:17 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v2 1/3] ethdev: introduce maximum Rx buffer size X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Fri, 27 Oct 2023 09:40:16 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9EFA1@smartserver.smartshare.dk> In-Reply-To: <20231027041523.14518-2-lihuisong@huawei.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v2 1/3] ethdev: introduce maximum Rx buffer size Thread-Index: AdoIjDdn395c6ZsdRFyFxss6lwUujgAG7RNw References: <20230808040234.12947-1-lihuisong@huawei.com> <20231027041523.14518-1-lihuisong@huawei.com> <20231027041523.14518-2-lihuisong@huawei.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Huisong Li" , Cc: , , , 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: Huisong Li [mailto:lihuisong@huawei.com] > Sent: Friday, 27 October 2023 06.15 >=20 > 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. >=20 > 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. >=20 > 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 "/**< ". > + /** > + * 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. With those to changes, Acked-by: Morten Br=F8rup