diff mbox

[for-next,0/3] IB/hfi1,core: Driver updates for 12/22/2017

Message ID 20171225104615.GH2942@mtr-leonro.local (mailing list archive)
State RFC
Headers show

Commit Message

Leon Romanovsky Dec. 25, 2017, 10:46 a.m. UTC
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:


>
> Thanks
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Dennis Dalessandro Jan. 3, 2018, 3:13 p.m. UTC | #1
On 12/25/2017 5:46 AM, Leon Romanovsky wrote:
> 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:

Agree. I'm going to look into that when I can. For now, the patch is 
minor and adds something important for debugging. I've made folks aware 
internally this is the last patch like this, so I'd like to see this go 
in for the current cycle and then we'll get to work on the new 
implementation. Does that sound reasonable?

-Denny
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Leon Romanovsky Jan. 3, 2018, 3:25 p.m. UTC | #2
On Wed, Jan 03, 2018 at 10:13:19AM -0500, Dennis Dalessandro wrote:
> On 12/25/2017 5:46 AM, Leon Romanovsky wrote:
> > 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:
>
> Agree. I'm going to look into that when I can. For now, the patch is minor
> and adds something important for debugging. I've made folks aware internally
> this is the last patch like this, so I'd like to see this go in for the
> current cycle and then we'll get to work on the new implementation. Does
> that sound reasonable?

It will be great.

Thanks

>
> -Denny
diff mbox

Patch

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 */