diff options
author | Parav Pandit <parav@mellanox.com> | 2018-04-01 08:08:24 -0400 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-04-03 23:34:16 -0400 |
commit | 414448d249d82c9be93b35e61e0303e84ef2f959 (patch) | |
tree | e9d417bc1511726395c4171380e16be804999d96 /drivers/infiniband/core/cache.c | |
parent | 3e44e0ee0893cbea257e585dbd4c7d2ff00f1a6b (diff) |
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>
Diffstat (limited to 'drivers/infiniband/core/cache.c')
-rw-r--r-- | drivers/infiniband/core/cache.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c index 045ca11fa135..e337b08de2ff 100644 --- a/drivers/infiniband/core/cache.c +++ b/drivers/infiniband/core/cache.c | |||
@@ -157,7 +157,7 @@ static void del_roce_gid(struct ib_device *device, u8 port_num, | |||
157 | table->data_vec[ix].gid.raw); | 157 | table->data_vec[ix].gid.raw); |
158 | 158 | ||
159 | if (rdma_cap_roce_gid_table(device, port_num)) | 159 | if (rdma_cap_roce_gid_table(device, port_num)) |
160 | device->del_gid(device, port_num, ix, | 160 | device->del_gid(&table->data_vec[ix].attr, |
161 | &table->data_vec[ix].context); | 161 | &table->data_vec[ix].context); |
162 | dev_put(table->data_vec[ix].attr.ndev); | 162 | dev_put(table->data_vec[ix].attr.ndev); |
163 | } | 163 | } |
@@ -186,8 +186,7 @@ static int add_roce_gid(struct ib_gid_table *table, | |||
186 | } | 186 | } |
187 | 187 | ||
188 | if (rdma_cap_roce_gid_table(attr->device, attr->port_num)) { | 188 | if (rdma_cap_roce_gid_table(attr->device, attr->port_num)) { |
189 | ret = attr->device->add_gid(attr->device, attr->port_num, | 189 | ret = attr->device->add_gid(gid, attr, &entry->context); |
190 | ix, gid, attr, &entry->context); | ||
191 | if (ret) { | 190 | if (ret) { |
192 | pr_err("%s GID add failed device=%s port=%d index=%d\n", | 191 | pr_err("%s GID add failed device=%s port=%d index=%d\n", |
193 | __func__, attr->device->name, attr->port_num, | 192 | __func__, attr->device->name, attr->port_num, |