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 ED98C4255E; Sun, 10 Sep 2023 04:56:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB26F40267; Sun, 10 Sep 2023 04:56:43 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 55B4E40156 for ; Sun, 10 Sep 2023 04:56:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694314602; x=1725850602; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=3+JDMPG8knO6tY8waWYblWIatiUVlYUd3bAxAOAucSY=; b=iBPIWR+oxbrwBpbZ1tpaxqBuALV76o9z3xZyVAv1OCNcf5Y5If/aR9Kj H7DmMJNHrdXMZgwkd3XOvm5RMpBwjxzokP5z+mnQEQfnTP875U6K00bu9 pGW6XVZUBXTdL3rSHjgx6aIvFLK+Q5CE1ZwMmL/DoY2h1hH/Qvfudq35T ySzddARyUr5RwQO5v9SswhL+lw79R31kwPlmDHFHiqtH/NNWjuWUaFFFC NBejs90FiwwQ3tiVppQX4Zdz8+Pc7SZ3FwlrJVsPsmcLEXLyizzfLRLHz Dzgt20xb1DHJAC14jEnR3xb+pgmO2JVCgDu3FyC+EK51AOi0CJ44ERSiE w==; X-IronPort-AV: E=McAfee;i="6600,9927,10827"; a="441876055" X-IronPort-AV: E=Sophos;i="6.02,241,1688454000"; d="scan'208";a="441876055" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2023 19:56:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10827"; a="886071723" X-IronPort-AV: E=Sophos;i="6.02,241,1688454000"; d="scan'208";a="886071723" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 09 Sep 2023 19:56:19 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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; Sat, 9 Sep 2023 19:56:39 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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; Sat, 9 Sep 2023 19:56:33 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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; Sat, 9 Sep 2023 19:56:33 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.170) 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.32; Sat, 9 Sep 2023 19:56:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=le2PzyIJthMLirU7/G5Xkk6pzoHac4biDQsIbXu4xrtDQx+FE84SXbdZANMttUGgExfZPWgW5wk08qW5u3dejCfHaVjk9dsBC0K29mMHTGMWbbqlEG1zq4vu52BuVKmiFxi1Uit7r32U7pos3YRmqNVBpouQNJ4W9iaplJ1K9rEutXZ6nAsCwWfdiM49YH3tKTM7pFvEK+k9cebUKj+oPB+NCqPVe29lnS+R8i8Z1TVvST7xhgzBHA+rIrSE0XFYwXmfvzp4bsOxIOixahKdYdRFfVyym6S8iF4lcRNXfp1U+3UFbzQY7YIbtiFtkFOnkKdF7gf2AAxZVpInkgqQiw== 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=tql1B/LLe7cqAqJnmVWocPx5tA0ib2AZBi1335DVUCM=; b=YcW7k7Pu9UC0YF4EFk9aK4wz+67AAM/5EVBxfHpv9TcQtIum2PpB/l+fJrIg2T4FIdiOtypUqnOvIaOENh7ck3yRlu/zo+7+tzYsu5zEmw7djFIkpVDoGsqmgcFw5qVEDTxXFwVk2CXrW27lCpF06a6LSEGgRRAJZJkb0MRLkK0W3f/0NNe5m9pT3RJgI2JKPcMQZL8ZxBGSeR7tGYwT+FjfJ3M33Ui7rvKLZcCyIVNx+o5dcwQc5Y4SUwOMDtTqKgIHBiB2+4X05C3yu/coNONRO1JuZb9+O5n1bbljitAblT7wC5xb3APvdTUlskXv6hWdLGjKUarIYUr+uyBmOw== 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 DM6PR11MB4252.namprd11.prod.outlook.com (2603:10b6:5:201::26) by SN7PR11MB7665.namprd11.prod.outlook.com (2603:10b6:806:340::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.30; Sun, 10 Sep 2023 02:56:31 +0000 Received: from DM6PR11MB4252.namprd11.prod.outlook.com ([fe80::fee:3776:8638:1df4]) by DM6PR11MB4252.namprd11.prod.outlook.com ([fe80::fee:3776:8638:1df4%5]) with mapi id 15.20.6768.029; Sun, 10 Sep 2023 02:56:31 +0000 From: "Xu, Rosen" To: Jie Hai , "dev@dpdk.org" , Ferruh Yigit , Lijun Ou , Chengwen Feng , Konstantin Ananyev <"konstantin.v.ananyev@yandex.rukonstantin.ananyev"@huawei.com>, "Thomas Monjalon" CC: "lihuisong@huawei.com" Subject: RE: [PATCH 16/36] net/ipn3ke: fix Rx and Tx queue state Thread-Topic: [PATCH 16/36] net/ipn3ke: fix Rx and Tx queue state Thread-Index: AQHZ4kgqHXoRjsJ3oU+DZ9QyNey4T7ATYCGQ Date: Sun, 10 Sep 2023 02:56:31 +0000 Message-ID: References: <20230908112901.1169869-1-haijie1@huawei.com> <20230908112901.1169869-17-haijie1@huawei.com> In-Reply-To: <20230908112901.1169869-17-haijie1@huawei.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: DM6PR11MB4252:EE_|SN7PR11MB7665:EE_ x-ms-office365-filtering-correlation-id: c252f75d-30d8-43d8-13d5-08dbb1a98964 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Qt9XzXHpBEeRWzjKRX2rjEspjJZm5JTAUt/j336MRwPtdLYNnDB8Rzd+9yis9rp6XOLvWrA0F4BxiUGnU40sxbMW/7/gp8pk6zzQ0ayRVExdpXRMkfUa6CIVeWY1AlBBETcrf55VEKJaHLtmLxN6KR0mCjpSNrUUfcmsWFYD5NqcKSUAsGpdw8/6OVviqaJq1jU0OaM4whgmtQmjxye3xocweDNJ/pEomueyeaZusMLiEV7wd2HX+l5ihrQu6zJSsYK0IzUAVLH6WZwoR/3xtgKzBmrHy1Ckm8BUDL017tYuBcgqXnp5N+aufl7LwoP+EyL6UCjj3EOlwRpAO9tWQ4aAGQgHZyABFWnKMeXXR1P8e0/v3FvNgjgyDc05h6cL5io3yHNdKP5FKDoiXSMpw/acL3pgIHygebX3VkXTNPkF7KmIogjdhW1IpSifduV4AQFhyUfOaad2NndGW+HUVLEV+SZfxr8z01e4Bk0edv1bhst1KXF7US45wcMeZBoEcHPvedUKdlMfsfRJAW4bH+0vPD1IGV3efGowSSdZYaRW9fgWf3eUCytgWndgtzEZmmWpMzXmYQQJ38BAHXyI582SRZqqjgQTd5Gp0hJD0ZuT189bkrhv8+aXunkFv1Ht x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4252.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(366004)(39860400002)(346002)(136003)(376002)(451199024)(186009)(1800799009)(2906002)(52536014)(55016003)(26005)(316002)(41300700001)(66556008)(64756008)(66446008)(66476007)(66946007)(76116006)(110136005)(478600001)(5660300002)(8676002)(8936002)(4326008)(53546011)(6506007)(7696005)(9686003)(71200400001)(83380400001)(38100700002)(33656002)(82960400001)(38070700005)(86362001)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?r1KUA2+h61bI49LisusziB+bl15T5IOgc/kF+dLBzv/+94N4vZqJfUpebxh9?= =?us-ascii?Q?vxUbQIsFCoxV9kW79vGhNqZsaijSKiA3gRZmzKuu67/pi7Lm8IhjlJ+bIzhW?= =?us-ascii?Q?kHHPAtBpKeJoD2H6GnDVodi1FQMnasO+J0TBEaQ6sAqgiSuJLXnB+UVoPYcT?= =?us-ascii?Q?hIbYNgp1OpPPzrcxUlYtez6lfWlFYrGVil6Qyt4BaYc0zrA5gmytVPlosLSv?= =?us-ascii?Q?n4lhweutaP9paEOMlkIja9AIigS0jpjsPdvVJbbQFYvgWZIJ0a9D6DDI3pgx?= =?us-ascii?Q?Sv8mNdowgcXCV1FpjWrJj1wLcCBWwU6OvjcuGjbnCTZqgg4iqKxnQLJpQVdK?= =?us-ascii?Q?UfQBV1CoQX6srpzTSe7nN02BRcGXGFQ0gsSJWz7boqaTZzIU0Ht7Py/Jc1nR?= =?us-ascii?Q?Jo13LvlaW1Lups/kdTkBhVFHDhoFbF0x7BJR5SaJ2cxY/k9aMKsZeApKxns2?= =?us-ascii?Q?d2ZlxSHxcwV2e5jvInFIS3gIpFOuk5lSxSkqtUUuKJdR0UMI1agD947SXBgO?= =?us-ascii?Q?uO1SfmWYi1f48yxmmmvfRiao27a1Y9e/SoXsweJt/oXkSHpJifpCUCbKgP12?= =?us-ascii?Q?lD61QKL76a1ndoq//9I/FVFdiyr1bh7GUlqxKAcmKTi4G0zZa/fETrnALNgx?= =?us-ascii?Q?3byBF1i7w6U5HXxZfiywigSzCBT9TsrjJrf8HkR0StLXwCivPAjKGlUDsh4R?= =?us-ascii?Q?fqVJTZu609ynGBIrf1ZWSaxMPfjrwbEjzeDvkvqTh74819ig68QHed36iYN9?= =?us-ascii?Q?Jebi44qehb3NZUkzWlVBmib+6h+xRJ+44b/J4o0PAUlVogi97Aa3iAS/GEXQ?= =?us-ascii?Q?XP/KxVH4vVy/k3DryGNTTacAwQPzYkTxg/J6xNBVulkIi3B+4pKlBiHAslOi?= =?us-ascii?Q?W54xLemyReF5NC3ZhBpphDHe2EYnUeijg6C3X4sqINx9sulvIWlETDsGEQ94?= =?us-ascii?Q?sUxFtjki+vJkKeWtv28kIevCxraevKZlviiVI5Dd3LUc5Dty3IBsVNSQIwpA?= =?us-ascii?Q?9Tu7hG/KQx0n+FDueqCX9qFFcm3eIU1DqDhXpGIlyoputcsLYo+BfsHdfP6I?= =?us-ascii?Q?gKiLLxmiSrk7H2wzFCXG1G6YpGSxIPToo+2haEI1FUhaSR7dBNbZ2x32kkFh?= =?us-ascii?Q?ROGhWSdao2I4jqr+DfENie/fxS+/X+czJmFb7if72Wl80RFy/78MtYes9Zra?= =?us-ascii?Q?zIxKuxJkLPU2hUSRe/V/2rkCi/epMceP5AdFun7ZyN4g42loJpBieGZRnsXs?= =?us-ascii?Q?K+7XEFsZfDUYmL2eQvHN7mdGNixaFW+HzFV4Xsf4Mlr+KSImZ5j+sisV38Rw?= =?us-ascii?Q?zht1A0YcvmzBdOfwbsX9wOy2jwuWBw5LkCr00yh775a9NtWy/UNudZJ9Fqm0?= =?us-ascii?Q?FMpEh6B1SUAsnQvlkJQrkl9n3fHhlxuYux2YmLFvpFPM74L9VgeVNipUoD9a?= =?us-ascii?Q?2GykpCm7PImjJ+IRZ+Lzk955Nm0WrJcpM6lCZe0gtjsjy669GR3NUajqgTNa?= =?us-ascii?Q?YbBXD30IE6DimGv5tVVE2hJ3y/+MQJNpyw7gMZ/92FBVlEc5pV0MjuxSJtyZ?= =?us-ascii?Q?jBqOhMolUlFxMlx5GAc=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: DM6PR11MB4252.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c252f75d-30d8-43d8-13d5-08dbb1a98964 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Sep 2023 02:56:31.5204 (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: +yf4/HNGSHnRpO46T4S7cl3q/OlVbF1s6weX77vzwCmYaW7Av58dq7MNCWixUKjuD4FT3xcf+z/zf5GGLT+iPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7665 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, > -----Original Message----- > From: Jie Hai > Sent: Friday, September 8, 2023 7:29 PM > To: dev@dpdk.org; Xu, Rosen ; Ferruh Yigit > ; Lijun Ou ; Chengwen Feng > ; Konstantin Ananyev > <"konstantin.v.ananyev@yandex.rukonstantin.ananyev"@huawei.com>; > Thomas Monjalon > Cc: haijie1@huawei.com; lihuisong@huawei.com > Subject: [PATCH 16/36] net/ipn3ke: fix Rx and Tx queue state >=20 > The DPDK framework reports the queue state, which is stored in > dev->data->tx_queue_state and dev->data->rx_queue_state. The > state is maintained by the driver. Users may determine whether a queue > participates in packet forwarding based on the state. > Therefore, the driver needs to modify the queue state in time according t= o > the actual situation. >=20 > Fixes: 9ad9ff476cac ("ethdev: add queue state in queried queue > information") > Cc: stable@dpdk.org >=20 > Signed-off-by: Jie Hai > --- > drivers/net/ipn3ke/ipn3ke_representor.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) >=20 > diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c > b/drivers/net/ipn3ke/ipn3ke_representor.c > index c82f8b533370..d904d3f251e3 100644 > --- a/drivers/net/ipn3ke/ipn3ke_representor.c > +++ b/drivers/net/ipn3ke/ipn3ke_representor.c > @@ -120,6 +120,7 @@ ipn3ke_rpst_dev_start(struct rte_eth_dev *dev) > uint64_t base_mac; > uint32_t val; > char attr_name[IPN3KE_RAWDEV_ATTR_LEN_MAX]; > + uint16_t i; >=20 > rawdev =3D hw->rawdev; >=20 > @@ -190,6 +191,11 @@ ipn3ke_rpst_dev_start(struct rte_eth_dev *dev) >=20 > ipn3ke_rpst_link_update(dev, 0); >=20 > + for (i =3D 0; i < dev->data->nb_rx_queues; i++) > + dev->data->rx_queue_state[i] =3D > RTE_ETH_QUEUE_STATE_STARTED; > + for (i =3D 0; i < dev->data->nb_tx_queues; i++) > + dev->data->tx_queue_state[i] =3D > RTE_ETH_QUEUE_STATE_STARTED; > + > return 0; > } >=20 > @@ -198,6 +204,7 @@ ipn3ke_rpst_dev_stop(struct rte_eth_dev *dev) { > struct ipn3ke_hw *hw =3D IPN3KE_DEV_PRIVATE_TO_HW(dev); > struct ipn3ke_rpst *rpst =3D IPN3KE_DEV_PRIVATE_TO_RPST(dev); > + uint16_t i; >=20 > if (hw->retimer.mac_type =3D=3D > IFPGA_RAWDEV_RETIMER_MAC_TYPE_10GE_XFI) { > /* Disable the TX path */ > @@ -207,6 +214,11 @@ ipn3ke_rpst_dev_stop(struct rte_eth_dev *dev) > ipn3ke_xmac_rx_disable(hw, rpst->port_id, 0); > } >=20 > + for (i =3D 0; i < dev->data->nb_rx_queues; i++) > + dev->data->rx_queue_state[i] =3D > RTE_ETH_QUEUE_STATE_STOPPED; > + for (i =3D 0; i < dev->data->nb_tx_queues; i++) > + dev->data->tx_queue_state[i] =3D > RTE_ETH_QUEUE_STATE_STOPPED; > + > return 0; > } >=20 > -- > 2.30.0 Reviewed-by: Rosen Xu