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 98E69A0C44; Fri, 16 Apr 2021 11:19:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 704FE141C11; Fri, 16 Apr 2021 11:19:50 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id B3225141C10 for ; Fri, 16 Apr 2021 11:19:48 +0200 (CEST) IronPort-SDR: O8qiiA6NrPmNbfAFL7UUJrFK58vqkGe6jdnAquDSseeQmj2Zytco9ga/n1Kqy4djr5jkh1pH1T 2myi5hstC5dA== X-IronPort-AV: E=McAfee;i="6200,9189,9955"; a="174508811" X-IronPort-AV: E=Sophos;i="5.82,226,1613462400"; d="scan'208";a="174508811" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2021 02:19:47 -0700 IronPort-SDR: 8PrsCXUKEMfhe4U1bVIRglrRGVUoZY6tFJv8zuUfKYUi9IRVYGFQ68/fpmP4pXzsL6Rv0OAAQl rzjsGHtcNmSw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,226,1613462400"; d="scan'208";a="453277340" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga002.fm.intel.com with ESMTP; 16 Apr 2021 02:19:47 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 16 Apr 2021 02:19:47 -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.2106.2 via Frontend Transport; Fri, 16 Apr 2021 02:19:47 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) 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.2106.2; Fri, 16 Apr 2021 02:19:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GFaQv+cT72BIPNgVuH409bZQ0GFI4UBqUV1h90MfWMOurckhIC6BF858l1TRqOOYT6OhP8UC0x/lrIixG9yARFvXx+dTxT69cAMKoe4is+2suXOZ/XcK6kIoLH10rU1ouQO2nxJsDVHirGH/rfoR34gUxu3q/0Bf9lyALu+h3TF7W+rn9KXOYGGBFTF+alyGrXamagKJeg6wuUSUZwJh0hJ8k4SUJTex8pxDsNVxVM1nslm0ZIPMVSbxr+0cQq5gUxnhK+ioIKYz21cSpB1h0ACj6KqfQ5INAqK/27+D2fczNV69B30xmk7CJfSeuMJqA1x4id0wqcCMmWck0QnZCg== 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-SenderADCheck; bh=x2hUubDcXb41j7E73VL0VNqCTFgOhAttTc8ZD3iVeFc=; b=NnJZtvjrzbdCRTwqZNWdTT3iXxbmP65khKhkWev8Ns3wJ3POQQPFI8DPH/BP8CI/AnjCRI6EkpjgVv3s8ToKC0bvcM6Z5bRo7Y2wi0KgobBSsc8wOnqNxj+whA3P16ObkwwytheQHQuRxrLTXoPD4lR/O0Hkv0iUxG3jBRW58keciK4J3Y72Gej62L3jgY9TBM5BBwue4Raz8vflJqQh3pSSk3nzhfOjK7Vlu09HwmWY3sheF2DgC6LZw7a8q2sxFsvvikevFMrZvKsrYq81vuBxSEuExwI/12L1twRL8Jyp0z4b+DquUeDQt/vCw9DIsYrWcdrzkD+FOBNwON8xDQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x2hUubDcXb41j7E73VL0VNqCTFgOhAttTc8ZD3iVeFc=; b=yvK3xC10uZOw8O77NE/mptGgmzGb6y2B++BNhnHy7o5ufABbKtfE/nJavqTNNK1ycW5DwSlXBc0I+/UsJgsh3JUjUNSS/vW7Rzqm9KhSFZJyqWqLWi2CgtaIFybbE0Ut/1uhu4Qibjv+DxAyJ8meEyJIS36zKMhhAPCDnN+EDgs= Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM6PR11MB4234.namprd11.prod.outlook.com (2603:10b6:5:1dc::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Fri, 16 Apr 2021 09:19:44 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::3182:6da2:8c64:f07a]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::3182:6da2:8c64:f07a%3]) with mapi id 15.20.4042.018; Fri, 16 Apr 2021 09:19:44 +0000 From: "Ananyev, Konstantin" To: Lijun Ou , "thomas@monjalon.net" , "Yigit, Ferruh" CC: "dev@dpdk.org" , "linuxarm@openeuler.org" Thread-Topic: [dpdk-dev] [PATCH V4] ethdev: add queue state when retrieve queue information Thread-Index: AQHXMp0hqsX3lOzAfke54FP/Mjxe16q22RPA Date: Fri, 16 Apr 2021 09:19:44 +0000 Message-ID: References: <1618454426-21457-1-git-send-email-oulijun@huawei.com> <1618562810-20304-1-git-send-email-oulijun@huawei.com> In-Reply-To: <1618562810-20304-1-git-send-email-oulijun@huawei.com> Accept-Language: en-GB, en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [109.255.184.192] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 114fa968-bcfd-4687-6e48-08d900b8c605 x-ms-traffictypediagnostic: DM6PR11MB4234: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lpuZ49/HwcxgAeqgpRPQUm/L83P1D5xncZQM2+CA6J0ECzsZr0XDUScAFM4UK0NoY6y/6GH2OuIm8ZEmY7wJ0a+h1H4Xo/b3/dLq0KjQlc1/Es3Q8yojvotzJ93abSXbspcaGwODmHWWeVvBqEPriaFJt/Vo3IVVN1tF7DTGxTOE7VAkPB0vWEiYa3SM/0wrSWX8bBQzrSU2U02ZiokqG46jDeqJ4C4uWxd50amXBbxvLPzr3bV8GbnMif/sXgaBj6sysS2lRWGlwmCIJBfkl86vyX1Eoe/uITaBe7sCyxmFylfT+8OXHk9Y8I+BWGIodLK9QMYB0E4qVheSvL8tw5LiaepYphhXPOMDIQHigwq7wvgO0t3WNT8I/hk2bGvfPLg8AnxKZMbYfNTIZnyCtZE6Vv2qyOWy+MnR44k+zlEYEk6XnigeZ+5FNkV+oUZoXuaKvNrbqkvTyz+bQTI4R90bwZgCa6mPaqerPpGfrozqVdohESSuIzDozNDowKehLONY2jusCTFue3h5UiKAVDAQSATGMYVdV1Lp9qzH/5OotTnyyeFCUwpQQJopiYjHJBdqIapQDo9H2xwgyGb8qnoStn5UJFakzQa2g2B1qA8= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(396003)(136003)(376002)(39860400002)(366004)(9686003)(6506007)(26005)(4326008)(54906003)(186003)(110136005)(33656002)(71200400001)(38100700002)(66946007)(6636002)(76116006)(2906002)(55016002)(122000001)(86362001)(478600001)(52536014)(316002)(8936002)(83380400001)(7696005)(5660300002)(8676002)(55236004)(66556008)(66476007)(64756008)(66446008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?m1Y0BMi4SyIO2K5BiYqvt+0HOC/EV4UsbW5+iQBIgwNxQHSNmHrZgWA1U8XB?= =?us-ascii?Q?Qn6VXqI2W42UHfw9e2vQmtN2rOQhu0LU9V1LMMTrClMsl5+r0g6bs/DhCd4p?= =?us-ascii?Q?RSU7/JdaTkKlqQOrbD3CSoBYybYuwl5oUAk3I/Vk63rj1LQb2jJKKUUyvS2O?= =?us-ascii?Q?fqmpHphfRML7PWfnl16PSOxFTTUHxjuNtzRY+5TemE0lSSOU9AXiWLWRf2am?= =?us-ascii?Q?B6+TxLDvgnHoMqGIz6WVTZ15+qC3zAdIOAUcjE0txJN4LycMskPNaqdUTNQ2?= =?us-ascii?Q?kekIEUQDDFy+Vb+4mJo2wRK7B49kpjNKzx85/9gZyQiA3b0jaLPxcDw/zxNK?= =?us-ascii?Q?zC3mDlGfiiOSu59E0oTmULtHrxC+nnc7rKQBVsfRkGoRxB7j8SO82SLEoJ7u?= =?us-ascii?Q?CehzA69Fe0AwAmA9lKWgosf7jXWdlC6AEX35UzEwCArYoDBWSLAZ8CmfqaAu?= =?us-ascii?Q?CIvKwn7JNeuMB10UDdFlMDYinacH4VN2BeTwNgppLGISuu/pkAkm4nB1CyUu?= =?us-ascii?Q?yA1ttkTGI1X5PLiSAnk+h1axA0Gi/qizBk8mUDGJQ2Qhgu3HXEAHVg87Tocj?= =?us-ascii?Q?sPqkWe+Pad6j/SgzqEbvyqcjOzYe5nL9ZElAh98c+lXIkmuNtJoqJ5X1BON8?= =?us-ascii?Q?nq6mzRzzwUS09lmLvBgZ/T5naeF8OHe6sP6yxSdJgBR6UTB2ty6UJ6q9TUKX?= =?us-ascii?Q?HCXRG9BZwV5I7wBlRD1TjyjvVvwMLnOo9/H4M7g+NVKmnlZGL8ip6IAgDN+x?= =?us-ascii?Q?iycjUE7cO0bEohzCLaR5439wEYhN+6XYHQ3vMd6bM7c+q8Tzm+r60o+G22yD?= =?us-ascii?Q?WwNOMHsHw0cJOB9Yv0q9fkNSLxDx9oaPdiCSLOdfDebSdmbbNBChmDRv2EJu?= =?us-ascii?Q?8GxJLEWtWEuosGuq4Osv/koz5YIEAUH6TakrMnN4DGTAnotISLwRtY5TEnUB?= =?us-ascii?Q?bcRt+N037unpEn32WUw+NPsiE1tbayH3Frlr14Nnr9Ir/1ylF88LOnhLezo/?= =?us-ascii?Q?2NJq/BxX2ZpGLzI8UNjKxXK5jB8dRgoamd6k0dsQ9shYUump0GYXBHY/CMOH?= =?us-ascii?Q?6vUXUFLke3P9BsjHT18d3rFfq5twvN+UgCk2D7b5iQOUTKJ9L/lneibgL2Q6?= =?us-ascii?Q?GllR6Rsm2ayXPW2wyLnYnhRjF2ljWQfGLA5qNhCnhM4smCw1q13mKf0tqLIn?= =?us-ascii?Q?fBDs1vaoqBUQDpvOLSMiovE6pZGiQlsqII3NP1DeORbvFaG4cxVr0NjbuFyI?= =?us-ascii?Q?H2KDsR6jlFVRfPTt1paAckUY2C818qFB0F5aGpwXkdUhIR9SAXJl/KPWXnP9?= =?us-ascii?Q?oJpgvRVQaoiBUWRH/nI+xiBJ?= 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: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 114fa968-bcfd-4687-6e48-08d900b8c605 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Apr 2021 09:19:44.5133 (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: DKdbEKZk1laGUW8GC5+eddnjP61eSmmEPsHxyCZn78DMKkXt7B8Bjb1RQH/8X2EVQo+u+YlcfsbF23aVQBUM3cCyvU9eCbm6ZSXTR/B791o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4234 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH V4] ethdev: add queue state when retrieve queue information 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 Sender: "dev" =20 > Currently, upper-layer application could get queue state only > through pointers such as dev->data->tx_queue_state[queue_id], > this is not the recommended way to access it. So this patch > add get queue state when call rte_eth_rx_queue_info_get and > rte_eth_tx_queue_info_get API. >=20 > Note: After add queue_state field, the 'struct rte_eth_rxq_info' size > remains 128B, and the 'struct rte_eth_txq_info' size remains 64B, so > it could be ABI compatible. >=20 > Signed-off-by: Chengwen Feng > Signed-off-by: Lijun Ou > --- > devtools/libabigail.abignore | 12 +++++++++++- > doc/guides/rel_notes/release_21_05.rst | 6 ++++++ > lib/librte_ethdev/ethdev_driver.h | 7 ------- > lib/librte_ethdev/rte_ethdev.c | 3 +++ > lib/librte_ethdev/rte_ethdev.h | 9 +++++++++ > 5 files changed, 29 insertions(+), 8 deletions(-) >=20 > diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore > index 6c0b389..54542a8 100644 > --- a/devtools/libabigail.abignore > +++ b/devtools/libabigail.abignore > @@ -19,4 +19,14 @@ > ; Ignore fields inserted in cacheline boundary of rte_cryptodev > [suppress_type] > name =3D rte_cryptodev > - has_data_member_inserted_between =3D {offset_after(attached), en= d} > \ No newline at end of file > + has_data_member_inserted_between =3D {offset_after(attached), en= d} > + > +; Ignore fields inserted in alignment hole of rte_eth_rxq_info > +[suppress_type] > + name =3D rte_eth_rxq_info > + has_data_member_inserted_at =3D offset_after(scattered_rx) > + > +; Ignore fields inserted in cacheline boundary of rte_eth_txq_info > +[suppress_type] > + name =3D rte_eth_txq_info > + has_data_member_inserted_between =3D {offset_after(nb_desc), end= } > diff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_note= s/release_21_05.rst > index 3bd7757..c6e45e2 100644 > --- a/doc/guides/rel_notes/release_21_05.rst > +++ b/doc/guides/rel_notes/release_21_05.rst > @@ -251,6 +251,12 @@ ABI Changes > function was already marked as internal in the API documentation for i= t, > and was not for use by external applications. >=20 > +* Added new field ``queue_state`` to ``rte_eth_rxq_info`` structure > + to provide indicated rxq queue state. > + > +* Added new field ``queue_state`` to ``rte_eth_txq_info`` structure > + to provide indicated txq queue state. > + >=20 > Known Issues > ------------ > diff --git a/lib/librte_ethdev/ethdev_driver.h b/lib/librte_ethdev/ethdev= _driver.h > index 113129d..40e474a 100644 > --- a/lib/librte_ethdev/ethdev_driver.h > +++ b/lib/librte_ethdev/ethdev_driver.h > @@ -952,13 +952,6 @@ struct eth_dev_ops { > }; >=20 > /** > - * RX/TX queue states > - */ > -#define RTE_ETH_QUEUE_STATE_STOPPED 0 > -#define RTE_ETH_QUEUE_STATE_STARTED 1 > -#define RTE_ETH_QUEUE_STATE_HAIRPIN 2 > - > -/** > * @internal > * Check if the selected Rx queue is hairpin queue. > * > diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethde= v.c > index 6b5cfd6..ab188ec 100644 > --- a/lib/librte_ethdev/rte_ethdev.c > +++ b/lib/librte_ethdev/rte_ethdev.c > @@ -5042,6 +5042,8 @@ rte_eth_rx_queue_info_get(uint16_t port_id, uint16_= t queue_id, >=20 > memset(qinfo, 0, sizeof(*qinfo)); > dev->dev_ops->rxq_info_get(dev, queue_id, qinfo); > + qinfo->queue_state =3D dev->data->rx_queue_state[queue_id]; > + > return 0; > } >=20 > @@ -5082,6 +5084,7 @@ rte_eth_tx_queue_info_get(uint16_t port_id, uint16_= t queue_id, >=20 > memset(qinfo, 0, sizeof(*qinfo)); > dev->dev_ops->txq_info_get(dev, queue_id, qinfo); > + qinfo->queue_state =3D dev->data->tx_queue_state[queue_id]; >=20 > return 0; > } > diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethde= v.h > index 3b773b6..a0d01d2 100644 > --- a/lib/librte_ethdev/rte_ethdev.h > +++ b/lib/librte_ethdev/rte_ethdev.h > @@ -1588,6 +1588,13 @@ struct rte_eth_dev_info { > }; >=20 > /** > + * RX/TX queue states > + */ > +#define RTE_ETH_QUEUE_STATE_STOPPED 0 > +#define RTE_ETH_QUEUE_STATE_STARTED 1 > +#define RTE_ETH_QUEUE_STATE_HAIRPIN 2 > + > +/** > * Ethernet device RX queue information structure. > * Used to retrieve information about configured queue. > */ > @@ -1595,6 +1602,7 @@ struct rte_eth_rxq_info { > struct rte_mempool *mp; /**< mempool used by that queue. */ > struct rte_eth_rxconf conf; /**< queue config parameters. */ > uint8_t scattered_rx; /**< scattered packets RX supported. */ > + uint8_t queue_state; /**< one of RTE_ETH_QUEUE_STATE_*. */ > uint16_t nb_desc; /**< configured number of RXDs. */ > uint16_t rx_buf_size; /**< hardware receive buffer size. */ > } __rte_cache_min_aligned; > @@ -1606,6 +1614,7 @@ struct rte_eth_rxq_info { > struct rte_eth_txq_info { > struct rte_eth_txconf conf; /**< queue config parameters. */ > uint16_t nb_desc; /**< configured number of TXDs. */ > + uint8_t queue_state; /**< one of RTE_ETH_QUEUE_STATE_*. */ > } __rte_cache_min_aligned; >=20 > /* Generic Burst mode flag definition, values can be ORed. */ > -- Acked-by: Konstantin Ananyev > 2.7.4