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 22A6643272; Fri, 3 Nov 2023 03:39:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 99CCB40265; Fri, 3 Nov 2023 03:39:56 +0100 (CET) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id 36BC54021E for ; Fri, 3 Nov 2023 03:39:55 +0100 (CET) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4SM4bk32BZzMmQn; Fri, 3 Nov 2023 10:35:30 +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; Fri, 3 Nov 2023 10:39:52 +0800 Message-ID: <1b312727-4960-a2dd-e69d-ab01c2465238@huawei.com> Date: Fri, 3 Nov 2023 10:39:51 +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 v4 2/3] app/testpmd: add maximum Rx buffer size display To: Ferruh Yigit , , Aman Singh , Yuying Zhang CC: , , References: <20230808040234.12947-1-lihuisong@huawei.com> <20231102121608.10170-1-lihuisong@huawei.com> <20231102121608.10170-3-lihuisong@huawei.com> From: "lihuisong (C)" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.59] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) 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/11/3 0:42, Ferruh Yigit 写道: > On 11/2/2023 12:16 PM, Huisong Li wrote: >> Add maximum Rx buffer size display. >> > I think there is a value to show what is the intended usage of this new > field in application level, > that is why what do you think to use testpmd? > > Testpmd can be updated to check if mbuf data size is bigger than device > buffer size, and just log, similar to done in ethdev layer, just to > showcase how application should use it. Just to check "--mbuf-size" in testpmd cmdline, right? But we already did it in ethdev layer, is it necessary for testpmd? Or we can add a usecase in test_ethdev_api.c. what do you think? > > For many drivers, this won't have anything functional, because of > UINT32_MAX size, but it is still valuable as sample. > > >> Signed-off-by: Huisong Li >> Acked-by: Chengwen Feng >> --- >> app/test-pmd/config.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c >> index b9fdb7e8f1..2ac6f15773 100644 >> --- a/app/test-pmd/config.c >> +++ b/app/test-pmd/config.c >> @@ -881,6 +881,8 @@ port_infos_display(portid_t port_id) >> } >> >> printf("Minimum size of RX buffer: %u\n", dev_info.min_rx_bufsize); >> + if (dev_info.max_rx_bufsize != UINT32_MAX) >> + printf("Maximum size of RX buffer: %u\n", dev_info.max_rx_bufsize); >> printf("Maximum configurable length of RX packet: %u\n", >> dev_info.max_rx_pktlen); >> printf("Maximum configurable size of LRO aggregated packet: %u\n", > .