diff mbox

[libibverbs,1/2] Add support for don't trap steering rule

Message ID 1458061436-15911-2-git-send-email-yishaih@mellanox.com (mailing list archive)
State Accepted
Headers show

Commit Message

Yishai Hadas March 15, 2016, 5:03 p.m. UTC
From: Marina Varshaver <marinav@mellanox.com>

Add an option to create a normal flow steering rule that doesn't trap
received packets, allowing them to match lower prioritized rules.

When the don't trap rule exists and matches a packet, the underlying HCA
should pass the packet to the rule's assigned QP(s). However, the HCA
will continue looking for other matches at lower priority rules, which
may be assigned to other QPs. This will let them get the traffic as
well.

Signed-off-by: Marina Varshaver <marinav@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
---
 include/infiniband/verbs.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
index d0c2969..0c29f1a 100644
--- a/include/infiniband/verbs.h
+++ b/include/infiniband/verbs.h
@@ -840,7 +840,8 @@  struct ibv_ah {
 };
 
 enum ibv_flow_flags {
-	IBV_FLOW_ATTR_FLAGS_ALLOW_LOOP_BACK = 1,
+	IBV_FLOW_ATTR_FLAGS_ALLOW_LOOP_BACK = 1 << 0,
+	IBV_FLOW_ATTR_FLAGS_DONT_TRAP = 1 << 1,
 };
 
 enum ibv_flow_attr_type {