RDMA/providers: Simplify query_gid callback of RoCE providers
ib_query_gid() fetches the GID from the software cache maintained in ib_core for RoCE ports. Therefore, simplify the provider drivers for RoCE to treat query_gid() callback as never called for RoCE, and only require non-RoCE devices to implement it. Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:

committed by
Jason Gunthorpe

szülő
72e1ff0fb7
commit
0e1f9b9244
@@ -77,23 +77,6 @@ out:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int rxe_query_gid(struct ib_device *device,
|
||||
u8 port_num, int index, union ib_gid *gid)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (index > RXE_PORT_GID_TBL_LEN)
|
||||
return -EINVAL;
|
||||
|
||||
ret = ib_get_cached_gid(device, port_num, index, gid, NULL);
|
||||
if (ret == -EAGAIN) {
|
||||
memcpy(gid, &zgid, sizeof(*gid));
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int rxe_add_gid(struct ib_device *device, u8 port_num, unsigned int
|
||||
index, const union ib_gid *gid,
|
||||
const struct ib_gid_attr *attr, void **context)
|
||||
@@ -1285,7 +1268,6 @@ int rxe_register_device(struct rxe_dev *rxe)
|
||||
dev->query_port = rxe_query_port;
|
||||
dev->modify_port = rxe_modify_port;
|
||||
dev->get_link_layer = rxe_get_link_layer;
|
||||
dev->query_gid = rxe_query_gid;
|
||||
dev->get_netdev = rxe_get_netdev;
|
||||
dev->add_gid = rxe_add_gid;
|
||||
dev->del_gid = rxe_del_gid;
|
||||
|
Reference in New Issue
Block a user