DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tal Shnaiderman <talshn@nvidia.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, matan@nvidia.com, rasland@nvidia.com,
	asafp@nvidia.com, odia@nvidia.com
Subject: [dpdk-dev] [PATCH 2/3] common/mlx5: read checksum capability from DevX
Date: Wed, 21 Apr 2021 19:34:40 +0300	[thread overview]
Message-ID: <20210421163441.17240-3-talshn@nvidia.com> (raw)
In-Reply-To: <20210421163441.17240-1-talshn@nvidia.com>

mlx5 in Windows needs the hca capability csum_cap
to query the NIC for checksum offloading support

Added the capability as part of the capabilities
queried by the PMD using DevX.

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 2 ++
 drivers/common/mlx5/mlx5_devx_cmds.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 268bcd0d99..d2e4ab33a2 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -837,6 +837,8 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 	hcattr = MLX5_ADDR_OF(query_hca_cap_out, out, capability);
 	attr->wqe_vlan_insert = MLX5_GET(per_protocol_networking_offload_caps,
 					 hcattr, wqe_vlan_insert);
+	attr->csum_cap = MLX5_GET(per_protocol_networking_offload_caps,
+					 hcattr, csum_cap);
 	attr->lro_cap = MLX5_GET(per_protocol_networking_offload_caps, hcattr,
 				 lro_cap);
 	attr->tunnel_lro_gre = MLX5_GET(per_protocol_networking_offload_caps,
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index 67b5f771c6..1fb9130e51 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -92,6 +92,7 @@ struct mlx5_hca_attr {
 	uint32_t eth_net_offloads:1;
 	uint32_t eth_virt:1;
 	uint32_t wqe_vlan_insert:1;
+	uint32_t csum_cap:1;
 	uint32_t wqe_inline_mode:2;
 	uint32_t vport_inline_mode:3;
 	uint32_t tunnel_stateless_geneve_rx:1;
-- 
2.16.1.windows.4


  parent reply	other threads:[~2021-04-21 16:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 16:34 [dpdk-dev] [PATCH 0/3] mlx5 - support checksum offloads on Windows Tal Shnaiderman
2021-04-21 16:34 ` [dpdk-dev] [PATCH 1/3] net/mlx5: fix unsupported offloads disablement Tal Shnaiderman
2021-04-22 10:17   ` Odi Assli
2021-04-21 16:34 ` Tal Shnaiderman [this message]
2021-04-22 10:17   ` [dpdk-dev] [PATCH 2/3] common/mlx5: read checksum capability from DevX Odi Assli
2021-04-21 16:34 ` [dpdk-dev] [PATCH 3/3] net/mlx5: support checksum offload on Windows Tal Shnaiderman
2021-04-22 10:17   ` Odi Assli
2021-04-28 12:06 ` [dpdk-dev] [PATCH 0/3] mlx5 - support checksum offloads " 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=20210421163441.17240-3-talshn@nvidia.com \
    --to=talshn@nvidia.com \
    --cc=asafp@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=odia@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=thomas@monjalon.net \
    /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).