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 CEE1FA00C3 for ; Thu, 13 Oct 2022 14:00:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C642542F20; Thu, 13 Oct 2022 14:00:20 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2075.outbound.protection.outlook.com [40.107.243.75]) by mails.dpdk.org (Postfix) with ESMTP id 7697642DC7; Thu, 13 Oct 2022 14:00:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TzjHfq3QPdAzrWWGHvsnTFuLlPTlR2RAdrSK44AYsiMUbmzqU26K6CS3EciSLg26DrOPRsnHyeq7evf4sl/RWGJBnIju2ZMO0fZFJBT3weQ9lfpwEuX68QYl7vwTqwKc0DtaMqPRZqID6cAwInNq0SIKDiVcvISjZUKgeFIcgSs/QjDY4/lRBh0sAxPF++rVsZN9MhneWQkktgVN0XDbnRcWTLZ9F9bgq5iYH+OOab7PPBBkDJakmP4CD5c9lvNikNRgglEQpQ2KYtU7d0bsqw/tpzuDeOQzxxqBD+BU2Ej5DiftIu912tYSO14r1+/gLDp9SkWtKJs2iCIWe92wDg== 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=mYwGM0j3S1qTcYpfS351Zqtjw0Boyh8W3aBtlxmKtIw=; b=OSklNxmpEU9dmR6a0Tq/HcgleNVIJyDNymBD+17AW+wtxZqDjcXBEuNMyyLFAwjsWoaqjn0JcmN36fPVMtf+HaDcWy8jrfktnfjmW5J+K8V7q0BIFx5zZ0ZrhSMuBpTy+zWxoYCYWIXfElzOKKt+6Iuk5fcUBWN891zGsT7neoNazsVqko60x8heAu9zuGFKTza43FdwPj+K9/7C8Ee70a2EqAqzxpqbHtAjRcfANkVdO588iNMvprj1rTCvjZY1d32Pgfma9vkouzti32i0X3gEXBATZfPemp5OovoDGx0Xl0KwNAuxFjuNVprOhjSkIqEcTrV5kxyi6amYjuPlhQ== 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=mYwGM0j3S1qTcYpfS351Zqtjw0Boyh8W3aBtlxmKtIw=; b=LSYqt5eia0FdXnjysaQn9SUIU3Cq5tVqO8OAqDmh6SIXrf+iXS0VsIOcX3vcy9HMlJatW90Yt3dvSbAxELtk35nUaDbvlvsajFieUYYRULwCluuZFq74GM9qdPL9oPlTLTyfsV8c5fHWQMrRipKtUuQ7GLtDZ3gjymyXDeBlub4= 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 PH8PR12MB7111.namprd12.prod.outlook.com (2603:10b6:510:22d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.17; Thu, 13 Oct 2022 12:00:15 +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.5676.036; Thu, 13 Oct 2022 12:00:15 +0000 Message-ID: <482436be-c20f-09a0-d4e7-b46458026317@amd.com> Date: Thu, 13 Oct 2022 13:00:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH] net/nfp: set the appropriate initialized value of flbufsz Content-Language: en-US To: Chaoyong He , dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Peng Zhang , stable@dpdk.org References: <1665384495-24990-1-git-send-email-chaoyong.he@corigine.com> From: Ferruh Yigit In-Reply-To: <1665384495-24990-1-git-send-email-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0441.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a9::14) To DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB4297:EE_|PH8PR12MB7111:EE_ X-MS-Office365-Filtering-Correlation-Id: 9e775db5-2176-4314-5ff5-08daad127d33 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: l8Cg3sWTOHAd/gJnY+uhkBC4E79SBaDPEE3xJmYcdzuKjfDqWaS/aReemEjJW/5NF1bvFZBeGfN+XI5pVkXa2Np6vzRSrw9k/uOVyNcRhdyYOBxUn1hQNowMreDFUNeeAVbTVxXx0qKg34MbpO84mThBkFbzGfm+cLDDA6/dOBrj66ilBt/dLMPFhGzKXFQt7G8izHQj6dmYTdIrnDy9FMqGBO+aX2rVPDVS5D3FpJiQRd2yaNJTzFCU9NvAKAlzJnKF/36Rn9S8rrdj8cyh65736wH7hxEblROEiyjgOvSvuojiEY7AqmVoazHhmU+KUiLqeb0gFEUltV2PLUhJAEgC8diVi0xdgJDEWbJ9z1e7sRbfhYcarWroMfougfBITJpmyh3MBEYOIuBFxcO2MjkAYSRlTm8FeIK+OOIJu1Y6USqNp5RPQbzZcPvN62MnugkWJpStOtDDknNRadk2OhId2cOtlUxfwgcaSPgZAXs/olliIW0rrsztc05LCtrDEH59JVW7HYJam82RP1AWOWJW+a+21HYOqb8zZEl1IZzx5+ezr+rcu/HXk3fUy4EOjEnH34Ri6ZAa0fuHCB+nGpuGYSIRhF88sk98d9+MRdlsC0fIufNeZARUKKqGFs+dbgkMNPVQx2oKrRQKh+nIpzZF/XGxaJMgLrhTcEE/RZ48Al8W3/a/i7jP8UQ/WeaQPAOuyecGmCXSr2I+IHbDn4OJAwwWDX2CiRo3Qv3CqHgMqZRl9EGxq21KRMXu52z9GTkwkykRPk4JctB2BM5WqH8+LqY9pQ57NySLOdFWupc= 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)(136003)(396003)(39860400002)(366004)(376002)(346002)(451199015)(6486002)(86362001)(36756003)(66556008)(8676002)(41300700001)(4326008)(66476007)(6512007)(8936002)(44832011)(66946007)(31696002)(5660300002)(6666004)(26005)(83380400001)(478600001)(316002)(186003)(2616005)(53546011)(66574015)(6506007)(38100700002)(31686004)(2906002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?K3hXRjZ5UlJSK2tEUWNaWnpUL2xDRDJobTBxSXNyZU1HN2JhQUJURGorWWVO?= =?utf-8?B?SlZCMytneUltNy9sNmUzNzBCd3lFU0ozbUI4RU1hRGlyTDAwQVhCUllBS1lo?= =?utf-8?B?NW1Xc2pJZkh3amV1dFJlRjZrVEdRc0xkeFZYQVlySFRqK0F4R1NvR1ZyeUM2?= =?utf-8?B?cVI2cDdLeERNYlRHZUJpVGRqdm5CS3RlUzVDZi9wV3ZFSnpScWdxM2s1WnFK?= =?utf-8?B?Y3N5aFZvdzJS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1VDNXMEdn?= =?utf-8?B?K0ZEQVFMUDZLUG10TXVjWG9mdld5MUJXcXhYMGl6YTk2T2ROWmZucTUxYUJT?= =?utf-8?Q?DWavKXpExbnZ2ll2DNCKbJGWP?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e775db5-2176-4314-5ff5-08daad127d33 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4297.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2022 12:00:15.1318 (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: lIWIGzR52MZnAvt+cpzIcc0TiSnTq9cfgCfUTJhyUsU5W/55TF0kWoZwaA1SNatG X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7111 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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? 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? > Fixes: 5c305e218f15 ("net/nfp: fix initialization") > Cc: stable@dpdk.org > > Signed-off-by: Peng Zhang > Reviewed-by: Chaoyong He > Reviewed-by: Niklas Söderlund > --- > drivers/net/nfp/nfp_ethdev.c | 2 +- > drivers/net/nfp/nfp_ethdev_vf.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c > index 5cdd34e588..b95e623f1f 100644 > --- a/drivers/net/nfp/nfp_ethdev.c > +++ b/drivers/net/nfp/nfp_ethdev.c > @@ -517,7 +517,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev) > hw->cap = nn_cfg_readl(hw, NFP_NET_CFG_CAP); > hw->max_mtu = nn_cfg_readl(hw, NFP_NET_CFG_MAX_MTU); > hw->mtu = RTE_ETHER_MTU; > - hw->flbufsz = RTE_ETHER_MTU; > + hw->flbufsz = hw->max_mtu; > > /* VLAN insertion is incompatible with LSOv2 */ > if (hw->cap & NFP_NET_CFG_CTRL_LSO2) > diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c > index d304d78d34..47acb4c60e 100644 > --- a/drivers/net/nfp/nfp_ethdev_vf.c > +++ b/drivers/net/nfp/nfp_ethdev_vf.c > @@ -396,7 +396,7 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev) > hw->cap = nn_cfg_readl(hw, NFP_NET_CFG_CAP); > hw->max_mtu = nn_cfg_readl(hw, NFP_NET_CFG_MAX_MTU); > hw->mtu = RTE_ETHER_MTU; > - hw->flbufsz = RTE_ETHER_MTU; > + hw->flbufsz = hw->max_mtu; > > /* VLAN insertion is incompatible with LSOv2 */ > if (hw->cap & NFP_NET_CFG_CTRL_LSO2)