DPDK patches and discussions
 help / color / mirror / Atom feed
From: Xueming Li <xuemingl@nvidia.com>
To: Matan Azrad <matan@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Cc: dev@dpdk.org, xuemingl@nvidia.com, Asaf Penso <asafp@nvidia.com>
Subject: [dpdk-dev] [PATCH v3 1/2] common/mlx5: add virtq attributes error fields
Date: Mon, 26 Oct 2020 15:04:46 +0000
Message-ID: <1603724687-14488-1-git-send-email-xuemingl@nvidia.com> (raw)
In-Reply-To: <1603696570-8606-1-git-send-email-xuemingl@nvidia.com>

Add the needed fields for virtq DevX object to read the error state.

Acked-by: Matan Azrad <matan@nvidia.com>
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 3 +++
 drivers/common/mlx5/mlx5_devx_cmds.h | 1 +
 drivers/common/mlx5/mlx5_prm.h       | 9 +++++++--
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 8aee12d527..dc426e9b09 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1754,6 +1754,9 @@ mlx5_devx_cmd_query_virtq(struct mlx5_devx_obj *virtq_obj,
 	attr->hw_available_index = MLX5_GET16(virtio_net_q, virtq,
 					      hw_available_index);
 	attr->hw_used_index = MLX5_GET16(virtio_net_q, virtq, hw_used_index);
+	attr->state = MLX5_GET16(virtio_net_q, virtq, state);
+	attr->error_type = MLX5_GET16(virtio_net_q, virtq,
+				      virtio_q_context.error_type);
 	return ret;
 }
 
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index abbea67784..0ea2427b75 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -298,6 +298,7 @@ struct mlx5_devx_virtq_attr {
 		uint32_t size;
 		uint64_t offset;
 	} umems[3];
+	uint8_t error_type;
 };
 
 
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index d342263c85..7d671a3996 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -2280,7 +2280,8 @@ struct mlx5_ifc_virtio_q_bits {
 	u8 used_addr[0x40];
 	u8 available_addr[0x40];
 	u8 virtio_q_mkey[0x20];
-	u8 reserved_at_160[0x20];
+	u8 reserved_at_160[0x18];
+	u8 error_type[0x8];
 	u8 umem_1_id[0x20];
 	u8 umem_1_size[0x20];
 	u8 umem_1_offset[0x40];
@@ -2308,7 +2309,7 @@ struct mlx5_ifc_virtio_net_q_bits {
 	u8 vhost_log_page[0x5];
 	u8 reserved_at_90[0xc];
 	u8 state[0x4];
-	u8 error_type[0x8];
+	u8 reserved_at_a0[0x8];
 	u8 tisn_or_qpn[0x18];
 	u8 dirty_bitmap_mkey[0x20];
 	u8 dirty_bitmap_size[0x20];
@@ -2329,6 +2330,10 @@ struct mlx5_ifc_query_virtq_out_bits {
 	struct mlx5_ifc_virtio_net_q_bits virtq;
 };
 
+enum {
+	MLX5_EVENT_TYPE_OBJECT_CHANGE = 0x27,
+};
+
 enum {
 	MLX5_QP_ST_RC = 0x0,
 };
-- 
2.25.1


  parent reply	other threads:[~2020-10-26 15:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26  7:16 [dpdk-dev] [PATCH " Xueming Li
2020-10-26  7:16 ` [dpdk-dev] [PATCH 2/2] vdpa/mlx5: hardware error handling Xueming Li
2020-10-26  9:12 ` [dpdk-dev] [PATCH v1 1/2] common/mlx5: add virtq attributes error fields Xueming Li
2020-10-26  9:12 ` [dpdk-dev] [PATCH v1 2/2] vdpa/mlx5: hardware error handling Xueming Li
2020-10-26 11:14 ` [dpdk-dev] [PATCH v2 1/2] common/mlx5: add virtq attributes error fields Xueming Li
2020-10-26 11:14 ` [dpdk-dev] [PATCH v2 2/2] vdpa/mlx5: hardware error handling Xueming Li
2020-10-26 15:04 ` Xueming Li [this message]
2020-10-26 15:04 ` [dpdk-dev] [PATCH v3 " Xueming Li
2020-10-27  8:28 ` [dpdk-dev] [PATCH v4 1/2] common/mlx5: add virtq attributes error fields Xueming Li
2020-10-28 13:59   ` Maxime Coquelin
2020-10-29  8:29   ` Maxime Coquelin
2020-10-27  8:28 ` [dpdk-dev] [PATCH v4 2/2] vdpa/mlx5: hardware error handling Xueming Li
2020-10-28 14:19   ` Maxime Coquelin
2020-10-29  8:29   ` 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=1603724687-14488-1-git-send-email-xuemingl@nvidia.com \
    --to=xuemingl@nvidia.com \
    --cc=asafp@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@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

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