lkml.org 
[lkml]   [2015]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 04/28] IB/Verbs: Reform IB-core cm
On Mon, Apr 13, 2015 at 01:29:30PM -0600, Jason Gunthorpe wrote:
> On Mon, Apr 13, 2015 at 06:40:35PM +0000, Hefty, Sean wrote:
> > > > - if (rdma_node_get_transport(ib_device->node_type) !=
> > > RDMA_TRANSPORT_IB)
> > > > - return;
> > > > + int count = 0;
> > >
> > > I'm ok with this as an intermediate patch but going forward if we are
> > > going to
> > > have calls like
> > >
> > > static inline int cap_ib_cm_dev(struct ib_device *device)
> >
> > I would rather keep everything to checking per port, not per device.
> > Specifically, because we have code that does this:
>
> Argee.
>
> I asked Michael for it and stand by it, the property is per-port, not
> per device. Having the per-device tests just muddles the logic, look
> at the trouble Sean notices in #10 when we are now forced to think of
> things clearly.

What about having those be helpers within the corresponding C code?

For example move cap_ib_cm_dev() into cm.c. Or just put the logic at the top
of cm_add_one()?

I think that having the ib_umad, ib_sa, and ib_cm modules skip devices which
have no ports which support those functions makes the code clean. But I
understand the desire to have checks from the devices be per port.

Also for these function clean up patches we preserve the existing logic.

Ira



\
 
 \ /
  Last update: 2015-04-13 22:21    [W:0.110 / U:3.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site