RDMA: Use ib_gid_attr during GID modification
Now that ib_gid_attr contains device, port and index, simplify the provider APIs add_gid() and del_gid() to use device, port and index fields from the ib_gid_attr attributes structure. 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

parent
3e44e0ee08
commit
414448d249
@@ -77,19 +77,17 @@ out:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int rxe_add_gid(struct ib_device *device, u8 port_num, unsigned int
|
||||
index, const union ib_gid *gid,
|
||||
static int rxe_add_gid(const union ib_gid *gid,
|
||||
const struct ib_gid_attr *attr, void **context)
|
||||
{
|
||||
if (index >= RXE_PORT_GID_TBL_LEN)
|
||||
if (attr->index >= RXE_PORT_GID_TBL_LEN)
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rxe_del_gid(struct ib_device *device, u8 port_num, unsigned int
|
||||
index, void **context)
|
||||
static int rxe_del_gid(const struct ib_gid_attr *attr, void **context)
|
||||
{
|
||||
if (index >= RXE_PORT_GID_TBL_LEN)
|
||||
if (attr->index >= RXE_PORT_GID_TBL_LEN)
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user