> -----Original Message----- > From: Jason Gunthorpe [mailto:jgg@xxxxxxxx] > Sent: Wednesday, March 21, 2018 4:55 PM > To: Leon Romanovsky <leon@xxxxxxxxxx> > Cc: Doug Ledford <dledford@xxxxxxxxxx>; Leon Romanovsky > <leonro@xxxxxxxxxxxx>; RDMA mailing list <linux-rdma@xxxxxxxxxxxxxxx>; > Mark Bloch <markb@xxxxxxxxxxxx>; Parav Pandit <parav@xxxxxxxxxxxx> > Subject: Re: [PATCH rdma-next 2/2] IB/core: Refer to RoCE port property > instead of GID table property > > On Wed, Mar 21, 2018 at 05:16:36PM +0200, Leon Romanovsky wrote: > > From: Parav Pandit <parav@xxxxxxxxxxxx> > > > > ib_query_gid() in commit [1] refers to RoCE GID table capability of > > the HCA using rdma_cap_roce_gid_table(). > > ib_core maintains the GID table cache regardless of the HCA provider > > drivers capability to maintain RoCE GID table. > > Therefore, whether to return a GID table entry from the software cache > > or from HCA should be done based on whether the port is RoCE or not. > > > > [1] commit 03db3a2d81e6 ("IB/core: Add RoCE GID table management") > > > > Reviewed-by: Mark Bloch <markb@xxxxxxxxxxxx> > > Signed-off-by: Parav Pandit <parav@xxxxxxxxxxxx> > > Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> > > drivers/infiniband/core/device.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > applied to for-next > > > diff --git a/drivers/infiniband/core/device.c > > b/drivers/infiniband/core/device.c > > index ef0b1047c5f7..a6e102e58d1a 100644 > > +++ b/drivers/infiniband/core/device.c > > @@ -877,7 +877,7 @@ int ib_query_gid(struct ib_device *device, > > u8 port_num, int index, union ib_gid *gid, > > struct ib_gid_attr *attr) > > { > > - if (rdma_cap_roce_gid_table(device, port_num)) > > + if (rdma_protocol_roce(device, port_num)) > > return ib_get_cached_gid(device, port_num, index, gid, attr); > > > > if (attr) > > Is any caller of rdma_cap_roce_gid_table actually correct to use it? > Maybe some in the core code? > Core code looks ok to me upcoming patches and existing code. > Particularly the driver stuff.. A driver that always sets add_gid then calls > rdma_cap_roce_gid_table seems confused, should just use rdma_protocol_roce > right? > Not sure. They can likely use rdma_protocol_roce(). Mlx4 has some complexity around VF that I don't fully understand. Qedr might have iWarp and RoCE both so it might need it, but yes in that case it can always make call to rdma_protocol_roce(). -- 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