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 9105E41DE6; Mon, 6 Mar 2023 12:05:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7EEA840E50; Mon, 6 Mar 2023 12:05:21 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id B5C4C40A8A; Mon, 6 Mar 2023 12:05:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678100720; x=1709636720; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=8WHFXhuM1zWpIoUMmpRjKpBsldUnUHNr1+wr8Kyphec=; b=NhaNq/2c22DV9bGYnb2/K+JCbZz3CrZGmGsrEVwVGIu/J1fGXn4j3Edv soIyUqcmwvDR2G9Tyns2fOSGw7BtSkJV2zSiq24P71JCaMfqTgQOv+C2k ErZIkDrUKvWqFkZ/yW8+kkAOrk5z9aboIwrnUhj8kknQtyBxy3fgD00p7 JI/GAf+UNZvXSxTW+3D021F+wtNO4558CZLruCnLCGKFgXamal27H2PYZ z4xHc1sJymUBhoJktcQCxa/be3CTN/DLLbKKxepkkhaBDuqBvhnTFrnI/ SIpEYc5aoGkrcyQJ+SzK9dexfzr4HK/tA3/bz2s8d83qxbRA6GAQkhgML A==; X-IronPort-AV: E=McAfee;i="6500,9779,10640"; a="334242213" X-IronPort-AV: E=Sophos;i="5.98,236,1673942400"; d="scan'208";a="334242213" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2023 03:05:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10640"; a="850253699" X-IronPort-AV: E=Sophos;i="5.98,236,1673942400"; d="scan'208";a="850253699" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga005.jf.intel.com with ESMTP; 06 Mar 2023 03:05:14 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) 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.2507.21; Mon, 6 Mar 2023 03:05:14 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 6 Mar 2023 03:05:13 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Mon, 6 Mar 2023 03:05:13 -0800 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.48) 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.2507.21; Mon, 6 Mar 2023 03:05:13 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nH9wtRmgEtxWhkEhsdZJJt2u/YJll/W9e9DgLDlS42iqiMmypvU1PlqCLZtIl23ooS+dqsQsozUtWTerc2rQOAzeayj0tsOj4yaMhWwOpFSfpOB2oeh5mCYedyO0M8JZnt/3w5TXg6CASf1GP94PMlbEGsoblZNF7TtSht3nDh5wiUQ6NKLqHdTvO3byMIng3FS8shT4pbJ3AySjfSsqn1Hg6DJ9xe3/uOO5o7JiIHWvgaFVf506tYdVSKVyyVzOu+NL3ikBisUM2UzmCbuH5kenXZc3+cpxgg2EraPtO4/3O8CjpwoQiJZVKlUDBSQcoJWS1wfzKRbNHeETIcGSww== 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=rbT+mD9ZnEXmC1zLVtwEGCoF9oqSSGgJ7NvFRbPvaMM=; b=fxkcSr2JvDbEB0BJZYLeYRdjkuwaPUVFYh4W64H/uNOyCxYt+/inHIJXLWPr01seFCrL1NHp3Y1gmiFagVTMzYh9eycfsRD3SlH9WQOQC5i1E1OtLhSdln1qE+6Kw/Xgyk/jYhMM078UjJJSFDqymgeXgQOoCM+I2pIQsO0O+3kCgR+SP5nyIJbObVxve2j9hCofVrX/kUzRRFuYChDxMvg8c6PYnfZXHbTsRfCMhTTbym3lr3E4FpBjgq86+qKY4TzrGfrM4u9o8yOqU4fcZl9HqfapsQ7GKvb1j/+4v5QjkSbbjRsq6mFfYgf1i6BiVKL2GB5vsSb2Zsz/DQia3g== 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 DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by IA1PR11MB6123.namprd11.prod.outlook.com (2603:10b6:208:3ed::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.28; Mon, 6 Mar 2023 11:05:11 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::2c5d:49cd:a9b4:f764]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::2c5d:49cd:a9b4:f764%7]) with mapi id 15.20.6156.027; Mon, 6 Mar 2023 11:05:11 +0000 From: "Zhang, Qi Z" To: "Su, Simei" , David Marchand , "dev@dpdk.org" CC: "stable@dpdk.org" , "Zhang, Yuying" , "Xing, Beilei" Subject: RE: [PATCH v2] net/i40e: don't check link status on device start Thread-Topic: [PATCH v2] net/i40e: don't check link status on device start Thread-Index: AQHZDtP7ZL+5sscKPECUkqGlc4wSiq7t0yaAgABGI0A= Date: Mon, 6 Mar 2023 11:05:11 +0000 Message-ID: References: <20221212143715.29649-1-david.marchand@redhat.com> <20221213091837.87953-1-david.marchand@redhat.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-traffictypediagnostic: DM4PR11MB5994:EE_|IA1PR11MB6123:EE_ x-ms-office365-filtering-correlation-id: 610b2f98-283d-4c28-4123-08db1e32a7bc x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: KnFJtTDd+R3SpBLj5T/+/eHY4lEYcdq5DjOnxK5o87lowpMwt7/ktr3XEZXttAcWEpJ+h/PZY2/OSl7Sj54YgHnoGFvZv2jA1G7w4gu3a43Z3+DeMNpDrGVBKLOGHZ5ogNzoP/UtcmZsgGQFc+EC/7OIGCRAJUM1bveTvjBCuYqyOqbF2IwFLldmCy030tscbnAoscEneY49aIH+A5zKw/X+tTsfA0135YxwKYgHM+ze9Qql8YtMvCV5uCx4rJ4QmHPB/SzPLncXMX1/JMG6Fmh3lPCKiqkj1U59yJdqKlrZazsoSpcWhie1sIlQl9aqtdLRFI13OTrWQHBWfig5g1T02i3laJut//BbBZDzQyfOKgnRbasg1SB8CNhlVtQMXFwzA+v0I5cAGswa0B/TzMu/4deSVD28BTCug2rbTbkC95vn75hVB/yhS2Mjxrf6xS4pIke231D9vIDsyjCI6flcaEeJSvM25XMnWmXJqlVGST+bwzrRhSqROEOudfU3GjAqFtbKtIod7YU9XJf+zaK0vX8qYMvnrxYS11umKilieE3IFaiaehThpaTvp1BBnDo2VJnjRGGPBrsWNfMZiNEGw81Z4xrly37ZsNyuPJuu/3obb4XzHQiXnz/xt6QXcmVhLnOxd0+CTKrlcqXGYgjnvMa77/JZIgNXyP5gyC6D7bCRVfGgyegEgdIWyjyPISEUe+V+ZDJIHLq08Cj2HlW/XM0H68vYhE4JAAzZRAw= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(39860400002)(396003)(346002)(376002)(136003)(366004)(451199018)(33656002)(4326008)(76116006)(66946007)(66556008)(41300700001)(66446008)(64756008)(8676002)(66476007)(8936002)(2906002)(5660300002)(38070700005)(86362001)(82960400001)(122000001)(38100700002)(7696005)(107886003)(26005)(71200400001)(478600001)(55016003)(110136005)(54906003)(6506007)(316002)(52536014)(83380400001)(9686003)(186003)(53546011)(309714004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?rfRoeSQpQ0VS35qW8CE6kcyAYXYdcLUWRd1l3imEjuqYV6nQMe4CBa/7IUGp?= =?us-ascii?Q?KJtTf90UF0cBMymIrVfIFaghLxF1q5vRBu4ee8yL6PUoX/ZbZ7hRVZqs2E+X?= =?us-ascii?Q?4NT6tRqTY8g4UTpis7URGUOGzmRBYdEnTflQwi6eyomHszmm8XMQbZj6JwgH?= =?us-ascii?Q?DAyUraCU6Txt4Rw5rtQ/9V0w5xOuzDjJwzCQ7dRT5daTH0YVngjJYRv3sudw?= =?us-ascii?Q?8Yd8mGdTwnkniW11L5Q01994ajokrdYD1UnUx2qmBJH87uPl8QWORBhiSgUV?= =?us-ascii?Q?SZ25L9HdbM/DgWFOUUojRF/aYcofC6a4Owki1ZZooZKjsKuuz/8cx3DF6Ees?= =?us-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BfwgQpeywNnYCHcC5bkxi7VXMV?= =?us-ascii?Q?7eHwZgoCPjVfdoYrfcy98ELsb8Ub7A+uvkNlZNamDqTTd1EX93yPpITyoFYE?= =?us-ascii?Q?dAhnf4MHKbSozSMlGtBaUqZCAa/CtEBr0/Z4lX65I7MguXtTVTsu4S3cTjm/?= =?us-ascii?Q?ic0PZ2Rkcgc92CvXMsjDrWqcYAgAHz7bnPYF48YtppAxhwZMYTLmoWJrk9t8?= =?us-ascii?Q?l+bjkWZw185KrErCgX134HWQfc6Ea6whXtkSj4aEis55Z9ykbh6Ccd6w+KJD?= =?us-ascii?Q?jR/2TzJoZxr4vzkleGFx/3i80GdPIYLGMZmUNaZgB2Z5RH1qVZDnsweq1UBx?= =?us-ascii?Q?GlyChlowdqS8Ociy4iauUBTr7vBTNKeThGNwHn1I?= 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: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 610b2f98-283d-4c28-4123-08db1e32a7bc X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Mar 2023 11:05:11.3762 (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: BJr7q0S5gG9+iVZhyG7KWQ+qB1Xh0rXRTq38kjnNeMMYpdl91K3C7P9UcY1oO77YcoLmJf4gUb9nPT16mRWC6w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6123 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 > -----Original Message----- > From: Su, Simei > Sent: Monday, March 6, 2023 2:54 PM > To: David Marchand ; dev@dpdk.org > Cc: stable@dpdk.org; Zhang, Yuying ; Xing, Beilei > ; Zhang, Qi Z > Subject: RE: [PATCH v2] net/i40e: don't check link status on device start >=20 >=20 >=20 > > -----Original Message----- > > From: David Marchand > > Sent: Tuesday, December 13, 2022 5:19 PM > > To: dev@dpdk.org > > Cc: stable@dpdk.org; Zhang, Yuying ; Xing, > > Beilei ; Zhang, Qi Z ; > > Dapeng Yu ; Wenxuan Wu > ; > > Wang, Jie1X > > Subject: [PATCH v2] net/i40e: don't check link status on device start > > > > The mentioned changes broke existing applications when the link status > > of i40e ports is down at the time the port is started. > > Revert those changes, the original issue will need a different fix. > > > > Fixes: a4ba77367923 ("net/i40e: enable maximum frame size at port > > level") > > Fixes: 2184f7cdeeaa ("net/i40e: fix max frame size config at port > > level") > > Fixes: 719469f13b11 ("net/i40e: fix jumbo frame Rx with X722") > > Cc: stable@dpdk.org > > > > Signed-off-by: David Marchand > > --- > > Changes since v1: > > - since the CI reports a failure on v1, simplified the fix by only > > reverting commits, > > > > --- > > drivers/net/i40e/i40e_ethdev.c | 50 > > +++++----------------------------- > > 1 file changed, 7 insertions(+), 43 deletions(-) > > > > diff --git a/drivers/net/i40e/i40e_ethdev.c > > b/drivers/net/i40e/i40e_ethdev.c index 7726a89d99..a982e42264 > 100644 > > --- a/drivers/net/i40e/i40e_ethdev.c > > +++ b/drivers/net/i40e/i40e_ethdev.c > > @@ -387,7 +387,6 @@ static int i40e_set_default_mac_addr(struct > > rte_eth_dev *dev, > > struct rte_ether_addr *mac_addr); > > > > static int i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu); > > -static void i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t > > size); > > > > static int i40e_ethertype_filter_convert( > > const struct rte_eth_ethertype_filter *input, @@ -1711,6 +1710,11 > @@ > > eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params > __rte_unused) > > */ > > i40e_add_tx_flow_control_drop_filter(pf); > > > > + /* Set the max frame size to 0x2600 by default, > > + * in case other drivers changed the default value. > > + */ > > + i40e_aq_set_mac_config(hw, I40E_FRAME_SIZE_MAX, TRUE, false, > 0, > > NULL); > > + > > /* initialize RSS rule list */ > > TAILQ_INIT(&pf->rss_config_list); > > > > @@ -2328,7 +2332,6 @@ i40e_dev_start(struct rte_eth_dev *dev) > > uint32_t intr_vector =3D 0; > > struct i40e_vsi *vsi; > > uint16_t nb_rxq, nb_txq; > > - uint16_t max_frame_size; > > > > hw->adapter_stopped =3D 0; > > > > @@ -2467,9 +2470,6 @@ i40e_dev_start(struct rte_eth_dev *dev) > > "please call hierarchy_commit() " > > "before starting the port"); > > > > - max_frame_size =3D dev->data->mtu + I40E_ETH_OVERHEAD; > > - i40e_set_mac_max_frame(dev, max_frame_size); > > - > > return I40E_SUCCESS; > > > > tx_err: > > @@ -2809,9 +2809,6 @@ i40e_dev_set_link_down(struct rte_eth_dev > *dev) > > return i40e_phy_conf_link(hw, abilities, speed, false); } > > > > -#define CHECK_INTERVAL 100 /* 100ms */ > > -#define MAX_REPEAT_TIME 10 /* 1s (10 * 100ms) in total */ > > - > > static __rte_always_inline void > > update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link) { @@ > > -2878,6 +2875,8 @@ static __rte_always_inline void > > update_link_aq(struct i40e_hw *hw, struct rte_eth_link *link, > > bool enable_lse, int wait_to_complete) { > > +#define CHECK_INTERVAL 100 /* 100ms */ > > +#define MAX_REPEAT_TIME 10 /* 1s (10 * 100ms) in total */ > > uint32_t rep_cnt =3D MAX_REPEAT_TIME; > > struct i40e_link_status link_status; > > int status; > > @@ -6738,7 +6737,6 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev > *dev) > > if (!ret) > > rte_eth_dev_callback_process(dev, > > RTE_ETH_EVENT_INTR_LSC, NULL); > > - > > break; > > default: > > PMD_DRV_LOG(DEBUG, "Request %u is not > supported yet", @@ > > -12123,40 +12121,6 @@ i40e_cloud_filter_qinq_create(struct i40e_pf > *pf) > > return ret; > > } > > > > -static void > > -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; > > - bool can_be_set =3D true; > > - > > - /* > > - * I40E_MEDIA_TYPE_BASET link up can be ignored > > - * I40E_MEDIA_TYPE_BASET link down that hw->phy.media_type > > - * is I40E_MEDIA_TYPE_UNKNOWN > > - */ > > - if (hw->phy.media_type !=3D I40E_MEDIA_TYPE_BASET && > > - hw->phy.media_type !=3D I40E_MEDIA_TYPE_UNKNOWN) { > > - 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; > > - } > > - > > - 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"); > > - } > > -} > > - > > RTE_LOG_REGISTER_SUFFIX(i40e_logtype_init, init, NOTICE); > > RTE_LOG_REGISTER_SUFFIX(i40e_logtype_driver, driver, NOTICE); #ifdef > > RTE_ETHDEV_DEBUG_RX > > -- > > 2.38.1 >=20 > Acked-by: Simei Su Applied to dpdk-next-net-intel. Thanks Qi >=20 > Thanks, > Simei