diff options
author | Matan Barak <matanb@mellanox.com> | 2015-10-15 18:38:51 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-10-21 23:48:17 -0400 |
commit | dbf727de7440f73c4b92be4b958cbc24977e8ca2 (patch) | |
tree | b7b5901767dc7f1ba8ce07126d10fe4cd8470390 /drivers/infiniband/core/addr.c | |
parent | 99b27e3b5da0871cb43980960fb14ff625adffad (diff) | |
download | linux-dbf727de7440f73c4b92be4b958cbc24977e8ca2.tar.gz linux-dbf727de7440f73c4b92be4b958cbc24977e8ca2.tar.bz2 linux-dbf727de7440f73c4b92be4b958cbc24977e8ca2.zip |
IB/core: Use GID table in AH creation and dmac resolution
Previously, vlan id and source MAC were used from QP attributes. Since
the net device is now stored in the GID attributes, they could be used
instead of getting this information from the QP attributes.
IB_QP_SMAC, IB_QP_ALT_SMAC, IB_QP_VID and IB_QP_ALT_VID were removed
because there is no known libibverbs that uses them.
This commit also modifies the vendors (mlx4, ocrdma) drivers in order
to use the new approach.
ocrdma driver changes were done by Somnath Kotur <Somnath.Kotur@Avagotech.Com>
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/addr.c')
-rw-r--r-- | drivers/infiniband/core/addr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 746cdf56bc76..d3c42b3c1b51 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -458,7 +458,7 @@ static void resolve_cb(int status, struct sockaddr *src_addr, } int rdma_addr_find_dmac_by_grh(const union ib_gid *sgid, const union ib_gid *dgid, - u8 *dmac, u16 *vlan_id) + u8 *dmac, u16 *vlan_id, int if_index) { int ret = 0; struct rdma_dev_addr dev_addr; @@ -476,6 +476,7 @@ int rdma_addr_find_dmac_by_grh(const union ib_gid *sgid, const union ib_gid *dgi rdma_gid2ip(&dgid_addr._sockaddr, dgid); memset(&dev_addr, 0, sizeof(dev_addr)); + dev_addr.bound_dev_if = if_index; ctx.addr = &dev_addr; init_completion(&ctx.comp); |