diff options
author | Devesh Sharma <devesh.sharma@emulex.com> | 2014-11-24 04:33:39 (GMT) |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-12-16 02:13:09 (GMT) |
commit | e5f0508d43b45d138d426afcaa1e4cce7658cff4 (patch) | |
tree | 9e044a2b6e27c93f4a76c5b5165b17add1ed1752 /drivers/infiniband/hw | |
parent | 95bf0093a95f864044d7782ddd15528350f915be (diff) | |
download | linux-e5f0508d43b45d138d426afcaa1e4cce7658cff4.tar.xz |
RDMA/ocrdma: Always resolve destination mac from GRH for UD QPs
For user applications that use UD QPs, always resolve destination MAC
from the GRH. This is to avoid failure due to any garbage value in
the attr->dmac.
Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c index ac02ce4..f3cc8c9 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c @@ -96,7 +96,6 @@ struct ib_ah *ocrdma_create_ah(struct ib_pd *ibpd, struct ib_ah_attr *attr) struct ocrdma_pd *pd = get_ocrdma_pd(ibpd); struct ocrdma_dev *dev = get_ocrdma_dev(ibpd->device); union ib_gid sgid; - u8 zmac[ETH_ALEN]; if (!(attr->ah_flags & IB_AH_GRH)) return ERR_PTR(-EINVAL); @@ -118,9 +117,7 @@ struct ib_ah *ocrdma_create_ah(struct ib_pd *ibpd, struct ib_ah_attr *attr) goto av_conf_err; } - memset(&zmac, 0, ETH_ALEN); - if (pd->uctx && - memcmp(attr->dmac, &zmac, ETH_ALEN)) { + if (pd->uctx) { status = rdma_addr_find_dmac_by_grh(&sgid, &attr->grh.dgid, attr->dmac, &attr->vlan_id); if (status) { |