From patchwork Tue Mar 15 17:03:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 8590541 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 83494C0553 for ; Tue, 15 Mar 2016 17:06:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC20520259 for ; Tue, 15 Mar 2016 17:06:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D0EF9201EC for ; Tue, 15 Mar 2016 17:06:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934729AbcCORGi (ORCPT ); Tue, 15 Mar 2016 13:06:38 -0400 Received: from [193.47.165.129] ([193.47.165.129]:53282 "EHLO mellanox.co.il" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932161AbcCORGi (ORCPT ); Tue, 15 Mar 2016 13:06:38 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 15 Mar 2016 19:06:11 +0200 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [10.7.2.17]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id u2FH6BMJ015275; Tue, 15 Mar 2016 19:06:11 +0200 Received: from vnc17.mtl.labs.mlnx (localhost.localdomain [127.0.0.1]) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8) with ESMTP id u2FH6Bko019621; Tue, 15 Mar 2016 19:06:11 +0200 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id u2FH6Bet019620; Tue, 15 Mar 2016 19:06:11 +0200 From: Yishai Hadas To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, yishaih@mellanox.com, marinav@mellanox.com, matanb@mellanox.com, majd@mellanox.com, talal@mellanox.com, ogerlitz@mellanox.com Subject: [PATCH libibverbs 1/2] Add support for don't trap steering rule Date: Tue, 15 Mar 2016 19:03:55 +0200 Message-Id: <1458061436-15911-2-git-send-email-yishaih@mellanox.com> X-Mailer: git-send-email 1.7.11.3 In-Reply-To: <1458061436-15911-1-git-send-email-yishaih@mellanox.com> References: <1458061436-15911-1-git-send-email-yishaih@mellanox.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marina Varshaver 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 Reviewed-by: Yishai Hadas --- include/infiniband/verbs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {