diff options
author | Matan Barak <matanb@mellanox.com> | 2013-11-07 08:25:13 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-01-14 17:06:50 -0500 |
commit | 240ae00e4d834e387f4f09e236130f520e357a70 (patch) | |
tree | fc59255ac393afb319291a0a2089748e16ab716d | |
parent | 90f1d1b41b70474bf73d07d4300196901cd81718 (diff) |
IB/core: Add support for IB L2 device-managed steering
This patch adds preliminary support for IB L2 device-managed steering,
currently exposed only in the kernel.
This flow spec can be used by low-level drivers that need to indicate
the link layer type when creating device-managed flow rules.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r-- | include/rdma/ib_verbs.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index d4d16394455f..aa24760f4bc2 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -1100,13 +1100,14 @@ enum ib_flow_attr_type { | |||
1100 | enum ib_flow_spec_type { | 1100 | enum ib_flow_spec_type { |
1101 | /* L2 headers*/ | 1101 | /* L2 headers*/ |
1102 | IB_FLOW_SPEC_ETH = 0x20, | 1102 | IB_FLOW_SPEC_ETH = 0x20, |
1103 | IB_FLOW_SPEC_IB = 0x22, | ||
1103 | /* L3 header*/ | 1104 | /* L3 header*/ |
1104 | IB_FLOW_SPEC_IPV4 = 0x30, | 1105 | IB_FLOW_SPEC_IPV4 = 0x30, |
1105 | /* L4 headers*/ | 1106 | /* L4 headers*/ |
1106 | IB_FLOW_SPEC_TCP = 0x40, | 1107 | IB_FLOW_SPEC_TCP = 0x40, |
1107 | IB_FLOW_SPEC_UDP = 0x41 | 1108 | IB_FLOW_SPEC_UDP = 0x41 |
1108 | }; | 1109 | }; |
1109 | 1110 | #define IB_FLOW_SPEC_LAYER_MASK 0xF0 | |
1110 | #define IB_FLOW_SPEC_SUPPORT_LAYERS 4 | 1111 | #define IB_FLOW_SPEC_SUPPORT_LAYERS 4 |
1111 | 1112 | ||
1112 | /* Flow steering rule priority is set according to it's domain. | 1113 | /* Flow steering rule priority is set according to it's domain. |
@@ -1134,6 +1135,18 @@ struct ib_flow_spec_eth { | |||
1134 | struct ib_flow_eth_filter mask; | 1135 | struct ib_flow_eth_filter mask; |
1135 | }; | 1136 | }; |
1136 | 1137 | ||
1138 | struct ib_flow_ib_filter { | ||
1139 | __be16 dlid; | ||
1140 | __u8 sl; | ||
1141 | }; | ||
1142 | |||
1143 | struct ib_flow_spec_ib { | ||
1144 | enum ib_flow_spec_type type; | ||
1145 | u16 size; | ||
1146 | struct ib_flow_ib_filter val; | ||
1147 | struct ib_flow_ib_filter mask; | ||
1148 | }; | ||
1149 | |||
1137 | struct ib_flow_ipv4_filter { | 1150 | struct ib_flow_ipv4_filter { |
1138 | __be32 src_ip; | 1151 | __be32 src_ip; |
1139 | __be32 dst_ip; | 1152 | __be32 dst_ip; |
@@ -1164,6 +1177,7 @@ union ib_flow_spec { | |||
1164 | u16 size; | 1177 | u16 size; |
1165 | }; | 1178 | }; |
1166 | struct ib_flow_spec_eth eth; | 1179 | struct ib_flow_spec_eth eth; |
1180 | struct ib_flow_spec_ib ib; | ||
1167 | struct ib_flow_spec_ipv4 ipv4; | 1181 | struct ib_flow_spec_ipv4 ipv4; |
1168 | struct ib_flow_spec_tcp_udp tcp_udp; | 1182 | struct ib_flow_spec_tcp_udp tcp_udp; |
1169 | }; | 1183 | }; |