diff options
author | Somnath Kotur <somnath.kotur@avagotech.com> | 2016-01-28 08:59:56 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-02-29 17:12:10 -0500 |
commit | e1614869d370d4d1599d771346d7da570f1d2bfa (patch) | |
tree | 20eeb3476e26086624ecde7eb7b9d52eb913be38 /drivers/infiniband/hw/ocrdma/ocrdma_main.c | |
parent | Linux 4.5-rc6 (diff) | |
download | linux-dev-e1614869d370d4d1599d771346d7da570f1d2bfa.tar.xz linux-dev-e1614869d370d4d1599d771346d7da570f1d2bfa.zip |
RDMA/ocrdma: Export udp encapsulation capability
Add support to read device configuration and initialize port-immutables
to report UDP-Encap flag during port query.
Signed-off-by: Devesh Sharma <devesh.sharma@avagotech.com>
Signed-off-by: Somnath Kotur <somnath.kotur@avagotech.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c index f38743018cb4..3d75f65ce87e 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c @@ -89,8 +89,10 @@ static int ocrdma_port_immutable(struct ib_device *ibdev, u8 port_num, struct ib_port_immutable *immutable) { struct ib_port_attr attr; + struct ocrdma_dev *dev; int err; + dev = get_ocrdma_dev(ibdev); err = ocrdma_query_port(ibdev, port_num, &attr); if (err) return err; @@ -98,6 +100,8 @@ static int ocrdma_port_immutable(struct ib_device *ibdev, u8 port_num, immutable->pkey_tbl_len = attr.pkey_tbl_len; immutable->gid_tbl_len = attr.gid_tbl_len; immutable->core_cap_flags = RDMA_CORE_PORT_IBA_ROCE; + if (ocrdma_is_udp_encap_supported(dev)) + immutable->core_cap_flags |= RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP; immutable->max_mad_size = IB_MGMT_MAD_SIZE; return 0; |