From: Saeed Mahameed <saeedm@nvidia.com>
To: Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leonro@mellanox.com>
Cc: <netdev@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
Parav Pandit <parav@nvidia.com>
Subject: [PATCH mlx5-next 08/16] net/mlx5: Update the hardware interface definition for vhca state
Date: Fri, 20 Nov 2020 15:03:31 -0800 [thread overview]
Message-ID: <20201120230339.651609-9-saeedm@nvidia.com> (raw)
In-Reply-To: <20201120230339.651609-1-saeedm@nvidia.com>
From: Parav Pandit <parav@nvidia.com>
Update the hardware interface definitions to query and modify vhca
state, related EQE and event code.
Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
include/linux/mlx5/device.h | 7 +++++++
include/linux/mlx5/mlx5_ifc.h | 17 ++++++++++++++---
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h
index e9639c4cf2ed..f1de49d64a98 100644
--- a/include/linux/mlx5/device.h
+++ b/include/linux/mlx5/device.h
@@ -346,6 +346,7 @@ enum mlx5_event {
MLX5_EVENT_TYPE_NIC_VPORT_CHANGE = 0xd,
MLX5_EVENT_TYPE_ESW_FUNCTIONS_CHANGED = 0xe,
+ MLX5_EVENT_TYPE_VHCA_STATE_CHANGE = 0xf,
MLX5_EVENT_TYPE_DCT_DRAINED = 0x1c,
MLX5_EVENT_TYPE_DCT_KEY_VIOLATION = 0x1d,
@@ -717,6 +718,11 @@ struct mlx5_eqe_sync_fw_update {
u8 sync_rst_state;
};
+struct mlx5_eqe_vhca_state {
+ __be16 ec_function;
+ __be16 function_id;
+} __packed;
+
union ev_data {
__be32 raw[7];
struct mlx5_eqe_cmd cmd;
@@ -736,6 +742,7 @@ union ev_data {
struct mlx5_eqe_temp_warning temp_warning;
struct mlx5_eqe_xrq_err xrq_err;
struct mlx5_eqe_sync_fw_update sync_fw_update;
+ struct mlx5_eqe_vhca_state vhca_state;
} __packed;
struct mlx5_eqe {
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index 632b9a61fda5..3ace1976514c 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -299,6 +299,8 @@ enum {
MLX5_CMD_OP_CREATE_UMEM = 0xa08,
MLX5_CMD_OP_DESTROY_UMEM = 0xa0a,
MLX5_CMD_OP_SYNC_STEERING = 0xb00,
+ MLX5_CMD_OP_QUERY_VHCA_STATE = 0xb0d,
+ MLX5_CMD_OP_MODIFY_VHCA_STATE = 0xb0e,
MLX5_CMD_OP_MAX
};
@@ -1244,7 +1246,15 @@ enum mlx5_fc_bulk_alloc_bitmask {
#define MLX5_FC_BULK_NUM_FCS(fc_enum) (MLX5_FC_BULK_SIZE_FACTOR * (fc_enum))
struct mlx5_ifc_cmd_hca_cap_bits {
- u8 reserved_at_0[0x30];
+ u8 reserved_at_0[0x20];
+
+ u8 reserved_at_20[0x3];
+ u8 event_on_vhca_state_teardown_request[0x1];
+ u8 event_on_vhca_state_in_use[0x1];
+ u8 event_on_vhca_state_active[0x1];
+ u8 event_on_vhca_state_allocated[0x1];
+ u8 event_on_vhca_state_invalid[0x1];
+ u8 reserved_at_28[0x8];
u8 vhca_id[0x10];
u8 reserved_at_40[0x40];
@@ -1534,7 +1544,8 @@ struct mlx5_ifc_cmd_hca_cap_bits {
u8 disable_local_lb_uc[0x1];
u8 disable_local_lb_mc[0x1];
u8 log_min_hairpin_wq_data_sz[0x5];
- u8 reserved_at_3e8[0x3];
+ u8 reserved_at_3e8[0x2];
+ u8 vhca_state[0x1];
u8 log_max_vlan_list[0x5];
u8 reserved_at_3f0[0x3];
u8 log_max_current_mc_list[0x5];
@@ -1602,7 +1613,7 @@ struct mlx5_ifc_cmd_hca_cap_bits {
u8 max_num_of_monitor_counters[0x10];
u8 num_ppcnt_monitor_counters[0x10];
- u8 reserved_at_640[0x10];
+ u8 max_num_sf[0x10];
u8 num_q_monitor_counters[0x10];
u8 reserved_at_660[0x20];
--
2.26.2
next prev parent reply other threads:[~2020-11-20 23:04 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-20 23:03 [PATCH mlx5-next 00/16] mlx5 next updates 2020-11-20 Saeed Mahameed
2020-11-20 23:03 ` [PATCH mlx5-next 01/16] net/mlx5: Add sample offload hardware bits and structures Saeed Mahameed
2020-11-20 23:03 ` [PATCH mlx5-next 02/16] net/mlx5: Add sampler destination type Saeed Mahameed
2020-11-20 23:03 ` [PATCH mlx5-next 03/16] net/mlx5: Check dr mask size against mlx5_match_param size Saeed Mahameed
2020-11-20 23:03 ` [PATCH mlx5-next 04/16] net/mlx5: Add misc4 to mlx5_ifc_fte_match_param_bits Saeed Mahameed
2020-11-20 23:03 ` [PATCH mlx5-next 05/16] net/mlx5: Add ts_cqe_to_dest_cqn related bits Saeed Mahameed
2020-11-20 23:03 ` [PATCH mlx5-next 06/16] net/mlx5: Avoid exposing driver internal command helpers Saeed Mahameed
2020-11-20 23:03 ` [PATCH mlx5-next 07/16] net/mlx5: Update the list of the PCI supported devices Saeed Mahameed
2020-11-20 23:03 ` Saeed Mahameed [this message]
2020-11-20 23:03 ` [PATCH mlx5-next 09/16] net/mlx5: Expose IP-in-IP TX and RX capability bits Saeed Mahameed
2020-11-21 23:58 ` Jakub Kicinski
2020-11-22 15:17 ` Aya Levin
2020-11-23 21:15 ` Saeed Mahameed
2020-11-20 23:03 ` [PATCH mlx5-next 10/16] net/mlx5: Expose other function ifc bits Saeed Mahameed
2020-11-20 23:03 ` [PATCH mlx5-next 11/16] net/mlx5: Add VDPA priority to NIC RX namespace Saeed Mahameed
2020-11-22 0:01 ` Jakub Kicinski
2020-11-22 6:41 ` Eli Cohen
2020-11-24 17:12 ` Jakub Kicinski
2020-11-24 18:02 ` Jason Gunthorpe
2020-11-24 18:41 ` Jakub Kicinski
2020-11-24 19:44 ` Jason Gunthorpe
2020-11-25 6:19 ` Eli Cohen
2020-11-25 19:04 ` Saeed Mahameed
2020-11-25 18:54 ` Jakub Kicinski
2020-11-25 19:28 ` Saeed Mahameed
2020-11-25 21:22 ` Jason Gunthorpe
2020-11-20 23:03 ` [PATCH mlx5-next 12/16] net/mlx5: Export steering related functions Saeed Mahameed
2020-11-20 23:03 ` [PATCH mlx5-next 13/16] net/mlx5: Make API mlx5_core_is_ecpf accept const pointer Saeed Mahameed
2020-11-20 23:03 ` [PATCH mlx5-next 14/16] net/mlx5: Rename peer_pf to host_pf Saeed Mahameed
2020-11-20 23:03 ` [PATCH mlx5-next 15/16] net/mlx5: Enable host PF HCA after eswitch is initialized Saeed Mahameed
2020-11-20 23:03 ` [PATCH mlx5-next 16/16] net/mlx5: Treat host PF vport as other (non eswitch manager) vport Saeed Mahameed
2020-11-30 18:42 ` [PATCH mlx5-next 00/16] mlx5 next updates 2020-11-20 Saeed Mahameed
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=20201120230339.651609-9-saeedm@nvidia.com \
--to=saeedm@nvidia.com \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=parav@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).