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 9E344A0503 for ; Tue, 17 May 2022 16:40:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 891FA4003C; Tue, 17 May 2022 16:40:46 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id B507E4003C; Tue, 17 May 2022 16:40:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652798445; x=1684334445; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=+yC3GmPdfMqCOQwmC6QWLw/sMQAlFLQmWvJKDFfg2aQ=; b=A7F3O083nx05vMyaTLiTXWzn74JPN3NovawXgvaHHsvb0VOmVLdm9At/ v0ysF6OEm4lX1HmYjmot15nuijuJiPQxAalW8E13YzxqYvRcF+938dX7Q vDrdIX1XssXnTOTjtHCteDUUrosQIuJgSbo0vVSsFQZwGoU3udpt1MSjp gqzCoSZaDVMcTRZg+vwyBK3KTrDq0h2pMCe/tif+d2AU2N/Lw0qs8zL4h SSV+qFrRwIML56/H4jFt6NsjmGCoAv9za7RqJtl8mpEk2E5xOYOFVoRRf 23raEWJ6CEjYw1b+ULYQFfjP6SboFEuLyauXtABOHWR/hEMXw6ZKvufCM Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10350"; a="270894651" X-IronPort-AV: E=Sophos;i="5.91,233,1647327600"; d="scan'208";a="270894651" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2022 07:40:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,233,1647327600"; d="scan'208";a="713877416" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga001.fm.intel.com with ESMTP; 17 May 2022 07:40:42 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) 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; Tue, 17 May 2022 07:40:42 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx612.amr.corp.intel.com (10.22.229.25) 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, 17 May 2022 07:40:42 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) 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, 17 May 2022 07:40:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kp6UYlcNZM+EzxrPlJYjF5FDnWy6NlMVTZGynsvcN4DdTvTofKUnQ7rXYl1518LfJLEx41qcrUb5DhWdIZc2sFehYdvWVtk9jBCn8owc0UfGVX2krF527+m452ejafpwB8UOEU8a33VExn68kCef9FPJoUL+WVEFr6uS1jif5ESzoVp17gNa/V8/JqGkGhe4vWgWKTb6Ec0VTIVDOX1xbOeHohZEdqQjp5IOddBjiSW5j35MCjKvd7YVjoOPL3cT5+lxgsvskMyulXHcVD4RYLR2Inl661EX21Yajb29djUzeDBCyTXq0oRssGsatPWLOXu9donDdhqbNSO1/GGdhA== 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=eVKFnIcaIYNsqbzIwNZugx4ndab/nL/jm/oDaMIyJgk=; b=a1vPwrX+ctCcc8ptQLW0IqJdpU+RlKfuM4rIDeIsPdETkb6FjhBZ5A5PVHmkVT9XWFuMTqAHXifKTuaCEA7JKOgoVZcySDEttQnqGOrPwbDOXZ7OZ0274IJ9Up3wNA/IxoPt+IKv4zCR9Ff0z4zojUuCAKYy65mxEmPrb1ckpl+msZJ4UMngsudrN7eLm5F2ZsEJonluLQqOPVzEazf8h5kJjYXY4GaPX3hCVPA+qSIpbJYGrt/9mWQ8X2jiG/nKIkHXKd6YLWXg/Gz0KAS63aFWCbnWjwF0Q9AXeFWZPvCR/ZDCnKI33Yp8AyI9qjPpXH0i1ax8QLCM0pAXlkEFvA== 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 SA0PR11MB4574.namprd11.prod.outlook.com (2603:10b6:806:71::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13; Tue, 17 May 2022 14:40:29 +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; Tue, 17 May 2022 14:40:29 +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/rdW63psSUGGLWKzAcyhgK0jI5JQ Date: Tue, 17 May 2022 14:40:29 +0000 Message-ID: References: <20220428111224.57705-1-wenxuanx.wu@intel.com> <20220513072049.149333-1-wenxuanx.wu@intel.com> In-Reply-To: <20220513072049.149333-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: 906c32fc-5603-43df-a9c4-08da38133070 x-ms-traffictypediagnostic: SA0PR11MB4574: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: V8S3L075E9kTnLh/6UF7NVTy22G8SCq6b80n4JlU9il41L2GuskdpmXLJgSkIGJK3suNEk/LPTfoNkHwCq5KXNHOvXsL8rXO+F0R17UHO75L4GUQqtQVNgYZfGRVVnmhkBxiyYYj8Pjg4pJE8XRdQ4tbeDemE6ugHwWq8zFbViPBvJizddXu3ItGuH1HYF8pv8j1dDJtFqDLT95QauBthjNl3bZOfmFOgNGpLW8uzOHV6P+Was+PIpMSb6suJ9LEhZ2T/XtJI4qPVDXIsEp4UqE96AhLWdzq/ODjs9NPKx00Y6I21nHOAz3qXANgy8bXy2umy/GJgP6N2bdItACBVPvcbg9dp+5cenOPDwD5NvxhyJ1k834FNCcPKgTsycssZySyhlRSuzy14Wq7e4BBDsOs3GfV8b+5zVAHdr0EGM2QkxKrAUlns5KFggLDD3iR+5Mf24V5pNDOmKRaslbwyL4RPR1Qh2XxO+lL9Ii0wocY9P1ba/AuEd193Zfh11yZFTMlUY8skQL3FTloZxER8Cf9h/Fa6DepcUoi/uKajlDQ8uF1ek74eG/86Xz/rWaQqwuJPmaKcqalrSbqRytJx+FNtKjjrmW7WSz7Z/XlK7YC6s5cWD1Vb0aUTbMpho9YqXK2kl52nXh1O58Cxo7m/wC00QGWMELN0dfwgpI2jWI5A9hwrbKyVD52WEzzBovOofIilQvYi8oZh5tmpUiK5w== 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)(5660300002)(52536014)(86362001)(450100002)(110136005)(83380400001)(66946007)(66476007)(33656002)(9686003)(54906003)(186003)(38100700002)(122000001)(7696005)(53546011)(66556008)(66446008)(64756008)(2906002)(8936002)(38070700005)(71200400001)(508600001)(82960400001)(55016003)(316002)(26005)(6506007)(76116006)(4326008)(8676002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2ttnybuKe/s32lkWrPzKp4UGepTkseSDSnu7i4pVoLt8lxjY8bYyVKalflC8?= =?us-ascii?Q?EnUHhS0cy1h4SEUWOL3MjhlettXfAGe31+Fg+fbcBYl7f3hDB9B3kitJ8iNb?= =?us-ascii?Q?7JWREf24yhnWVGZMYtDDBCgwxxHaXWKf+ptKKH0HVZ1RqAoZoxQHwkJWBKR2?= =?us-ascii?Q?5sy/IKIz2AQFTf74kBwYnllnRw5xqjFsLXTmWw4uMM4Yat4pw0lDCYV02sIw?= =?us-ascii?Q?OtvGZljcaj2e5HQpCTe1psop5Sm0PJzpNB1LvwaFR5nsmBbw8+Mky7zj92uN?= =?us-ascii?Q?yKRBCZPnIyYIo03LjTC0ykBqUxHbcrP5nk90LagkRONg0vfzqbXR/lLY7QTd?= =?us-ascii?Q?BPxpVFVhMht2TZq5w8glua7HSYEHqbJD0JuLfRHmGI95IORANpxM+PAd2eV1?= =?us-ascii?Q?Ucyo7bnzpX+lftMffE9cFPFdYZW/G4naS8+Nzj0R+gyvhyv/ZI/oySOffay5?= =?us-ascii?Q?bt9iLHf6JcBTx7eg6TJEHcenpsJK+tbzuE3a/T1tiQNcjgSDssVTkVZ+WK7U?= =?us-ascii?Q?ZOVUcz/c19WxOamWP+OHmvLet8vanTo1PqP2afq1449zTwvCYDLd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KlWDGGpZHytr1CjzETHBtjFhDDK2kEa7/C0ZabRl?= =?us-ascii?Q?mZ2MHFnxJXPWKh2zEuCjKPWIl4OO/u4NHewqcYa9XGhFaKIEqMy2XFq0qURJ?= =?us-ascii?Q?KaI9/PbYR25ejhkD/XPaZQpK1nfvhB4TA2IZ0KX3EUzb+rQqNamKfMCSWTJU?= =?us-ascii?Q?KKIGJZGriSTxKnBUngY5uZGBwGXUtn+U0wvtagNq0Zk3kz1zupP9S71bjWLN?= =?us-ascii?Q?Fp6oZPXTudoFI/+aZxeShPdqVsCFXiV5yF5q519yPvU6laYi0LmDU+mpZv63?= =?us-ascii?Q?954vtzkqsQ=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: 906c32fc-5603-43df-a9c4-08da38133070 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 May 2022 14:40:29.4101 (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: l8jF0LmNELaM5ZOAEYa13KKphOkyfb8hNIq/ZltYtldjYOcBAT/Px7zhnrmLG9ZGTW/8pU1Bu7QuVyc1vGispg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4574 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: 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 >=20 > From: Wenxuan Wu >=20 > 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 failur= e. >=20 > Acctually, max frame size of media type I40E_MEDIA_TYPE_BASET can be set > regardless of link status. >=20 > This patch omitted the link 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 | 24 ++++++++++++++---------- > 1 file changed, 14 insertions(+), 10 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.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 code. > + 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); > + } >=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