]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Add don't trap flag to flow creation
authorMarina Varshaver <marinav@mellanox.com>
Thu, 18 Feb 2016 16:31:05 +0000 (18:31 +0200)
committerDoug Ledford <dledford@redhat.com>
Mon, 29 Feb 2016 22:11:40 +0000 (17:11 -0500)
commita0d5960cb6a23fd464611ccde85a2ece770593b5
tree326f2c7cad6a08839629a59ec6036caca8e9cf53
parentfff8519eb61587b19879e57c86665fb28da3de6a
IB/core: Add don't trap flag to flow creation

Don't trap flag (i.e. IB_FLOW_ATTR_FLAGS_DONT_TRAP) indicates that QP
will receive traffic, but will not steal it.

When a packet matches a flow steering rule that was created with
the don't trap flag, the QPs assigned to this rule will get this
packet, but matching will continue to other equal/lower priority
rules. This will let other QPs assigned to those rules to get the
packet too.

If both don't trap rule and other rules have the same priority
and match the same packet, the behavior is undefined.

The don't trap flag can't be set with default rule types
(i.e. IB_FLOW_ATTR_ALL_DEFAULT, IB_FLOW_ATTR_MC_DEFAULT) as default rules
don't have rules after them and don't trap has no meaning here.

Signed-off-by: Marina Varshaver <marinav@mellanox.com>
Reviewed-by: Matan Barak <matanb@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/hw/mlx4/main.c
include/rdma/ib_verbs.h