On Fri, Dec 22, 2017 at 04:37:38PM -0700, Jason Gunthorpe wrote: > On Fri, Dec 22, 2017 at 08:45:35AM -0800, Dennis Dalessandro wrote: > > Don Hiatt (2): > > IB/core: Use rdma_cap_opa_mad to check for OPA > > IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit > > For now I took these two to for-next the other should sit on the list > for a bit. Just to emphasize how easy to add new field in nldev: diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c index 6b22f1f2d084..ca07f845a6ae 100644 --- a/drivers/infiniband/core/nldev.c +++ b/drivers/infiniband/core/nldev.c @@ -70,6 +70,7 @@ static const struct nla_policy nldev_policy[RDMA_NLDEV_ATTR_MAX] = { [RDMA_NLDEV_ATTR_RES_PID] = { .type = NLA_U32 }, [RDMA_NLDEV_ATTR_RES_PID_COMM] = { .type = NLA_NUL_STRING, .len = TASK_COMM_LEN }, + [RDMA_NLDEV_ATTR_RES_RNR_TIMEOUT] = { .type = NLA_U8 }, }; static int fill_nldev_handle(struct sk_buff *msg, struct ib_device *device) @@ -283,6 +284,9 @@ static int fill_res_qp_entry(struct sk_buff *msg, RDMA_NLDEV_ATTR_RES_PID_COMM, qp->res.task_comm)) goto err; + if (nla_put_u8(msg, RDMA_NLDEV_ATTR_RES_RNR_TIMEOUT, qp_attr.min_rnr_timer)) + goto err; + nla_nest_end(msg, entry_attr); return 0; diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h index 9a90cd9f614e..241a9184a9f7 100644 --- a/include/uapi/rdma/rdma_netlink.h +++ b/include/uapi/rdma/rdma_netlink.h @@ -357,6 +357,8 @@ enum rdma_nldev_attr { */ RDMA_NLDEV_ATTR_RES_PID_COMM, /* string */ + RDMA_NLDEV_ATTR_RES_RNR_TIMEOUT, /* u8 */ + RDMA_NLDEV_ATTR_MAX }; #endif /* _UAPI_RDMA_NETLINK_H */ > > Thanks > Jason > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html
Attachment:
signature.asc
Description: PGP signature