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 908BD425B2; Sat, 16 Sep 2023 12:07:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7CEC840298; Sat, 16 Sep 2023 12:07:44 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2074.outbound.protection.outlook.com [40.107.21.74]) by mails.dpdk.org (Postfix) with ESMTP id D822040291 for ; Sat, 16 Sep 2023 12:07:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CdS7f7fLXrQI0Lih9vtTtWHVwHPNqDH/sVzG0NOTF2s84QNY0nYLR3yCy4Lx3a2qjkWFIU6ipYAIQUtou5VsS13OybyFfmQQTY4aLqSqtGqm+8wH215TLHxUjIaimvJtSpiK9lGmXun0y9OGkb5PpXZWdkW5CCusPWa95opTfWzyEoQfp1zk8IBfO7Ssd4XoYXt/IaaG8YCLkL8Y+KV/pYIQm8cIBRu5+i5O8hI3TH0a6CQnhRUO3LQa/WABdPZqu220tqRVpEU2TGcvGrELd83LuZRnCjQTJicUQ20Tmuj9sJv33OOC5A+zy3UiKtpZo/r6ulmdWFTOY3UG8g0xrw== 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=iwY4NzCgNd1zC+CyyWxEqKAkjvm9HXiYPYSFVMY2W70=; b=ltSMel/8fqUVK2G6v9pvtRQLSo6WF3k8ivVcGe4lNNqPU2ILOrGFiCN08QTofWE0CoWm7zRrso0gEHwINFcUlxSlxSVHfbeYhUXT+bbwm18+w4WAHllOMEpSEJkGgKcVdX8+xkqS01dvtXs8kGhUZi+GnZnjY0PTdUeP+0QVqTNmPIfEIT3mWrcLrltoeRb/ts/u56m/lsQe8AD9u03VNEPO0+ZREiHrHesX7AsZzhLI3Z8L5gCVw/bgL5yvrnvmn9NgI0nYLlyBFJR+CB+zPPsxUXHZgSYRpER3ezLcrCpQR7duUJa9EVhC9Vmd6+PccT8pBiUCcyQegEnboagQ8Q== 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=iwY4NzCgNd1zC+CyyWxEqKAkjvm9HXiYPYSFVMY2W70=; b=IRaxr6a7fVY+X1ua6LjdxHaC7xRj0i03SBu9GaNuPALPCxgRY//FXbBVYqYgBB9u5xhHlQO8CwDbi5/cvoYv1/HSF0ukT3CigAUPw+leMWG2lEAokFY+aXeNY/QvBzOEVORaYi/K0iU8UWFZXPphr4gpxzSNowvI3IiBcrIpaew= 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:41 +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:41 +0000 From: Hemant Agrawal To: Jie Hai , "dev@dpdk.org" , Sachin Saxena , Lijun Ou , Ferruh Yigit , Konstantin Ananyev <"konstantin.v.ananyev@yandex.rukonstantin.ananyev"@huawei.com>, Thomas Monjalon , Chengwen Feng CC: "lihuisong@huawei.com" Subject: RE: [PATCH 09/36] net/dpaa: fix Rx and Tx queue state Thread-Topic: [PATCH 09/36] net/dpaa: fix Rx and Tx queue state Thread-Index: AQHZ4kghWcKZF54KIEq90g2NADV6ULAdRqzA Date: Sat, 16 Sep 2023 10:07:41 +0000 Message-ID: References: <20230908112901.1169869-1-haijie1@huawei.com> <20230908112901.1169869-10-haijie1@huawei.com> In-Reply-To: <20230908112901.1169869-10-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: fb520f1e-fc15-4bd4-9bd6-08dbb69cc38f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aOYlORI0y2yTdJ/Er7eNyNLR0tDSDP58Wv7YVeysNOokr0Ev+1b/mHgG+3Mbn3lr2c/xDLXd8b+b4WpdgvXgYHlgUHSisL1zbA+flCFC/ymJqOjiwBBVwcJpZMT53kzVVDlmQ7fMDmclXK/HtOC8rtV9rvIthdND10od/Z61nXlc9mfnZ7Um6OoD+HPY3v3RiNZEvA/dp+CzQrLhpV9i4cJ143u8Avw16+v2EeUiHAeQhxp/+pEhJddcMk76iFUWazJ2J7L6DiLibW8yAldNAduTo3704bda0rtgADn09J00OBbBehOgZ5NcDK/KURIABnL1iGFksR8+CdVoR4P+2GvfPLao75udl+ISH7x6mnLbfydkhx0MtEr1XNI9Qc4kiig1IzHWrFa579ePV3VgnxDiiK47Bl5U7rlAwXfJfhf3r13+xgWLIwIS6YFzKbDtdht37mI0ebSzMgsOkHApOjrnp0vKMrVqKKS2GBhNV+l2ij/FwN34lfEAGNQ2zFPPG+cRHY+XZWhcW+swyYVOaItNmZBabnZrKqGC8HvMhlSP+KfClJNFb7kWXHzaqZvjGWChE3WDk0UahwPSe2DeLq5f+8aBwcn51lmVko9b1aH4h7pHIfZ//JFkFx2wppVh 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?vK0yiaWUtn1PFS/xZ74S3CUX0ehVuHy4Ib68Xf2vchE+0Bd8ZaCtLyv9KeYn?= =?us-ascii?Q?IDIhc7TLf8yMgWLONH4p0hMwNNp413g7/aLCgUB30HJwFO3e/nG+DrJA69lW?= =?us-ascii?Q?YkhtCSBVPE74P/giNpkGB8+UU96rFWiqUhNYWvUBCGHLPMX8MuZHXllHolvY?= =?us-ascii?Q?aOCbEtCedYO5N9JWXzNxaad8OyXSoEPjzNtwATq9mtH06oFUDff880lX1IIT?= =?us-ascii?Q?5CgCMWY7flob5MkeF4Qeuy1MQj5QgvTQZZYXb3Lrgpp8l0DtPFxOKmZVAK+3?= =?us-ascii?Q?8uqVofh6TnoanEHz+Mfbp17WF6NB4g4hEaXg6u2VwA0RoB6KUNVXyz0MQe6c?= =?us-ascii?Q?GcjG2C59Djpas78V/of0b05H7hXrlEkyKIOkCY1hl5mG/1/x5BFWx3P47beR?= =?us-ascii?Q?xfows2My14U0Q0P0Kx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CwWf?= =?us-ascii?Q?z0Vmw/GxZW9c5YrqYKY999Br+BAyGcVRwcMTlIr7neLsUr0fc8fhv8liNQsN?= =?us-ascii?Q?PNSZI/cSiXOAfchlwbjSXRUuK5HpIvsIE4Q9N8Bm4JnlCcTAWwwyt9WwWsyl?= =?us-ascii?Q?6HDbQIrAelnRqTdkrZZ0+l8s8U2UJuONCbkpVily7rANHwKHO8+sqGlFSYb1?= =?us-ascii?Q?ChubcMQkGF+wk7zpYxpbTX1vbmuDSHSaDou4RDP1eFjQcxkEdoben00Y0RzL?= =?us-ascii?Q?crckKH5uYsyveGLgp6OnxkIWnaTypO7T4zl56lWa?= 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: fb520f1e-fc15-4bd4-9bd6-08dbb69cc38f X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Sep 2023 10:07:41.4894 (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: GUiPDQLxyRBep1EvBjbkfla6/fbx/Y4mQ1atyObedDr45rF0qZWUcRZL/eh3tOARNNDR93y2jbLJmLA8CL5x1g== 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 ; Lijun Ou ; Ferruh > Yigit ; Konstantin Ananyev > <"konstantin.v.ananyev@yandex.rukonstantin.ananyev"@huawei.com>; > Thomas Monjalon ; Chengwen Feng > > Cc: haijie1@huawei.com; lihuisong@huawei.com > Subject: [PATCH 09/36] net/dpaa: 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/dpaa/dpaa_ethdev.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) >=20 > diff --git a/drivers/net/dpaa/dpaa_ethdev.c > b/drivers/net/dpaa/dpaa_ethdev.c index a6c86113d125..ef4c06db6a4d > 100644 > --- a/drivers/net/dpaa/dpaa_ethdev.c > +++ b/drivers/net/dpaa/dpaa_ethdev.c > @@ -399,6 +399,7 @@ static void dpaa_interrupt_handler(void *param) > static int dpaa_eth_dev_start(struct rte_eth_dev *dev) { > struct dpaa_if *dpaa_intf =3D dev->data->dev_private; > + uint16_t i; >=20 > PMD_INIT_FUNC_TRACE(); >=20 > @@ -413,12 +414,18 @@ static int dpaa_eth_dev_start(struct rte_eth_dev > *dev) >=20 > fman_if_enable_rx(dev->process_private); >=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 > static int dpaa_eth_dev_stop(struct rte_eth_dev *dev) { > struct fman_if *fif =3D dev->process_private; > + uint16_t i; >=20 > PMD_INIT_FUNC_TRACE(); > dev->data->dev_started =3D 0; > @@ -427,6 +434,11 @@ static int dpaa_eth_dev_stop(struct rte_eth_dev > *dev) > fman_if_disable_rx(fif); > dev->tx_pkt_burst =3D dpaa_eth_tx_drop_all; >=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