summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-07-03 15:44:26 +0100
committerMark Brown <broonie@kernel.org>2026-07-03 15:44:26 +0100
commita7d435fd4c2f7e42117f5f31c3c40010b12d855a (patch)
treeb838e4e5f704e318096050df79ad8c8d881e732c
parenteecad93810611868c31955a16e741e87171430f8 (diff)
parentc3fd3966f7dd871e47f9bcd8fe90d6e23e4cdb1a (diff)
downloadlinux-next-a7d435fd4c2f7e42117f5f31c3c40010b12d855a.tar.gz
linux-next-a7d435fd4c2f7e42117f5f31c3c40010b12d855a.zip
Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git
-rw-r--r--Documentation/infiniband/user_mad.rst2
-rw-r--r--drivers/infiniband/core/iwpm_msg.c2
-rw-r--r--drivers/infiniband/core/nldev.c29
-rw-r--r--drivers/infiniband/core/uverbs_std_types_mr.c6
-rw-r--r--drivers/infiniband/hw/mlx5/umr.c2
-rw-r--r--include/uapi/rdma/rdma_netlink.h5
6 files changed, 38 insertions, 8 deletions
diff --git a/Documentation/infiniband/user_mad.rst b/Documentation/infiniband/user_mad.rst
index d88abfc0e370..cd66e7623d66 100644
--- a/Documentation/infiniband/user_mad.rst
+++ b/Documentation/infiniband/user_mad.rst
@@ -62,7 +62,7 @@ Receiving MADs
struct ib_user_mad *mad;
mad = malloc(sizeof *mad + 256);
ret = read(fd, mad, sizeof *mad + 256);
- if (ret == -ENOSPC)) {
+ if (ret == -ENOSPC) {
length = mad.length;
free(mad);
mad = malloc(sizeof *mad + length);
diff --git a/drivers/infiniband/core/iwpm_msg.c b/drivers/infiniband/core/iwpm_msg.c
index 4625abd29ac0..1b10f2973ad9 100644
--- a/drivers/infiniband/core/iwpm_msg.c
+++ b/drivers/infiniband/core/iwpm_msg.c
@@ -268,7 +268,7 @@ int iwpm_add_and_query_mapping(struct iwpm_sa_data *pm_msg, u8 nl_client)
if (ret)
goto query_mapping_error;
- /* If flags are required and we're not V4, then return a quite error */
+ /* If flags are required and we're not V4, then return a quiet error */
if (pm_msg->flags && iwpm_ulib_version == IWPM_UABI_VERSION_MIN) {
ret = -EINVAL;
goto query_mapping_error_nowarn;
diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
index 02a0a9c0a4a6..f599c24b34e8 100644
--- a/drivers/infiniband/core/nldev.c
+++ b/drivers/infiniband/core/nldev.c
@@ -188,6 +188,7 @@ static const struct nla_policy nldev_policy[RDMA_NLDEV_ATTR_MAX] = {
[RDMA_NLDEV_ATTR_FRMR_POOLS_AGING_PERIOD] = { .type = NLA_U32 },
[RDMA_NLDEV_ATTR_FRMR_POOL_PINNED_HANDLES] = { .type = NLA_U32 },
[RDMA_NLDEV_ATTR_FRMR_POOL_KEY_KERNEL_VENDOR_KEY] = { .type = NLA_U64 },
+ [RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_MAX] = { .type = NLA_U64 },
};
static int put_driver_name_print_type(struct sk_buff *msg, const char *name,
@@ -413,7 +414,7 @@ out:
}
static int fill_res_info_entry(struct sk_buff *msg,
- const char *name, u64 curr)
+ const char *name, u64 curr, u64 max)
{
struct nlattr *entry_attr;
@@ -427,6 +428,9 @@ static int fill_res_info_entry(struct sk_buff *msg,
if (nla_put_u64_64bit(msg, RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_CURR, curr,
RDMA_NLDEV_ATTR_PAD))
goto err;
+ if (max && nla_put_u64_64bit(msg, RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_MAX,
+ max, RDMA_NLDEV_ATTR_PAD))
+ goto err;
nla_nest_end(msg, entry_attr);
return 0;
@@ -450,7 +454,7 @@ static int fill_res_info(struct sk_buff *msg, struct ib_device *device,
};
struct nlattr *table_attr;
- int ret, i, curr;
+ int ret, i, curr, max;
if (fill_nldev_handle(msg, device))
return -EMSGSIZE;
@@ -463,7 +467,26 @@ static int fill_res_info(struct sk_buff *msg, struct ib_device *device,
if (!names[i])
continue;
curr = rdma_restrack_count(device, i, show_details);
- ret = fill_res_info_entry(msg, names[i], curr);
+ switch (i) {
+ case RDMA_RESTRACK_QP:
+ max = device->attrs.max_qp;
+ break;
+ case RDMA_RESTRACK_CQ:
+ max = device->attrs.max_cq;
+ break;
+ case RDMA_RESTRACK_MR:
+ max = device->attrs.max_mr;
+ break;
+ case RDMA_RESTRACK_PD:
+ max = device->attrs.max_pd;
+ break;
+ case RDMA_RESTRACK_SRQ:
+ max = device->attrs.max_srq;
+ break;
+ default:
+ max = 0;
+ }
+ ret = fill_res_info_entry(msg, names[i], curr, max);
if (ret)
goto err;
}
diff --git a/drivers/infiniband/core/uverbs_std_types_mr.c b/drivers/infiniband/core/uverbs_std_types_mr.c
index 570b9656801d..0c72f801e0d3 100644
--- a/drivers/infiniband/core/uverbs_std_types_mr.c
+++ b/drivers/infiniband/core/uverbs_std_types_mr.c
@@ -364,7 +364,8 @@ static int UVERBS_HANDLER(UVERBS_METHOD_REG_MR)(
dmah, attrs);
else
mr = pd->device->ops.reg_user_mr(pd, addr, length, iova,
- access_flags, dmah, NULL);
+ access_flags, dmah,
+ &attrs->driver_udata);
if (IS_ERR(mr))
return PTR_ERR(mr);
@@ -527,7 +528,8 @@ DECLARE_UVERBS_NAMED_METHOD(
UA_MANDATORY),
UVERBS_ATTR_PTR_OUT(UVERBS_ATTR_REG_MR_RESP_RKEY,
UVERBS_ATTR_TYPE(u32),
- UA_MANDATORY));
+ UA_MANDATORY),
+ UVERBS_ATTR_UHW());
DECLARE_UVERBS_NAMED_METHOD_DESTROY(
UVERBS_METHOD_MR_DESTROY,
diff --git a/drivers/infiniband/hw/mlx5/umr.c b/drivers/infiniband/hw/mlx5/umr.c
index 48cae5cc1c1b..c595b85b428c 100644
--- a/drivers/infiniband/hw/mlx5/umr.c
+++ b/drivers/infiniband/hw/mlx5/umr.c
@@ -978,7 +978,7 @@ static inline int _mlx5r_dmabuf_umr_update_pas(struct mlx5_ib_mr *mr,
start_block, nblocks);
}
-/**
+/*
* This function makes an mkey non-present by zapping the translation entries of
* the mkey by zapping (zeroing out) the first N entries, where N is determined
* by the largest page size supported by the device and the MR length.
diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
index aac9782ddc09..3af946ecbac3 100644
--- a/include/uapi/rdma/rdma_netlink.h
+++ b/include/uapi/rdma/rdma_netlink.h
@@ -605,6 +605,11 @@ enum rdma_nldev_attr {
RDMA_NLDEV_ATTR_FRMR_POOL_KEY_KERNEL_VENDOR_KEY, /* u64 */
/*
+ * Resource summary entry maximum value.
+ */
+ RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY_MAX, /* u64 */
+
+ /*
* Always the end
*/
RDMA_NLDEV_ATTR_MAX