Re: [PATCH 3/9] IB/core: add a helper to check for READ WITH INVALIDATE support

Jason Gunthorpe
2016-03-03T17:53:01Z

On Thu, Mar 03, 2016 at 02:10:50PM +0100, 'Christoph Hellwig' wrote:
> On Tue, Mar 01, 2016 at 09:45:40AM -0600, Steve Wise wrote:
> > > > +static inline bool rdma_has_read_invalidate(struct ib_device *dev, u32 port_num)
> > >
> > > Is rdma_device_sup_read_inv() a better name?
> >
> > or rdma_dev_supports_read_inv()
>
> I looked at the naming and I think a rdma_device_* or rdma_dev_* is
> simplify wrong - per the official decree we can support different
> protocols on different ports, and that's why we also pass the port_num
> to this function. How about rdma_cap_read_inv?

We can't support different protocols on different ports. The ports
hung off a struct device must be similar. The rules might be bent a
bit for rocee/ib sharing (not a great idea, IMHO) but certainly iwap
and !iwarp cannot share a struct device.

Jason