DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shiri Kuzin <shirik@nvidia.com>
To: dev@dpdk.org
Cc: viacheslavo@nvidia.com, adrien.mazarguil@6wind.com,
	orika@nvidia.com, ferruh.yigit@intel.com, thomas@monjalon.net,
	rasland@nvidia.com, andrew.rybchenko@oktetlabs.ru
Subject: [dpdk-dev] [PATCH v6 4/9] common/mlx5: check GENEVE TLV support in HCA attributes
Date: Thu, 14 Jan 2021 09:07:38 +0200
Message-ID: <20210114070743.2377-5-shirik@nvidia.com> (raw)
In-Reply-To: <20210114070743.2377-1-shirik@nvidia.com>

This is preparation step to support match on GENEVE TLV option.

In this Patch we add the HCA attributes that will allow
supporting GENEVE TLV option matching.

Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c |  7 +++++++
 drivers/common/mlx5/mlx5_devx_cmds.h |  4 ++++
 drivers/common/mlx5/mlx5_prm.h       | 28 +++++++++++++++++++++++++---
 3 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 4d01f52986..861f75e47d 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -690,6 +690,10 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 	attr->eth_virt = MLX5_GET(cmd_hca_cap, hcattr, eth_virt);
 	attr->flex_parser_protocols = MLX5_GET(cmd_hca_cap, hcattr,
 					       flex_parser_protocols);
+	attr->max_geneve_tlv_options = MLX5_GET(cmd_hca_cap, hcattr,
+			max_geneve_tlv_options);
+	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->vdpa.valid = !!(MLX5_GET64(cmd_hca_cap, hcattr,
 					 general_obj_types) &
@@ -717,6 +721,9 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 	attr->flow_hit_aso = !!(MLX5_GET64(cmd_hca_cap, hcattr,
 					   general_obj_types) &
 				MLX5_GENERAL_OBJ_TYPES_CAP_FLOW_HIT_ASO);
+	attr->geneve_tlv_opt = !!(MLX5_GET64(cmd_hca_cap, hcattr,
+					   general_obj_types) &
+				MLX5_GENERAL_OBJ_TYPES_CAP_GENEVE_TLV_OPT);
 	attr->log_max_cq = MLX5_GET(cmd_hca_cap, hcattr, log_max_cq);
 	attr->log_max_qp = MLX5_GET(cmd_hca_cap, hcattr, log_max_qp);
 	attr->log_max_cq_sz = MLX5_GET(cmd_hca_cap, hcattr, log_max_cq_sz);
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index 8d993dfad7..1e0a48d810 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -97,6 +97,8 @@ struct mlx5_hca_attr {
 	uint32_t lro_timer_supported_periods[MLX5_LRO_NUM_SUPP_PERIODS];
 	uint16_t lro_min_mss_size;
 	uint32_t flex_parser_protocols;
+	uint32_t max_geneve_tlv_options;
+	uint32_t max_geneve_tlv_option_data_len;
 	uint32_t hairpin:1;
 	uint32_t log_max_hairpin_queues:5;
 	uint32_t log_max_hairpin_wq_data_sz:5;
@@ -116,6 +118,7 @@ struct mlx5_hca_attr {
 	uint32_t regex:1;
 	uint32_t regexp_num_of_engines;
 	uint32_t log_max_ft_sampler_num:8;
+	uint32_t geneve_tlv_opt;
 	struct mlx5_hca_qos_attr qos;
 	struct mlx5_hca_vdpa_attr vdpa;
 	int log_max_qp_sz;
@@ -481,6 +484,7 @@ struct mlx5_devx_obj *mlx5_devx_cmd_create_flex_parser(void *ctx,
 __rte_internal
 int mlx5_devx_cmd_register_read(void *ctx, uint16_t reg_id,
 				uint32_t arg, uint32_t *data, uint32_t dw_cnt);
+
 /**
  * Create virtio queue counters object DevX API.
  *
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 9e2d1d0c81..e37c8f9a3c 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -789,7 +789,7 @@ struct mlx5_ifc_fte_match_set_misc3_bits {
 	u8 icmp_code[0x8];
 	u8 icmpv6_type[0x8];
 	u8 icmpv6_code[0x8];
-	u8 reserved_at_120[0x20];
+	u8 geneve_tlv_option_0_data[0x20];
 	u8 gtpu_teid[0x20];
 	u8 gtpu_msg_type[0x08];
 	u8 gtpu_msg_flags[0x08];
@@ -1082,6 +1082,8 @@ enum {
 			(1ULL << MLX5_GENERAL_OBJ_TYPE_FLEX_PARSE_GRAPH)
 #define MLX5_GENERAL_OBJ_TYPES_CAP_FLOW_HIT_ASO \
 			(1ULL << MLX5_GENERAL_OBJ_TYPE_FLOW_HIT_ASO)
+#define MLX5_GENERAL_OBJ_TYPES_CAP_GENEVE_TLV_OPT \
+			(1ULL << MLX5_OBJ_TYPE_GENEVE_TLV_OPT)
 
 enum {
 	MLX5_HCA_CAP_OPMOD_GET_MAX   = 0,
@@ -1380,8 +1382,10 @@ struct mlx5_ifc_cmd_hca_cap_bits {
 	u8 reserved_at_500[0x20];
 	u8 num_of_uars_per_page[0x20];
 	u8 flex_parser_protocols[0x20];
-	u8 reserved_at_560[0x20];
-	u8 reserved_at_580[0x3c];
+	u8 max_geneve_tlv_options[0x8];
+	u8 reserved_at_568[0x3];
+	u8 max_geneve_tlv_option_data_len[0x5];
+	u8 reserved_at_570[0x4c];
 	u8 mini_cqe_resp_stride_index[0x1];
 	u8 cqe_128_always[0x1];
 	u8 cqe_compression_128[0x1];
@@ -2292,6 +2296,7 @@ struct mlx5_ifc_create_cq_in_bits {
 };
 
 enum {
+	MLX5_OBJ_TYPE_GENEVE_TLV_OPT = 0x000b,
 	MLX5_GENERAL_OBJ_TYPE_VIRTQ = 0x000d,
 	MLX5_GENERAL_OBJ_TYPE_VIRTIO_Q_COUNTERS = 0x001c,
 	MLX5_GENERAL_OBJ_TYPE_FLEX_PARSE_GRAPH = 0x0022,
@@ -2326,6 +2331,17 @@ struct mlx5_ifc_virtio_q_counters_bits {
 	u8 reserved_at_180[0x50];
 };
 
+struct mlx5_ifc_geneve_tlv_option_bits {
+	u8 modify_field_select[0x40];
+	u8 reserved_at_40[0x18];
+	u8 geneve_option_fte_index[0x8];
+	u8 option_class[0x10];
+	u8 option_type[0x8];
+	u8 reserved_at_78[0x3];
+	u8 option_data_length[0x5];
+	u8 reserved_at_80[0x180];
+};
+
 struct mlx5_ifc_create_virtio_q_counters_in_bits {
 	struct mlx5_ifc_general_obj_in_cmd_hdr_bits hdr;
 	struct mlx5_ifc_virtio_q_counters_bits virtio_q_counters;
@@ -2335,6 +2351,12 @@ struct mlx5_ifc_query_virtio_q_counters_out_bits {
 	struct mlx5_ifc_general_obj_in_cmd_hdr_bits hdr;
 	struct mlx5_ifc_virtio_q_counters_bits virtio_q_counters;
 };
+
+struct mlx5_ifc_create_geneve_tlv_option_in_bits {
+	struct mlx5_ifc_general_obj_in_cmd_hdr_bits hdr;
+	struct mlx5_ifc_geneve_tlv_option_bits geneve_tlv_opt;
+};
+
 enum {
 	MLX5_VIRTQ_STATE_INIT = 0,
 	MLX5_VIRTQ_STATE_RDY = 1,
-- 
2.21.0


  parent reply	other threads:[~2021-01-14  7:08 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210105175358-16712-1-shirik@nvidia.com>
2021-01-07  8:38 ` [dpdk-dev] [PATCH v3 0/8] ethdev: introduce GENEVE header TLV option item Shiri Kuzin
2021-01-07  8:38   ` [dpdk-dev] [PATCH v3 1/8] lib/librte_ethdev: " Shiri Kuzin
2021-01-10 10:58     ` Ori Kam
2021-01-07  8:38   ` [dpdk-dev] [PATCH v3 2/8] app/testpmd: add GENEVE option item support Shiri Kuzin
2021-01-08 12:10     ` Suanming Mou
2021-01-08 12:21       ` Slava Ovsiienko
2021-01-07  8:38   ` [dpdk-dev] [PATCH v3 3/8] common/mlx5: check GENEVE TLV support in HCA attributes Shiri Kuzin
2021-01-07  8:38   ` [dpdk-dev] [PATCH v3 4/8] common/mlx5: create GENEVE TLV option object with DevX Shiri Kuzin
2021-01-07  8:38   ` [dpdk-dev] [PATCH v3 5/8] net/mlx5: create GENEVE TLV option management Shiri Kuzin
2021-01-07  8:38   ` [dpdk-dev] [PATCH v3 6/8] net/mlx5: add GENEVE TLV option flow validation Shiri Kuzin
2021-01-07  8:38   ` [dpdk-dev] [PATCH v3 7/8] net/mlx5: add GENEVE TLV option flow translation Shiri Kuzin
2021-01-07  8:38   ` [dpdk-dev] [PATCH v3 8/8] doc: update GENEVE TLV option support Shiri Kuzin
2021-01-11 14:26   ` [dpdk-dev] [PATCH v4 0/8] ethdev: introduce GENEVE header TLV option item Shiri Kuzin
2021-01-11 14:26     ` [dpdk-dev] [PATCH v4 1/8] lib/librte_ethdev: " Shiri Kuzin
2021-01-11 14:26     ` [dpdk-dev] [PATCH v4 2/8] app/testpmd: add GENEVE option item support Shiri Kuzin
2021-01-11 15:44       ` Ori Kam
2021-01-11 14:26     ` [dpdk-dev] [PATCH v4 3/8] common/mlx5: check GENEVE TLV support in HCA attributes Shiri Kuzin
2021-01-11 14:26     ` [dpdk-dev] [PATCH v4 4/8] common/mlx5: create GENEVE TLV option object with DevX Shiri Kuzin
2021-01-11 14:26     ` [dpdk-dev] [PATCH v4 5/8] net/mlx5: create GENEVE TLV option management Shiri Kuzin
2021-01-11 14:26     ` [dpdk-dev] [PATCH v4 6/8] net/mlx5: add GENEVE TLV option flow validation Shiri Kuzin
2021-01-11 14:26     ` [dpdk-dev] [PATCH v4 7/8] net/mlx5: add GENEVE TLV option flow translation Shiri Kuzin
2021-01-11 14:26     ` [dpdk-dev] [PATCH v4 8/8] doc: update GENEVE TLV option support Shiri Kuzin
2021-01-12 14:02     ` [dpdk-dev] [PATCH v5 0/8] ethdev: introduce GENEVE header TLV option item Shiri Kuzin
2021-01-12 14:02       ` [dpdk-dev] [PATCH v5 1/8] lib/librte_ethdev: " Shiri Kuzin
2021-01-12 14:02       ` [dpdk-dev] [PATCH v5 2/8] app/testpmd: add GENEVE option item support Shiri Kuzin
2021-01-12 14:02       ` [dpdk-dev] [PATCH v5 3/8] common/mlx5: check GENEVE TLV support in HCA attributes Shiri Kuzin
2021-01-12 14:02       ` [dpdk-dev] [PATCH v5 4/8] common/mlx5: create GENEVE TLV option object with DevX Shiri Kuzin
2021-01-12 14:02       ` [dpdk-dev] [PATCH v5 5/8] net/mlx5: create GENEVE TLV option management Shiri Kuzin
2021-01-12 14:02       ` [dpdk-dev] [PATCH v5 6/8] net/mlx5: add GENEVE TLV option flow validation Shiri Kuzin
2021-01-12 14:02       ` [dpdk-dev] [PATCH v5 7/8] net/mlx5: add GENEVE TLV option flow translation Shiri Kuzin
2021-01-12 14:02       ` [dpdk-dev] [PATCH v5 8/8] doc: update GENEVE TLV option support Shiri Kuzin
2021-01-14  7:07       ` [dpdk-dev] [PATCH v6 0/9] ethdev: introduce GENEVE header TLV option item Shiri Kuzin
2021-01-14  7:07         ` [dpdk-dev] [PATCH v6 1/9] lib/librte_ethdev: " Shiri Kuzin
2021-01-14  7:07         ` [dpdk-dev] [PATCH v6 2/9] app/testpmd: add GENEVE option item support Shiri Kuzin
2021-01-14  7:07         ` [dpdk-dev] [PATCH v6 3/9] app/testpmd: add GENEVE header option length support Shiri Kuzin
2021-01-14 14:36           ` Ori Kam
2021-01-14  7:07         ` Shiri Kuzin [this message]
2021-01-14  7:07         ` [dpdk-dev] [PATCH v6 5/9] common/mlx5: create GENEVE TLV option object with DevX Shiri Kuzin
2021-01-14  7:07         ` [dpdk-dev] [PATCH v6 6/9] net/mlx5: create GENEVE TLV option management Shiri Kuzin
2021-01-14  7:07         ` [dpdk-dev] [PATCH v6 7/9] net/mlx5: add GENEVE TLV option flow validation Shiri Kuzin
2021-01-14  7:07         ` [dpdk-dev] [PATCH v6 8/9] net/mlx5: add GENEVE TLV option flow translation Shiri Kuzin
2021-01-14  7:07         ` [dpdk-dev] [PATCH v6 9/9] doc: update GENEVE TLV option support Shiri Kuzin
2021-01-15  1:33         ` [dpdk-dev] [PATCH v6 0/9] ethdev: introduce GENEVE header TLV option item Ferruh Yigit
2021-01-17  9:19           ` Shiri Kuzin
2021-01-17 10:21         ` [dpdk-dev] [PATCH v7 " Shiri Kuzin
2021-01-17 10:21           ` [dpdk-dev] [PATCH v7 1/9] lib/librte_ethdev: " Shiri Kuzin
2021-01-18 14:29             ` Ferruh Yigit
2021-01-17 10:21           ` [dpdk-dev] [PATCH v7 2/9] app/testpmd: add GENEVE option item support Shiri Kuzin
2021-01-17 10:21           ` [dpdk-dev] [PATCH v7 3/9] app/testpmd: add GENEVE header option length support Shiri Kuzin
2021-01-17 10:21           ` [dpdk-dev] [PATCH v7 4/9] common/mlx5: check GENEVE TLV support in HCA attributes Shiri Kuzin
2021-01-17 10:21           ` [dpdk-dev] [PATCH v7 5/9] common/mlx5: create GENEVE TLV option object with DevX Shiri Kuzin
2021-01-17 10:21           ` [dpdk-dev] [PATCH v7 6/9] net/mlx5: create GENEVE TLV option management Shiri Kuzin
2021-01-17 10:21           ` [dpdk-dev] [PATCH v7 7/9] net/mlx5: add GENEVE TLV option flow validation Shiri Kuzin
2021-01-17 10:21           ` [dpdk-dev] [PATCH v7 8/9] net/mlx5: add GENEVE TLV option flow translation Shiri Kuzin
2021-01-17 10:21           ` [dpdk-dev] [PATCH v7 9/9] doc: update GENEVE TLV option support Shiri Kuzin
2021-01-18 14:30           ` [dpdk-dev] [PATCH v7 0/9] ethdev: introduce GENEVE header TLV option item Ferruh Yigit
2021-01-18 14:34           ` 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=20210114070743.2377-5-shirik@nvidia.com \
    --to=shirik@nvidia.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=orika@nvidia.com \
    --cc=rasland@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