Message ID | 936843f73c6dbb569b064a994b06f20a9702b842.1530227929.git.petrm@mellanox.com (mailing list archive) |
---|---|
State | Accepted |
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 33CCF6022E for <patchwork-linux-mlxsw@patchwork.kernel.org>; Thu, 28 Jun 2018 23:22:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2208F29965 for <patchwork-linux-mlxsw@patchwork.kernel.org>; Thu, 28 Jun 2018 23:22:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 145C629989; Thu, 28 Jun 2018 23:22:04 +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 5F85D29965 for <patchwork-linux-mlxsw@patchwork.kernel.org>; Thu, 28 Jun 2018 23:22:03 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41Gwls4NrCzF1RK for <patchwork-linux-mlxsw@patchwork.kernel.org>; Fri, 29 Jun 2018 09:22:01 +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="w5U1HwtM"; 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=104.47.0.78; helo=eur01-he1-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="w5U1HwtM"; dkim-atps=neutral Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0078.outbound.protection.outlook.com [104.47.0.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41Gwlk6KStzF1QL for <linux-mlxsw@lists.ozlabs.org>; Fri, 29 Jun 2018 09:21:54 +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=OTfsHH2DLywBQLBwRV3w56gd+o06Eubv1njhzO9FfjY=; b=w5U1HwtMDsWukSN0SWbQ6qpfuhiHsY219cxuv/uLNLdwmNu+UDM13AI9i9oX5gtcYtsUVSvBhlj1pMpZUaNqDx0aIs9DBDnG1nY+ieStluBbASeVTKUXdcVOIWzmn4DpEveZ+1s3hNLjfKo3VdJehUeQZI82a6SWwgMx+rdsmzM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (89.176.83.59) by VI1PR05MB4191.eurprd05.prod.outlook.com (2603:10a6:803:4e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.884.23; Thu, 28 Jun 2018 23:21:49 +0000 From: Petr Machata <petrm@mellanox.com> To: <linux-internal@mellanox.com> Subject: [PATCH net-next mlxsw v2 1/3] team: Publish team_port_get_rcu() In-Reply-To: <cover.1530227929.git.petrm@mellanox.com> References: <cover.1530227929.git.petrm@mellanox.com> Message-Id: <936843f73c6dbb569b064a994b06f20a9702b842.1530227929.git.petrm@mellanox.com> Date: Fri, 29 Jun 2018 01:20:48 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-Originating-IP: [89.176.83.59] X-ClientProxiedBy: DB6PR07CA0011.eurprd07.prod.outlook.com (2603:10a6:6:2d::21) To VI1PR05MB4191.eurprd05.prod.outlook.com (2603:10a6:803:4e::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 72cceade-fee8-4686-e1a8-08d5dd4dece7 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR05MB4191; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4191; 3:dOIoX+Yb0kahRmeCblUT3aA1ACBQA4tmKjtqVv/UjG4PTKhUjmIMTWYzlgteJaPIXBvdXD5UZRUJuaCP1ZtLtlSs4mcM18C/gGmzNErqxfIKGkI4e45NDFdWFY1tfrcHjVcV6gOksJuZe4fNmh+HUrmv+mwgbgGU5bDBw3HHQiqTj9GiZNBcOXGF9A3d3gVn/HSrx6m786XCHTwPpJK+ItgKUiFUJ/63gaJD2RwU5YB5Xax6mq1v+vmnE7UZ5Jq0; 25:YJhAiqyDx+COu29DrHrSIvOKNZBsAngyMOn1P6IxyvTQSHe34u74T4BLkCL91ILX9oCOAMCBEdw5vEthk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bAkQizyLE5; 4:hzi9IWbb6ELbP7LaleQpgFVeQtARmmhfCIkUMDYz++uEJaGEzf0GLaoaYHjrFXAhJduAEcE7C9GxT/mqbM1+nFyc9USoQIwrBYDqq4jXBVed4LMaaq3xWIk2kaLU30BaUd9Mm0TkPc/EdtSpcWjTfgO0HGSlapLAxDOsMpdig/NfIaX3yOYKvjtNTJjcLPE7BPN7X5QIFoInFP7XUU6DiA8LdENqAtquKDQ4uHhNoZ1Fvvli0xlWl5enMMhnvtyWAimVgbQnKftOiiMF5Vv0GA== X-Microsoft-Antispam-PRVS: <VI1PR05MB41916CF098E97367D2B059B4DB4F0@VI1PR05MB4191.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)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:VI1PR05MB4191; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB4191; X-Forefront-PRVS: 0717E25089 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(136003)(39860400002)(396003)(376002)(366004)(346002)(189003)(199004)(186003)(11346002)(26005)(5660300001)(97736004)(36756003)(16526019)(446003)(48376002)(486006)(86362001)(76176011)(50466002)(386003)(956004)(476003)(6636002)(2616005)(6486002)(16586007)(6496006)(6116002)(3846002)(316002)(52116002)(47776003)(118296001)(81166006)(66066001)(51416003)(2351001)(2906002)(81156014)(305945005)(8936002)(53936002)(7736002)(6862004)(106356001)(105586002)(8676002)(25786009)(478600001)(68736007)(58126008)(37006003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB4191; 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; VI1PR05MB4191; 23:d+3CbEP8e2ygLx6NW+7oOMqtTXUnI3pqgvuKHFvXo?= =?us-ascii?Q?2DKXtp5R1m/LaFEonK9UQ/uru8WoDUIfdVgljgskKZScgS0Suzxbb7lJcNvD?= =?us-ascii?Q?9twhAEx2vgUoPvCdItOqD6Aa8fhODkzFi9OLabVG3FMbdpS2XKKlVy20eICH?= =?us-ascii?Q?E/fyMR+RN5qbobzGb0KAtQNG4EcMUEgs4nlHxurf1U4Vd942eYBbXieLj1XW?= =?us-ascii?Q?AW4FgSUDaYIRi6mCBjwlumsrhNvABWqYL7idur8zPChqOnwt/E6SCceyMnPe?= =?us-ascii?Q?6um5ykDkDgXPt2kx72hFy5L4dP32Zp4b8DZWAwR1OR9VBgZmzd+8MapzGJS2?= =?us-ascii?Q?at8MSfmg5vDeAhtxOv2UC0DELN4B0YLGUEx2/Y12uRqGerWQdGOfSWZRZl8Z?= =?us-ascii?Q?XPKhyP7RlQJ245s6h2kB9rIX1eoQe469sRByzvLn9Lpz4J5FrUczvJVD/dP+?= =?us-ascii?Q?N/bP012/FpF6zm1ZKV6hcPdkWH5Vp5hS+Lv22BfL2Tffbs+V/+ITLnlhG2k8?= =?us-ascii?Q?wvwtDTXcsjzBh8biadDuohq/mDfhMALxsxdKkCBgkG8tFRvaI+xYGYWRDGC4?= =?us-ascii?Q?47FqJhM1gc0LILRk2ZrdGKS++4U8CXoeOeNUybcmRaXnx+SZk5artTit5J6J?= =?us-ascii?Q?3M6OAqNyy6tGkFi/fRgwJO3yD6iHWsQICySvtm6Mrf9wfoI7eawMBO/jk+Ah?= =?us-ascii?Q?/DvwK1tm2Tx9pOlbAyFjkcWk8OxBy3Yp1pl863Knwvd/XGdc6tU9BUzExGHZ?= =?us-ascii?Q?NCKO6KJkOdaDr4bxp/pudhKBo4KQV4d2i5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0lapYpgxbRUVG8XImdmtY2Oavz0sAU3f+mj6ApEglVFUVw2a1i0zGbFVdQ8d1cncRU8WvVYXZtnUNaVGz0Q5UvM5lrE3URbuiH8g0RcgKjS5nIhwbzfVeSsXkJZxNQ+nKuyu9abQjT+Yo6ljN5q8LbGcxgVwMzQKvHsXA3nI8LFaFZVWveLrfMsW31IJZk7viYQ8DrFeQhSSpQa48uUvovxMiGc/YM7MQwUR7bHZXJhz+KMZSIrTLoHgeZxPqJdPkNw1xxlKCvxKHMWna2Gqb3yLP8DeaKCBbomYAENWgLsXE5a8Ri9grJKkRvw05GUQ+/fJPZA==; 5:O8WAxC1bB3y+slIlBQd6++avgEtZXw7K3BgKV4/XXCGuDnTzTRKie32R9fFnVw+oTTgBntVa0MML/rq0+6eMRYKhO0I52lZOGztln1Vz16qyaN4LBVH6ZwqynJlqtVzQSUG8wqbY+V4vFNgpoEbhrp0EAqbQ0MqutZVr6eWR8cQ=; 24:FfPsRhbxieloZLf301ype1tgKNdt1nFpxwoSVE4urQXdVszJtwIOkUzlew1N+p9l63/nzQOzIL2UHMBHo8yPa4CzoglMgLnaY4sBNf/FUw4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4191; 7:JSkwjszfujNyzR2EA/4pATlM21Wp435jvESYFrp0zpt3iKbw8YD4gQsLFlq+cKNh/OzhtUGCcwU2+sgbwNm7nUfD9l6zFeWZeco+VETLP7rlIkJiazBvNvc9es6rpGlo+rDD5bgXSwBSizda9y/PoQsqSvVOO+XuNMJHN2fJLnrLQ19dDrcEvwTGaRJrwQCdik6ED18K7fjBr4RX6bYvWNnoxg3A+62YXpn3xPI02zRE6MjFIDbfPIYYP5kAqn1m X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2018 23:21:49.5101 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 72cceade-fee8-4686-e1a8-08d5dd4dece7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4191 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/team/team.c b/drivers/net/team/team.c index b070959737ff..c46191183fb1 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -41,11 +41,6 @@ #define team_port_exists(dev) (dev->priv_flags & IFF_TEAM_PORT) -static struct team_port *team_port_get_rcu(const struct net_device *dev) -{ - return rcu_dereference(dev->rx_handler_data); -} - static struct team_port *team_port_get_rtnl(const struct net_device *dev) { struct team_port *port = rtnl_dereference(dev->rx_handler_data); diff --git a/include/linux/if_team.h b/include/linux/if_team.h index d95cae09dea0..0d07c6655cce 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h @@ -74,6 +74,11 @@ struct team_port { long mode_priv[0]; }; +static inline struct team_port *team_port_get_rcu(const struct net_device *dev) +{ + return rcu_dereference(dev->rx_handler_data); +} + static inline bool team_port_enabled(struct team_port *port) { return port->index != -1;
A follow-up patch adds a new entry point, team_port_dev_txable(). Making it an ordinary exported function would mean that any module that may need the service in one of the supported configurations also unconditionally needs to pull in the team module, whether or not the user actually intends to create team interfaces. To prevent that, team_port_dev_txable() is defined in if_team.h, and therefore all dependencies of that function also need to be publicly-visible. Therefore move team_port_get_rcu() from team.c to if_team.h. Signed-off-by: Petr Machata <petrm@mellanox.com> --- drivers/net/team/team.c | 5 ----- include/linux/if_team.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-)