Re: [PATCH RFC iproute2-next 2/2] rdma: print provider resource attributes

2018-05-02 Thread Stephen Hemminger
On Wed, 2 May 2018 16:38:52 +0300 Leon Romanovsky wrote: > On Mon, Apr 30, 2018 at 08:25:24AM -0700, Stephen Hemminger wrote: > > On Mon, 30 Apr 2018 07:36:18 -0700 > > Steve Wise wrote: > > > > > +#define nla_type(attr) ((attr)->nla_type & NLA_TYPE_MASK) > > > + > > > +void newline(struct rd

Re: [PATCH RFC iproute2-next 2/2] rdma: print provider resource attributes

2018-05-02 Thread Leon Romanovsky
On Mon, Apr 30, 2018 at 08:25:24AM -0700, Stephen Hemminger wrote: > On Mon, 30 Apr 2018 07:36:18 -0700 > Steve Wise wrote: > > > +#define nla_type(attr) ((attr)->nla_type & NLA_TYPE_MASK) > > + > > +void newline(struct rd *rd) > > +{ > > + if (rd->json_output) > > + jsonw_end_array(rd

Re: [PATCH RFC iproute2-next 2/2] rdma: print provider resource attributes

2018-04-30 Thread Stephen Hemminger
On Mon, 30 Apr 2018 07:36:18 -0700 Steve Wise wrote: > +#define nla_type(attr) ((attr)->nla_type & NLA_TYPE_MASK) > + > +void newline(struct rd *rd) > +{ > + if (rd->json_output) > + jsonw_end_array(rd->jw); > + else > + pr_out("\n"); > +} > + > +void newline_inden

[PATCH RFC iproute2-next 2/2] rdma: print provider resource attributes

2018-04-30 Thread Steve Wise
This enhancement allows printing rdma device-specific state, if provided by the kernel. This is done in a generic manner, so rdma tool doesn't need to know about the details of every type of rdma device. Provider attributes for a rdma resource are in the form of tuples, where the key is a string