diff options
author | Devesh Sharma <devesh.sharma@avagotech.com> | 2016-01-28 16:59:59 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-01 01:12:10 +0300 |
commit | 834d16d66ebc2b5faa06af0bda3bb6f9c71b3996 (patch) | |
tree | 5efcd294f393fa6a3c0725ff2b8ff8af075d3a32 /drivers/infiniband/hw/ocrdma/ocrdma_ah.c | |
parent | bcf117e2cf6f451b46780e0660e9ae7ab33a33ea (diff) | |
download | linux-834d16d66ebc2b5faa06af0bda3bb6f9c71b3996.tar.xz |
RDMA/ocrdma: Support user AH creation for RoCE-v2
This patch adds support to create RoCE-v2 compatible AH. It uses ahid
field to tell network-header-type to user space library. The library
has to decode network-header-type from ahid field.
Signed-off-by: Somnath Kotur <somnath.kotur@avagotech.com>
Signed-off-by: Devesh Sharma <devesh.sharma@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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c index 4aed1dbb0b97..e3c4f1784ce8 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c @@ -218,6 +218,11 @@ struct ib_ah *ocrdma_create_ah(struct ib_pd *ibpd, struct ib_ah_attr *attr) ahid_addr = pd->uctx->ah_tbl.va + attr->dlid; *ahid_addr = 0; *ahid_addr |= ah->id & OCRDMA_AH_ID_MASK; + if (ocrdma_is_udp_encap_supported(dev)) { + *ahid_addr |= ((u32)ah->hdr_type & + OCRDMA_AH_L3_TYPE_MASK) << + OCRDMA_AH_L3_TYPE_SHIFT; + } if (isvlan) *ahid_addr |= (OCRDMA_AH_VLAN_VALID_MASK << OCRDMA_AH_VLAN_VALID_SHIFT); |