From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
To: <dev@dpdk.org>
Cc: <matan@nvidia.com>, <rasland@nvidia.com>
Subject: [PATCH v3 1/3] common/mlx5: add send on time capability check
Date: Thu, 24 Feb 2022 12:54:59 +0200 [thread overview]
Message-ID: <20220224105501.6549-2-viacheslavo@nvidia.com> (raw)
In-Reply-To: <20220224105501.6549-1-viacheslavo@nvidia.com>
The patch provides check for send scheduling on time hardware capability.
With this capability enabled hardware is able to handle Wait WQEs
with directly specified timestamp values. No Clock Queue is needed
anymore to handle send scheduling.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/common/mlx5/mlx5_devx_cmds.c | 1 +
drivers/common/mlx5/mlx5_devx_cmds.h | 1 +
drivers/common/mlx5/mlx5_prm.h | 27 ++++++++++++++++++++++++++-
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 70a430f134..9f1419ded8 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -962,6 +962,7 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
MLX5_GET(cmd_hca_cap, hcattr, umr_indirect_mkey_disabled);
attr->umr_modify_entity_size_disabled =
MLX5_GET(cmd_hca_cap, hcattr, umr_modify_entity_size_disabled);
+ attr->wait_on_time = MLX5_GET(cmd_hca_cap, hcattr, wait_on_time);
attr->crypto = MLX5_GET(cmd_hca_cap, hcattr, crypto);
if (attr->crypto)
attr->aes_xts = MLX5_GET(cmd_hca_cap, hcattr, aes_xts);
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index 4373761c29..1bac18c59d 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -201,6 +201,7 @@ struct mlx5_hca_attr {
uint32_t scatter_fcs_w_decap_disable:1;
uint32_t flow_hit_aso:1; /* General obj type FLOW_HIT_ASO supported. */
uint32_t roce:1;
+ uint32_t wait_on_time:1;
uint32_t rq_ts_format:2;
uint32_t sq_ts_format:2;
uint32_t steering_format_version:4;
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index b9e39aa717..ce3e47059f 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -133,6 +133,19 @@
#define MLX5_OPCODE_WAIT 0x0fu
#endif
+#define MLX5_OPC_MOD_WAIT_CQ_PI 0u
+#define MLX5_OPC_MOD_WAIT_DATA 1u
+#define MLX5_OPC_MOD_WAIT_TIME 2u
+
+
+#define MLX5_WAIT_COND_INVERT 0x10u
+#define MLX5_WAIT_COND_ALWAYS_TRUE 0u
+#define MLX5_WAIT_COND_EQUAL 1u
+#define MLX5_WAIT_COND_BIGGER 2u
+#define MLX5_WAIT_COND_SMALLER 3u
+#define MLX5_WAIT_COND_CYCLIC_BIGGER 4u
+#define MLX5_WAIT_COND_CYCLIC_SMALLER 5u
+
#ifndef HAVE_MLX5_OPCODE_ACCESS_ASO
#define MLX5_OPCODE_ACCESS_ASO 0x2du
#endif
@@ -348,6 +361,15 @@ struct mlx5_wqe_qseg {
uint32_t qpn_cqn;
} __rte_packed;
+struct mlx5_wqe_wseg {
+ uint32_t operation;
+ uint32_t lkey;
+ uint32_t va_high;
+ uint32_t va_low;
+ uint64_t value;
+ uint64_t mask;
+} __rte_packed;
+
/* The title WQEBB, header of WQE. */
struct mlx5_wqe {
union {
@@ -1660,7 +1682,10 @@ struct mlx5_ifc_cmd_hca_cap_bits {
u8 num_vhca_ports[0x8];
u8 reserved_at_618[0x6];
u8 sw_owner_id[0x1];
- u8 reserved_at_61f[0x129];
+ u8 reserved_at_61f[0x6C];
+ u8 wait_on_data[0x1];
+ u8 wait_on_time[0x1];
+ u8 reserved_at_68d[0xBB];
u8 dma_mmo_qp[0x1];
u8 regexp_mmo_qp[0x1];
u8 compress_mmo_qp[0x1];
--
2.18.1
next prev parent reply other threads:[~2022-02-24 10:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 8:56 [PATCH 0/4] net/mlx5: support send scheduling for ConnextX-7 Viacheslav Ovsiienko
2022-02-14 8:56 ` [PATCH 1/4] common/mlx5: add send on time capability check Viacheslav Ovsiienko
2022-02-22 10:26 ` [PATCH v2 0/4] net/mlx5: support send scheduling for ConnectX-7 Viacheslav Ovsiienko
2022-02-22 10:26 ` [PATCH v2 1/4] common/mlx5: add send on time capability check Viacheslav Ovsiienko
2022-02-22 10:26 ` [PATCH v2 2/4] net/mlx5: configure Tx queue with send on time offload Viacheslav Ovsiienko
2022-02-22 10:26 ` [PATCH v2 3/4] net/mlx5: add wait on time support in Tx datapath Viacheslav Ovsiienko
2022-02-22 10:26 ` [PATCH v2 4/4] doc: update send scheduling mlx5 feature description Viacheslav Ovsiienko
2022-02-23 18:56 ` Ferruh Yigit
2022-02-24 10:56 ` Slava Ovsiienko
2022-02-23 13:13 ` [PATCH v2 0/4] net/mlx5: support send scheduling for ConnectX-7 Raslan Darawsheh
2022-02-24 10:54 ` [PATCH v3 0/3] " Viacheslav Ovsiienko
2022-02-24 10:54 ` Viacheslav Ovsiienko [this message]
2022-02-24 10:55 ` [PATCH v3 2/3] net/mlx5: configure Tx queue with send on time offload Viacheslav Ovsiienko
2022-02-24 10:55 ` [PATCH v3 3/3] net/mlx5: add wait on time support in Tx datapath Viacheslav Ovsiienko
2022-02-24 12:48 ` [PATCH v3 0/3] net/mlx5: support send scheduling for ConnectX-7 Raslan Darawsheh
2022-02-14 8:56 ` [PATCH 2/4] net/mlx5: configure Tx queue with send on time offload Viacheslav Ovsiienko
2022-02-14 8:56 ` [PATCH 3/4] net/mlx5: add wait on time support in Tx datapath Viacheslav Ovsiienko
2022-02-14 8:56 ` [PATCH 4/4] doc: update send scheduling mlx5 feature description Viacheslav Ovsiienko
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=20220224105501.6549-2-viacheslavo@nvidia.com \
--to=viacheslavo@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=rasland@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).