Message ID | 39326cfa698abfb3aca246602e61e3fd2f65b820.1528204848.git.petrm@mellanox.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Ido Schimmel |
Headers | show
Return-Path: <linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4D7326024A for <patchwork-linux-mlxsw@patchwork.kernel.org>; Tue, 5 Jun 2018 13:38:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E23228CEF for <patchwork-linux-mlxsw@patchwork.kernel.org>; Tue, 5 Jun 2018 13:38:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 329C529387; Tue, 5 Jun 2018 13:38:14 +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=-2.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 66D2E28CEF for <patchwork-linux-mlxsw@patchwork.kernel.org>; Tue, 5 Jun 2018 13:38:13 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 410Xtq2Lb9zF1sg for <patchwork-linux-mlxsw@patchwork.kernel.org>; Tue, 5 Jun 2018 23:38:11 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="bGKdNgEL"; dkim-atps=neutral X-Original-To: linux-mlxsw@lists.ozlabs.org Delivered-To: linux-mlxsw@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=mellanox.com (client-ip=40.107.0.88; helo=eur02-am5-obe.outbound.protection.outlook.com; envelope-from=petrm@mellanox.com; receiver=<UNKNOWN>) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="bGKdNgEL"; dkim-atps=neutral Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00088.outbound.protection.outlook.com [40.107.0.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 410Xtl4Qw6zF1xh for <linux-mlxsw@lists.ozlabs.org>; Tue, 5 Jun 2018 23:38:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gWT5JDzkT1X6D8VqtSmdqHuyWak2CCUyd7l8rqnorjs=; b=bGKdNgELHq9k/HaK7sc4W/IvXe6ZBtWvvZubuXhbID+Ncf9B/Lrudt94uQpPO4fdTx0j4St0Wi7KImoxV9+LMHiJ0cRBy/TFYJR9NC5R6pfYN2oXKxlMJg0t8FRtC2fVf3HMlOMwDSlcFCSqohRdZ0DWkjAkRfCxEovCYo4D4pc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (78.45.160.211) by AM6PR05MB4182.eurprd05.prod.outlook.com (2603:10a6:209:40::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.14; Tue, 5 Jun 2018 13:38:00 +0000 From: Petr Machata <petrm@mellanox.com> To: <linux-internal@mellanox.com> Subject: [PATCH net-next mlxsw 4/6] mlxsw: spectrum_router: Add mlxsw_sp_rif_fid() In-Reply-To: <cover.1528204848.git.petrm@mellanox.com> References: <cover.1528204848.git.petrm@mellanox.com> Message-Id: <39326cfa698abfb3aca246602e61e3fd2f65b820.1528204848.git.petrm@mellanox.com> Date: Tue, 05 Jun 2018 15:37:54 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-Originating-IP: [78.45.160.211] X-ClientProxiedBy: CWLP265CA0130.GBRP265.PROD.OUTLOOK.COM (2603:10a6:401:53::22) To AM6PR05MB4182.eurprd05.prod.outlook.com (2603:10a6:209:40::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4182; X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4182; 3:a9tNXB8yEYOk8Xt+g4e1Xd3647a0PphkDeGo+mqbKOuDUFW0UZjYoEYEcxYHQ5b7dl+2q6y/1MgKf/4/StUYNoMq8HUwl7NdkWmQIAk/J/uYf7bCHCpnqa3bE0MUki2HTjfmGk69EomAK3Mbse6EqmYvS1H8mIeE7nsL4Mo6hbMc7MiTULZQqnfFlaZqjR5oj8Y7+r7bmJwRMoud4hVSBLQWqYPBUPrzBSbIG0OhlA5h9xvyLk/R4b0DluqMGzSS; 25:7ZU3DxXwdQZH8EjLWNYln107mqb+Rx2wBShcf0K/RGt7W60jILEu+iy0MMf7oZnE4nieKgpC6Ov6PJN9m0Hr3Ls1BXn0tRD5LzdIqcsyBeaNErW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c/XZKAey1UOCLECMjsBDYP7bBE9kPDQ48xIUTZ2FrZRzfwzJKkiV3jr3agD3L7i+vytS7l3bkKtQgLETautSO2IcE9vLelkiq2bQnMS6cU/UM8i+vIsyk3EIWmDiVe3WSC1d80yaRVm6n7Ztg/iARj1no3X+Av4VbjGPMbUwMLGTuWnUaf2oKiIX40nlM76CT5JVpKyAIEL8bRWqZm7uSMYe2dsGi+gcX/sKzQ8fj22JoZ01IBTNlhrLp/slkxzvGUhW3IOKA== X-Microsoft-Antispam-PRVS: <AM6PR05MB4182A002DCBA48AD3A080DC7DB660@AM6PR05MB4182.eurprd05.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231254)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:AM6PR05MB4182; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4182; X-Forefront-PRVS: 0694C54398 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(39860400002)(346002)(39380400002)(376002)(189003)(199004)(59450400001)(386003)(68736007)(16526019)(16586007)(37006003)(58126008)(3846002)(316002)(2906002)(26005)(6116002)(476003)(36756003)(50466002)(106356001)(105586002)(956004)(2616005)(486006)(76176011)(8676002)(52116002)(25786009)(6496006)(86362001)(305945005)(51416003)(48376002)(6636002)(6486002)(47776003)(7736002)(66066001)(186003)(53936002)(8936002)(6862004)(97736004)(81166006)(118296001)(81156014)(2351001)(478600001)(446003)(11346002)(6666003)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4182; H:t540p; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM6PR05MB4182; 23:HixDWJ/RK1aSAOk9hpl0+j7wN+jdJ8EsNjvvxVplr?= =?us-ascii?Q?HU9l4uCyjuKUxWP8VgJW/Ly5xCMC3hL6c5r2Um7W4IFTZgdveroFNY8LoXZQ?= =?us-ascii?Q?IFW+PSJXlG9km4NFik/A9wODQUaDzfQDyjW0sltdlUzHj7XAnTdTrVj+nM18?= =?us-ascii?Q?cD7uImANgWJN8CfWatKhe7nr3ITPZcGIudzi52YuPhFJeev/0CjtWDHJEzgv?= =?us-ascii?Q?okBQBSvrok3HM2JWiwlCes77dmpgVQO3cCeZW2i3gjEO3zeBBbVnddcFB/H0?= =?us-ascii?Q?aFhWgQaZqws/SLm8N4aFOZxv0bCYzZu05anz5j1fjde4Ft/396BsYMFtZvoq?= =?us-ascii?Q?01aK5X5pj9xRhtsB1GIPbLeDFqL2EMRyLaCiS59/Q3e9usFow/GaQ+JT0UJ5?= =?us-ascii?Q?M3Rl4uNvIlV87Bh997b7b+lH1BpA9zW5MU7Yb9AvU7vTMRIQwMS6CO8f4K58?= =?us-ascii?Q?3ZIAoA4UDseNvKz7tXnyOWM+Kc2pt2O3/1zf7WdoJfz7XSyGiRe987dD/QAK?= =?us-ascii?Q?/cGb8E+q6jlbZDnzAdfeTWXfKi4FZTlOlthsb3oKhUZBMdP04uM+EvOH52k2?= =?us-ascii?Q?8Rx6K5Xpwn3FM7Gzzgs6sAWKxRmczU1UsW3SM0twqy2Oy1VixI6dg88vCc7m?= =?us-ascii?Q?gJTjllIVvlcak6BbZGjNDmYk+F8enkaewGD9Eahb4Jl9y6Rs2QGRfLjWvymS?= =?us-ascii?Q?OTNHIRMj2Nr3AKEhpMj6XsUictrF7/mmJ3aQGW2pY3MjNxUBDsisKp5MHM8y?= =?us-ascii?Q?q1YoSd/Xrvc4qjKzaVDCHemM1RQa2SUKmzxIAha2Uh7oeTa0NXYbD0zsWt3Q?= =?us-ascii?Q?iqzNIJJ90HKPZBjlIZAyWM8N1k+tQH5vJysk/B+wei7SqXuiF51+YzZyhUb+?= =?us-ascii?Q?nV37VfVldC9NO4CPyVPTrFNLOEEte1wBW6QJGVolarEN45ukkThv5cJCnU8t?= =?us-ascii?Q?BgWzW4mMdVwa6az8tSOojsWociwmyLCGdGx0UMVV1hWzySUYfXMtGg5iyToL?= =?us-ascii?Q?SrHOy8DvXOwTiApf/WhcONxMFW53ozhc61QzLeC8tin04Yv9hQzvhqSeh5xM?= =?us-ascii?Q?VOfFsHWoRlFQDKIJgTU4XLJA2ii9CwaDUUrlcmRl9rtqBMM52lDQDo2fzBt9?= =?us-ascii?Q?1cz2mKircjnz6KxwcZLu5EJyvRbpxk1yuMQtqDfFR4FGZI0SZ2UfJRt81wLh?= =?us-ascii?Q?dpLgaQzQBpU8ii5dzuc+3KkpNjNf024HiSQk5bSbT5coBsGufkPIRaXcXUkF?= =?us-ascii?Q?GAZuTVT4K6Ko/ce0vg=3D?= X-Microsoft-Antispam-Message-Info: FWVSX2jMZ7BSSX/U4AwKcWqEd+KayvmF1rrgPYVkYo6LNg8hS/CkhzsvUxq0ejLiwbwpVlmuxN9bD9fHVf4aSOwFE4/U4uCI45eF6g4LZnPwi8yftHYJ9Wc5Hh5GGLyUm3al7Zb5rq69pNteAFXK5pZFquGstGzmRdn/Dseo4IliofaOccotGq37nhj89aOX X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4182; 6:G+3ELSSYPAQpaoPKNGZsin5ajplosHM0KiuLZ3rGQIL08rjv04ChgrGgqoep+DAcnMklCpoyNWdxkj9sE0s5MGiUkEargXz/mxcQb5oU7pFJK1IjrwDBsxAKyOsW3qfuejin0HpMh+0jAwUYx5pHjVpU9CpuxwH+ox9VdeSPbSZFhGeHDrLsz32ekSyb/qYenn8g8cUTygpQhiZDNUMeMqgSC+FjorySxO+mVDfe3X/9CeQ1WkElLJSOK2XiVDcOEm2vAfUZMpAUoH1vHSia0kraDIX5q8jdaJ8idNmU0damWBxugzeKgiCZXSSppwKwbLYauBfTOo9bRwKmycqQmgnLw6cHjzKkrt+N5WCndb9lD5ZzCzBDhyZMYu6RMC3Mv4+N+ILjSo2ScqMvXQ7jQwqzOhvIZZejjsdSoUhXmzpOBqRn6/4Pm0rHvOJGnoEOu7zYyWGMFPbNL0KH7CvUTw==; 5:/lmqk6f7O9y6D32cXAeZpkIrDi6W/3kHucCSgWNWXtWG66ONaxW98sGltS+56G8I0rczBc31O1BzAQ0cW21tuizJAJk+FzyhJSto3Ehd4Fj1ecE1xQ1OvuYA+4/cRvTsZDFMMEGcRV8ioWzRsV+QpRADxPp3+iZT943vSG9X6E0=; 24:RLiD1aOyWuaHrpwfQq+qoOBaRyQ6CGeB8J0LxZPSh9aoIP2RJXvozeV45u+Z0aOUROc7AwWJSYTOi5M1eOM4x3J9Q9VvLBHcKzQduqryshw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4182; 7:cJuV1KVl5viFpnSNNpJ4UxTcvlS+G2m73B5GQYTWJXtrTRZUTYfLGpFY5OHfBP1b6gbJOTFE47Stz6XNS8NJPBAD/JyfPP+YNICCXA9K1bhJqmG9OA9ldlDnm0MgAl4EJMFlnyYIQrSWrO1NifZkP1jX1WENZeLiciuawm3ibJ/Fn1dT7jsccZqJbZMHy8FO891FHM41w1aaivLJH/+SK4FPvZBuUzdQYNBLABjOdA204PCbswl9t1IOoTl+a1dO X-MS-Office365-Filtering-Correlation-Id: 2577fbb6-83cd-40af-9cd5-08d5cae98e9a X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2018 13:38:00.3981 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2577fbb6-83cd-40af-9cd5-08d5cae98e9a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4182 X-BeenThere: linux-mlxsw@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: mlxsw driver development <linux-mlxsw.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/linux-mlxsw>, <mailto:linux-mlxsw-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/linux-mlxsw/> List-Post: <mailto:linux-mlxsw@lists.ozlabs.org> List-Help: <mailto:linux-mlxsw-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/linux-mlxsw>, <mailto:linux-mlxsw-request@lists.ozlabs.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index 230e447..0714282 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -6122,6 +6122,11 @@ const struct net_device *mlxsw_sp_rif_dev(const struct mlxsw_sp_rif *rif) return rif->dev; } +struct mlxsw_sp_fid *mlxsw_sp_rif_fid(const struct mlxsw_sp_rif *rif) +{ + return rif->fid; +} + static struct mlxsw_sp_rif * mlxsw_sp_rif_create(struct mlxsw_sp *mlxsw_sp, const struct mlxsw_sp_rif_params *params, diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h index 5a258b1..52e2569 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h @@ -77,6 +77,7 @@ u32 mlxsw_sp_ipip_dev_ul_tb_id(const struct net_device *ol_dev); int mlxsw_sp_rif_dev_ifindex(const struct mlxsw_sp_rif *rif); u8 mlxsw_sp_router_port(const struct mlxsw_sp *mlxsw_sp); const struct net_device *mlxsw_sp_rif_dev(const struct mlxsw_sp_rif *rif); +struct mlxsw_sp_fid *mlxsw_sp_rif_fid(const struct mlxsw_sp_rif *rif); int mlxsw_sp_rif_counter_value_get(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_rif *rif, enum mlxsw_sp_rif_counter_dir dir,
In order to allow querying of the VID for which a RIF was created, add a new function that returns a FID for a given RIF. Signed-off-by: Petr Machata <petrm@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 5 +++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | 1 + 2 files changed, 6 insertions(+)