Skip to contentSkip to conversation

net/mlx5: Report multi packet WQE capabilities

PATCH In review Leon Romanovsky 2 participants 3 messages Oct 31, 2016 – Dec 14, 2016 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 net/mlx5: Report multi packet WQE capabilities

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

Multi packet WQE enables sending multiple fix sized packets using a single WQE. The exposed field reports such HW support.

---
 include/linux/mlx5/mlx5_ifc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mlx5/mlx5_ifc.h +1 -1
index 6045d4d..2def5b9 100644
@@ -556,7 +556,7 @@ struct mlx5_ifc_per_protocol_networking_offload_caps_bits {
 	u8         self_lb_en_modifiable[0x1];
 	u8         reserved_at_9[0x2];
 	u8         max_lso_cap[0x5];
-	u8         reserved_at_10[0x2];
+	u8         multi_pkt_send_wqe[0x2];
 	u8	   wqe_inline_mode[0x2];
 	u8         rss_ind_tbl_cap[0x4];
 	u8         reg_umr_sq[0x1];
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1477908921-12222-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

#2 lore raw

PATCH 2/2 IB/mlx5: Report mlx5 multi packet WQE capabilities when querying device

From: Bodong Wang <bodong-VPRAkNaXOzVWk0Htik3J/[email protected]>

The capabilities whether hardware support multi packet WQE or not is exposed to user space through query_device by uhw.

---
 drivers/infiniband/hw/mlx5/main.c | 11 +++++++++++
 include/uapi/rdma/mlx5-abi.h      |  2 ++
 2 files changed, 13 insertions(+)
drivers/infiniband/hw/mlx5/main.c +11 -0
index 2217477..9245b51 100644
@@ -669,6 +669,17 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
 			1 << MLX5_CAP_GEN(dev->mdev, log_max_rq);
 	}
 
+	if (field_avail(typeof(resp), mlx5_ib_support_multi_pkt_send_wqes,
+			uhw->outlen)) {
+		resp.mlx5_ib_support_multi_pkt_send_wqes =
+			MLX5_CAP_ETH(mdev, multi_pkt_send_wqe);
+		resp.response_length +=
+			sizeof(resp.mlx5_ib_support_multi_pkt_send_wqes);
+	}
+
+	if (field_avail(typeof(resp), reserved, uhw->outlen))
+		resp.response_length += sizeof(resp.reserved);
+
 	if (uhw->outlen) {
 		err = ib_copy_to_udata(uhw, &resp, resp.response_length);
 
include/uapi/rdma/mlx5-abi.h +2 -0
index f5d0f4e..93d6b9f 100644
@@ -129,6 +129,8 @@ struct mlx5_ib_query_device_resp {
 	__u32	response_length;
 	struct	mlx5_ib_tso_caps tso_caps;
 	struct	mlx5_ib_rss_caps rss_caps;
+	__u32	mlx5_ib_support_multi_pkt_send_wqes;
+	__u32	reserved;
 };
 
 struct mlx5_ib_create_cq {
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
In reply to a message not in the archive
Quoted 7 lines · Leon Romanovsky

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

Multi packet WQE enables sending multiple fix sized packets using a single WQE. The exposed field reports such HW support.

Both the WQE and CQE capabilities patch series applied, thanks.

Signature · 2 lines
Doug Ledford <[email protected]>
    GPG Key ID: 0E572FDD