diff options
author | Somnath Kotur <somnath.kotur@avagotech.com> | 2016-01-28 14:59:56 +0100 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-02-29 23:12:10 +0100 |
commit | e1614869d370d4d1599d771346d7da570f1d2bfa (patch) | |
tree | 20eeb3476e26086624ecde7eb7b9d52eb913be38 /drivers/infiniband/hw/ocrdma/ocrdma.h | |
parent | Linux 4.5-rc6 (diff) | |
download | linux-e1614869d370d4d1599d771346d7da570f1d2bfa.tar.xz linux-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 'drivers/infiniband/hw/ocrdma/ocrdma.h')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma.h b/drivers/infiniband/hw/ocrdma/ocrdma.h index 12503f15fbd6..b58833d9b909 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma.h +++ b/drivers/infiniband/hw/ocrdma/ocrdma.h @@ -114,6 +114,7 @@ struct ocrdma_dev_attr { u8 local_ca_ack_delay; u8 ird; u8 num_ird_pages; + u8 udp_encap; }; struct ocrdma_dma_mem { @@ -598,4 +599,10 @@ static inline u8 ocrdma_get_ae_link_state(u32 ae_state) return ((ae_state & OCRDMA_AE_LSC_LS_MASK) >> OCRDMA_AE_LSC_LS_SHIFT); } +static inline bool ocrdma_is_udp_encap_supported(struct ocrdma_dev *dev) +{ + return (dev->attr.udp_encap & OCRDMA_L3_TYPE_IPV4) || + (dev->attr.udp_encap & OCRDMA_L3_TYPE_IPV6); +} + #endif |