* [PATCH mlx5-next 1/4] net/mlx5: Use debug message instead of warn
2019-08-08 8:43 [PATCH rdma-next 0/4] Add XRQ and SRQ support to DEVX interface Leon Romanovsky
@ 2019-08-08 8:43 ` Leon Romanovsky
2019-08-08 8:43 ` [PATCH mlx5-next 2/4] net/mlx5: Add XRQ legacy commands opcodes Leon Romanovsky
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Leon Romanovsky @ 2019-08-08 8:43 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Leon Romanovsky, RDMA mailing list, Edward Srouji,
Saeed Mahameed, Yishai Hadas, linux-netdev
From: Yishai Hadas <yishaih@mellanox.com>
As QP may be created by DEVX, it may be valid to not find the rsn in
mlx5 core tree, change the level to be debug.
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/qp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/qp.c b/drivers/net/ethernet/mellanox/mlx5/core/qp.c
index b8ba74de9555..f0f3abe331da 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/qp.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/qp.c
@@ -162,7 +162,7 @@ static int rsc_event_notifier(struct notifier_block *nb,
common = mlx5_get_rsc(table, rsn);
if (!common) {
- mlx5_core_warn(dev, "Async event for bogus resource 0x%x\n", rsn);
+ mlx5_core_dbg(dev, "Async event for unknown resource 0x%x\n", rsn);
return NOTIFY_OK;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH mlx5-next 2/4] net/mlx5: Add XRQ legacy commands opcodes
2019-08-08 8:43 [PATCH rdma-next 0/4] Add XRQ and SRQ support to DEVX interface Leon Romanovsky
2019-08-08 8:43 ` [PATCH mlx5-next 1/4] net/mlx5: Use debug message instead of warn Leon Romanovsky
@ 2019-08-08 8:43 ` Leon Romanovsky
2019-08-08 8:43 ` [PATCH mlx5-next 3/4] IB/mlx5: Add legacy events to DEVX list Leon Romanovsky
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Leon Romanovsky @ 2019-08-08 8:43 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Leon Romanovsky, RDMA mailing list, Edward Srouji,
Saeed Mahameed, Yishai Hadas, linux-netdev
From: Yishai Hadas <yishaih@mellanox.com>
Add XRQ legacy commands opcodes, will be used via the DEVX interface.
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 ++++
include/linux/mlx5/mlx5_ifc.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
index 8cdd7e66f8df..53d09620e215 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
@@ -446,6 +446,8 @@ static int mlx5_internal_err_ret_value(struct mlx5_core_dev *dev, u16 op,
case MLX5_CMD_OP_CREATE_UMEM:
case MLX5_CMD_OP_DESTROY_UMEM:
case MLX5_CMD_OP_ALLOC_MEMIC:
+ case MLX5_CMD_OP_MODIFY_XRQ:
+ case MLX5_CMD_OP_RELEASE_XRQ_ERROR:
*status = MLX5_DRIVER_STATUS_ABORTED;
*synd = MLX5_DRIVER_SYND;
return -EIO;
@@ -637,6 +639,8 @@ const char *mlx5_command_str(int command)
MLX5_COMMAND_STR_CASE(DESTROY_UCTX);
MLX5_COMMAND_STR_CASE(CREATE_UMEM);
MLX5_COMMAND_STR_CASE(DESTROY_UMEM);
+ MLX5_COMMAND_STR_CASE(RELEASE_XRQ_ERROR);
+ MLX5_COMMAND_STR_CASE(MODIFY_XRQ);
default: return "unknown command opcode";
}
}
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index 82470b670cb7..080bba20b129 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -172,6 +172,8 @@ enum {
MLX5_CMD_OP_QUERY_XRQ_DC_PARAMS_ENTRY = 0x725,
MLX5_CMD_OP_SET_XRQ_DC_PARAMS_ENTRY = 0x726,
MLX5_CMD_OP_QUERY_XRQ_ERROR_PARAMS = 0x727,
+ MLX5_CMD_OP_RELEASE_XRQ_ERROR = 0x729,
+ MLX5_CMD_OP_MODIFY_XRQ = 0x72a,
MLX5_CMD_OP_QUERY_ESW_FUNCTIONS = 0x740,
MLX5_CMD_OP_QUERY_VPORT_STATE = 0x750,
MLX5_CMD_OP_MODIFY_VPORT_STATE = 0x751,
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH mlx5-next 3/4] IB/mlx5: Add legacy events to DEVX list
2019-08-08 8:43 [PATCH rdma-next 0/4] Add XRQ and SRQ support to DEVX interface Leon Romanovsky
2019-08-08 8:43 ` [PATCH mlx5-next 1/4] net/mlx5: Use debug message instead of warn Leon Romanovsky
2019-08-08 8:43 ` [PATCH mlx5-next 2/4] net/mlx5: Add XRQ legacy commands opcodes Leon Romanovsky
@ 2019-08-08 8:43 ` Leon Romanovsky
2019-08-08 8:43 ` [PATCH rdma-next 4/4] IB/mlx5: Expose XRQ legacy commands over the DEVX interface Leon Romanovsky
2019-08-08 10:11 ` [PATCH rdma-next 0/4] Add XRQ and SRQ support to " Leon Romanovsky
4 siblings, 0 replies; 9+ messages in thread
From: Leon Romanovsky @ 2019-08-08 8:43 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Leon Romanovsky, RDMA mailing list, Edward Srouji,
Saeed Mahameed, Yishai Hadas, linux-netdev
From: Yishai Hadas <yishaih@mellanox.com>
Add two events that were defined in the device specification but were
not exposed in the driver list.
Post this patch those events can be read over the DEVX events interface
once be reported by the firmware.
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Edward Srouji <edwards@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/infiniband/hw/mlx5/devx.c | 8 ++++++++
include/linux/mlx5/device.h | 9 +++++++++
2 files changed, 17 insertions(+)
diff --git a/drivers/infiniband/hw/mlx5/devx.c b/drivers/infiniband/hw/mlx5/devx.c
index fd577ffd7864..3dbdfe0eb5e4 100644
--- a/drivers/infiniband/hw/mlx5/devx.c
+++ b/drivers/infiniband/hw/mlx5/devx.c
@@ -233,6 +233,8 @@ static bool is_legacy_obj_event_num(u16 event_num)
case MLX5_EVENT_TYPE_SRQ_CATAS_ERROR:
case MLX5_EVENT_TYPE_DCT_DRAINED:
case MLX5_EVENT_TYPE_COMP:
+ case MLX5_EVENT_TYPE_DCT_KEY_VIOLATION:
+ case MLX5_EVENT_TYPE_XRQ_ERROR:
return true;
default:
return false;
@@ -315,8 +317,10 @@ static u16 get_event_obj_type(unsigned long event_type, struct mlx5_eqe *eqe)
case MLX5_EVENT_TYPE_SRQ_CATAS_ERROR:
return eqe->data.qp_srq.type;
case MLX5_EVENT_TYPE_CQ_ERROR:
+ case MLX5_EVENT_TYPE_XRQ_ERROR:
return 0;
case MLX5_EVENT_TYPE_DCT_DRAINED:
+ case MLX5_EVENT_TYPE_DCT_KEY_VIOLATION:
return MLX5_EVENT_QUEUE_TYPE_DCT;
default:
return MLX5_GET(affiliated_event_header, &eqe->data, obj_type);
@@ -2300,7 +2304,11 @@ static u32 devx_get_obj_id_from_event(unsigned long event_type, void *data)
case MLX5_EVENT_TYPE_WQ_ACCESS_ERROR:
obj_id = be32_to_cpu(eqe->data.qp_srq.qp_srq_n) & 0xffffff;
break;
+ case MLX5_EVENT_TYPE_XRQ_ERROR:
+ obj_id = be32_to_cpu(eqe->data.xrq_err.type_xrqn) & 0xffffff;
+ break;
case MLX5_EVENT_TYPE_DCT_DRAINED:
+ case MLX5_EVENT_TYPE_DCT_KEY_VIOLATION:
obj_id = be32_to_cpu(eqe->data.dct.dctn) & 0xffffff;
break;
case MLX5_EVENT_TYPE_CQ_ERROR:
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h
index ce9839c8bc1a..e427af260ebe 100644
--- a/include/linux/mlx5/device.h
+++ b/include/linux/mlx5/device.h
@@ -328,6 +328,7 @@ enum mlx5_event {
MLX5_EVENT_TYPE_GPIO_EVENT = 0x15,
MLX5_EVENT_TYPE_PORT_MODULE_EVENT = 0x16,
MLX5_EVENT_TYPE_TEMP_WARN_EVENT = 0x17,
+ MLX5_EVENT_TYPE_XRQ_ERROR = 0x18,
MLX5_EVENT_TYPE_REMOTE_CONFIG = 0x19,
MLX5_EVENT_TYPE_GENERAL_EVENT = 0x22,
MLX5_EVENT_TYPE_MONITOR_COUNTER = 0x24,
@@ -345,6 +346,7 @@ enum mlx5_event {
MLX5_EVENT_TYPE_ESW_FUNCTIONS_CHANGED = 0xe,
MLX5_EVENT_TYPE_DCT_DRAINED = 0x1c,
+ MLX5_EVENT_TYPE_DCT_KEY_VIOLATION = 0x1d,
MLX5_EVENT_TYPE_FPGA_ERROR = 0x20,
MLX5_EVENT_TYPE_FPGA_QP_ERROR = 0x21,
@@ -584,6 +586,12 @@ struct mlx5_eqe_cq_err {
u8 syndrome;
};
+struct mlx5_eqe_xrq_err {
+ __be32 reserved1[5];
+ __be32 type_xrqn;
+ __be32 reserved2;
+};
+
struct mlx5_eqe_port_state {
u8 reserved0[8];
u8 port;
@@ -698,6 +706,7 @@ union ev_data {
struct mlx5_eqe_pps pps;
struct mlx5_eqe_dct dct;
struct mlx5_eqe_temp_warning temp_warning;
+ struct mlx5_eqe_xrq_err xrq_err;
} __packed;
struct mlx5_eqe {
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH rdma-next 4/4] IB/mlx5: Expose XRQ legacy commands over the DEVX interface
2019-08-08 8:43 [PATCH rdma-next 0/4] Add XRQ and SRQ support to DEVX interface Leon Romanovsky
` (2 preceding siblings ...)
2019-08-08 8:43 ` [PATCH mlx5-next 3/4] IB/mlx5: Add legacy events to DEVX list Leon Romanovsky
@ 2019-08-08 8:43 ` Leon Romanovsky
2019-08-08 10:11 ` [PATCH rdma-next 0/4] Add XRQ and SRQ support to " Leon Romanovsky
4 siblings, 0 replies; 9+ messages in thread
From: Leon Romanovsky @ 2019-08-08 8:43 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Leon Romanovsky, RDMA mailing list, Edward Srouji,
Saeed Mahameed, Yishai Hadas, linux-netdev
From: Yishai Hadas <yishaih@mellanox.com>
Expose missing XRQ legacy commands over the DEVX interface.
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/infiniband/hw/mlx5/devx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/infiniband/hw/mlx5/devx.c b/drivers/infiniband/hw/mlx5/devx.c
index 3dbdfe0eb5e4..04b4e937c198 100644
--- a/drivers/infiniband/hw/mlx5/devx.c
+++ b/drivers/infiniband/hw/mlx5/devx.c
@@ -546,6 +546,8 @@ static u64 devx_get_obj_id(const void *in)
break;
case MLX5_CMD_OP_ARM_XRQ:
case MLX5_CMD_OP_SET_XRQ_DC_PARAMS_ENTRY:
+ case MLX5_CMD_OP_RELEASE_XRQ_ERROR:
+ case MLX5_CMD_OP_MODIFY_XRQ:
obj_id = get_enc_obj_id(MLX5_CMD_OP_CREATE_XRQ,
MLX5_GET(arm_xrq_in, in, xrqn));
break;
@@ -822,6 +824,8 @@ static bool devx_is_obj_modify_cmd(const void *in)
case MLX5_CMD_OP_ARM_DCT_FOR_KEY_VIOLATION:
case MLX5_CMD_OP_ARM_XRQ:
case MLX5_CMD_OP_SET_XRQ_DC_PARAMS_ENTRY:
+ case MLX5_CMD_OP_RELEASE_XRQ_ERROR:
+ case MLX5_CMD_OP_MODIFY_XRQ:
return true;
case MLX5_CMD_OP_SET_FLOW_TABLE_ENTRY:
{
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH rdma-next 0/4] Add XRQ and SRQ support to DEVX interface
2019-08-08 8:43 [PATCH rdma-next 0/4] Add XRQ and SRQ support to DEVX interface Leon Romanovsky
` (3 preceding siblings ...)
2019-08-08 8:43 ` [PATCH rdma-next 4/4] IB/mlx5: Expose XRQ legacy commands over the DEVX interface Leon Romanovsky
@ 2019-08-08 10:11 ` Leon Romanovsky
2019-08-12 15:43 ` Doug Ledford
4 siblings, 1 reply; 9+ messages in thread
From: Leon Romanovsky @ 2019-08-08 10:11 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: RDMA mailing list, Edward Srouji, Saeed Mahameed, Yishai Hadas,
linux-netdev
On Thu, Aug 08, 2019 at 11:43:54AM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
>
> Hi,
>
> This small series extends DEVX interface with SRQ and XRQ legacy commands.
Sorry for typo in cover letter, there is no SRQ here.
Thanks
>
> Thanks
>
> Yishai Hadas (4):
> net/mlx5: Use debug message instead of warn
> net/mlx5: Add XRQ legacy commands opcodes
> IB/mlx5: Add legacy events to DEVX list
> IB/mlx5: Expose XRQ legacy commands over the DEVX interface
>
> drivers/infiniband/hw/mlx5/devx.c | 12 ++++++++++++
> drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 ++++
> drivers/net/ethernet/mellanox/mlx5/core/qp.c | 2 +-
> include/linux/mlx5/device.h | 9 +++++++++
> include/linux/mlx5/mlx5_ifc.h | 2 ++
> 5 files changed, 28 insertions(+), 1 deletion(-)
>
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH rdma-next 0/4] Add XRQ and SRQ support to DEVX interface
2019-08-08 10:11 ` [PATCH rdma-next 0/4] Add XRQ and SRQ support to " Leon Romanovsky
@ 2019-08-12 15:43 ` Doug Ledford
2019-08-13 10:06 ` Leon Romanovsky
0 siblings, 1 reply; 9+ messages in thread
From: Doug Ledford @ 2019-08-12 15:43 UTC (permalink / raw)
To: Leon Romanovsky, Jason Gunthorpe
Cc: RDMA mailing list, Edward Srouji, Saeed Mahameed, Yishai Hadas,
linux-netdev
[-- Attachment #1: Type: text/plain, Size: 601 bytes --]
On Thu, 2019-08-08 at 10:11 +0000, Leon Romanovsky wrote:
> On Thu, Aug 08, 2019 at 11:43:54AM +0300, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@mellanox.com>
> >
> > Hi,
> >
> > This small series extends DEVX interface with SRQ and XRQ legacy
> > commands.
>
> Sorry for typo in cover letter, there is no SRQ here.
Series looks fine to me. Are you planning on the first two via mlx5-
next and the remainder via RDMA tree?
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: B826A3330E572FDD
Fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH rdma-next 0/4] Add XRQ and SRQ support to DEVX interface
2019-08-12 15:43 ` Doug Ledford
@ 2019-08-13 10:06 ` Leon Romanovsky
2019-08-13 16:28 ` Doug Ledford
0 siblings, 1 reply; 9+ messages in thread
From: Leon Romanovsky @ 2019-08-13 10:06 UTC (permalink / raw)
To: Doug Ledford
Cc: Jason Gunthorpe, RDMA mailing list, Edward Srouji,
Saeed Mahameed, Yishai Hadas, linux-netdev
On Mon, Aug 12, 2019 at 11:43:58AM -0400, Doug Ledford wrote:
> On Thu, 2019-08-08 at 10:11 +0000, Leon Romanovsky wrote:
> > On Thu, Aug 08, 2019 at 11:43:54AM +0300, Leon Romanovsky wrote:
> > > From: Leon Romanovsky <leonro@mellanox.com>
> > >
> > > Hi,
> > >
> > > This small series extends DEVX interface with SRQ and XRQ legacy
> > > commands.
> >
> > Sorry for typo in cover letter, there is no SRQ here.
>
> Series looks fine to me. Are you planning on the first two via mlx5-
> next and the remainder via RDMA tree?
>
Thanks, applied to mlx5-next
b1635ee6120c net/mlx5: Add XRQ legacy commands opcodes
647d58a989b3 net/mlx5: Use debug message instead of warn
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH rdma-next 0/4] Add XRQ and SRQ support to DEVX interface
2019-08-13 10:06 ` Leon Romanovsky
@ 2019-08-13 16:28 ` Doug Ledford
0 siblings, 0 replies; 9+ messages in thread
From: Doug Ledford @ 2019-08-13 16:28 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Jason Gunthorpe, RDMA mailing list, Edward Srouji,
Saeed Mahameed, Yishai Hadas, linux-netdev
[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]
On Tue, 2019-08-13 at 10:06 +0000, Leon Romanovsky wrote:
> On Mon, Aug 12, 2019 at 11:43:58AM -0400, Doug Ledford wrote:
> > On Thu, 2019-08-08 at 10:11 +0000, Leon Romanovsky wrote:
> > > On Thu, Aug 08, 2019 at 11:43:54AM +0300, Leon Romanovsky wrote:
> > > > From: Leon Romanovsky <leonro@mellanox.com>
> > > >
> > > > Hi,
> > > >
> > > > This small series extends DEVX interface with SRQ and XRQ legacy
> > > > commands.
> > >
> > > Sorry for typo in cover letter, there is no SRQ here.
> >
> > Series looks fine to me. Are you planning on the first two via
> > mlx5-
> > next and the remainder via RDMA tree?
> >
>
> Thanks, applied to mlx5-next
>
> b1635ee6120c net/mlx5: Add XRQ legacy commands opcodes
> 647d58a989b3 net/mlx5: Use debug message instead of warn
Merged mlx5-next, then applied remaining two patches to for-next.
Thanks.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: B826A3330E572FDD
Fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread