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 ED5AFA0503; Wed, 18 May 2022 09:31:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CE0B40156; Wed, 18 May 2022 09:31:48 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 6ACC5400D6; Wed, 18 May 2022 09:31:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652859107; x=1684395107; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ruIFAKAUnnbQX2cZS/qS/IIJ7tIM4ti/Un4EGiN0aiU=; b=M6EfK+8wbmZX7Jjujz9NU+ViXMFJaxoTLPeg+DZyJg2H/oflKaPlyinb u9yDDgFZn5Bc8PXBolDlw3p3yja2Uyuc3cf7q5dL687Tm/NMraBsDRI+h /tzwxKjkly4J8FXILV9uAcTtdK7wST43V51ujlISn4QN2C1T6dC2g4r0B 0cl1un09hD79j4Zsci7PPzOf9T5uXvEw/U/3rqQQwhCNBTOEfr0xvTkIR 0d1uSt9Gna059r7n2bCyZlVtf9kobhvQEqQh5+tXkwR237WMugqVuVNFQ lAMhIw+Ldn/bUn3vGQPapV8Xmn3HgGawF0WtFxoV2768qAqoCsOGXgi8J Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10350"; a="270355463" X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="270355463" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2022 00:31:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,234,1647327600"; d="scan'208";a="700469473" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga004.jf.intel.com with ESMTP; 18 May 2022 00:31:38 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx606.amr.corp.intel.com (10.18.126.86) 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 00:31:37 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx611.amr.corp.intel.com (10.18.126.91) 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 00:31:36 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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 00:31:36 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.49) by edgegateway.intel.com (192.55.55.68) 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 00:31:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AV+qzgqEU1w4opPni7DTc4Hy3G9xjIL8a6NMwC3dN3qP3pV3p6eF6vJbpAiQNa7TCobRbZp9cMApaAre/VKxN9Cj77Hxq5TAFKfeohDVmzt4d8ueOqio6KwZzVz9VvApKh3ITduJXZkowKhxPNn8RwGyAO8/ePxmMfevD5dlCyNl+Jy/Dpb2nt2aPi5pq735aK6GbsMuXbXbQ9MEIuuu/hLbfeGH7Z2KjrEZuFB2bUWFrjie+rZR5BvO+xDcqFR+2x6xjaFFcj0DXOkzBcOAYsPvnttASeOJrORkrm1i1BFjaGD6wYFrG6MIL2bLyJ6yVwMbh/6jQbPNhNKRFSmi0w== 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=kuChm2L7rGi1tBurCWfLPmksmJgny0zKuQo0kOzEU9s=; b=VMTzF5Uy9x1w+RLaDtTLmu3duw0KgDVs1QdoQKMTqlvUQPt7JoxQusmScPQzvMOtYTjeajbIPz42Svo7YVrp+77UYYcy95hP5GuW/RfTAqreZhD5auyQORv+U9/Q8hDO84biumQJtkXOhNNg3mcDiVj4QlAkS5cHVmgCKCBvtaCi2DhVBGhacM54rrmurp8xpF5OXz5/9OXo/1Dp4pzdYQq/rWZu8WElQMaasGKdDnaDAStgafx4AJOruj3bVOrqXTe3HG+w2VwiRB/9Wnyj+GKajNf/1kCnxN6bnRBcXmimXEsBFadIdCUlb+bs8FOxL18sENEzCSEEhtAD3Hcitg== 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 MW3PR11MB4665.namprd11.prod.outlook.com (2603:10b6:303:5d::12) by MWHPR1101MB2255.namprd11.prod.outlook.com (2603:10b6:301:5b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14; Wed, 18 May 2022 07:31:34 +0000 Received: from MW3PR11MB4665.namprd11.prod.outlook.com ([fe80::b1cb:7fb8:6cea:4c72]) by MW3PR11MB4665.namprd11.prod.outlook.com ([fe80::b1cb:7fb8:6cea:4c72%6]) with mapi id 15.20.5250.018; Wed, 18 May 2022 07:31:34 +0000 From: "Wu, WenxuanX" 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 Thread-Topic: [PATCH v3] net/i40e: fix max frame size config at port level Thread-Index: AQHYZp0232Mm2ag7NECVVtzxnBSko60jKuCAgAEZuLA= Date: Wed, 18 May 2022 07:31:34 +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: 4e045f54-7112-403c-0802-08da38a06f92 x-ms-traffictypediagnostic: MWHPR1101MB2255: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: Ylwmy62SOwFmXsETruZmdzF5wTL8u3KEe01NS6hc3R/ayojjDjGVpoSZNEcZow9XS0MucGrlfmiMwQgYlku/4I2wXMtdMh3XUPybVX5C84UGuxDRnVbUtQD3Bf2hyar7GmINbPjHk+/kA4S7BFv8QcG+nW/OSsW/xMyiY3iJL0Ozq0EHdeov/+MD0ztyU4K6WO4VDvMslhSGXHkxxVLYgEKl/Hj2vbeRd/PGUi11Pdl2vqUV7as/zu9RTO5Ml30UvXgWSPNvbEJYwdzqfXduIzXPJ3Sax69Y9Qu/9K9yr1F8xImtplgE2A3C903/36AFBFNPW1/evN3BTK/AOMwc6OtU5pUmq6GeDOTlCxVWU9FNmLs3C9BHanwYQWY/vnWnmJzCIiBtxMJyGiAAkqPfdKjE1Odhf4vgQEhHhvrtwdbwwODQlaEQCZ/JwuSeI4EWK/UrddQUuP8pheLl64bHZwSclwzzulXUG6Dks4WUydZwJZGZSFImNk18TSuLLov2yW3aCGGNmXZpWUfIhKFYtUld7TGqvByS4TbSdu/XmKjrTTc4dCcbza3FoDVPEilysFS/+0Pi2aEA7kiY2kvofnFf1aMxoF173KD9idPjufK67I/XsiMqWKV4DdBwtDMLOAFdbeXz5hiUUT9SnvM30YbMgsZcyuS/qE5Urk8KHL+dCJ/ynTcvjDdmYx8pAlMRJSWyRE1gFVJpr/vg7kh7Yw50Sbr+optmrFHJt1PEfeU= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW3PR11MB4665.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(110136005)(52536014)(8936002)(86362001)(66946007)(8676002)(64756008)(54906003)(76116006)(450100002)(4326008)(66556008)(316002)(82960400001)(9686003)(66446008)(122000001)(66476007)(53546011)(26005)(6506007)(7696005)(71200400001)(38070700005)(38100700002)(33656002)(55016003)(2906002)(83380400001)(508600001)(5660300002)(186003)(309714004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?WFZVUkNIeDdyQWp1c084MXdIUGdrb1JFTHAySUVnQTZ3RG03SUZySTBI?= =?iso-2022-jp?B?RStabWhVWHlFY3k3L3lJT0RkSURTRUF5Sms2RC9URHNtenRZVUdZMWdu?= =?iso-2022-jp?B?RGUrZ0NxOVJmVVhEK2pMOGpUWm1YNWV4S0Nac2JQTVdKazBUeG5xWUF5?= =?iso-2022-jp?B?a2Rxa09NU1JlTDFnZGVFa3IzQ1NlQlhjK0NoNWFpdTN1eTZhU3p5S0xZ?= =?iso-2022-jp?B?QnBzckRIZUZWWk1nMER0MWc1MG80dmNJUzNkanhTK0phN0NJMHh5YWli?= =?iso-2022-jp?B?TEJqU2pYWm9pekhwbmZXcFdDZllta2libk9ud2IwUExrT3haenJkUk1y?= =?iso-2022-jp?B?MTVSTk9maGhWQ1BBVFZIenVSemFwUE5FQmZyb1AvWld5S2R6Ukplcmhu?= =?iso-2022-jp?B?L2RkMXhjeU14S1lPU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N3L1Uw?= =?iso-2022-jp?B?MkZPR0cxckFRK2w4VkFVVG82ckVyWjRRR1Y2THAza0Q4WVpHWjBuK0o0?= =?iso-2022-jp?B?NkJWWG1SRXpvU241ZFpzMkZxc0xQOG44dExtU1VZWlk1eUJFQjhNK0R4?= =?iso-2022-jp?B?bjRpWkFUNlBUYlhJT2FRL1RNczR6emc1aW8rRVJRb3BnQkpYVmFxV3ly?= =?iso-2022-jp?B?aEhmZUVacG8xRm5wUVU5WEdOM21pM0czakdyMG9yNk0zQTl5WnhCSkxX?= =?iso-2022-jp?B?M1RNeTMvYVRhSWpjWEVKZTU3am9qWThEOWNiZz09?= 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: MW3PR11MB4665.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4e045f54-7112-403c-0802-08da38a06f92 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 May 2022 07:31:34.3642 (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: VKSSeWWbh1KmHrqhQw7WROeRNRHtTABSy/fSStZxdm2JMlPRw7tUiUsLniRR+otH/79HkJ338nEomIm5A8ymBw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2255 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, Yuying > -----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 >=20 > Hi Wenxuan, >=20 > > -----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 resu= lt 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 > > --- > > 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; >=20 > There is no need to initialize status. You can reserve the original code. >=20 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; >=20 > can_be_set =3D !(! link.link_status); Will fix like this without parentheses in next version e.g. !(! link.link= _status) -> !!link.link_status >=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"); > > -- > > 2.25.1 Thanks Wenxuan