summaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2013-11-07 15:25:13 +0200
committerRoland Dreier <roland@purestorage.com>2014-01-14 14:06:50 -0800
commit240ae00e4d834e387f4f09e236130f520e357a70 (patch)
treefc59255ac393afb319291a0a2089748e16ab716d /include/rdma
parent90f1d1b41b70474bf73d07d4300196901cd81718 (diff)
downloadblackbird-op-linux-240ae00e4d834e387f4f09e236130f520e357a70.tar.gz
blackbird-op-linux-240ae00e4d834e387f4f09e236130f520e357a70.zip
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>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_verbs.h16
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 {
enum ib_flow_spec_type {
/* L2 headers*/
IB_FLOW_SPEC_ETH = 0x20,
+ IB_FLOW_SPEC_IB = 0x22,
/* L3 header*/
IB_FLOW_SPEC_IPV4 = 0x30,
/* L4 headers*/
IB_FLOW_SPEC_TCP = 0x40,
IB_FLOW_SPEC_UDP = 0x41
};
-
+#define IB_FLOW_SPEC_LAYER_MASK 0xF0
#define IB_FLOW_SPEC_SUPPORT_LAYERS 4
/* Flow steering rule priority is set according to it's domain.
@@ -1134,6 +1135,18 @@ struct ib_flow_spec_eth {
struct ib_flow_eth_filter mask;
};
+struct ib_flow_ib_filter {
+ __be16 dlid;
+ __u8 sl;
+};
+
+struct ib_flow_spec_ib {
+ enum ib_flow_spec_type type;
+ u16 size;
+ struct ib_flow_ib_filter val;
+ struct ib_flow_ib_filter mask;
+};
+
struct ib_flow_ipv4_filter {
__be32 src_ip;
__be32 dst_ip;
@@ -1164,6 +1177,7 @@ union ib_flow_spec {
u16 size;
};
struct ib_flow_spec_eth eth;
+ struct ib_flow_spec_ib ib;
struct ib_flow_spec_ipv4 ipv4;
struct ib_flow_spec_tcp_udp tcp_udp;
};
OpenPOWER on IntegriCloud