From patchwork Tue May 8 16:02:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 10386441 X-Patchwork-Delegate: idosch@idosch.org Return-Path: 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 536D0602C2 for ; Tue, 8 May 2018 16:02:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4190128F96 for ; Tue, 8 May 2018 16:02:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3542D28FBA; Tue, 8 May 2018 16:02:44 +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 52E0F28F96 for ; Tue, 8 May 2018 16:02:42 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40gPQS6Gb9zF1m4 for ; Wed, 9 May 2018 02:02:40 +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="akWazVQV"; 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=2a01:111:f400:fe1f::60d; helo=eur01-ve1-obe.outbound.protection.outlook.com; envelope-from=petrm@mellanox.com; receiver=) 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="akWazVQV"; dkim-atps=neutral Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on060d.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1f::60d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40gPQM47sVzF1TN for ; Wed, 9 May 2018 02:02:35 +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; bh=BbKDoxx/GWpZ8PwPkL8fDp6WPdL0jUmB5zXD8dnPc1A=; b=akWazVQVi8zM1nruGFgl/OrRJJex3S6/vrDWIXIu7FBJZufHzWOO4QeTHFGzPIsKnsfnF9JvfeDIHHHai4lhMUduyIJjwJnd0QUgaScKbTvqPQJVdKUecUODf/uVRZQdfl9u48gztBIT/PWPltW6LNSOmj68Q0lmDWsEX9lnTp0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (78.45.160.211) 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_CBC_SHA384_P256) id 15.20.735.18; Tue, 8 May 2018 16:02:32 +0000 From: Petr Machata To: Subject: [PATCH net-next mlxsw v2 1/4] net: bridge: Allow bridge master in br_vlan_get_info() In-Reply-To: References: Message-Id: <42319f7ab2f535e4b05857fdf48ae9a45e828f4d.1525792392.git.petrm@mellanox.com> Date: Tue, 08 May 2018 18:02:25 +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: HE1PR02CA0097.eurprd02.prod.outlook.com (2603:10a6:7:29::26) To VI1PR05MB4191.eurprd05.prod.outlook.com (2603:10a6:803:4e::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR05MB4191; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4191; 3:yLa5Rssdyf/W14fVK89OIQSVp8s0+Io1a2MmoagiHI6jKwVvkxjdoCKyDmbrt0VmRr/O2oqVtQjoVu6+FOWICyP4HMnNqTLW4JfyLDOMEMGGgY7ZebzXUzl2mY8a3GGKENguVUk6iI7MiaWICpIQmqA8NETgmriU++U+0VeXQQklKTzOnWSX0VxmthiqRtWG5uKW5KptinEJuONy7tTy6RT3BlCbOjh3CYs/L9dVycK8jpYNP8/T4/tMLzBgjGuZ; 25:1DBnq80yGHWfkTpqT/oNVo2rV50wlR7ngEo9nWMfTq4KW/uqkeLKq8nx2EUK3fLHEi94ohfElpFGhVGc6aqSUhPoj7cLl3CAASdMqhyiURPUj+0dZ0OwFR6DD7A+zCPbB6/oYlSjNm678W+hiwSMHVvzt1BOZNJClMGfdqouwdGWPQwK/8aXvqPPAAes1N4vS6+hXlgvUjbFr92PSdRe0KffO1ef2DtJAtW84BfFZe00SLONoGL3HO59qVzK623MNbo/5RYVeLF4AL7f3B4ZtTMM5FI0AYmVm9fKpQTXogkrMtGWwwsom+MI9MkxcUEYyKPM70UC3lRRKfSSgF31WQ==; 31:h2pYCSB8HWo4/c67RcjD7POAG8QzmQSvjtwkULdK8n/5iUxAopc8Z1b3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change-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)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:VI1PR05MB4191; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB4191; X-Forefront-PRVS: 0666E15D35 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(346002)(376002)(366004)(39380400002)(39860400002)(189003)(199004)(305945005)(7736002)(8676002)(6916009)(6666003)(81166006)(105586002)(106356001)(6496006)(51416003)(76176011)(52116002)(81156014)(2906002)(68736007)(25786009)(386003)(5660300001)(50466002)(3846002)(47776003)(48376002)(66066001)(6116002)(97736004)(6486002)(16526019)(8936002)(486006)(2351001)(446003)(107886003)(118296001)(53936002)(478600001)(2616005)(86362001)(16586007)(11346002)(36756003)(956004)(4326008)(476003)(26005)(58126008)(316002); 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:JCrdcdwqpGr7C8jW5b2NBKyf/aWJiEi5flq7fCuS8?= =?us-ascii?Q?mdR1fy+XiRMcqBK3anGFd9ifddfc+ta1Ysd2QCwRqiZbSd5wcuwWdxTis/tb?= =?us-ascii?Q?kQ3w0RgH/hHoN/lyxvHNUX4xbgbdCV8yUug/K6YFdb7RbWzsxaDKztk37LcF?= =?us-ascii?Q?9Kv8plQ9utCH36vKLJzIv0kp99wDlLuBGW0BcJuyTOcQ2X8WreXHLWLOKMLs?= =?us-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ibH+z3IG516hstJi5ufQR4S9JUQLAfhilazU6o1jWWx/Jp3c90j8M5EXZJ5EJfZRyGh6fCBDiDlNb6LM+YGvnJerAE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4191; 7:Yoovjs/Rjotl6AlC4ivVm7b4mcegS+l9iXBDd8yGCxkKxlm1rI8uXrshgpjCKNMRm4dB4S7G3PPyePuW9hLOp6hV3sbah3KVubIG54zIDyIF6yCIK8sQKcv6w4gRlEvgo2VcK49+uo7hkxQsIPJNpujMM8q1FFUBQyWH2DljkpajcwD/ZIb0Al3Xa6xD+wxUCLXqEWyJprIuOOCePqIy3pBS2tfqHrZO2nJWfAPXPOk30IC8bN8vbTWDf3IGTohC X-MS-Office365-Filtering-Correlation-Id: a052f38f-f306-4d4a-5aaa-08d5b4fd1b9f X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2018 16:02:32.1103 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a052f38f-f306-4d4a-5aaa-08d5b4fd1b9f 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-internal@mellanox.com Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org X-Virus-Scanned: ClamAV using ClamSMTP Allow lookup of information of bridge VLANs. Signed-off-by: Petr Machata Signed-off-by: Petr Machata --- net/bridge/br_vlan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index df37a51..dc832c09 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c @@ -1176,6 +1176,8 @@ int br_vlan_get_info(const struct net_device *dev, u16 vid, p = br_port_get_check_rtnl(dev); if (p) vg = nbp_vlan_group(p); + else if (netif_is_bridge_master(dev)) + vg = br_vlan_group(netdev_priv(dev)); else return -EINVAL;