From: Gregory Etelson <getelson@nvidia.com>
To: <dev@dpdk.org>
Cc: <getelson@nvidia.com>, <matan@nvidia.com>, <rasland@nvidia.com>,
Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
Shahaf Shuler <shahafs@nvidia.com>
Subject: [dpdk-dev] [PATCH 1/3] common/mlx5: query for hardware capability to offload IPv4 IHL field
Date: Wed, 30 Jun 2021 10:04:50 +0300 [thread overview]
Message-ID: <20210630070452.14055-2-getelson@nvidia.com> (raw)
In-Reply-To: <20210630070452.14055-1-getelson@nvidia.com>
The patch queries MLX5 port hardware if it is capable to offload
IPv4 IHL field.
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/common/mlx5/mlx5_devx_cmds.c | 6 ++++++
drivers/common/mlx5/mlx5_devx_cmds.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index f5914bce32..9070691332 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -948,6 +948,12 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
(flow_table_nic_cap, hcattr,
flow_table_properties_nic_receive.log_max_ft_sampler_num);
attr->pkt_integrity_match = mlx5_devx_query_pkt_integrity_match(hcattr);
+ attr->inner_ipv4_ihl = MLX5_GET
+ (flow_table_nic_cap, hcattr,
+ ft_field_support_2_nic_receive.inner_ipv4_ihl);
+ attr->outer_ipv4_ihl = MLX5_GET
+ (flow_table_nic_cap, hcattr,
+ ft_field_support_2_nic_receive.outer_ipv4_ihl);
/* Query HCA offloads for Ethernet protocol. */
memset(in, 0, sizeof(in));
memset(out, 0, sizeof(out));
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index f8a17b886b..034c40b49c 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -148,6 +148,8 @@ struct mlx5_hca_attr {
uint32_t crypto_login:1; /* General obj type CRYPTO_LOGIN supported. */
uint32_t regexp_num_of_engines;
uint32_t log_max_ft_sampler_num:8;
+ uint32_t inner_ipv4_ihl:1;
+ uint32_t outer_ipv4_ihl:1;
uint32_t geneve_tlv_opt;
uint32_t cqe_compression:1;
uint32_t mini_cqe_resp_flow_tag:1;
--
2.31.1
next prev parent reply other threads:[~2021-06-30 7:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 7:04 [dpdk-dev] [PATCH 0/3] net/mlx5: add flow rule match for " Gregory Etelson
2021-06-30 7:04 ` Gregory Etelson [this message]
2021-06-30 7:04 ` [dpdk-dev] [PATCH 2/3] " Gregory Etelson
2021-06-30 7:04 ` [dpdk-dev] [PATCH 3/3] app/testpmd: add flow item to match on IPv4 version_ihl field Gregory Etelson
2021-07-05 11:40 ` [dpdk-dev] [PATCH v2 0/2] net/mlx5: add flow rule match for IPv4 IHL field Gregory Etelson
2021-07-05 11:40 ` [dpdk-dev] [PATCH v2 1/2] common/mlx5: query for hardware capability to offload " Gregory Etelson
2021-07-05 11:40 ` [dpdk-dev] [PATCH v2 2/2] net/mlx5: add flow rule match for " Gregory Etelson
2021-07-13 19:09 ` [dpdk-dev] [PATCH v2 0/2] " Raslan Darawsheh
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=20210630070452.14055-2-getelson@nvidia.com \
--to=getelson@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=rasland@nvidia.com \
--cc=shahafs@nvidia.com \
--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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).