aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h
diff options
context:
space:
mode:
authorNiranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>2017-09-26 06:44:26 -0700
committerDoug Ledford <dledford@redhat.com>2017-09-27 11:21:57 -0400
commitb209a368eb72cacce290e327d3f783e9cdee040c (patch)
tree7dec5da22219f6c3b99855871b87616c1adabe1c /drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h
parentIB/opa_vnic: Properly set vesw port status (diff)
downloadlinux-dev-b209a368eb72cacce290e327d3f783e9cdee040c.tar.xz
linux-dev-b209a368eb72cacce290e327d3f783e9cdee040c.zip
IB/opa_vnic: Add routing control information
Add protocol specific routing control information in the encapsulation header as per the configuration. Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Signed-off-by: Scott Franco <safranco@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h')
-rw-r--r--drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h b/drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h
index be45697b8e60..e4c9bf2ef7e2 100644
--- a/drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h
+++ b/drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h
@@ -103,6 +103,17 @@
#define OPA_VNIC_ETH_LINK_UP 1
#define OPA_VNIC_ETH_LINK_DOWN 2
+/* routing control */
+#define OPA_VNIC_ENCAP_RC_DEFAULT 0
+#define OPA_VNIC_ENCAP_RC_IPV4 4
+#define OPA_VNIC_ENCAP_RC_IPV4_UDP 8
+#define OPA_VNIC_ENCAP_RC_IPV4_TCP 12
+#define OPA_VNIC_ENCAP_RC_IPV6 16
+#define OPA_VNIC_ENCAP_RC_IPV6_TCP 20
+#define OPA_VNIC_ENCAP_RC_IPV6_UDP 24
+
+#define OPA_VNIC_ENCAP_RC_EXT(w, b) (((w) >> OPA_VNIC_ENCAP_RC_ ## b) & 0x7)
+
/**
* struct opa_vesw_info - OPA vnic switch information
* @fabric_id: 10-bit fabric id
@@ -111,6 +122,7 @@
* @pkey: partition key
* @u_mcast_dlid: unknown multicast dlid
* @u_ucast_dlid: array of unknown unicast dlids
+ * @rc: routing control
* @eth_mtu: Ethernet MTU
*/
struct opa_vesw_info {
@@ -127,7 +139,9 @@ struct opa_vesw_info {
__be32 u_mcast_dlid;
__be32 u_ucast_dlid[OPA_VESW_MAX_NUM_DEF_PORT];
- u8 rsvd3[60];
+ __be32 rc;
+
+ u8 rsvd3[56];
__be16 eth_mtu;
u8 rsvd4[2];
} __packed;