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 953014252F; Thu, 7 Sep 2023 04:35:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C8554029E; Thu, 7 Sep 2023 04:35:02 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 1A5D14029D; Thu, 7 Sep 2023 04:34:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694054100; x=1725590100; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=WJN9dT1yv7lemw2KPzo8Udx8xjLRNdBjti6QpA0Tcdw=; b=IeiD5tWofjn59uIglg4jZ2bMkX+YdlH3otJxK08cVaWgZK/WSCN7eSP1 cK2sNH2bcDtaVe6ozYAV5JlHGzzqH8HPZzcCMyaPg3WU+rjClambPRO82 vAG5bUicE4/ABA2+S5sBoRZxDkz5ZzYCxI18rz5cra2x6mN8/qLf/XSdG cKIAAHLNdrTuwvWxExXxMKDwNogfhB6I/3noEqFkdo9A5eTAztZoaeeMS C9Y4mK30eT2p0ugKEZlx7YWEfycJyrz/D9ynr9khyQFj1vEfXyepLq+ZD XbY9R2R+NuEzWwkw/n96L3FkNbl+u/VhzMpzhNMEMqgjpEb9XUfDNf6+1 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="357553786" X-IronPort-AV: E=Sophos;i="6.02,233,1688454000"; d="scan'208";a="357553786" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2023 19:34:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="988553237" X-IronPort-AV: E=Sophos;i="6.02,233,1688454000"; d="scan'208";a="988553237" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga006.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Sep 2023 19:34:58 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 6 Sep 2023 19:34:58 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 6 Sep 2023 19:34:57 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Wed, 6 Sep 2023 19:34:57 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.169) 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.2507.27; Wed, 6 Sep 2023 19:34:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I+0H4dWPrSrDlI2WDUDlUdW10AMqoUMKOD3V1BpEktUgN1nrSOwDXAyKoKhtTF1MTheWSV+Ms/qJXbAEFjDFP7O2g5sbW56FE4CkAC8bHSUeaVH79X0ILzCT3Pe+LNEndIShCm9KA0LFh8TJL9aOQSXBMNPAecMA0eMTdJZzzD72dhLTLmcABQbqHgKEcDDCPxv1OpB9WHnUt/Vw+rFn1drCnGSicFF0SU4SdzwsKaVTzTKlMAOv49RvjG0UR+RqeTOsN79d0CYCoZcuu6T8QTgBWmoB2Oxuu5AlMU+4+UPVu3tHdlUmizNiFvr6V2b9O3kfYUyT8JDkVJKra0/DEg== 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=ANUiwh6vf7ExuytwC7qEyc2Sd0jqtA4GDsJ/u8k3pBs=; b=GyNlAL72wPWg2Gg7LGPp+ZdMkTCYfs5X5rpnJB1Y/qM3nImIMYQrVaoEOOni7rN1nvqqS1jhNOC+zGDSqHFxJqq9inm5fF1Kdq1A6Qsnm+TtM4I/j+V1/4HxZ20M8b2iPjhffCqgTmf6Dz9GXZVBE0fbqxVMy+W8sJeNiS83pJID7ZW+UK/vqqoiXCSN1v1DgKYHBkuk4TCWT3putz0FnJvJwOgOapEr2Y8rNIZTaSnhqQiFXHQB89EVqEe8QcR7KXCQKOi4Zf2p4ttSx3OqsvQkUDfUvTFzJprJsp6ppWqsGaAG4XSORzhAWnEq4riI5bynjny7Vtv2IHyyLvyNBA== 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 IA0PR11MB7955.namprd11.prod.outlook.com (2603:10b6:208:3dd::6) by DS7PR11MB7836.namprd11.prod.outlook.com (2603:10b6:8:e3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.33; Thu, 7 Sep 2023 02:34:56 +0000 Received: from IA0PR11MB7955.namprd11.prod.outlook.com ([fe80::6f86:7fd1:af53:ee2]) by IA0PR11MB7955.namprd11.prod.outlook.com ([fe80::6f86:7fd1:af53:ee2%7]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 02:34:55 +0000 From: "Wu, Wenjun1" To: "Deng, KaiwenX" , "dev@dpdk.org" CC: "stable@dpdk.org" , "Yang, Qiming" , "Zhou, YidingX" , "Deng, KaiwenX" , "Zhang, Qi Z" , "Xu, Ting" Subject: RE: [PATCH v3] net/ice: fix tm configuration cannot be cleared Thread-Topic: [PATCH v3] net/ice: fix tm configuration cannot be cleared Thread-Index: AQHZ4JnArxcRSFL8NUG7E4F9iLNdB7AOpjiQ Date: Thu, 7 Sep 2023 02:34:55 +0000 Message-ID: References: <20230905073444.708799-1-kaiwenx.deng@intel.com> <20230906074930.746005-1-kaiwenx.deng@intel.com> In-Reply-To: <20230906074930.746005-1-kaiwenx.deng@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-traffictypediagnostic: IA0PR11MB7955:EE_|DS7PR11MB7836:EE_ x-ms-office365-filtering-correlation-id: ecbdceae-97ed-447e-4fdf-08dbaf4b055f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vOFiCdUz7fXHqm6M2TDlBhkuXOFZB+0Oflr5lLFlU9QDdID5JxPzIZhMudA72FaCgWDlx5cZ7aQQPvh6AD/QxfPV1jrc8JeYMHKBB050fNO6I3emqBw8XPeIu0Jkc//LfiRD6hsvb58uOocRVo+FTaue2WSbXncCVnBpWBMPvBpWXgTSVksPD00Xeh/Jok+yPrkD/wHArBhHeQjniO4zP9hwSKP7MCrPrprRLPfhpXwThS2BAwgdZnhzd8qJz9LQYAeinQcgvRVqLNhOa9HJ8ICyKnaEVi5/OSsA4z5FCQcglkWTz4bNdw37kYGUVd1v7wzgS6lFj+qc4EL+96Rh43Fif0/ZcCt4hO7Tuir4Nyf8K8uHnbX7IEayaQ5aoDIjy8s+aBaGtgWp07cWt7USeaId5kSNRXlx6rCsVHrNET1PVmQLW6+jaqrAlbOhaBfuxLSHj0ZybRKFXiM0RtGHMVidDPn9qJiwtYoOu2Scg/awHBV8wevKUEqsd6Ga4o0mNLff/+fJJBkUUw3LrCP1UojP04Lx1EG9NJend/wYJvDx1wj0eI1YEQ0Sd/AF/13iTU96/OYL3PRpwDhneLOmpPwGFKGD7OZC2SSMJW39wNUHacX4a7a9NHtPaRuvIJzc x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA0PR11MB7955.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(136003)(376002)(396003)(39860400002)(366004)(1800799009)(451199024)(186009)(71200400001)(86362001)(53546011)(7696005)(6506007)(52536014)(5660300002)(2906002)(107886003)(83380400001)(26005)(9686003)(33656002)(55016003)(82960400001)(122000001)(66446008)(64756008)(8676002)(41300700001)(316002)(54906003)(66556008)(66476007)(110136005)(4326008)(38100700002)(66946007)(76116006)(8936002)(450100002)(38070700005)(478600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?bCA/K1kQkzdubfNNICHo3KXW+yLS9KTn8Se+tycVzbzvWs4NW5jY1xHoKSXM?= =?us-ascii?Q?stIrgtBWtDn2pMBtqwE0l9Ec1kghB7anfdSu183GlzhY8rWxqRRU6wrEF+vq?= =?us-ascii?Q?3MtgnjVFPbsrxG9ocsHCLNRjJR4PL8LJepTPXCu5AmaGT6PrvlHWSiaPEZe7?= =?us-ascii?Q?G0MpLufvN5VP7GxxHWjb5pU8ys+kVRvxkqB2148uTW/P7pjzbby3Om5YDKYV?= =?us-ascii?Q?A/DW6TkuSNrhzYIRJcy+h0nBscz/S2rz3HD6AekIZ2xuvt50CHfQPjcr4a4y?= =?us-ascii?Q?p/D3/KK6Ef+PYegF+1BnSWZNp9cLJrI9jemi/FJaeYx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9jw8ouYI0mFHV2FPY0Q3YXWD9tuEjiaq1iJdrXVMs3W1kfJ/K4UMyxExg?= =?us-ascii?Q?KY7n/6dLHpGjIox/wVwFRE4P4k4KDkmX3flN8qZZfUAE4+poWpLraByo1mHy?= =?us-ascii?Q?gFwwawRggBq3FEm5bE2t51c8jqu8rrglpuuWNI4AQsvs/BfISLBNQKdw7Ov0?= =?us-ascii?Q?2njUn3Al3+v7HpbZGFb6ot9UWJ8s7RLGvJ+daA/rAdYX4STbny6QS62/93y8?= =?us-ascii?Q?gq7lO9Xlq7g3mx99oeX7rh42LmxGu03S3+1iqFPQPl7ZqVHbex7YEwIENFHv?= =?us-ascii?Q?1C2RscfoeQBvwLyH+pBgYRZNO5qEWqzK6ecJ/c6tYjkcCXLPRErZXUS2ruRb?= =?us-ascii?Q?ZD8jnZrKgckG5tVzpcRldbN6SKJj2Hkbhy+PGbU6?= 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: IA0PR11MB7955.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ecbdceae-97ed-447e-4fdf-08dbaf4b055f X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2023 02:34:55.0429 (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: DIh8m1iNTgaX2OOqQZM6jjR/AGNHNjyPL61Wq5UIwgNmcguq2HDX1NfdmE9b5YKZp1DubYHRCZ2NxeqlPqj5jA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB7836 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: Kaiwen Deng > Sent: Wednesday, September 6, 2023 3:50 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Yang, Qiming ; Zhou, YidingX > ; Deng, KaiwenX ; > Zhang, Qi Z ; Xu, Ting > Subject: [PATCH v3] net/ice: fix tm configuration cannot be cleared >=20 > When the device is stopped, the PMD resets the commit flag so that we can > update the hierarchy configuration. The commit flag is also used to deter= mine > if the hierarchy configuration needs to be cleared. > When the PMD exits, it always stops the device first and also resets the > commit flag result in the hierarchy configuration is not cleared. >=20 > This commit changes the PMD to not reset the commit flag when the device = is > stopped. And we prevent additional commit when device is running by only > checking the stop flag. >=20 > Fixes: f5ec6a3a1987 ("net/ice: fix TM hierarchy commit flag reset") > Cc: stable@dpdk.org >=20 > Signed-off-by: Kaiwen Deng > --- > Changes since v2: > - Replace DPDK with the PMD in commit log. >=20 > Changes since v1: > - Prevent additional commit when device is running. > --- > --- > drivers/net/ice/ice_dcf_ethdev.c | 2 -- drivers/net/ice/ice_dcf_sched.= c | 14 > ++++++++------ > 2 files changed, 8 insertions(+), 8 deletions(-) >=20 > diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_e= thdev.c > index 30ad18d8fc..065ec728c2 100644 > --- a/drivers/net/ice/ice_dcf_ethdev.c > +++ b/drivers/net/ice/ice_dcf_ethdev.c > @@ -670,7 +670,6 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev) > struct ice_dcf_adapter *dcf_ad =3D dev->data->dev_private; > struct rte_intr_handle *intr_handle =3D dev->intr_handle; > struct ice_adapter *ad =3D &dcf_ad->parent; > - struct ice_dcf_hw *hw =3D &dcf_ad->real_hw; >=20 > if (ad->pf.adapter_stopped =3D=3D 1) { > PMD_DRV_LOG(DEBUG, "Port is already stopped"); @@ - > 697,7 +696,6 @@ ice_dcf_dev_stop(struct rte_eth_dev *dev) >=20 > dev->data->dev_link.link_status =3D RTE_ETH_LINK_DOWN; > ad->pf.adapter_stopped =3D 1; > - hw->tm_conf.committed =3D false; >=20 > return 0; > } > diff --git a/drivers/net/ice/ice_dcf_sched.c b/drivers/net/ice/ice_dcf_sc= hed.c > index a231c1e60b..b08bc5f1de 100644 > --- a/drivers/net/ice/ice_dcf_sched.c > +++ b/drivers/net/ice/ice_dcf_sched.c > @@ -237,6 +237,7 @@ ice_dcf_node_add(struct rte_eth_dev *dev, uint32_t > node_id, > enum ice_dcf_tm_node_type node_type =3D > ICE_DCF_TM_NODE_TYPE_MAX; > struct ice_dcf_tm_shaper_profile *shaper_profile =3D NULL; > struct ice_dcf_adapter *adapter =3D dev->data->dev_private; > + struct ice_adapter *ad =3D &adapter->parent; > struct ice_dcf_hw *hw =3D &adapter->real_hw; > struct ice_dcf_tm_node *parent_node; > struct ice_dcf_tm_node *tm_node; > @@ -246,10 +247,10 @@ ice_dcf_node_add(struct rte_eth_dev *dev, > uint32_t node_id, > if (!params || !error) > return -EINVAL; >=20 > - /* if already committed */ > - if (hw->tm_conf.committed) { > + /* if port is running */ > + if (!ad->pf.adapter_stopped) { > error->type =3D RTE_TM_ERROR_TYPE_UNSPECIFIED; > - error->message =3D "already committed"; > + error->message =3D "port is running"; > return -EINVAL; > } >=20 > @@ -400,16 +401,17 @@ ice_dcf_node_delete(struct rte_eth_dev *dev, > uint32_t node_id, { > enum ice_dcf_tm_node_type node_type =3D > ICE_DCF_TM_NODE_TYPE_MAX; > struct ice_dcf_adapter *adapter =3D dev->data->dev_private; > + struct ice_adapter *ad =3D &adapter->parent; > struct ice_dcf_hw *hw =3D &adapter->real_hw; > struct ice_dcf_tm_node *tm_node; >=20 > if (!error) > return -EINVAL; >=20 > - /* if already committed */ > - if (hw->tm_conf.committed) { > + /* if port is running */ > + if (!ad->pf.adapter_stopped) { > error->type =3D RTE_TM_ERROR_TYPE_UNSPECIFIED; > - error->message =3D "already committed"; > + error->message =3D "port is running"; > return -EINVAL; > } >=20 > -- > 2.25.1 Acked-by: Wenjun Wu