DPDK patches and discussions
 help / color / mirror / Atom feed
From: Li Zhang <lizh@nvidia.com>
To: dekelp@nvidia.com, orika@nvidia.com, viacheslavo@nvidia.com,
	matan@nvidia.com, shahafs@nvidia.com
Cc: dev@dpdk.org, thomas@monjalon.net, rasland@nvidia.com, roniba@nvidia.com
Subject: [dpdk-dev] [PATCH v4 07/14] common/mlx5: add read ASO flow meter HCA capability
Date: Wed, 14 Apr 2021 05:57:28 +0300
Message-ID: <20210414025736.31142-8-lizh@nvidia.com> (raw)
In-Reply-To: <20210414025736.31142-1-lizh@nvidia.com>

Read and store the device capability of FLOW_METER_ASO general object,
using the DevX API.

Signed-off-by: Li Zhang <lizh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 14 ++++++++++++++
 drivers/common/mlx5/mlx5_devx_cmds.h |  8 ++++++++
 2 files changed, 22 insertions(+)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 268bcd0d99..a878a5c689 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -696,6 +696,9 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 	attr->max_geneve_tlv_option_data_len = MLX5_GET(cmd_hca_cap, hcattr,
 			max_geneve_tlv_option_data_len);
 	attr->qos.sup = MLX5_GET(cmd_hca_cap, hcattr, qos);
+	attr->qos.flow_meter_aso_sup = !!(MLX5_GET64(cmd_hca_cap, hcattr,
+					 general_obj_types) &
+			      MLX5_GENERAL_OBJ_TYPES_CAP_FLOW_METER_ASO);
 	attr->vdpa.valid = !!(MLX5_GET64(cmd_hca_cap, hcattr,
 					 general_obj_types) &
 			      MLX5_GENERAL_OBJ_TYPES_CAP_VIRTQ_NET_Q);
@@ -783,6 +786,17 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 				MLX5_GET(qos_cap, hcattr, packet_pacing);
 		attr->qos.wqe_rate_pp =
 				MLX5_GET(qos_cap, hcattr, wqe_rate_pp);
+		if (attr->qos.flow_meter_aso_sup) {
+			attr->qos.log_meter_aso_granularity =
+				MLX5_GET(qos_cap, hcattr,
+					log_meter_aso_granularity);
+			attr->qos.log_meter_aso_max_alloc =
+				MLX5_GET(qos_cap, hcattr,
+					log_meter_aso_max_alloc);
+			attr->qos.log_max_num_meter_aso =
+				MLX5_GET(qos_cap, hcattr,
+					log_max_num_meter_aso);
+		}
 	}
 	if (attr->vdpa.valid)
 		mlx5_devx_cmd_query_hca_vdpa_attr(ctx, &attr->vdpa);
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index 67b5f771c6..673e41599e 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -50,10 +50,18 @@ struct mlx5_hca_qos_attr {
 	 * Using older driver versions, flow_meter_old can be 1
 	 * while flow_meter is 0.
 	 */
+	uint32_t flow_meter_aso_sup:1;
+	/* Whether FLOW_METER_ASO Object is supported. */
 	uint8_t log_max_flow_meter;
 	/* Power of the maximum supported meters. */
 	uint8_t flow_meter_reg_c_ids;
 	/* Bitmap of the reg_Cs available for flow meter to use. */
+	uint32_t log_meter_aso_granularity:5;
+	/* Power of the minimum allocation granularity Object. */
+	uint32_t log_meter_aso_max_alloc:5;
+	/* Power of the maximum allocation granularity Object. */
+	uint32_t log_max_num_meter_aso:5;
+	/* Power of the maximum number of supported objects. */
 
 };
 
-- 
2.27.0


  parent reply	other threads:[~2021-04-14  2:58 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31  7:36 [dpdk-dev] [PATCH 00/13] Add ASO meter support in MLX5 PMD Li Zhang
2021-03-31  7:36 ` [dpdk-dev] [PATCH 01/13] net/mlx5: support three level table walk Li Zhang
2021-03-31  7:36 ` [dpdk-dev] [PATCH 02/13] net/mlx5: fix meter statistics Li Zhang
2021-03-31  7:36 ` [dpdk-dev] [PATCH 03/13] net/mlx5: optimize " Li Zhang
2021-03-31  7:36 ` [dpdk-dev] [PATCH 04/13] net/mlx5: use mask for meter register setting Li Zhang
2021-03-31  7:36 ` [dpdk-dev] [PATCH 05/13] common/mlx5: add definitions for ASO flow meter Li Zhang
2021-03-31  7:36 ` [dpdk-dev] [PATCH 06/13] common/mlx5: add read ASO flow meter HCA capability Li Zhang
2021-03-31  7:36 ` [dpdk-dev] [PATCH 07/13] common/mlx5: add DevX API to create ASO flow meter object Li Zhang
2021-03-31  7:36 ` [dpdk-dev] [PATCH 08/13] net/mlx5: flow meter pool to manage " Li Zhang
2021-03-31  7:36 ` [dpdk-dev] [PATCH 09/13] net/mlx5: init/uninit flow meter queue for WQE Li Zhang
2021-03-31  7:36 ` [dpdk-dev] [PATCH 10/13] net/mlx5: aso flow meter send WQE and CQE handle Li Zhang
2021-03-31  7:36 ` [dpdk-dev] [PATCH 11/13] net/mlx5: add support of ASO meter action Li Zhang
2021-03-31  7:36 ` [dpdk-dev] [PATCH 12/13] net/mlx5: make ASO meter queue thread-safe Li Zhang
2021-03-31  7:36 ` [dpdk-dev] [PATCH 13/13] net/mlx5: allow multiple flow tables on the same level Li Zhang
2021-04-02 15:16 ` [dpdk-dev] [PATCH v2 00/13] Add ASO meter support in MLX5 PMD Li Zhang
2021-04-02 15:16   ` [dpdk-dev] [PATCH v2 01/13] net/mlx5: support three level table walk Li Zhang
2021-04-02 15:16   ` [dpdk-dev] [PATCH v2 02/13] net/mlx5: fix meter statistics Li Zhang
2021-04-02 15:16   ` [dpdk-dev] [PATCH v2 03/13] net/mlx5: optimize " Li Zhang
2021-04-02 15:16   ` [dpdk-dev] [PATCH v2 04/13] net/mlx5: use mask for meter register setting Li Zhang
2021-04-02 15:16   ` [dpdk-dev] [PATCH v2 05/13] common/mlx5: add definitions for ASO flow meter Li Zhang
2021-04-02 15:16   ` [dpdk-dev] [PATCH v2 06/13] common/mlx5: add read ASO flow meter HCA capability Li Zhang
2021-04-02 15:16   ` [dpdk-dev] [PATCH v2 07/13] common/mlx5: add DevX API to create ASO flow meter object Li Zhang
2021-04-13 16:50     ` Kinsella, Ray
2021-04-02 15:16   ` [dpdk-dev] [PATCH v2 08/13] net/mlx5: flow meter pool to manage " Li Zhang
2021-04-02 15:16   ` [dpdk-dev] [PATCH v2 09/13] net/mlx5: init/uninit flow meter queue for WQE Li Zhang
2021-04-02 15:16   ` [dpdk-dev] [PATCH v2 10/13] net/mlx5: aso flow meter send WQE and CQE handle Li Zhang
2021-04-02 15:16   ` [dpdk-dev] [PATCH v2 11/13] net/mlx5: add support of ASO meter action Li Zhang
2021-04-02 15:16   ` [dpdk-dev] [PATCH v2 12/13] net/mlx5: make ASO meter queue thread-safe Li Zhang
2021-04-02 15:16   ` [dpdk-dev] [PATCH v2 13/13] net/mlx5: allow multiple flow tables on the same level Li Zhang
2021-04-13  0:10 ` [dpdk-dev] [PATCH v3 00/14] Add ASO meter support in MLX5 PMD Li Zhang
2021-04-13  0:10   ` [dpdk-dev] [PATCH v3 01/14] net/mlx5: support three level table walk Li Zhang
2021-04-13  0:10   ` [dpdk-dev] [PATCH v3 02/14] common/mlx5: add color register idle bits definition Li Zhang
2021-04-13  0:10   ` [dpdk-dev] [PATCH v3 03/14] net/mlx5: fix meter statistics Li Zhang
2021-04-13  0:10   ` [dpdk-dev] [PATCH v3 04/14] net/mlx5: optimize " Li Zhang
2021-04-13  0:10   ` [dpdk-dev] [PATCH v3 05/14] net/mlx5: use mask for meter register setting Li Zhang
2021-04-13  0:10   ` [dpdk-dev] [PATCH v3 06/14] common/mlx5: add definitions for ASO flow meter Li Zhang
2021-04-13  0:10   ` [dpdk-dev] [PATCH v3 07/14] common/mlx5: add read ASO flow meter HCA capability Li Zhang
2021-04-13  0:10   ` [dpdk-dev] [PATCH v3 08/14] common/mlx5: add DevX API to create ASO flow meter object Li Zhang
2021-04-13  0:10   ` [dpdk-dev] [PATCH v3 09/14] net/mlx5: flow meter pool to manage " Li Zhang
2021-04-13  0:10   ` [dpdk-dev] [PATCH v3 10/14] net/mlx5: initialize the flow meter ASO SQ Li Zhang
2021-04-13  0:10   ` [dpdk-dev] [PATCH v3 11/14] net/mlx5: aso flow meter send WQE and CQE handle Li Zhang
2021-04-13  0:10   ` [dpdk-dev] [PATCH v3 12/14] net/mlx5: add support of ASO meter action Li Zhang
2021-04-13  0:10   ` [dpdk-dev] [PATCH v3 13/14] net/mlx5: make ASO meter queue thread-safe Li Zhang
2021-04-13  0:10   ` [dpdk-dev] [PATCH v3 14/14] net/mlx5: allow multiple flow tables on the same level Li Zhang
2021-04-14  2:57 ` [dpdk-dev] [PATCH v4 00/14] Add ASO meter support in MLX5 PMD Li Zhang
2021-04-14  2:57   ` [dpdk-dev] [PATCH v4 01/14] net/mlx5: support three level table walk Li Zhang
2021-04-14  2:57   ` [dpdk-dev] [PATCH v4 02/14] common/mlx5: add color register idle bits definition Li Zhang
2021-04-14  2:57   ` [dpdk-dev] [PATCH v4 03/14] net/mlx5: fix meter statistics Li Zhang
2021-04-14  2:57   ` [dpdk-dev] [PATCH v4 04/14] net/mlx5: optimize " Li Zhang
2021-04-14  2:57   ` [dpdk-dev] [PATCH v4 05/14] net/mlx5: use mask for meter register setting Li Zhang
2021-04-14  2:57   ` [dpdk-dev] [PATCH v4 06/14] common/mlx5: add definitions for ASO flow meter Li Zhang
2021-04-14  2:57   ` Li Zhang [this message]
2021-04-14  2:57   ` [dpdk-dev] [PATCH v4 08/14] common/mlx5: add DevX API to create ASO flow meter object Li Zhang
2021-04-14  2:57   ` [dpdk-dev] [PATCH v4 09/14] net/mlx5: flow meter pool to manage " Li Zhang
2021-04-14  2:57   ` [dpdk-dev] [PATCH v4 10/14] net/mlx5: initialize the flow meter ASO SQ Li Zhang
2021-04-15 13:05     ` Raslan Darawsheh
2021-04-15 14:21       ` Li Zhang
2021-04-14  2:57   ` [dpdk-dev] [PATCH v4 11/14] net/mlx5: aso flow meter send WQE and CQE handle Li Zhang
2021-04-14  2:57   ` [dpdk-dev] [PATCH v4 12/14] net/mlx5: add support of ASO meter action Li Zhang
2021-04-14  2:57   ` [dpdk-dev] [PATCH v4 13/14] net/mlx5: make ASO meter queue thread-safe Li Zhang
2021-04-14  2:57   ` [dpdk-dev] [PATCH v4 14/14] net/mlx5: allow multiple flow tables on the same level Li Zhang
2021-04-15 15:11 ` [dpdk-dev] [PATCH v5 00/14] Add ASO meter support in MLX5 PMD Li Zhang
2021-04-15 15:11   ` [dpdk-dev] [PATCH v5 01/14] net/mlx5: support three level table walk Li Zhang
2021-04-15 15:11   ` [dpdk-dev] [PATCH v5 02/14] common/mlx5: add color register idle bits definition Li Zhang
2021-04-15 15:11   ` [dpdk-dev] [PATCH v5 03/14] net/mlx5: fix meter statistics Li Zhang
2021-04-15 15:11   ` [dpdk-dev] [PATCH v5 04/14] net/mlx5: optimize " Li Zhang
2021-04-15 15:11   ` [dpdk-dev] [PATCH v5 05/14] net/mlx5: use mask for meter register setting Li Zhang
2021-04-15 15:11   ` [dpdk-dev] [PATCH v5 06/14] common/mlx5: add definitions for ASO flow meter Li Zhang
2021-04-15 15:11   ` [dpdk-dev] [PATCH v5 07/14] common/mlx5: add read ASO flow meter HCA capability Li Zhang
2021-04-15 15:11   ` [dpdk-dev] [PATCH v5 08/14] common/mlx5: add DevX API to create ASO flow meter object Li Zhang
2021-04-15 15:11   ` [dpdk-dev] [PATCH v5 09/14] net/mlx5: flow meter pool to manage " Li Zhang
2021-04-15 15:11   ` [dpdk-dev] [PATCH v5 10/14] net/mlx5: initialize the flow meter ASO SQ Li Zhang
2021-04-15 15:11   ` [dpdk-dev] [PATCH v5 11/14] net/mlx5: aso flow meter send WQE and CQE handle Li Zhang
2021-04-19 21:46     ` Ferruh Yigit
2021-04-19 22:02       ` Thomas Monjalon
2021-04-20 10:35         ` Jiawei(Jonny) Wang
2021-04-15 15:11   ` [dpdk-dev] [PATCH v5 12/14] net/mlx5: add support of ASO meter action Li Zhang
2021-04-15 15:11   ` [dpdk-dev] [PATCH v5 13/14] net/mlx5: make ASO meter queue thread-safe Li Zhang
2021-04-15 15:11   ` [dpdk-dev] [PATCH v5 14/14] net/mlx5: allow multiple flow tables on the same level Li Zhang
2021-04-18 19:33   ` [dpdk-dev] [PATCH v5 00/14] Add ASO meter support in MLX5 PMD Raslan Darawsheh
2021-04-19 21:42   ` Ferruh Yigit
2021-04-19 21:59     ` Thomas Monjalon
2021-04-20 10:33       ` Jiawei(Jonny) Wang
2021-04-20 10:55 ` [dpdk-dev] [PATCH v6 00/15] " Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 01/15] net/mlx5: support three level table walk Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 02/15] common/mlx5: add color register idle bits definition Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 03/15] net/mlx5: fix meter statistics Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 04/15] net/mlx5: optimize " Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 05/15] net/mlx5: use mask for meter register setting Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 06/15] common/mlx5: add definitions for ASO flow meter Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 07/15] common/mlx5: add read ASO flow meter HCA capability Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 08/15] common/mlx5: add DevX API to create ASO flow meter object Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 09/15] net/mlx5: flow meter pool to manage " Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 10/15] net/mlx5: initialize the flow meter ASO SQ Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 11/15] net/mlx5: add meter ASO queue management Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 12/15] net/mlx5: add support of ASO meter action Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 13/15] net/mlx5: make ASO meter queue thread-safe Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 14/15] net/mlx5: allow multiple flow tables on the same level Jiawei Wang
2021-04-20 10:55   ` [dpdk-dev] [PATCH v6 15/15] doc: update release notes for ASO meter Jiawei Wang
2021-04-21  6:50     ` Raslan Darawsheh
2021-04-21  8:58     ` Ferruh Yigit
2021-04-21  6:51   ` [dpdk-dev] [PATCH v6 00/15] Add ASO meter support in MLX5 PMD Raslan Darawsheh
2021-04-21  8:31   ` Ferruh Yigit
2021-04-21  8:33     ` Asaf Penso
2021-04-21  8:58       ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210414025736.31142-8-lizh@nvidia.com \
    --to=lizh@nvidia.com \
    --cc=dekelp@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=roniba@nvidia.com \
    --cc=shahafs@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git