From patchwork Thu Oct 4 10:17:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 10625857 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A33E23B73 for ; Thu, 4 Oct 2018 10:20:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DD6A28C66 for ; Thu, 4 Oct 2018 10:20:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B17E28CAC; Thu, 4 Oct 2018 10:20:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2764C28C5B for ; Thu, 4 Oct 2018 10:20:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727245AbeJDRMp (ORCPT ); Thu, 4 Oct 2018 13:12:45 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:48532 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727183AbeJDRMp (ORCPT ); Thu, 4 Oct 2018 13:12:45 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 4 Oct 2018 12:22:32 +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 w94AHn3P007374; Thu, 4 Oct 2018 13:17:49 +0300 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [127.0.0.1]) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8) with ESMTP id w94AHn1o021121; Thu, 4 Oct 2018 13:17:49 +0300 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id w94AHn0R021120; Thu, 4 Oct 2018 13:17:49 +0300 From: Yishai Hadas To: linux-rdma@vger.kernel.org Cc: yishaih@mellanox.com, markb@mellanox.com, jgg@mellanox.com, majd@mellanox.com, guyle@mellanox.com Subject: [PATCH rdma-core 4/5] mlx5: Allow passing flow flags Date: Thu, 4 Oct 2018 13:17:26 +0300 Message-Id: <1538648247-21003-5-git-send-email-yishaih@mellanox.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1538648247-21003-1-git-send-email-yishaih@mellanox.com> References: <1538648247-21003-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-Virus-Scanned: ClamAV using ClamSMTP From: Mark Bloch Use flags defined under enum ibv_flow_flags, this will allow creating egress matcher. Signed-off-by: Mark Bloch Signed-off-by: Yishai Hadas --- providers/mlx5/verbs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/providers/mlx5/verbs.c b/providers/mlx5/verbs.c index de731ce..41060bc 100644 --- a/providers/mlx5/verbs.c +++ b/providers/mlx5/verbs.c @@ -3665,7 +3665,7 @@ mlx5dv_create_flow_matcher(struct ibv_context *context, { DECLARE_COMMAND_BUFFER(cmd, MLX5_IB_OBJECT_FLOW_MATCHER, MLX5_IB_METHOD_FLOW_MATCHER_CREATE, - 4); + 5); struct mlx5dv_flow_matcher *flow_matcher; struct ib_uverbs_attr *handle; int ret; @@ -3695,6 +3695,9 @@ mlx5dv_create_flow_matcher(struct ibv_context *context, fill_attr_in_enum(cmd, MLX5_IB_ATTR_FLOW_MATCHER_FLOW_TYPE, IBV_FLOW_ATTR_NORMAL, &attr->priority, sizeof(attr->priority)); + if (attr->flags) + fill_attr_const_in(cmd, MLX5_IB_ATTR_FLOW_MATCHER_FLOW_FLAGS, + attr->flags); ret = execute_ioctl(context, cmd); if (ret)