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 61630A0566; Tue, 18 Oct 2022 12:42:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 308164021E; Tue, 18 Oct 2022 12:42:48 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2042.outbound.protection.outlook.com [40.107.243.42]) by mails.dpdk.org (Postfix) with ESMTP id 779AC4021D; Tue, 18 Oct 2022 12:42:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eeMVkQ2LgICCdlfj4ogVOLJa/d8bKlvRWpOYCtKXhpaGOfiu3ke+lu8hbHZTl+teIMpxf5b5FrIibKsfgfWX+Rthxlqptgt2j54ZZ//WuTGA6g7k32wA5kWofqRQRTt7g0Z6hQR+iau8ykZE1RVKSy/Xajez4Yq1ac1kxpM846sG13V0efdBNRZu8YXGfUX/7N0/trght+XDI//W8up95DfgsXMwtG1TcNlY23vXXQZt1hQuAmZ4J7OV4moAyrue5XzHJ7A/Bs/aEo2u2f/WMbBW1RfBu5q0+vRPtLpj1GqUzrICjrc/8d7kNgnaRJBDDW50GzGlhL740P7OOUEKEw== 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=npsCEt7GbAEYUOihiHFSY3F0gBkv6QWlq3niFoJJwi8=; b=DrqqBP5DS/erYTu+fg2ESAyCzD2ZCLoqtVGUj1sa27r5rPEVrys92Qkp9lxhHGTWBzCLb83DE+wDQLEMy6DE0OAESurz3yxT71YdbVcxfht3sT5xxEJqJBsuvh0kORrMmG/7VhbaPQnUkMdAdK5uBX6T9dFb0HRaVy0WCZNgvRj3TY5FrXcwzq6ZhndqJXN5GBNkeGUmJllO7kY3bZ6tXBm6wXqhI2qVhZII/m0MbeU3MQJc18kIdXxCgtM0BCZM195XAyucIL+3iCnWX0aF98UTNeaRlkYaUaNg5oPnWVT7DXNU1gB5mJuutGZSWl6V7nCV10oLPeKuOKBsMI8Abw== 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=npsCEt7GbAEYUOihiHFSY3F0gBkv6QWlq3niFoJJwi8=; b=YLU1w+4M8Hiv+R71yGw6v++SwDa6vvVG4hYIIjEftvxkeopO+Oy9QWEPLd/GBVD2CzNza6EMy1rQqedD6divzQv19pwfvp7SKiFgxZyyorS6afX3UG6Fcg5qrv2VWgJ7iA6yxSF0Ld8EmTiiiTdOm7X7QySZmLq73NDdJG+Xix0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) by CH2PR12MB4310.namprd12.prod.outlook.com (2603:10b6:610:a9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Tue, 18 Oct 2022 10:42:44 +0000 Received: from DM6PR12MB4297.namprd12.prod.outlook.com ([fe80::b9fd:e732:4585:6b25]) by DM6PR12MB4297.namprd12.prod.outlook.com ([fe80::b9fd:e732:4585:6b25%7]) with mapi id 15.20.5723.033; Tue, 18 Oct 2022 10:42:44 +0000 Message-ID: Date: Tue, 18 Oct 2022 11:42:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH] net/nfp: set the appropriate initialized value of flbufsz Content-Language: en-US To: Nole Zhang , Chaoyong He , "dev@dpdk.org" Cc: oss-drivers , Niklas Soderlund , "stable@dpdk.org" References: <1665384495-24990-1-git-send-email-chaoyong.he@corigine.com> <482436be-c20f-09a0-d4e7-b46458026317@amd.com> <005358b0-33cf-1fb1-bf1a-08b82c2a08cd@amd.com> <62bf28bc-fda3-c4d2-c0c3-46fed4f2984c@amd.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0562.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:33b::12) To DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB4297:EE_|CH2PR12MB4310:EE_ X-MS-Office365-Filtering-Correlation-Id: 3807b208-6713-47aa-9b0e-08dab0f57d1f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kgWC184AW4b8kXPrGAK5qVBeUjyoqYu+Uq9iy+WDs/qUyXrOENDCVdhj9LLq4kfeo2QCWtbN08pbynWTxXUdyroLAy2WfBwmI9ap1Z858ox9ITBioPxQ0BwxCFQ+1D7my+QzKPHbMS6cdHRQFD00fMAad38ZG5nfmHCYdbqjzD6JuAxMkYo2MR+xQlDc7be6odIv4jam1KUXBzgd/ga6VQxf2+NViOHZNe1TMx++ViD0TsK10izHBF3e0IysBkWTd3PPvpkRW6zunBEqtFrasMXo9HRnFfo+uvFPiTv3LQTYgkrbt9K9M6QLtlHyy7Rka39tkUeU8EL1T8Oknj5rFEoCA5/TFoQ+eTg6JR6ciamJTszGYMxRY2nQhF+0Ppz94Qfs1yyVRg9MIgvghsxOpeXo8+axRGZnrFwj/Ezk3Zd40xOV+rQ9BddO/t2lda9m67WACuGci1JcIuxUwsN9gSo2rETwWFvLB6OudDIZfnxenJffCm5bfBUZ0gOmaqVHHxkn1W2kWgjIkfYzI93z9x9IVXLnuht8lPmTRDd9CSgsTNlBO9YF+juvbMHvD3tdWQD7Swwd5AHVtJx6gkY2iS8tS+n7JFhgWTGyKrjJp/UO5m9vPE5z0xz1gJ355lPS5laCOVS4L1wa3fF3QuUSbNta+121z9YvwfTK6wg3srStA/lBAU6uaOf8JX/gnoHQ84xYt/C+MPAZTmzt8AHNH7G1kNfYyasJVTKW8LselUZJGI+M740iQ97QWb/BpaJyd7kx0qOIFd/7RHkZGDe8e5dnXGBAoHWK/Hr+f4wUdJ8= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB4297.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(396003)(366004)(39860400002)(136003)(346002)(376002)(451199015)(186003)(2616005)(53546011)(6506007)(6666004)(6512007)(26005)(83380400001)(2906002)(5660300002)(44832011)(316002)(54906003)(8936002)(6486002)(478600001)(41300700001)(66946007)(4326008)(110136005)(8676002)(66476007)(66556008)(31696002)(86362001)(36756003)(38100700002)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NkZYdm9Oc09hWDl0MEEyMndhK0ZKN0QrSXpjSlhTRjNQSVJvMlpyMy9NMFdq?= =?utf-8?B?Qkgwbm8wU2lmaW0rd0VqWlBFYWdESGxlVzEzd2hrc1d2OVRrQzRYUFhrR3pz?= =?utf-8?B?SUZUSmhSNTFUcmVsNlVza1MzOTFQS1ZROWt1WlRFekNjYS9rWmluMnFYWVV6?= =?utf-8?B?UGkyQVRleHpPMy9QVDNPaUVXNEhZb0NkeHd5Zm9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xZUowS1BUL2h5UjNmOW8rWUlmeVdvS2ZHSnhlM2I1eFVi?= =?utf-8?B?bTk4ZllaaERLMkJkU3BOV1RtSzBERzNpZ0pvcUpxRW1zVWJaT1Bub3F2QWl6?= =?utf-8?Q?YbPlVdGByz47oLfIY8XsGsufz?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3807b208-6713-47aa-9b0e-08dab0f57d1f X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4297.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2022 10:42:44.2326 (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: PmSC6WRVOsACwUcLj5sfFzlOCiRBdjzgKYa9hrtyYMBTsUKzTwz/ef3e6nGS9gOt X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4310 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 10/18/2022 10:50 AM, Nole Zhang wrote: > > >> -----Original Message----- >> From: Ferruh Yigit >> Sent: 2022年10月18日 17:36 >> To: Nole Zhang ; Chaoyong He >> ; dev@dpdk.org >> Cc: oss-drivers ; Niklas Soderlund >> ; stable@dpdk.org >> Subject: Re: [PATCH] net/nfp: set the appropriate initialized value of flbufsz >> >> On 10/18/2022 9:51 AM, Nole Zhang wrote: >>>> On 10/18/2022 2:41 AM, Nole Zhang wrote: >>>>> >>>>>> On 10/15/2022 8:38 AM, Nole Zhang wrote: >>>>>>> > On 10/10/2022 7:48 AM, Chaoyong He wrote: >>>>>>>>> From: Peng Zhang >>>>>>>>> >>>>>>>>> When the testpmd app start-up with parameter max-pkt-len, it >>>>>>>>> will set >>>>>>>> MTU. >>>>>>>>> But the initialized value of flubfsz is inappropriate, if the >>>>>>>>> value of flbufsz is smaller than the valude of max-pkt-len, the >>>>>>>>> testpmd app will start fail. >>>>>>>>> >>>>>>>> >>>>>>>> What is the failure in the testpmd? >>>>>>> >>>>>>> The log is as follows: >>>>>>> [root@volstruis ~]# dpdk-testpmd --main-lcore 10 -l 10,11,12 -n 4 >>>>>>> -a >>>>>>> 0000:81:00.0 --socket-mem 2048,2048 --proc-type auto -- --portmask >>>>>>> 0x3 --nb-cores 2 --rxq 1 --txq 1 --rxd 1024 --txd 1024 >>>>>>> --port-topology loop --forward-mode macswap --max-pkt-len 9216 >>>>>>> --mbuf-size 9600 --rss-udp --burst=32 >>>>>>> EAL: Detected CPU lcores: 40 >>>>>>> EAL: Detected NUMA nodes: 2 >>>>>>> EAL: Auto-detected process type: PRIMARY >>>>>>> EAL: Detected static linkage of DPDK >>>>>>> EAL: Multi-process socket /var/run/dpdk/rte/mp_socket >>>>>>> EAL: Selected IOVA mode 'VA' >>>>>>> EAL: VFIO support initialized >>>>>>> EAL: Using IOMMU type 1 (Type 1) >>>>>>> EAL: Probe PCI driver: net_nfp_pf (19ee:4000) device: 0000:81:00.0 >>>>>>> (socket 1) NFP HWINFO header: 48490200 >>>>>>> TELEMETRY: No legacy callbacks, legacy socket not created Set >>>>>>> macswap packet forwarding mode >>>>>>> testpmd: create a new mbuf pool : n=163456, size=9600, >>>>>>> socket=1 >>>>>>> testpmd: preferred mempool ops selected: ring_mp_mc Configuring >>>>>>> Port >>>>>>> 0 (socket 1) >>>>>>> Port0 dev_configure = -34 >>>>>>> Fail to configure port 0 >>>>>>> EAL: Error - exiting with code: 1 >>>>>>> Cause: Start ports failed >>>>>>> >>>>>>> First in the `nfp_net_configure()`, we will judge the value of >>>>>>> MTU and hw- flbufsz, If MTU > hw->flbufsz, it will have the error. >>>>>>> >>>>>>> And the `--max-pkt-len` is setting the MTU in the initialize >>>>>>> process, the >>>>>> initialized value of hw->flbufsz is just 1500 at first. >>>>>>> >>>>>>> So if we set the `max-pkt-len` bigger than the initialized value >>>>>>> of flbufsz, It >>>>>> will lead the error. >>>>>>> >>>>>>> Hence we set the new value of hw->flbufsz, it can large the range >>>>>>> max-pkt- >>>>>> len in the initialized process. >>>>>>> >>>>>>> >>>>>>>> >>>>>>>> This patch is fixing something but it is not clear what is fixed, >>>>>>>> the concern is it may be changing driver to make something pass >>>>>>>> in test >>>>>> application (testpmd). >>>>>>>> >>>>>>>> What is 'flubfsz', is it Hw configured frame buffer size? >>>>>>> >>>>>>> >>>>>>> It is configured in the `nfp_net_rx_queue_setup()`{`hw->flbufsz = >>>>>>> rxq- mbuf_size`}. >>>>>>> If the rxq->mbuf_size < MTU, the MTU can't work. >>>>>>> >>>>>> >>>>>> It looks like `hw->flbufsz` holds the Rx buffer size, as you >>>>>> highlighted >>>> above. >>>>>> >>>>>> And you don't want to accept frames bigger than buffer size, since >>>>>> it seems driver doesn't support `RTE_ETH_RX_OFFLOAD_SCATTER`, all >>>>>> looks >>>> OK. >>>>>> >>>>>> >>>>>> According above logic, I agree "hw->flbufsz = RTE_ETHER_MTU;" is >>>>>> wrong, but equally `hw->flbufsz = hw->max_mtu;` seems wrong. >>>>>> >>>>>> In above command line, it is safe because "mbuf-size=9600" and >>>>>> "max-pkt-len=9216", buffer size is bigger than packet size. >>>>> Yes, if I need set the hardcoded value, I should set the max max-pkt-len. >>>> >>>> I think it should be 'mbuf-size', since 'hw->flbufsz' is the buffer size. >>>> 'max-pkt-len' is the max Rx frame accepted by NIC, for some devices >>>> 'max- pkt-len' can be bigger than buffer size but it will work fine >>>> because of segmented Rx, but it seems this config doesn't work for nfp. >>>> >>> As you said, maybe the ` NFP_FRAME_SIZE_MAX ` is right, for our nic, >>> the max_rx_pktlen is NFP_FRAME_SIZE_MAX. >> >> If 'NFP_FRAME_SIZE_MAX' is your HW limit, agree to set it if it will be a >> hardcoded value, please see below. >> >>>>>> >>>>>> You should able to set `hw->flbufsz` to current buffer size, >>>>>> instead of a hardcoded value. >>>>>> >>>>>> In `nfp_net_init()`, most probably you don't know the buffer size >>>>>> yet, can't you skip setting this value here and set it in >>>>>> `nfp_net_rx_queue_setup()` when you know the buffer size? >>>>>> >>>>> >>>>> But If I just depends on the `nfp_net_rx_queue_setup()`, in the >>>>> `nfp_net_init()`, it will Call the `nfp_net_configure()`, it will >>>>> lead the testpmd start failed, so I add the hardcoded value in the >>>>> initialize >>>> process. Or I can remove the judge about `hw->flbufsz` in the >>>> `nfp_net_init()`. >>>>> >>>> >>>> Instead of setting 'hw->flbufsz' in 'nfp_net_init()' and check it in >>>> 'nfp_net_configure()', why not set 'hw->flbufsz' in 'nfp_net_configure()'? >>>> >>>> Because in 'nfp_net_configure()', 'mtu' is a configuration parameter. >>>> It can be possible to convert 'mtu' to frame size and set it. If >>>> there is a HW limitation on buffer size, it can fail in 'nfp_net_configure()' >> when that limit hit. >>>> >>> You mean in the 'nfp_net_configure()', set the value of 'hw->flbufsz', >>> Like `if (rxmode->mtu > hw->flbufsz) { >>> hw->flbufsz = rxmode->mtu; >>> }` >>> Because the 'nfp_net_configure()' also isn't only called once. >>> If it will be set the values every times, so I first just set the >>> Initial value in the `nfp_net_inital()`. >>> >> >> >> But during init, 'nfp_net_init()', you don't know the buffer size, that is why >> you are just setting a hardcoded value, which can be wrong, as you are >> observing now. >> >> Also thinking twice setting "hw->flbufsz = rxmode->mtu" is not correct, since >> it is not frame size either. >> >> >> What about: >> - in 'nfp_net_configure()' change check as: >> if (rxmode->mtu > NFP_FRAME_SIZE_MAX) >> return error >> >> And you may want to save 'mtu' in driver or in device via >> nn_cfg_writel(hw, NFP_NET_CFG_MTU, mtu); >> >> >> - in start() add check for buffer size: >> if (mtu > hw->flbufsz) >> return error >> >> - in init() you can either remove setting 'hw->flbufsz' or set it to max >> (NFP_FRAME_SIZE_MAX) as you suggested. >> If you remove setting it in init, you can have logic in configure() as >> ` >> bufsize = hw->flbufsz ? hw->flbufsz : NFP_FRAME_SIZE_MAX; >> if (rxmode->mtu > bufsize) >> return error >> ` > Yes, thanks for your advice. > > I will add the > - in start() add check for buffer size: > `if (mtu > hw->flbufsz) > return error` > -in the init() keep the value > ` > hw->flbufsz = NFP_FRAME_SIZE_MAX; > ` > -in the conigdure() use this check > ` > if (rxmode->mtu > NFP_FRAME_SIZE_MAX) > return error > ` If you will initialize 'hw->flbufsz' as 'NFP_FRAME_SIZE_MAX' in the init(), you can keep the check in the configure() intact, up to you. > I will send the v2 after the testing. > ack, thanks. > Thanks for your review and help again. > >> >>>>> Thanks for your advice. >>>>>> >>>>>>>> >>>>>>>> >>>>>>>>> Fixes: 5c305e218f15 ("net/nfp: fix initialization") >>>>>>>>> Cc: stable@dpdk.org >>> ... >>>>>>>>> /* VLAN insertion is incompatible with LSOv2 */ >>>>>>>>> if (hw->cap & NFP_NET_CFG_CTRL_LSO2) >>>>>>> >>>>> >>> >