From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60C09C43381 for ; Thu, 28 Mar 2019 13:28:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 25BDB217D7 for ; Thu, 28 Mar 2019 13:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553779687; bh=76iJ4FYd+CzDGuPZr8V26/PbA3a0drgm8kQPI14Wjmo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=DDNUCFxODDV3RmyCqonS0hu2TaDLebOe7b0h/7TjY8a0nm4/s55mPC1v+2aW5DeP3 H2zjq+UdpaaOQmVjntGgDDJ6BeCza7GGdOuIKKbQRvrnaAvvBVBSqMu0x36Yx/05Ul JqtivdSveB61rz5cgHjMo4FgSwtGQdaDG/RQ3XtQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727090AbfC1N2G (ORCPT ); Thu, 28 Mar 2019 09:28:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:34316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfC1N2F (ORCPT ); Thu, 28 Mar 2019 09:28:05 -0400 Received: from localhost (unknown [77.138.135.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 73A3D21773; Thu, 28 Mar 2019 13:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553779685; bh=76iJ4FYd+CzDGuPZr8V26/PbA3a0drgm8kQPI14Wjmo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H7AOIygw6Rx+A1rlwcm9rBSxWew2o/SUjovsVMKk4v5jsNmt4Kc6RV65fb0ehWfGA wEFmEaZHP3Gk/R0+rQ54ahM5izx2W9uB5YtYiZXebOQs83mXsj0gj009Ne2/JjxgnZ KaQ1TA0/Vz50tMEDUtfI/7G54ZpjyExkoTY+sdYw= From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Leon Romanovsky , RDMA mailing list , Maor Gottlieb , Mark Bloch , Saeed Mahameed , linux-netdev Subject: [PATCH mlx5-next 02/12] net/mlx5: E-Switch, add a new prio to be used by the RDMA side Date: Thu, 28 Mar 2019 15:27:32 +0200 Message-Id: <20190328132742.12070-3-leon@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190328132742.12070-1-leon@kernel.org> References: <20190328132742.12070-1-leon@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Mark Bloch Create a new prio in the FDB, it will be used when inserting steering rules into the FDB from the RDMA side. We create a new PRIO so rules from the net side and rules from the RDMA side won't be inserted to the same PRIO, each side has it's own sandbox to play in. Signed-off-by: Mark Bloch Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 7 +++++++ include/linux/mlx5/fs.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index f34515d03a3b..f0b460879c91 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -2516,6 +2516,13 @@ static int init_fdb_root_ns(struct mlx5_flow_steering *steering) if (!steering->fdb_sub_ns) return -ENOMEM; + maj_prio = fs_create_prio(&steering->fdb_root_ns->ns, FDB_BYPASS_PATH, + 1); + if (IS_ERR(maj_prio)) { + err = PTR_ERR(maj_prio); + goto out_err; + } + levels = 2 * FDB_MAX_PRIO * (FDB_MAX_CHAIN + 1); maj_prio = fs_create_prio_chained(&steering->fdb_root_ns->ns, FDB_FAST_PATH, diff --git a/include/linux/mlx5/fs.h b/include/linux/mlx5/fs.h index 3eeb04154317..fd91df3a4e09 100644 --- a/include/linux/mlx5/fs.h +++ b/include/linux/mlx5/fs.h @@ -76,6 +76,7 @@ enum mlx5_flow_namespace_type { }; enum { + FDB_BYPASS_PATH, FDB_FAST_PATH, FDB_SLOW_PATH, }; -- 2.20.1