summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ocrdma/ocrdma_ah.c
diff options
context:
space:
mode:
authorMitesh Ahuja <mitesh.ahuja@avagotech.com>2015-05-19 11:32:38 +0530
committerDoug Ledford <dledford@redhat.com>2015-05-18 10:25:24 -0400
commitd27b2f15eb535b4f02a75070108c08cefb540257 (patch)
tree7864d11c30fdd5de1037968c8c6fff6b32162ebd /drivers/infiniband/hw/ocrdma/ocrdma_ah.c
parent59582d86e23f30466413a04cc4db678b09f937ea (diff)
downloadlinux-d27b2f15eb535b4f02a75070108c08cefb540257.tar.gz
linux-d27b2f15eb535b4f02a75070108c08cefb540257.tar.bz2
linux-d27b2f15eb535b4f02a75070108c08cefb540257.zip
RDMA/ocrdma: Fix dmac resolution for link local address
rdma_addr_find_dmac_by_grh fails to resolve dmac for link local address. Use rdma_get_ll_mac to resolve the link local address. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com> Signed-off-by: Mitesh Ahuja <mitesh.ahuja@avagotech.com> Signed-off-by: Devesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: Selvin Xavier <selvin.xavier@avagotech.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma/ocrdma_ah.c')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_ah.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c
index 2a5993b75651..f5a5ea836dbd 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c
@@ -127,7 +127,9 @@ struct ib_ah *ocrdma_create_ah(struct ib_pd *ibpd, struct ib_ah_attr *attr)
goto av_conf_err;
}
- if (pd->uctx) {
+ if ((pd->uctx) &&
+ (!rdma_is_multicast_addr((struct in6_addr *)attr->grh.dgid.raw)) &&
+ (!rdma_link_local_addr((struct in6_addr *)attr->grh.dgid.raw))) {
status = rdma_addr_find_dmac_by_grh(&sgid, &attr->grh.dgid,
attr->dmac, &attr->vlan_id);
if (status) {