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 19D8EA0093; Tue, 10 May 2022 18:50:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB458410EE; Tue, 10 May 2022 18:50:57 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 19D39406B4; Tue, 10 May 2022 18:50:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652201456; x=1683737456; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=3fDZvcv9h7rY4nBfd27IZuQiUdX+HoJ+896jQdrpSiY=; b=B4DsgQql3s8foLUQHwNjjx7+9N5MhevBbRdS8BBpALW3X+YrjjD3ZDaJ 4HWSGs2+YwtS6MLJBR2RIy8LopWvp+agbq44UvtnlfN6i17TDEM+D0ruB i2ZIz6dbd0dd5BVnzB3bVDS2sCFu5y9B8nnXtzDoCIHPQNkyOs48o5gZp RDE92w0TjBUyRnpjLFszy3eRixvX0sAujJ3oMRxrjMw0/4Kh0SODpdz8a peaC1pdWzfIGU5XxHwbBxzXDR8sXPbnz53MMf9MOGtMEQdsUWQBVbR87j fbN/SFHrJgDsz+wrzGUen5BxmS+KBDEN3F+m6muiLpq2PMMfhhtJS9oJF g==; X-IronPort-AV: E=McAfee;i="6400,9594,10343"; a="268276033" X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="268276033" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 09:50:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="519976768" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by orsmga003.jf.intel.com with ESMTP; 10 May 2022 09:50:53 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 10 May 2022 09:50:52 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 10 May 2022 09:50:52 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Tue, 10 May 2022 09:50:52 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Tue, 10 May 2022 09:50:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gmm/edTkLB8Z7fKTal8a6DFSCVaxWxlVzdaQPQ33fh9AXfwp30ajwhr5ulTiXASMGikYDTfy80tWlHhzgS1QF6GMJ6i7DWYLkYuqhECXHVQi1gokSCR1eicXZGrNh3yultwcUqMRQ8kLfWDCE/gRN1HeJXHrRZ0JPuyIQ/4C1FWBqqf1KFXSXym3mEDSAXi3Wk77gehLVWpZMh/bjkF9JsCQHnLwq51MSlNK0ye7k2FYbOGeCt8qo8DvPjaUxtyFQNnaOYpHvPTC2149QfXKKws7GvEJsKZww/ksDIAGBXOIxmDwOnteqDJZgVESHwpmYhHnFs4dg2/tUR4LBc2eVg== 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=5vx709QatNsR1zuXg6ER+TkbSDIwW9BI0NblD5KgtEs=; b=LG6jlKGvCRfjw/UsQSKGl0eIYRlV4FGj3+ECUpf6LcQeSalWTvuRy0eEODFeR2zM+JMeVSKqqHseWFCkC7zY6fwZqed8NEo++6EyAuSEhsB0jvXEBVIrG1h6T9FQTeY2y3Z7CKh2ZvFgFyofRAQu5Sp5ePTNLIwDb4cajwfxGV0NkhlIa4tGBXjoDrilLKEZg29PQUG7pO5TMdya29wRlQz3HaIAnrd2i1bkX0ux7DP1jo/sfTPKHy+xlHXdRi99KUMnwrRxQfgpxrHuUFlB33bpfyR9+5DNCXFxyNyvbkB6wdhJh/2DMqqADNzSFNYNlYZ+heOrHIhagJFX7ufwUg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB3516.namprd11.prod.outlook.com (2603:10b6:5:72::13) by SN6PR11MB3533.namprd11.prod.outlook.com (2603:10b6:805:cc::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.21; Tue, 10 May 2022 16:50:50 +0000 Received: from DM6PR11MB3516.namprd11.prod.outlook.com ([fe80::4ccd:3d22:1e04:5ed7]) by DM6PR11MB3516.namprd11.prod.outlook.com ([fe80::4ccd:3d22:1e04:5ed7%7]) with mapi id 15.20.5227.023; Tue, 10 May 2022 16:50:49 +0000 From: "Zhang, Yuying" To: "dev@dpdk.org" , "Wu, WenxuanX" , "Xing, Beilei" CC: "Zhou, YidingX" , "stable@dpdk.org" Subject: RE: [PATCH] net/i40e: fix max frmame size config at port level Thread-Topic: [PATCH] net/i40e: fix max frmame size config at port level Thread-Index: Adhki1Tmlwt/5VKlSwG458eb59CX8w== Date: Tue, 10 May 2022 16:50:49 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 72908f2e-d15c-45e8-f14d-08da32a53ce8 x-ms-traffictypediagnostic: SN6PR11MB3533:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 2XD9cbrYtEHmq8oY5bRKpjv/Wc7dhzGGu1fj9mpM47gd7MKEmLwEDlNL8ITBXJqoLlk+rsBl4GHk5L/GK6LVVmgyFpZs1pKq1Y8Yj7GB/qeIKsx6cdQ1ZrhORKrLC/OPI7s7sVwr5AI+tJMjP5GXsT9VBocOStb/lIJe/Vo+3JLWG8JF159K6QPgzU/kwpSqDR3pCKz4WIQ0tiLs2GSvKTOCEb4bKfBDgEq1wAL0BaGpKPZRPBmWGIgH5eKDSvtHgkDBjGbJsrUkJWNuWgcwaJs+BgIaKRmHEx6338RGoSiZzl5rKPjQdEVb6l7NAHxKZYJeJ6HpgzmV4xqQGGFThNRWe/mEpK868IBkLmMX2iP3MlKMfNg0PYpDcva9b6BHCvXtN7Rn13MMWqOeU+F/jz5reJrqwlu9wmujJTUnaASot4Tzbe3VYaZNHBy5FU/JPpWfK+OZH1A3qCn2W+HMFuwPWp84yUVGtdObzlinLPDJwXEzVliOconwwa3vjrg6JyVORDriKsBb5MJs9nB3sGW/V3dq6zvp+xAdRBn7UsJzdqIzqeTajQInVm01cx3HXu+NU11cONY3Qsluw8Uvk+kwQn5PwOtcebAyE0HLVH2AVj8FrnZvKJ13tzz8T7vUtZW365S6skzJ5ExoO5+E39QLBJITWDwmkg5BpQ7V+0qWNzdZQx0tc1jThenJZeINWtgV3uwebmj2Kq3m4GlQRA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3516.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(508600001)(9686003)(76116006)(316002)(66556008)(64756008)(55016003)(66946007)(66446008)(66476007)(7696005)(186003)(82960400001)(2906002)(8676002)(4326008)(54906003)(71200400001)(6636002)(38100700002)(26005)(122000001)(33656002)(38070700005)(8936002)(6506007)(83380400001)(52536014)(450100002)(5660300002)(110136005)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?VBZkO+0fvFgngfGEnC3VgAxM/XkEZxccjt/i2p55lCmBSCp1DkaqWFrzRg2A?= =?us-ascii?Q?hMFfDEdX8aKg03WUvON0q9v75/SFyi4OzaIxvx3T/L9t26xwNlIDBasWl578?= =?us-ascii?Q?kK+96EXfZs49T6Y5G34i49VSMTDTxEOYx2CnJRYhsYVMRy56+8QQjfs0G6+h?= =?us-ascii?Q?2UHz9N47C/d2u4//K8wvlupncdcrtlnOv8d9A4n27f7mwi9N4VqJwBrOd6PZ?= =?us-ascii?Q?J7ucsutjg3l+ncvR9IhB+NP5bK0k1vqII2Re5FicGG8piCmUIBq4ZY4co0bb?= =?us-ascii?Q?WzrhV8el2lRtI8JiRtF9ArAyIUs05via1KsITytacjJcdiRV/IJF8JV7BXWW?= =?us-ascii?Q?Io40XWDIN23+2i3LLzy7JsaopEsF4OquYxERyBxyxW7lc0zsX0dzYLwahJ+B?= =?us-ascii?Q?aHIAoGwOMmDldmxcsLCZhW2ZL4Z8H/8JfjasiMCDRirrKNzCxBxEY8mq6fFP?= =?us-ascii?Q?VOpiDX5q+wvESBj7Kofgtt0WnUiEFGKMypU1idKv17h+rgF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HIJSK+G6Scauo95B4767JutJFrrNG8wHI4g7s2iqdVbGl5Z1HnVOAA?= =?us-ascii?Q?Ln7tWx+HUtesJldgqQ0QjJMePDrncsMIntqn4LtMXijBCRBy0dZbyO70lwqk?= =?us-ascii?Q?64OHTRYxt6Yug3J+rJS4JC4ZiclgPyc44jgqB2VS55K2kXXhu1ISM37U5kxl?= =?us-ascii?Q?++68RSzQtMu/3YuRA8UXBUEVFYq4aj9D0D/i4AkMvfcIls0zk2JLgU7egwCm?= =?us-ascii?Q?N1O4aVFGZUrP0matrbwS6ioTDgA/gOH7nyGUMo04sKG290O8SWQyPpLm3/W5?= =?us-ascii?Q?QKsNRY7A9BQ4iSn8iQxdES3njs5kZJMAZR5fTWvjDqsnUyX63ZFQrn413OA/?= =?us-ascii?Q?2Crn+lP8/g=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3516.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72908f2e-d15c-45e8-f14d-08da32a53ce8 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2022 16:50:49.8769 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Qh0hktQ3ljU/9BlU8ibLlXCgYCHgaIqvOgHXI1Z4Lt9N3DoMli07+1Ompbl/+JxhvZlqRpaCRwYHvjtgB5ev8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3533 X-OriginatorOrg: intel.com 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 Hi Wenxuan, > -----Original Message----- > Date: Thu, 28 Apr 2022 11:12:24 +0000 > From: wenxuanx.wu@intel.com > To: beilei.xing@intel.com, dev@dpdk.org > Cc: wenxuanx.wu@intel.com, yidingx.zhou@intel.com, > stable@dpdk.org > Subject: [PATCH] net/i40e: fix max frmame size config at port level Please add version of patch and correct the spelling error in the title. > Message-ID: <20220428111224.57705-1-wenxuanx.wu@intel.com> >=20 > From: Wenxuan Wu >=20 > Previously, max frame size can only be set when link is up, and the wait > time is 1 sec. But for nic media type of I40E_10G_BASET would consume > longer > time which is too short to up would result in error. Please split this sentence into two since two subjects are different and om= itted by you. BTW, it should be less than 75 characters per line. Fix the code style warn= ing please. >=20 > Acctually, max frame size of media type I40E_MEDIA_TYPE_BASET can be set > regardless of link status. >=20 > This patch omit the status check of 10G_MEDIA_TYPE_BASET. >=20 > Fixes: a4ba77367923 ("net/i40e: enable maximum frame size at port level") > Cc: stable@dpdk.org >=20 > Signed-off-by: Wenxuan Wu > --- > drivers/net/i40e/i40e_ethdev.c | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 755786dc10..5762cd526a 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -12102,23 +12102,21 @@ i40e_set_mac_max_frame(struct rte_eth_dev > *dev, uint16_t size) > struct i40e_hw *hw =3D I40E_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > uint32_t rep_cnt =3D MAX_REPEAT_TIME; > struct rte_eth_link link; > - enum i40e_status_code status; > + enum i40e_status_code status =3D I40E_ERR_DEVICE_NOT_SUPPORTED; >=20 > do { > update_link_reg(hw, &link); > if (link.link_status) > break; > - > rte_delay_ms(CHECK_INTERVAL); > } while (--rep_cnt); It dones't need to wait for 1s without link status check. >=20 > - if (link.link_status) { > + /* Only I40E_MEDIA_TYPE_FIBER link up should be guaranteed */ Your code mismatches with your comment. > + if (hw->phy.media_type =3D=3D I40E_MEDIA_TYPE_BASET || > link.link_status) > status =3D i40e_aq_set_mac_config(hw, size, TRUE, 0, false, > NULL); > - if (status !=3D I40E_SUCCESS) > - PMD_DRV_LOG(ERR, "Failed to set max frame size at > port level"); > - } else { > - PMD_DRV_LOG(ERR, "Set max frame size at port level not > applicable on link down"); > - } > + > + if (status !=3D I40E_SUCCESS) > + PMD_DRV_LOG(ERR, "Failed to set max frame size at port > level"); > } >=20 > RTE_LOG_REGISTER_SUFFIX(i40e_logtype_init, init, NOTICE); > -- > 2.25.1 Best regards, Yuying