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 84E7AA0545 for ; Mon, 10 Oct 2022 08:48:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7EB2F41148; Mon, 10 Oct 2022 08:48:41 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2100.outbound.protection.outlook.com [40.107.236.100]) by mails.dpdk.org (Postfix) with ESMTP id DB40340146; Mon, 10 Oct 2022 08:48:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D+ZfO1AmY4/tOFQJWxHP/lOQdbcdrr1nmDJbMwysDhqDd9NRc5WG9cty1vNL8b1KPuhxBdgtDXbZqd6VeA+IZ9A0WYeqzw9r/U7N8+GREh05cXYEYxeVyvaOsC2AK8UbLtbj/zOXUN+NF7tc4YCMKFRVluURBY/m+lEa8OH77j+ElxsY3HZusNNXQ2r0GbyspEn+X6Fq9qG0qM0Po8uCPimenNL9qaWoWo0vicSHqU+vx9TdLlQRPWTNSR+OU3GlSAoirHxDMMSJB1xKkftEiQWWkAcjkJuO6gyBTAKQitEFtYdeoigCPAsfr3IgvYaksno9El8857TBIfm9Let9Fg== 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=BWO/12xJtBym94ZiR0Cj+wgKZxYl/sXWSqCxwte0aiE=; b=AO9hrDiOKAzw90pjjDoTAQmpN4YNfUMrb2CBnDXxxeYsN07gBYdw9+T/KtdclOw38eHIqrq9vOKQhMKffe1+hguVd8m0U8DTMMWa3xkUXJ/HLZvI2/OiCJ3ZhUQppH0wVwou+6tZk5Vo+7lw5Jl1Gc7lxwtKsZ3Gm+CogU6vajQmB1DSnQ/dEkibuqyJh572pZ/gx4wyLKH9SI3/wf98N4Cg0D4094EtUH9+2zSwS/IZQRJMI1evZdOakMOm5CnycV0C/mJ1GrdsQWxM24onilXT/qtC/33BUagobndcuxlnrmvY7zGS104NB/o/Cry0MaG4HQTLOBfrXn92RMIQFw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BWO/12xJtBym94ZiR0Cj+wgKZxYl/sXWSqCxwte0aiE=; b=WF8rUwiHMfo5YABaxIG0GLBwXRPxMSi2ix5A9BoacglmRw/90nIX9Q7en3QSh4acosWTMabzivR22Tx+XYrlUTATQ2G4f3fOGbQP+d5K6OmI+IPpiUH87MzBpkNOPgZhky/5+aEywn4AsjhvK4DqKTtbbQl77DnUEK31b0OY27g= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by MW4PR13MB5459.namprd13.prod.outlook.com (2603:10b6:303:182::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.13; Mon, 10 Oct 2022 06:48:34 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7c26:1a0b:2825:6f4b]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7c26:1a0b:2825:6f4b%4]) with mapi id 15.20.5723.014; Mon, 10 Oct 2022 06:48:33 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Peng Zhang , stable@dpdk.org Subject: [PATCH] net/nfp: set the appropriate initialized value of flbufsz Date: Mon, 10 Oct 2022 14:48:15 +0800 Message-Id: <1665384495-24990-1-git-send-email-chaoyong.he@corigine.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2PR04CA0183.apcprd04.prod.outlook.com (2603:1096:4:14::21) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|MW4PR13MB5459:EE_ X-MS-Office365-Filtering-Correlation-Id: b2693ae4-f0e2-494d-f2d4-08daaa8b7334 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tGtzPf7lrLRv1qdKFDUQDOnazdYUB/tnpgcnqkMkyZ+is3Pndqm08cWhyq5uJuiL854X2+AoMu/am+jzboBhJrBwplR4uKsTwALVESoRzXXfXfdmOodeK4lWBlAW2yRb+fC1FG1pswEiIkkhQuGRuYG8wNSZODWBhTbOPhRK2SH881cjc93NXSD5uQsv6ZGKZRV2w7Hd3HE/gspEJgVUE6br8MJ5IdwQ7FwZ3xpNB/RY4DnBRO8DKWRQU1CuhqOdZlYIbvreVyyMDpGKVqUX4KAP6i5gci4AcFhiMp9AEgeTeIK0Xx4YdEC91ILfV+5WOCqlGF8yHzBfh9fZTCLh/4GSSP7wUEgw2E8hzE03P8Wl63VCu1lRj+MhFujgJYAhyROkJG1Lxfv6wVxta59g524EgklA87qMTU0oaagw6q2tvBQzSRG5PgiQjo8GJvYDQp7T712FCkDgZ6zqtGCbbzBj+QKlLHZzWbNualcCCQVE0GGluOcOLEkux2t5zGo4goZdPoLlPA/ggEENQxYjvnSdiTbIK5eRgUW93Ux5sYoQ2tdDJoSkMFvBAAXkb4WcHOhNCIB68R7zl8WkeWevTm1FimO7QJle4F3dFtcBbtLCW5MtZXaYabEei1njl+sTiww+yAYpZ8Uf0nZVHPq8KazDroHHEYqLon/Vrn7f+2Cw3cg1wbhcKEATyg/O/61eLnTqVVwHs7mvihbKOiANTojpOvmNTkyydFjC+C+BnNy1ywdrAKPR2QIfAiGXyk7E2wYf4vvurEs+jPqIiLHYMg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(366004)(39840400004)(346002)(396003)(376002)(451199015)(6486002)(5660300002)(478600001)(8936002)(44832011)(2906002)(6916009)(450100002)(6666004)(52116002)(83380400001)(186003)(6506007)(8676002)(4326008)(36756003)(66476007)(38100700002)(66556008)(38350700002)(86362001)(66946007)(2616005)(316002)(6512007)(41300700001)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WlM4OWdSYmhEaTBvU2lKVHNRQVJsMWFqd0hPalpWOWZYN01jajBDaDJna1A5?= =?utf-8?B?bHRSaXpTZjI5TzloMkViWGg0QzE5c2ZHRytUdXkvMCtZOElYM1gySEx0K3FH?= =?utf-8?B?K0pac24yVkhqTmRsemY0TFRsRFpKYnU1aU1mRm1pSXhzL1Z5ckZRK3hsMkZK?= =?utf-8?B?Ky9SZS9NQ1k4RzZNUVNGV2JBamRJUHNjcFBQbzZ6bkFRRTdEbi9Kcm41N05x?= =?utf-8?B?YXp1M3ZGeUVQUjBpZi9PN2FRSTMvZjRwQWJxTmJ2cjFYbUtiMTJ2dWlQLzFT?= =?utf-8?B?OUFsN2kzcFVXK1cvWDZmc2NqSjhvVDlDZllxRGppVHlxcmFLUHdDUUZjYnhN?= =?utf-8?B?emF6RFhT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3VkTVZWVFY2?= =?utf-8?B?Y3c9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2693ae4-f0e2-494d-f2d4-08daaa8b7334 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2022 06:48:33.9340 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PmkBqp0s9ADgC9o/pgtNI0su9QJ9ntxoBKxn5bIbPLgGsPA1lgJRQbeswIBhzBkEJSMbg82XM84AL/kIF5kWNw1spblLHm+Mg/9SYh8qZx8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR13MB5459 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 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. 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) -- 2.27.0