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 C700342532; Thu, 7 Sep 2023 09:51:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E932402C6; Thu, 7 Sep 2023 09:51:19 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 9F2A24026C; Thu, 7 Sep 2023 09:51:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694073077; x=1725609077; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=3cJDyrMew+7qFaqbSbYGswcNv+88dpVUJJfV2YNNVRE=; b=fkIA8OqJEWkw+/zcn3g+DUvNxBLSaBtuoACQJ12cTdpl/TYhpfGUhCIA A0pmF38p2ssyt1uPz//w8IZBVGKTPC901t3PmNOM935h3XT1LOS1+C/pS bhiSoPz/74qTXaoIF7JnPw+uyGnsfG5S1/CT55QXJUy3NJqEUOE1ayCwC YE5j9rE5xhg9Aty9/JtZZbfUFhvURpuGwvLhkyfNREmolbbN6BjBSpx9f WdRgnyp83ghj3ct6Ccd08kOmPGgKFZqasLzvB8V+/5J9L5BPWh7TQUTqi 70zVKLk9lJCqhqGvI4HRbxODeRToFquPsuWGJ0KiCrDeUTgm6vAkeaWjI g==; X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="374678183" X-IronPort-AV: E=Sophos;i="6.02,234,1688454000"; d="scan'208";a="374678183" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2023 00:51:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10825"; a="832065335" X-IronPort-AV: E=Sophos;i="6.02,234,1688454000"; d="scan'208";a="832065335" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by FMSMGA003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 07 Sep 2023 00:51:13 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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; Thu, 7 Sep 2023 00:51:12 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Thu, 7 Sep 2023 00:51:12 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.103) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Thu, 7 Sep 2023 00:51:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=icl/jRDrCeRo/JwFhBqb2K4TW5woL5K6hhilGeKqa5k46FJ/5xpnsEcHA697qcQRtwuPT2s+xwk3P9Gg4sAcz8T5s9NIGHh1IxhkP7d0KcBTNmOaLuE/9ZQFfwIJsV28TYEpmFZIhaQAr/MiAIyuUeiQW8F6lVUFsTQCLJu3IW02ggVfq/cfBck2h5KxGGEOMgByBvcvXNipiZDmqx4wZHS3tjEHaBkes8Ods+YIR4B0VoiB+0TKt8oMNi9xSsxf948S8G7LtHR3qFuwDkgqb6bY3AmLOYvV3HffDCANj6vwx5gg2EfcuY1991HJ7SuLGtp6Owt9XkmFeV3WP+UFyA== 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=I+KcVLrlQCG3s7G0PviFHV4tKBpv4vAV5iU4o7MOizg=; b=RekeuM5W87088YkuP4QL/RRUpA1wvMGcoVKgjjQe42TF6uuJ7zJcw4U4119g4jiBCHaHGNayqvGq2RH/ENu5djnQVJSMx8ihiM1PokRHj31MBgg6snoYnaLg+dWGDVv52F4c+gFC8iXBNCizPCoCCJmEb0H8uNDO2RdE7AebKevaQQ1fxeKej2/LK6uUwnlltWnFf6IS6ZgasSpoBnNVr928CSxdTggSQxRRUKkcbmZi/8m0flD+OwUib/fB0VM5ektHN2iRWinsxak5Xp7RGDseC9mVQ4RmBKpOK1XaiRm3H0B/5gpsn6LGaHT0Tz1CBs1ZcksciUwOLpj/v9s/Ag== 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 MN0PR11MB6229.namprd11.prod.outlook.com (2603:10b6:208:3c6::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.36; Thu, 7 Sep 2023 07:51:09 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::8a49:15a2:ab69:91c3]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::8a49:15a2:ab69:91c3%4]) with mapi id 15.20.6745.030; Thu, 7 Sep 2023 07:51:09 +0000 From: "Zhang, Qi Z" To: "Wu, Wenjun1" , "Deng, KaiwenX" , "dev@dpdk.org" CC: "stable@dpdk.org" , "Yang, Qiming" , "Zhou, YidingX" , "Deng, KaiwenX" , "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: AQHZ4Jm229x6E6TIGU+/YOv6zUqWP7AOppKAgABYR6A= Date: Thu, 7 Sep 2023 07:51:09 +0000 Message-ID: References: <20230905073444.708799-1-kaiwenx.deng@intel.com> <20230906074930.746005-1-kaiwenx.deng@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-traffictypediagnostic: DM4PR11MB5994:EE_|MN0PR11MB6229:EE_ x-ms-office365-filtering-correlation-id: aa3d2227-9ad9-416f-309d-08dbaf773338 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3kovGZ4aLc0bXFLqZKdxh+W55Uy6x5cT/VnxfIURhUjaiJLyNYe2D44RS+C+CmQ8Sj3dZ8ebgR18jZTTuSKPkdC3mYJg6yIthu6GbDY+11MF2KnC0UtkX/RsDTRvi3gI6sALvEsF1rQPJUCXCzboWBE5p9b1PFAiNazKWyWNvSiQ++NlM+Fq0zkqN4kfI/xU/nkt2NB3B9azKpDHdf06OZbCinOvKtF9060tfvLsTyVkCUF2WB5xXYR7JliKmM+VcdlF9D41KnjKYVS3WiB0X75Uxmp8ZwZeXsP7605RDmnItVfsHrRP80NWcr9gwVVSV75jaDmNhbbFhR4TPV+SXrbiQYjGVkhPLPeJU60ixtR7zKpTIdEmm1epUHFgBBHnDohtUzDC2z0JRDDBTOunsBSWy/pne028zSeNbb6SIPvdrMx+dsRLV5MTuFhMM+xUuFJNzwae5kEXxZqgKYTLQmKLIsjWhMUqgITa2YLUbKNGKqX/Eg6a9rrPX5sqh+mGEergwcdje8JoxgaJQB6BdgmrilV64c965J9k2iJ2FZYzUgjaDGcuzDUCTHr+4faRSOzGqqiw6UNB3jAWQP+gmqOMWXqdcr0gplj3pqisysENmruvST9SguLFpmzLCcuz 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:(13230031)(346002)(366004)(39860400002)(376002)(136003)(396003)(1800799009)(186009)(451199024)(82960400001)(122000001)(38070700005)(38100700002)(55016003)(86362001)(33656002)(478600001)(2906002)(110136005)(9686003)(53546011)(71200400001)(7696005)(6506007)(4326008)(8936002)(8676002)(450100002)(5660300002)(52536014)(66946007)(316002)(54906003)(64756008)(76116006)(66556008)(66476007)(66446008)(41300700001)(83380400001)(26005)(107886003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?PkKP9vQOqz7IfGQWLHx4eF/cTRUGlYPwD2pWhQocdn4+vQPCwzVsnMkWZkXG?= =?us-ascii?Q?KJER++VIPlPWCquML9nXA6Lytr/A/hLaIeoa/CaFsEjyH8SlLWda300hqAt7?= =?us-ascii?Q?NfqC29WRaKq0lVkKLCYD0iqHJkXqs3U1wVhPCYkuSp9h+kTXUTgZ2Y/B45F7?= =?us-ascii?Q?6KXcRP5Jm5rgf5Ty6LYHWbhNsB/nOtNVHzK9zUP5sEeXUVNkuAEDqQgn5xDE?= =?us-ascii?Q?gDh2+zr6qAHuzrM+7ePv1tsnk2POYS9llk5hDP8NQo2lLxPipq1cv54cmz5E?= =?us-ascii?Q?jAkM76Md2wTqiEODCcksGfM7gF1NMVj5UHaM1EoB6e8Syraec9X2Z69n1Js4?= =?us-ascii?Q?PTDEPVAottqkxjRdJ4WOhP32btriIuVNDUSyJnqicCBOowg59alH7tlNX+SZ?= =?us-ascii?Q?BW3bCZ8G1l/apzxuQ2s6xalvfwB4jwqLHO1MOvEW5eUbb45sPBOl2/AadPsd?= =?us-ascii?Q?jajXWzyxVSUR2zAgc4Lg1+YpcYNpt6Pn79qr6Ce0O14+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IX7mcZmybK9ntgGIwdU2KoaEuJaWmBz67JDxK41?= =?us-ascii?Q?HnGgzCgzph0aZX6edNc2BXWzwS2/1Y0u+NG/zPdJNT8Bm95RePlSAD9YVwXk?= =?us-ascii?Q?OSTgUwlI/Ft9i6yY56LU8O3YnihsaB5bdkmnqUwYQr19rIgPQW+KuwCWTTYj?= =?us-ascii?Q?EdYyDUqdAygWUrnCRi8nM/RMy9GYaBQaENki99vr?= 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: aa3d2227-9ad9-416f-309d-08dbaf773338 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2023 07:51:09.7807 (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: jChtZ7SWAYHFRNLkhBBEQ2cELvpq66zX8BidVQuayb54xWa2kEkIh1lFYGx+QeO8P9fjWqxmch8D6d0DqlSYcA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR11MB6229 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: Wu, Wenjun1 > Sent: Thursday, September 7, 2023 10:35 AM > 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 >=20 >=20 >=20 > > -----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 > > > > 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 determine 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. > > > > 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. > > > > Fixes: f5ec6a3a1987 ("net/ice: fix TM hierarchy commit flag reset") > > Cc: stable@dpdk.org > > > > Signed-off-by: Kaiwen Deng > > --- > > Changes since v2: > > - Replace DPDK with the PMD in commit log. > > > > 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(-) > > > > diff --git a/drivers/net/ice/ice_dcf_ethdev.c > > b/drivers/net/ice/ice_dcf_ethdev.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; > > > > 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) > > > > dev->data->dev_link.link_status =3D RTE_ETH_LINK_DOWN; > > ad->pf.adapter_stopped =3D 1; > > - hw->tm_conf.committed =3D false; > > > > return 0; > > } > > diff --git a/drivers/net/ice/ice_dcf_sched.c > > b/drivers/net/ice/ice_dcf_sched.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; > > > > - /* 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; > > } > > > > @@ -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; > > > > if (!error) > > return -EINVAL; > > > > - /* 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; > > } > > > > -- > > 2.25.1 >=20 > Acked-by: Wenjun Wu Applied to dpdk-next-net-intel. Thanks Qi