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 4874BA00C4 for ; Fri, 13 May 2022 08:27:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 441B2410F2; Fri, 13 May 2022 08:27:21 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 23BC140698; Fri, 13 May 2022 08:27:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652423239; x=1683959239; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Hreo7ossbWkK6hmPazWA1PJ1jitqoTaPpq3lk7oG79U=; b=A1UlEX1cRTori1xjmib03RE29XarudgIZI/r/xOQlVGee6iYjluZ4Nu9 1EhbgXAzj51+nvmOSbu7bJ+Kil+gW8gPas4q7F3zAgzCK39hHIbzzpte6 0GCvBa0rHvLhQOJAP/BN2QbKkMF1tciyi65kR7gvA8mAqSSEXc/RCF5HI wMuGX3WsfSt9G4dTp8mNAHDzHmWpmeNbdzeKD+7NmkguRoNTX/BfMyYlS x8I1NfZiuFbQWoih+Eqf3yQEkG0Oz8Vtk5Ww7lyiPvpArL2r8CJjhkWy8 ujF/mS+Lw2+V//2Ml3IbdZ577SNZRGBnCzZEoN59OI6PzTmuAVYYKhL9h g==; X-IronPort-AV: E=McAfee;i="6400,9594,10345"; a="250760682" X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="250760682" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 23:27:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="603720123" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga001.jf.intel.com with ESMTP; 12 May 2022 23:27:17 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 12 May 2022 23:27:17 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Thu, 12 May 2022 23:27:17 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 12 May 2022 23:27:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dRH8YKrI/RpEd+DrrFw7RrhlzDotE6cAG16+5VeqXE3gQhPAGKs99r2Ku3fIOJIbRzaKugJ/RB/B5TY4eDlj/1Dd1EL8VpXrUksrbc2BD1v7dKcJrE4eH27vWvGMPb/oCVPgn0oOwTLmYbLdsJCw8lg79PzRccCJVl6c6sVuyyXFLJlERwXSJHVTshl2Fl6fUHlxM7u1pyqxh5Ycjyry+y481Z0dQPNVj87djUMBBTzjBMk4PhA1Hn+U1oE0zCEfnBe3XygkRQHfKPiYFelCR7SedLymnomM1Er2Fu0MLHuZn21vUBGJn0vbARcX7GeMvvpRR/Jxf8WbJPZyyrOe7Q== 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=cOmK/h0j6UEpxJAurloAsx177lyLkdvlcsqhP4dFdEU=; b=Kvzf5F5S5YaPMWb4T0uG5JX/u/3Rs53/mDlN/zdSM8Ato7PJy3NtUG8sH2T0k8UDWD1G0owYWKP+rqw2isbcqV8Z6/9UB+yNARBp/f21fvpl0WL6M8dL6WpbVIArmSdtAcBbgB3CY482U0QhFgG0jC7DlQB8vpUEv1h1jj7GVD2zsgznGnAOWH5U9zfGPONEUYOyHvHTfrrH2l2cPm682b4ugzesv6eyjPOzbA8PF7yYQftQek+SUBZiE0gedchkVNM5MInWlAKcRXCoEdeudc8CV6kMW/Uvl4t69WPyNn3Hh9wVyW7jylbEumLqJNZQqdogWZ31AUPxHxo+EaotyQ== 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 BN6PR11MB3876.namprd11.prod.outlook.com (2603:10b6:405:77::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.22; Fri, 13 May 2022 06:27:15 +0000 Received: from DM6PR11MB3516.namprd11.prod.outlook.com ([fe80::187:4143:ba20:d362]) by DM6PR11MB3516.namprd11.prod.outlook.com ([fe80::187:4143:ba20:d362%7]) with mapi id 15.20.5250.014; Fri, 13 May 2022 06:27:15 +0000 From: "Zhang, Yuying" To: "Wu, WenxuanX" , "Xing, Beilei" , "dev@dpdk.org" CC: "Zhou, YidingX" , "stable@dpdk.org" Subject: RE: [PATCH v2] net/i40e: fix max frame size config at port level Thread-Topic: [PATCH v2] net/i40e: fix max frame size config at port level Thread-Index: AQHYZOxAOuCkD5GOakmT56gSp2gx5K0cWJPg Date: Fri, 13 May 2022 06:27:15 +0000 Message-ID: References: <20220428111224.57705-1-wenxuanx.wu@intel.com> <20220511040447.64272-1-wenxuanx.wu@intel.com> In-Reply-To: <20220511040447.64272-1-wenxuanx.wu@intel.com> 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: 0fae1ddc-35f8-44c7-df50-08da34a99f68 x-ms-traffictypediagnostic: BN6PR11MB3876: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: yoslK1P9r+7qNtdj7WruPBOBaXzlXsst+qn3O3B1zIuIvuzOdYIfj3h2pZobHSteeZhGdw3yQmCb+aQT+suoY0E8BG8NoCxEp4M5GNLOy5rn83s4FrYFz/Nhc+TSow42JRVe4YjbmPftDmI0Yfjm2nYoJ+tpp0Ep7nBttakosWwdz92g31TZsYbtM7LrBFSUKtXUXzK0nUQH6K+NU0kcXCbP7dWFS1rKuoGImcnpWnk1VDHHlVHB9xm+orSwtdi0jz0jMYetHNuFA7v/meyPVrSwwkuTJkQeoSFZL1rb7uvniQYjp+RYIITFC6y1QN5CSPQM8tYT4ePLqFPjy0iUsONhS9onLf33Bjv4fE7hNtxxPOV0cggD9s4aQwnkglXtFGIrQ6T9kM+56C46dTmQ5qFEZkHsVlwjVSwLeqZwUM6fkXz9LHR+g3WhOrEGB9vT3ngQjKw/zbQgvuTivPm3mbn6Zl4REylxQdO3ltkjXoTAfLe4+RLhPSzS6fENRCvlnEII163RW+LoEc3vvoAn3VjYza81B4nCKAQXihFlhrok28H2Z+kuBX7nmlp/FlxJ3paNKkzGLIXv4jPC8iUEgLf+CG2g2hp5E4JiP5aPJoigtHzuhSTv3jLI+rRzCtN6zKjNa5ZYro/hX9IKte363zBQpN3JaH5SI+gKlNcLv81Xm9uYuTUQ2ySLiWWI8IVEIoDFfZ7SbTYSQwontAxPNg== 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)(86362001)(8676002)(4326008)(71200400001)(82960400001)(9686003)(6506007)(53546011)(7696005)(2906002)(122000001)(83380400001)(33656002)(38070700005)(55016003)(5660300002)(38100700002)(8936002)(508600001)(316002)(52536014)(26005)(186003)(66946007)(66476007)(76116006)(66556008)(66446008)(54906003)(450100002)(110136005)(64756008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?CZKlEQO8xmaCLSqMeuD5bOHw40b6Y8IC3a22fgdWCWFwHgud1No5w6FsoxsB?= =?us-ascii?Q?6z9buAnkYQcQTqUoMjF+Rma+21Fba69TI71bpK1km0bpxLLwXwdZ2dUvZccC?= =?us-ascii?Q?eJ6EXEFEBfWJ/VP6aTcOJ1ihYZZZiVB0U7vQRl1cx74twXTZNAcz1NicQZ9G?= =?us-ascii?Q?dJ+gWWy1lAOSG6aANhO8Sc8eTCSJ0oF48lrxPAaXfNf93vbHPJ8BXSebIPJ7?= =?us-ascii?Q?WH+jjFNWABOvmYlfI4+c/M5E94svIWP7ho5hY0fUUuthadekEyA7iZgQhwYe?= =?us-ascii?Q?VgflS4iFtcWidoRDXgliOErhLXeVylLT0NL14w373MUPsZ65bgH1ERfWlZvI?= =?us-ascii?Q?y0zjW38wXIhTnBAa89JRtNTND0+r0wYmtBcLg3xEJbjj1VJlUVjqRCJcxbt0?= =?us-ascii?Q?IGNeguW4aZNz5gvcu66Z1G3BBwyScUMya3/i585OIoZ6ul2BmMPwVrl6YZ7c?= =?us-ascii?Q?eIsvij2rip8+VuHFpCSZG2wI0bca+O7fLs+u5MC4WSBBP9RpNOWp8HAuwqyW?= =?us-ascii?Q?mLZB2Y4YR+gSWjoYu1DGW0+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5b5?= =?us-ascii?Q?JHXSPmalU6ZVoQ2BqKw8gKFeHYlDRL5VY84k4yXoFJi30Jau+QQalgZot51f?= =?us-ascii?Q?o2h2EMFxsFQXYreu1o9nBBj1PaIgtzLRtJzg1Zs031lR4k60mEnmcUpnrMTF?= =?us-ascii?Q?+WvhjgLQ+dSt2EHisIzoPEPQ5ORp6xDMWGjZ7Swykud1dxUkyWwDiJlsZKGH?= =?us-ascii?Q?NCuY+s1tghWE9+qSjIBxdjjmV/wLGr/smX4U7E4/AfXWpl2T7dBFvZZyuSa6?= =?us-ascii?Q?QXpz5B8Lm/cXoNcoq1fiXDcBxEbu5h/1uNQR4BhaFJXWRQ0D/Cx1Q3+8gxQW?= =?us-ascii?Q?tccWtjFE9g=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: 0fae1ddc-35f8-44c7-df50-08da34a99f68 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2022 06:27:15.4445 (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: BOmm8QQNB5g1duZ0sOdq+ELg5DfTuUyh35OwOOtnOTCRyyIooUuY4exxWLW+nT/UUrZTp+Ir2mDMTLEpDQ0UHw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB3876 X-OriginatorOrg: intel.com 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 Hi Wenxuan, > -----Original Message----- > From: Wu, WenxuanX > Sent: Wednesday, May 11, 2022 12:05 PM > To: Xing, Beilei ; Zhang, Yuying > ; dev@dpdk.org > Cc: Wu, WenxuanX ; Zhou, YidingX > ; stable@dpdk.org > Subject: [PATCH v2] net/i40e: fix max frame size config at port level >=20 > From: Wenxuan Wu >=20 > Previously, max frame size can only be set when link is up, and the wait = time > is 1 sec. For media type of I40E_10G_BASET would consume longer time > which is too short to up would result in error. Above sentence lacks of subject.=20 "This time is too short for some media types such as I40E_10G_BASET to upli= nk which results in error." >=20 > Acctually, max frame size of media type I40E_MEDIA_TYPE_BASET can be set > regardless of link status. >=20 > This patch omitted 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 | 32 +++++++++++++++++--------------- > 1 file changed, 17 insertions(+), 15 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index 755786dc10..383e9a542e 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -12102,23 +12102,25 @@ 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; > - > - do { > - update_link_reg(hw, &link); > - if (link.link_status) > - break; > - > - rte_delay_ms(CHECK_INTERVAL); > - } while (--rep_cnt); > + enum i40e_status_code status =3D I40E_ERR_DEVICE_NOT_SUPPORTED; > + bool can_be_set =3D true; > + > + /* I40E_MEDIA_TYPE_BASET link up can be ignored */ > + if (hw->phy.media_type !=3D I40E_MEDIA_TYPE_BASET) { > + do { > + update_link_reg(hw, &link); > + if (link.link_status) > + break; > + rte_delay_ms(CHECK_INTERVAL); > + } while (--rep_cnt); > + can_be_set =3D link.link_status !=3D 0; > + } >=20 > - if (link.link_status) { > + if (can_be_set) > 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"); You can reserve above LOG to reduce the change of other types. > - } > + > + 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