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 8DF3243274; Fri, 3 Nov 2023 04:31:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EA534067B; Fri, 3 Nov 2023 04:31:08 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2078.outbound.protection.outlook.com [40.107.212.78]) by mails.dpdk.org (Postfix) with ESMTP id 535784067B for ; Fri, 3 Nov 2023 04:31:07 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JbOzlyp/bo8+C4Wdy6Q1oBx3VqVJnOBsILZRWNXU7/XiR6xH2b4OdR7X/LX9tdVt7IOktm3i0awLl0RYvOXwog6QnkioA7c66tGWbA/3/W9qM+D0Dj3NHtJ3vXkJGns/leYSoDkuPed9ew4pLaEkQboPRIZvDWClRylIMxtrrbFQFBFhkWV/hsI+YHkorQHpb4oNAPRn+r7VviqtbHePURTDWjw/r1NiHbOrx/8IDNK34g+opqRMLJFM89JxA7RVcAZssro2cPY5NbzbWbUJWwpZoPq4UZhOnwtVvtVQO/PX9Io8dwcu7w/hCA6gxTj+hVcPM50WIdZUgEBkIywPqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dbP1zypUCUUt6jLL9Zg5Lz9DvcMuYOllzAoaIAVm110=; b=BTY3xuG5cEx4umcLeY6XgMYIvoOLUdad0kkEeeKAlp/yW8OHupEn8yi/H4w3TTRJhYNON0gKOMDZIjCYpW2/vOZlSbSybAySWRU+sgBtnLHWTnjnAqmQyvETpETOMp0BTznZ3bleluJjvSoszT+IYQ3VnzzfTtXLZZ/pFUtMf4FofEtLBZFqiYsjOAji/Tcr5eEG+hGmprTcPKTKFC2Zxkyt5jJgsEX7dzSH5FcLwbtzq2+W2r8d3wn8Ytf2V13fqq5cF3xZAPYTnrmo1x3dXY16RDv/XYo8q+8hnvihAjoTUNEEOyJiG4ELu0sGUbPPdejsC0TY4fRWJuJs+zDLdg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dbP1zypUCUUt6jLL9Zg5Lz9DvcMuYOllzAoaIAVm110=; b=cbrd7AmbbtxaP9ftdAASrDVPpECsd7SWa5bvrMOUTkuVJigXDzFaVkEK6TXHuBar9ay1uQPzWzTbSHzQWb9v29NezSWCDzhvhmBt64KsMgCRhu+C3TCaROhYxtWHSRkxTB6671Nosl6DCPkIOSYAysYD/yMhjbtj4yfJ3/jkN3I= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by BY5PR12MB4998.namprd12.prod.outlook.com (2603:10b6:a03:1d4::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.21; Fri, 3 Nov 2023 03:31:04 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f%6]) with mapi id 15.20.6954.019; Fri, 3 Nov 2023 03:31:03 +0000 Message-ID: <769abd53-d93b-440e-b542-aee3e244f147@amd.com> Date: Fri, 3 Nov 2023 03:30:52 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/3] ethdev: introduce maximum Rx buffer size Content-Language: en-US To: "lihuisong (C)" , dev@dpdk.org, Thomas Monjalon , Andrew Rybchenko , =?UTF-8?Q?Morten_Br=C3=B8rup?= , Stephen Hemminger Cc: liuyonglong@huawei.com References: <20230808040234.12947-1-lihuisong@huawei.com> <20231102121608.10170-1-lihuisong@huawei.com> <20231102121608.10170-2-lihuisong@huawei.com> <85d5dacf-4cb2-3eb9-87e0-29da61726b80@huawei.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1a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cMh1CLUHXF1GlofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <85d5dacf-4cb2-3eb9-87e0-29da61726b80@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR3P281CA0097.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a1::15) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|BY5PR12MB4998:EE_ X-MS-Office365-Filtering-Correlation-Id: 501b1743-d74e-4735-4b69-08dbdc1d4e70 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mo6mT9Zc3cLIRl6JCt+JcOO6+L0xGJxXHmZ5Vv+pUnAeEQTCLcAIUTxgqt98uQDskU7+wYqr9dHVi75sH2GPFBVHA7KpjpPUIKRKx8RSgq3q5adGNGRJoC6VeyCvyzn9JncIqy3/b+KyEbB6soNsCi3HjqC71Nvqa2luMJWxbVHbTtqiHRrd7ot2XLvnp1joKpd/Cpy9XZYQr1Fw6fsEFyoQ+uarjQM+Q5aSwvrZcXElWpFK0wFgP9WU6Oj44q8ezIh3eDFS6keQrmO/FvI3+BEvD2SSs3ieJwFQQgdhip+Fjgt/RsjCfMgyFsXtaSo/ULuUF8NUYR1hYSYUkl35PgToCEbXz9zO9POxbUXQTArxODdE6IoL6XeY9ty/wS8K7p7P6sv3o5xMZ8k3K6xO8qmCM7rnGO2HhBl0NnwWLTyXnhkfNZetGEVh1HpY3nAvfqOL5FSVriXSOkhCxdnvTkv0QD3hkZ9YL0ezxYFydNWb6ucAdzqAenAHCzIlA/jYvAJ2++sP4T2LinLgKme1ILBgF4nmKEDcxS87iJGBZf9tN8f3NDY+QMzEhCGmEyjknTJF01AEkh0ITXNvbA+wW9NJXgK8PK5dd0085m/2X6vNAS6rNOXbB2sEAkDYD2ul5CprPxi2tQSr8d4713lnEA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(136003)(346002)(376002)(39860400002)(396003)(230922051799003)(186009)(451199024)(1800799009)(64100799003)(31686004)(26005)(6512007)(2616005)(38100700002)(31696002)(36756003)(86362001)(2906002)(83380400001)(53546011)(5660300002)(478600001)(6666004)(66574015)(6506007)(4326008)(8936002)(8676002)(316002)(66946007)(66556008)(66476007)(41300700001)(44832011)(6486002)(110136005)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?R0Q5TlpsNEpxaFo1dkVDVys4VXJGMUU3NTJuaGRnYjBaY0U2OFFGT21KelFB?= =?utf-8?B?SFYzYlZybHV3N1ZiaHFVSmJwSEdUQjhBSkxCVlkwbXc1QWtwN2luUnBmZ3Jj?= =?utf-8?B?TW9EaVJuamlZMCtFaEFhbzNHSlJaMEVMakdsVDhFdDBydGxTVTAxd2VLRjMy?= =?utf-8?B?TzJ4dWxzZmVyRlJySFdLbmprbC9kcDh3WVBteWtUVzVLTGRzUTd1WlprTGlL?= =?utf-8?B?MVloa0FyLzhmS1RtbnQxTGxNOFhOMnZJaTRYWTV0eFpRL3dvb0E2RDR0Ky9z?= =?utf-8?B?RElRdzd5RzhJdURlb1lodDFVMGZlNGxWUnZRR0t6ZTlXVG9OcU1ZdTZkM0xU?= =?utf-8?B?bFhjSURqcGM5U09LKzlxL0hLNWpKc0NoVHQ5em1pQnpKZmdQd3BTQUM4N0tV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1d4e70 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2023 03:31:03.3531 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: V0WpfTThohfG5wrNWQTz1WjRNX1yo/nnzHFV8Rdwt7ohs4pNi0poamC/WB95RTkr X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4998 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 On 11/3/2023 2:21 AM, lihuisong (C) wrote: > > 在 2023/11/3 0:35, Ferruh Yigit 写道: >> On 11/2/2023 12:16 PM, Huisong Li wrote: >>> 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, i40e and so on. If mbuf >>> data room size in mempool is greater then the maximum Rx buffer size >>> per descriptor supported by HW, the data size application used in each >>> mbuf is just as much as the maximum Rx buffer size 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 >>> Acked-by: Chengwen Feng >>> Acked-by: Morten Brørup >>> --- >>>   doc/guides/rel_notes/release_23_11.rst |  7 +++++++ >>>   lib/ethdev/rte_ethdev.c                |  7 +++++++ >>>   lib/ethdev/rte_ethdev.h                | 10 +++++++++- >>>   3 files changed, 23 insertions(+), 1 deletion(-) >>> >>> diff --git a/doc/guides/rel_notes/release_23_11.rst >>> b/doc/guides/rel_notes/release_23_11.rst >>> index 95db98d098..d4f7d5b266 100644 >>> --- a/doc/guides/rel_notes/release_23_11.rst >>> +++ b/doc/guides/rel_notes/release_23_11.rst >>> @@ -122,6 +122,13 @@ New Features >>>     a group's miss actions, which are the actions to be performed on >>> packets >>>     that didn't match any of the flow rules in the group. >>>   +* **Added maximum Rx buffer size to report.** >>> + >>> +  Introduced the ``max_rx_bufsize`` field representing the maximum Rx >>> +  buffer size per descriptor supported by HW in structure >>> ``rte_eth_dev_info`` >>> +  to report user and to avoid wasting space of mempool. >>> +  Its value is UINT32_MAX if driver doesn't report it. >>> + >>>   * **Updated Amazon ena (Elastic Network Adapter) net driver.** >>>       * Upgraded ENA HAL to latest version. >>> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c >>> index af23ac0ad0..03539bb6c3 100644 >>> --- a/lib/ethdev/rte_ethdev.c >>> +++ b/lib/ethdev/rte_ethdev.c >>> @@ -2112,6 +2112,7 @@ rte_eth_rx_queue_setup(uint16_t port_id, >>> uint16_t rx_queue_id, >>>       struct rte_eth_dev *dev; >>>       struct rte_eth_dev_info dev_info; >>>       struct rte_eth_rxconf local_conf; >>> +    uint32_t vld_bufsize; >>>   >> I guess 'vld' is valid, but that is not accurate. Can we rename it >> something like 'buf_data_size'? > Ack >> >>>       RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); >>>       dev = &rte_eth_devices[port_id]; >>> @@ -2158,6 +2159,11 @@ rte_eth_rx_queue_setup(uint16_t port_id, >>> uint16_t rx_queue_id, >>>               return ret; >>>             mbp_buf_size = rte_pktmbuf_data_room_size(mp); >>> +        vld_bufsize = mbp_buf_size - RTE_PKTMBUF_HEADROOM; >>> +        if (vld_bufsize > dev_info.max_rx_bufsize) >>> +            RTE_ETHDEV_LOG(INFO, >>> +                "For port_id=%u the max data size per mbuf in Rx is >>> %u instead of the whole data room(%u).\n", >>> +                port_id, dev_info.max_rx_bufsize, vld_bufsize); >>> >> This log gives some information, but it is not clear what user should >> do. My concern is this can confuse end users (not developers but users >> of dpdk application). >> >> Since audience of this message is DPDK application developer, most of >> the times end user don't have anything to do with this log, what do you >> think to change log level to 'debug'? > Ack >> >> Also can we add some action to it, something like: >> "mbuf data buffer size is bigger than what device can utilize, consider >> reducing mbuf size." > What do you think of this log, Ferruh? > "The mbuf data buffer size (%u) is bigger than the max size (%u) device > with port_id=%u can utilize, consider reducing mbuf size.\n", > Can move port_id to the beginning, and can make wording passive, what about: "For port_id=%u, the mbuf data buffer size (%u) is bigger than max buffer size (%u) device can utilize, mbuf size can be reduced.\n" >> >> >> >>>       } else if (rx_conf != NULL && rx_conf->rx_nseg > 0) { >>>           const struct rte_eth_rxseg_split *rx_seg; >>>           uint16_t n_seg; >>> @@ -3757,6 +3763,7 @@ rte_eth_dev_info_get(uint16_t port_id, struct >>> rte_eth_dev_info *dev_info) >>>       dev_info->min_mtu = RTE_ETHER_MIN_LEN - RTE_ETHER_HDR_LEN - >>>           RTE_ETHER_CRC_LEN; >>>       dev_info->max_mtu = UINT16_MAX; >>> +    dev_info->max_rx_bufsize = UINT32_MAX; >>>         if (*dev->dev_ops->dev_infos_get == NULL) >>>           return -ENOTSUP; >>> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h >>> index a53dd5a1ef..7133b73d26 100644 >>> --- a/lib/ethdev/rte_ethdev.h >>> +++ b/lib/ethdev/rte_ethdev.h >>> @@ -1723,7 +1723,15 @@ 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; >>> +    /** >>> +     * Maximum Rx buffer size per descriptor supported by HW. >>> +     * The value is not enforced, information only to application to >>> +     * optimize mbuf size. Its value is UINT32_MAX when not specified >>> +     * by the driver. >>> +     */ >>> +    uint32_t max_rx_bufsize; >>>       uint32_t max_rx_pktlen; /**< Maximum configurable length of Rx >>> pkt. */ >>>       /** Maximum configurable size of LRO aggregated packet. */ >>>       uint32_t max_lro_pkt_size; >> .