From: Matan Azrad <matan@mellanox.com>
To: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Cc: dev@dpdk.org, Maxime Coquelin <maxime.coquelin@redhat.com>,
stable@dpdk.org, Xueming Li <xuemingl@mellanox.com>
Subject: [dpdk-dev] [PATCH 1/2] common/mlx5: add virtio queue protection domain
Date: Tue, 2 Jun 2020 15:51:43 +0000 [thread overview]
Message-ID: <1591113104-79071-1-git-send-email-matan@mellanox.com> (raw)
Starting from FW version 22.27.4002, it is required to configure
protection domain (PD) for each virtq created by DevX.
Add PD requirement in virtq DevX APIs.
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
---
drivers/common/mlx5/mlx5_devx_cmds.c | 1 +
drivers/common/mlx5/mlx5_devx_cmds.h | 1 +
drivers/common/mlx5/mlx5_prm.h | 4 +++-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 4bf22ce..3b6a857 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1262,6 +1262,7 @@ struct mlx5_devx_obj *
MLX5_SET(virtio_q, virtctx, umem_3_size, attr->umems[2].size);
MLX5_SET64(virtio_q, virtctx, umem_3_offset, attr->umems[2].offset);
MLX5_SET(virtio_q, virtctx, counter_set_id, attr->counters_obj_id);
+ MLX5_SET(virtio_q, virtctx, pd, attr->pd);
MLX5_SET(virtio_net_q, virtq, tisn_or_qpn, attr->tis_id);
virtq_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out,
sizeof(out));
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index 59a70a0..3ce44c3 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -259,6 +259,7 @@ struct mlx5_devx_virtq_attr {
uint16_t hw_available_index;
uint16_t hw_used_index;
uint16_t q_size;
+ uint32_t pd:24;
uint32_t virtio_version_1_0:1;
uint32_t tso_ipv4:1;
uint32_t tso_ipv6:1;
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 5fc10d6..c63795f 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -2088,7 +2088,9 @@ struct mlx5_ifc_virtio_q_bits {
u8 umem_3_size[0x20];
u8 umem_3_offset[0x40];
u8 counter_set_id[0x20];
- u8 reserved_at_320[0xe0];
+ u8 reserved_at_320[0x8];
+ u8 pd[0x18];
+ u8 reserved_at_340[0xc0];
};
struct mlx5_ifc_virtio_net_q_bits {
--
1.8.3.1
next reply other threads:[~2020-06-02 15:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-02 15:51 Matan Azrad [this message]
2020-06-02 15:51 ` [dpdk-dev] [PATCH 2/2] vdpa/mlx5: adjust " Matan Azrad
2020-06-18 14:59 ` Maxime Coquelin
2020-06-18 15:13 ` Maxime Coquelin
2020-06-18 16:30 ` Maxime Coquelin
2020-06-18 14:56 ` [dpdk-dev] [PATCH 1/2] common/mlx5: add " Maxime Coquelin
2020-06-18 16:30 ` Maxime Coquelin
2020-06-19 6:01 ` Maxime Coquelin
2020-06-19 6:20 ` Maxime Coquelin
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=1591113104-79071-1-git-send-email-matan@mellanox.com \
--to=matan@mellanox.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
--cc=viacheslavo@mellanox.com \
--cc=xuemingl@mellanox.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).