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 7F5E0A0505 for ; Thu, 19 May 2022 03:05:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A1D5841156; Thu, 19 May 2022 03:05:29 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id C296E400D6; Thu, 19 May 2022 03:05:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652922327; x=1684458327; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=XK4f5DvuAHJSwpKA4MsmO0c2vneTRm0n7EkkvigBEWM=; b=ix8XvC9F/FqBjlYx0+2oCJwZSzwjCvQrBdKmempx9BJWcv9TcXZ2w3Sb Ie6Bh3/MHhFRBBVFbmIbkqyV7ov1hlpPvV+waIKvYFlrqc8mxBFO//lS1 YCt1sF8imuarIZXFOC8dt/Zn/K5Pb3tJEfe2z7WqhOqSD3CosDvjA4Mr5 atUOl9TEVCshSvrmAHXwpDVMRgTHdi+4wWKjTM46umukOGKZO6461d8hC rIHPN6W9GwoP6w0fs6APbZcSSbiQGxSKSFDDpEvW2T9O/WK3prGKk2UOD aAI6w8AVH0QZsbQOZJmtg9RqyR5XYI6g+mugKlRpj92r4WHm39AlW6EOV Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10351"; a="271659039" X-IronPort-AV: E=Sophos;i="5.91,236,1647327600"; d="scan'208";a="271659039" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2022 18:05:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,236,1647327600"; d="scan'208";a="598169489" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by orsmga008.jf.intel.com with ESMTP; 18 May 2022 18:05:24 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 18 May 2022 18:05:24 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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 via Frontend Transport; Wed, 18 May 2022 18:05:24 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.46) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 18 May 2022 18:05:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RPomzkpJbGrVCf+KUQNT8U8OZY5hN1jIex7m3XAlxRodqT1MqiuspXLL+HxwZR4fBKCFwuZuq8ROuducEd409Zob+5XuwTpYE145U/sMiXMUiOX+OCm3MwPJm8KVy42aLFW2qn3OCE/jrXnmdE/5uKk9DqajdTRUFQNANnIGEbmMby/WA4LY5Mkrq+yYOd/GQloHXDygy/fMc8a7wpk4dcg6JpJL822ceW4v6M7eZntvA4bXv5gEC/MIyONxsztLaKuxvg8JY9XWbQGnOseFoHtSAimEwZLKVFUt7CY8lxvjmLaGEsg04m90XruL38rkFP+eHTdTuSH3Y81ZH2lszg== 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=XWbimBEYVWTT4cVtZDu6O4MvqVSBeh3HPwet5UpmZbc=; b=RAPcg8N/r+q/rl+bsUTJCdlwQnYaF7kX5maVI/BGZeJ67CjB/wMPRa6J36Wod8Ap+OyW0k8tMgGBtWPS+uRdMacWVg5uTOL3GOrcB9boD8c03jX6oSnZkjeT2ATa7xLwGMPw1PreFOreTZRnspBvZ4B7RKn8oywDDD3H4bm08GSIp7jUOSpxwPKinGCRcWilj6usM5tfKPYPmEfysILxEmhQUlx0d548Fb8dhJ6iy6NLl4JWMdUM1oJpFhPL9YJtBhd1OeDEdZweoVcUqIxjS5WNSH7hIdxysaJ1dWAHHMQygd9FzWRwpQluvFDINliGokmfh91OdlVZrvq2NZ4XpQ== 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 BY5PR11MB4257.namprd11.prod.outlook.com (2603:10b6:a03:1ca::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.14; Thu, 19 May 2022 01:05:22 +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.018; Thu, 19 May 2022 01:05:22 +0000 From: "Zhang, Yuying" To: "Wu, WenxuanX" , "Xing, Beilei" , "dev@dpdk.org" CC: "Zhou, YidingX" , "stable@dpdk.org" Subject: RE: [PATCH v3] net/i40e: fix max frame size config at port level Thread-Topic: [PATCH v3] net/i40e: fix max frame size config at port level Thread-Index: AQHYZp02/rdW63psSUGGLWKzAcyhgK0jI5JQgAEhzQCAASVmcA== Date: Thu, 19 May 2022 01:05:22 +0000 Message-ID: References: <20220428111224.57705-1-wenxuanx.wu@intel.com> <20220513072049.149333-1-wenxuanx.wu@intel.com> In-Reply-To: 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: a157753f-cdab-4848-79f3-08da3933a65a x-ms-traffictypediagnostic: BY5PR11MB4257: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: EK+6YqY4/HruHYSPbHFFkkD4fespb048p/WgEHPeGJALzjDyWzekUG38XfaRnDpnBsd3AbY7uLiW0zlcsJn+QVgHzZhlBp5PQx5G5QuaX2XgbdSGeSS9080iOmnhtjBrq2J52qDGfATur69ejE5ngaVA5JkZ2uWzdS6jf/eIMFSfQeby3ioGBUOisRU3qvtPZiBfuw7KK+AMx06hV8JKKNXFuuFH3G4ZL+eFJKW7JDGwusSDQtW2cEbeg5I91lGtA8BjUsi803T0+suRd2yP9xgsu6EbK1WuwBygViqh0+Tj9yCOuHk1Mt18kBk2pzZ1imuMrYotZYfPF23P1p69dIhCyMQBYyeYpJF1QhEd+Qswsyu6i4QIF1RFkF9R5xY9XehcOvpOrXAxeRVHSqqNGip/Z6/YJ13v6K4YBssCp0Vdc/hqIa1Aax59yOcSyUVb2SUJ/WlPaOzHKxQi6VOu8jhxEGqdacl4Ygp31p/GtqUop6zy+eb3UYFL9XOqG4tq3ShdRHz5RlpDp9Om1Rju4pjwrJnOfMI7m/aDICX2Amla5qdGTuo4d+gSYNgfwlBTIRHpW1F9/dwRNpWMRuHph/0mBW592wV0UayRN9qi1CQJwAzFWdZdskv/evKYvINgXAAdm3QaefKx1FtBDDcqPszwCqOZVqTizC54e6FlD+vKVam9HAfxw209R5mjV6tQN+drWwR3zNX6Ccf1EowOL3ozmMomXMvrNtN9MEpwgqc= 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)(2906002)(122000001)(83380400001)(26005)(5660300002)(9686003)(86362001)(450100002)(53546011)(6506007)(66946007)(82960400001)(76116006)(186003)(7696005)(66556008)(66476007)(66446008)(64756008)(4326008)(8676002)(316002)(54906003)(52536014)(508600001)(33656002)(8936002)(55016003)(38070700005)(110136005)(71200400001)(38100700002)(309714004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?UlpzUm1GOWZnODdYQUVxRWROaDVuTitud0dlVlJwakJzWVdxU2drL3Bt?= =?iso-2022-jp?B?cmpaTVhkeVhON3gvUms5eDFSbjNHdUtDUFBSUTlPOHlNY2R6N0J6Wk5X?= =?iso-2022-jp?B?VFNKVmZjMHlNeUp5K0xJTzM3N2x4RkNHcHlpNEdGL2dYMmIyVlFVQmdL?= =?iso-2022-jp?B?QW0rL1FEKy92TEp0dzY1QVg0eVd6M3JpajByRHo0RkxJT243UTZlU1lJ?= =?iso-2022-jp?B?dEZEeFBldGl5dGpyZUdJTXFSK202VXkyekxLZVk2UUQ5VXhoL0RlQmQr?= =?iso-2022-jp?B?NDk5aDF2MVJiRERsNGV1YWRDcTdkSVdtWjNvdk9ZV3NQLzlIaG11d3gy?= =?iso-2022-jp?B?bjZ5bkcvZ1hCZVBzakh2S0RqRFkxOXBzMHdIeEJrdDUrR3RtWEowa2Z5?= =?iso-2022-jp?B?MnZTcGhVOHhieFdnTDRjUGVpMU9ZcytNeThLTWpUT05PbDZJSkU3QlFv?= =?iso-2022-jp?B?TzdIaTF3Wm9INmxPTFFuOUl6ek9RanR2T0ozbGJ4VHFVcmwvQ0UrWVh2?= =?iso-2022-jp?B?bXBLM1gzcENEMjZjZmpST1Y2bHpGQlpXS1QwMk9mQ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jp?B?VjZOb3NqZjRDa1hQa2Q3VGIydGxXVTZrRWlGeUJHM09uU1FtbTdjaUVX?= =?iso-2022-jp?B?M3hCUHBRY1ZVaG1uWm9zdkwrNi9KdUZ3Ly9vRDNXY0dkcWVlNytsTURq?= =?iso-2022-jp?B?M3NrUzZlb3dCcmM3dk1Oc2Z5MkQvSUNpaU1VUT09?= Content-Type: text/plain; charset="iso-2022-jp" 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: a157753f-cdab-4848-79f3-08da3933a65a X-MS-Exchange-CrossTenant-originalarrivaltime: 19 May 2022 01:05:22.3096 (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: KCOmlnt8Ww48TXB8tn5UT7weTSSIkHZh5drT08oyNCw0H9ty8UcBCxIU7kcs9+2etqP4jjhOPB6kIbTofWxEBA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4257 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, LGTM. > -----Original Message----- > From: Wu, WenxuanX > Sent: Wednesday, May 18, 2022 3:32 PM > To: Zhang, Yuying ; Xing, Beilei > ; dev@dpdk.org > Cc: Zhou, YidingX ; stable@dpdk.org > Subject: RE: [PATCH v3] net/i40e: fix max frame size config at port level >=20 > Hi, Yuying >=20 > > -----Original Message----- > > From: Zhang, Yuying > > Sent: 2022=1B$BG/=1B(B5=1B$B7n=1B(B17=1B$BF|=1B(B 22:40 > > To: Wu, WenxuanX ; Xing, Beilei > > ; dev@dpdk.org > > Cc: Zhou, YidingX ; stable@dpdk.org > > Subject: RE: [PATCH v3] net/i40e: fix max frame size config at port > > level > > > > Hi Wenxuan, > > > > > -----Original Message----- > > > From: Wu, WenxuanX > > > Sent: Friday, May 13, 2022 3:21 PM > > > To: Xing, Beilei ; Zhang, Yuying > > > ; dev@dpdk.org > > > Cc: Wu, WenxuanX ; Zhou, YidingX > > > ; stable@dpdk.org > > > Subject: [PATCH v3] net/i40e: fix max frame size config at port > > > level > > > > > > From: Wenxuan Wu > > > > > > Previously, max frame size can only be set when link is up, and the > > > wait time is 1 sec. Startup time of 10G_BASET longer than 1s would > > > result in > > failure. > > > > > > Acctually, max frame size of media type I40E_MEDIA_TYPE_BASET can be > > > set regardless of link status. > > > > > > This patch omitted the link status check of 10G_MEDIA_TYPE_BASET. > > > > > > Fixes: a4ba77367923 ("net/i40e: enable maximum frame size at port > > > level") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Wenxuan Wu Acked-by: Yuying Zhang > > > --- > > > drivers/net/i40e/i40e_ethdev.c | 24 ++++++++++++++---------- > > > 1 file changed, 14 insertions(+), 10 deletions(-) > > > > > > diff --git a/drivers/net/i40e/i40e_ethdev.c > > > b/drivers/net/i40e/i40e_ethdev.c index 755786dc10..12d3cd9b0c 100644 > > > --- a/drivers/net/i40e/i40e_ethdev.c > > > +++ b/drivers/net/i40e/i40e_ethdev.c > > > @@ -12102,17 +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; > > > - > > > - 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; > > > > There is no need to initialize status. You can reserve the original cod= e. > > > Yeah, will fix in next version. > > > + 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; > > > > can_be_set =3D !(! link.link_status); > Will fix like this without parentheses in next version e.g. !(! link.li= nk_status) - > > !!link.link_status > > > > > + } > > > > > > - 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"); > > > -- > > > 2.25.1 > Thanks > Wenxuan