diff options
author | Matan Barak <matanb@mellanox.com> | 2015-10-15 18:38:45 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-10-21 23:48:17 -0400 |
commit | 55ee3ab2e49a9ead850722ef47698243dd226d16 (patch) | |
tree | 5e1d6c782a7ca0f41878e49deb94e9dd321d7418 /drivers/infiniband/core/cm.c | |
parent | fbfb6625ea2d1bd535db03838df381768a2d6865 (diff) | |
download | linux-55ee3ab2e49a9ead850722ef47698243dd226d16.tar.gz linux-55ee3ab2e49a9ead850722ef47698243dd226d16.tar.bz2 linux-55ee3ab2e49a9ead850722ef47698243dd226d16.zip |
IB/core: Add netdev and gid attributes paramteres to cache
Adding an ability to query the IB cache by a netdev and get the
attributes of a GID. These parameters are necessary in order to
successfully resolve the required GID (when the netdevice is known)
and get the Ethernet L2 attributes from a GID.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Reviewed-By: Devesh Sharma <devesh.sharma@avagotech.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/cm.c')
-rw-r--r-- | drivers/infiniband/core/cm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 4f918b929eca..2d8a0e4c42d6 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -365,7 +365,7 @@ static int cm_init_av_by_path(struct ib_sa_path_rec *path, struct cm_av *av) read_lock_irqsave(&cm.device_lock, flags); list_for_each_entry(cm_dev, &cm.device_list, list) { if (!ib_find_cached_gid(cm_dev->ib_device, &path->sgid, - &p, NULL)) { + NULL, &p, NULL)) { port = cm_dev->port[p-1]; break; } @@ -1643,7 +1643,8 @@ static int cm_req_handler(struct cm_work *work) ret = cm_init_av_by_path(&work->path[0], &cm_id_priv->av); if (ret) { ib_get_cached_gid(work->port->cm_dev->ib_device, - work->port->port_num, 0, &work->path[0].sgid); + work->port->port_num, 0, &work->path[0].sgid, + NULL); ib_send_cm_rej(cm_id, IB_CM_REJ_INVALID_GID, &work->path[0].sgid, sizeof work->path[0].sgid, NULL, 0); |