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 C6497425B2; Sat, 16 Sep 2023 12:07:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B7A5C402C1; Sat, 16 Sep 2023 12:07:50 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2078.outbound.protection.outlook.com [40.107.6.78]) by mails.dpdk.org (Postfix) with ESMTP id A3D1C402BC for ; Sat, 16 Sep 2023 12:07:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lBWGykXhSDO4owVjrCSga0TWe5B5WcPJM2vIAGK4z9FyDf0xBxqROVnWGXqcftrKUTtIP4FBAlDJ9ML4BqguKwfQvqL0k2DEGMxJ7iUaR/0BNjNAZP5acA80bFSdPZLpuLt0UTHPTm1ep4ZV+qxl/srrF2wiB6g1u2jJXJhpNfRVxAcz3sPvAxfyzHn3LSxbTxCBJwHmZGElqVBwIS2TRECDSDLNMX1Ua/Cy08Swy1GWGgMzvaHU4OxSXuEVmXYhGlr/zAe7nQQglN83UQ3QTcZysMs129RD3J8VH7OjEQFceWhhso2tmbUzQCwonF/Qwx63WurT+O91Hd6kcucaFw== 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=KWCqvnFhG7tsLU5LjNiRZkyIowClbenhDXZWYk+qAYU=; b=WtzBTyn15zm2kCqyPlqIUMKF4qkjwC/QTmwJF6BJuCwJp0P54nI1YLmhf7nVAM5aid/U8GKlkrh29C1LxNVlNYEYGvqGrO2IlQgGa8MTeNlvX/CAayRWs94SJ86keneYdx3jhTbxBb8SE/hrVttaDMK71csC0k9vsqA0a5AkpH6PnHCG44WCBrkD2OgSrM3yUrAwFPa3miovmZF3oJKCKBjHbfvwUQC7Dd3Fzt4EB6a7sUG4DTDdNeuYUwCjsSTsWIcjB9aEnMiR8YyD5OgLzynBDbmFnbwTyMH+OLAy/AVLWZryrgxrd1LgpnMZEBNbircZ/hxQBcwDco5OY1+49Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KWCqvnFhG7tsLU5LjNiRZkyIowClbenhDXZWYk+qAYU=; b=YjAbe3zeFxgc9WibvGkhp2LholHSxOpC0BpS8/oYT5hSXQszO7zFh3Zk3E0GFP0eDIkpA5jxcu5jKm42GOWVyQvIdY4oCc+2txOEvKQc1h1xVhNYBtryw7q7X3SEd7+KYqZN8nWe9poF23oNfoz2u/g/t8/MCaAJxqmO807FhSw= Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by DU2PR04MB8536.eurprd04.prod.outlook.com (2603:10a6:10:2d7::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.23; Sat, 16 Sep 2023 10:07:48 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::450d:89ac:4f6a:6ae2]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::450d:89ac:4f6a:6ae2%4]) with mapi id 15.20.6792.021; Sat, 16 Sep 2023 10:07:48 +0000 From: Hemant Agrawal To: Jie Hai , "dev@dpdk.org" , Sachin Saxena , Thomas Monjalon , Konstantin Ananyev <"konstantin.v.ananyev@yandex.rukonstantin.ananyev"@huawei.com>, Chengwen Feng , Ferruh Yigit , Lijun Ou CC: "lihuisong@huawei.com" Subject: RE: [PATCH 10/36] net/dpaa2: fix Rx and Tx queue state Thread-Topic: [PATCH 10/36] net/dpaa2: fix Rx and Tx queue state Thread-Index: AQHZ4kgh90vithH4UkKfz13U3QNeJrAdRrUA Date: Sat, 16 Sep 2023 10:07:48 +0000 Message-ID: References: <20230908112901.1169869-1-haijie1@huawei.com> <20230908112901.1169869-11-haijie1@huawei.com> In-Reply-To: <20230908112901.1169869-11-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=nxp.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PAXPR04MB9328:EE_|DU2PR04MB8536:EE_ x-ms-office365-filtering-correlation-id: ef7960d7-91f5-4cd4-fce3-08dbb69cc7d0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LNqgN6YcN7a4f9Ejt5xMBNwHuw79ndHJliS+tHw4qqAiyoAa+Pu2AwuW+5iU1a78hANEqNdN8yJiEtvvzC3xwVKQ2E8gzSiiJh+51iV+9z0tqKB1FCCmZjozndsEA+BBMdgJaU1Hz4bN8/CFyIhz6FEFDPk7wpMyi02WvuW8M9nfUABuHStDl6Yn+nojAHvOZIhNobsVv4VWDI7eL9Ufdp0WxEaH5itflDfhy/c82p5EYm+BfVvyQOWAKFcBy7VYBPfuSXK/kcs/m1acVQskMPdYguLvKDxttLtUAGpSnSfLNpqjQwZGptDpmALvWnwFVucRDY9JqEqrghFOgclTCjz2I6CjasHOQWIX5BvolDa/kxzKwLWv4Hvg71ONl/jjnQ0mnH9p2lpEEWSl5YE//xKmQagF8We2rSxVxKYkh7TBNn7oe0Xv8a8dWP6GdCG2gu9FvImRw4OUbDugT91Q8Vx5R/IhgwQNKWJ3RRePjfRpErXG2k1zEApinyQxx22cvcZ0WRj3gXHU7HcSBfnAwfF+CFP1tPIzqwbepStbNTZNkuAxAosmY1qdgMe6+vmit7fOTF8tvJcvJcQ2r7Jj1XCZxIPF5L0GJqsnxbxxbRUux7woTV4eQX6G7252kRTc x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(396003)(376002)(136003)(346002)(366004)(186009)(1800799009)(451199024)(55016003)(2906002)(83380400001)(38070700005)(38100700002)(122000001)(53546011)(55236004)(110136005)(71200400001)(478600001)(6506007)(7696005)(9686003)(5660300002)(4326008)(8936002)(8676002)(52536014)(76116006)(44832011)(316002)(66946007)(66556008)(66476007)(64756008)(66446008)(26005)(41300700001)(86362001)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?NpdV9/3XBqCjfPBRwwHS9t6bp8lXy0Vmbu8SSo0yCYVp/ouBGt2vAp2fqbI6?= =?us-ascii?Q?2/175UYqlzsw2cp3yJuuvOSGXsCc9gwtjV3AHBrYpGzkfn2MUJ0joQH4XL7r?= =?us-ascii?Q?OQla87QcFuRCbc2YEJRduOuAU8D03zTgzdbVFmh+lZZDrL9te4YqdW4dJAnM?= =?us-ascii?Q?UJggai8FjUqi5ti0MFc4sX+hj824UKlOYHShaSrWm/P/y5YwyifSfNEj8y0v?= =?us-ascii?Q?fVn8JKXnD1/94R9VTYXyjDvDcIGh5mi6E85zqia5Y0siLUedOEjuTFqKP66x?= =?us-ascii?Q?f4K5qrL+5vG0K4JMR4ymWZUK+5BFo33PFHvcNYM9JgRETug9jc8mIVZCGHWr?= =?us-ascii?Q?b8rxFLsp4YekFnrMFigFidhrupDgzShBIy8N2Lxu6uPST8TkWUI8zhdxqtsD?= =?us-ascii?Q?RsdDZbUuCQtbDbrd/0fcD/APQBviJhTmJ5Rf4FLAPQldVoPePMIPGOMCr742?= =?us-ascii?Q?TlHAxlDzZnFiTuBup2/J75LJUA9lVBBo+N9LDwE288OsXsPWXFBxra6+OBub?= =?us-ascii?Q?O78UDK+xWjkgZd9ZTjNWsRkXqHTZY4MzwTbYn/ZNL9N+8mMb6XAisU0yVx2O?= =?us-ascii?Q?cloCOc52XvSAqcwuQDrZPbRyjvoZ4sYtUxubaf90WopkQ6pdpJwqT3a9WzqF?= =?us-ascii?Q?GZErxdJH55fpPIA0elMqQelNUNLLDyfGmnXSQnFAabKLS6AmBWubvXjAMVoK?= =?us-ascii?Q?Y/gnl8f1QEwbHqyHtW6J7W5misMT6Kgj9OLPBjlOzXf0H7II7y8umxGii09B?= =?us-ascii?Q?WRNdnmjnkS1X3Hr2SYXmEebI9arhwLFvpgV70GrppreaZWzu4v5ySsWGRBpO?= =?us-ascii?Q?a0edXPMQSWYiuRycqVp2WIql67sA49APIDscUKpBigabc4MtHcza55teeKsh?= =?us-ascii?Q?G2xrY9sEx0w/ZfbDP2hgGxB6cfUpPet16ycwAXhYl6mo5/6lAcqH6KHrKDxB?= =?us-ascii?Q?euJ+xjNAXrjZsdxfeaBXgBabosLsNTZPodv8k6/5q1/niTosh4dLsYV1pdS3?= =?us-ascii?Q?HPkJ8NOd2NcpF20a0Gxa9lImzbHBhTe6/1knxB3CPEcuGUkiktPet/S2EkKn?= =?us-ascii?Q?qyk3Dj9YqsC9/ILgtDv8Um/bsTG7io5CjlEVT5hhCnZf+QB6kUbtH3n5OYN9?= =?us-ascii?Q?eS0SX4EvE8JBFGe/fDn+qAe50asX228hGKe7G9zZlCoAqe+h9H5sC9ourSWk?= =?us-ascii?Q?Poma7V1I4lEGcXYBiD9zcKfETozBNuzfXRSU6oQ0mu4g6oXscmbITA7bX/0m?= =?us-ascii?Q?UKod1w0q9hUC3cqe6BBTJSdhYQsKOjzMMfN1xAgkveHd09gj1H1ftlaefP86?= =?us-ascii?Q?MPPPzMgIuuwrmSK/b+oIzkxnf8wD2rW1XUM+sJszn917LdHHTCDnFlDlave3?= =?us-ascii?Q?5/ia6YkNmdCIxV08DyXAxCKU0axgKqBkRJzWHrwvxGcJUplJqTTxQ8mFfD08?= =?us-ascii?Q?/sJY9P1qM184LMJOBicAgAr+f8sIrb7358Zw7bQQY7fjv9dhQ9rlNKQBx3UH?= =?us-ascii?Q?QDPEveIB0INcVDhg6ZA3Nve60EanFw/jglm+S3DAy/QaDvFioOIlBnaxeQTh?= =?us-ascii?Q?olKP44dF81H5R3WfBuZYhNUsPM2t4Hoaw+W3rLzU?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef7960d7-91f5-4cd4-fce3-08dbb69cc7d0 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Sep 2023 10:07:48.6519 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: HKuB+36hfllX7WehuGsIUD4fNnBhNNR7MTii54BCtaGesz4wi8uxyZtubhuKSoPNt8Z07vrFJy7OZhq+Esyn6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8536 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 Acked-by: Hemant Agrawal > -----Original Message----- > From: Jie Hai > Sent: Friday, September 8, 2023 4:59 PM > To: dev@dpdk.org; Hemant Agrawal ; Sachin > Saxena ; Thomas Monjalon > ; Konstantin Ananyev > <"konstantin.v.ananyev@yandex.rukonstantin.ananyev"@huawei.com>; > Chengwen Feng ; Ferruh Yigit > ; Lijun Ou > Cc: haijie1@huawei.com; lihuisong@huawei.com > Subject: [PATCH 10/36] net/dpaa2: fix Rx and Tx queue state > Importance: High >=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/dpaa2/dpaa2_ethdev.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c > b/drivers/net/dpaa2/dpaa2_ethdev.c > index 679f33ae1a08..8e610b6bba30 100644 > --- a/drivers/net/dpaa2/dpaa2_ethdev.c > +++ b/drivers/net/dpaa2/dpaa2_ethdev.c > @@ -1278,6 +1278,11 @@ dpaa2_dev_start(struct rte_eth_dev *dev) > if (priv->en_ordered) > dev->tx_pkt_burst =3D dpaa2_dev_tx_ordered; >=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 > @@ -1295,6 +1300,7 @@ dpaa2_dev_stop(struct rte_eth_dev *dev) > struct rte_device *rdev =3D dev->device; > struct rte_intr_handle *intr_handle; > struct rte_dpaa2_device *dpaa2_dev; > + uint16_t i; >=20 > dpaa2_dev =3D container_of(rdev, struct rte_dpaa2_device, device); > intr_handle =3D dpaa2_dev->intr_handle; > @@ -1329,6 +1335,11 @@ dpaa2_dev_stop(struct rte_eth_dev *dev) > memset(&link, 0, sizeof(link)); > rte_eth_linkstatus_set(dev, &link); >=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