Message ID | e25c50b3949ce0584c1ef25c4d7ffdf761d68c51.1527806682.git.petrm@mellanox.com (mailing list archive) |
---|---|
State | Accepted |
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 C1A28603B5 for <patchwork-linux-mlxsw@patchwork.kernel.org>; Thu, 31 May 2018 23:30:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC1CF28DC6 for <patchwork-linux-mlxsw@patchwork.kernel.org>; Thu, 31 May 2018 23:30:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFA8A28E8B; Thu, 31 May 2018 23:30:50 +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 0196D28DC6 for <patchwork-linux-mlxsw@patchwork.kernel.org>; Thu, 31 May 2018 23:30:50 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40xkGw31svzDrZD for <patchwork-linux-mlxsw@patchwork.kernel.org>; Fri, 1 Jun 2018 09:30:48 +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="J7lD2y6D"; 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.79; 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="J7lD2y6D"; dkim-atps=neutral Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0079.outbound.protection.outlook.com [104.47.0.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40xkGr5zfpzDrZD for <linux-mlxsw@lists.ozlabs.org>; Fri, 1 Jun 2018 09:30:44 +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=Xlfz3sPtXgaAHAPSZ59aNkVh9zXezmiHeyl9Ki0B2bA=; b=J7lD2y6DG41INswkC32Hg+DGzcYl8w3e+Jpo0fcrXy23TXp9b6VLZjdx3/R16SiqelxgobA14kINUWM4AZBmaA3QwRGpPxVJIumKgu88gEvsJ1Lu6Gewi3OaNPXiYB6eCQpS/eTNkLoUnQQ4YUDKbNcSZuPmaO2Axjt4DjNIyqM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=petrm@mellanox.com; Received: from t540p (89.176.83.59) by AM6PR05MB4183.eurprd05.prod.outlook.com (2603:10a6:209:40::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.797.11; Thu, 31 May 2018 23:30:40 +0000 From: Petr Machata <petrm@mellanox.com> To: <linux-internal@mellanox.com> Subject: [PATCH net-next mlxsw 2/2] mlxsw: spectrum_span: Suppress VLAN on BRIDGE_VLAN_INFO_UNTAGGED In-Reply-To: <cover.1527806682.git.petrm@mellanox.com> References: <cover.1527806682.git.petrm@mellanox.com> Message-Id: <e25c50b3949ce0584c1ef25c4d7ffdf761d68c51.1527806682.git.petrm@mellanox.com> Date: Fri, 01 Jun 2018 01:30:13 +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: LO2P265CA0212.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::32) To AM6PR05MB4183.eurprd05.prod.outlook.com (2603:10a6:209:40::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4183; X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4183; 3:if2O0fyy1daR+4bFVrRaPKSiBuckzuKWE73qsQNFHUUvjWkEiVI8qkDXLaLL5Sq95XuflsAaMRg770ecjLw/g0Mk/NF43wz/yjZHMVABI80x0GMtWUQRhMP4XLgtnEr3k1hMDDDtjdYERa5S9GFlZyim3XeJpZ0J/3aA4n4hyiv+Fz1f45tGs3NjpX4PSPlNGySpW7A3vI//dYlJp4NDqAPbg6tvSdqODbB0m1DdtVPRAUak5DVKXECPXyZQ6f6C; 25:4lEXc5c5adGvkPsq3n6XRJnpZHb7EYy4swKvVWG0bAsrHf44DcP1zRpZPfgZXkdxfUALkoteRFWefx8Rix27eBhTTvoLaO4jjRSqjzo64pNQ/I3U0HZDQrDxHL8Q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jZ+sGiAL0OpknG/dDnw7/9huEfQ8gUpLI42pDWJTQG+uc6C9bB1OCyuhWybagOooWLI9pqs9+pyrur3YX2/C3EfQ2A7cp5R/6uUlDad4aQP84ZVDrb+asV8rDBYsFl4ZVtRGZ959L/cR1WgIkMekSLZZOFtDiGCQqu33KL/ZLHhXLwLtkwYwMBdt8FW1tdBT1BpAUKULLgUmwUaWsb5/j5x1XRX35/GpPVw9MlVAZ8NJRGsxZi0mtO4JUQZ4Ddw== X-Microsoft-Antispam-PRVS: <AM6PR05MB41830D94377A9B187CF21959DB630@AM6PR05MB4183.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)(3231254)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:AM6PR05MB4183; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4183; X-Forefront-PRVS: 06891E23FB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39380400002)(39860400002)(396003)(346002)(376002)(189003)(199004)(11346002)(6486002)(37006003)(486006)(52116002)(51416003)(476003)(2616005)(956004)(16586007)(6116002)(8676002)(81156014)(305945005)(81166006)(26005)(59450400001)(316002)(186003)(3846002)(58126008)(6496006)(52396003)(66066001)(8936002)(6862004)(16526019)(68736007)(5660300001)(105586002)(53936002)(478600001)(50466002)(25786009)(7736002)(47776003)(97736004)(118296001)(36756003)(86362001)(106356001)(76176011)(386003)(6636002)(2351001)(6666003)(446003)(2906002)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4183; 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; AM6PR05MB4183; 23:sdiJ/d9pLIN92pv+g5ONEo2jB2PTJuXK3UA1Ev60z?= =?us-ascii?Q?Uv8u4vTjJv/+hfDsussBgN4Q3MeEHm73MK7v3rCg9e3fV8S+TOfSKGQy4b8/?= =?us-ascii?Q?Vtcl4rhWMbZZYdgXLdn4LofthB3n50wgcMucVM6O8fBgWrn7tTzfUT9l4zid?= =?us-ascii?Q?4hZW2C12e3uxVgp+5NEydcn/Lf8GbDCuNsa93L/UrVbF/l/aGbD9h2PU2yp0?= =?us-ascii?Q?qveLwk6wC6Lgo47crlViNlJK0yn8NJY+tOwsNgFOszyY3EI+9QHc5hcvLiTD?= =?us-ascii?Q?duzleTEz5p6Gnz8AeBJuChLqYII6Gxy5meYdM0cOoOADYQ2Htqq9y95jVsFj?= =?us-ascii?Q?wNGaIgjjXgo0uBU/OOLnB7L7zNtQbCIAoYzCyi0HDWRDeVdFGWD6b/MbHwdJ?= =?us-ascii?Q?f7t/4vJUX0fjHXy7Jk0E4VqiEvVaI0UvgSsUVZP+XN4gV8wqwCoimu3eBG4p?= =?us-ascii?Q?EXSnPKSDg0qOa4ZLTUJHKT9usnvEH0GuIWAXaapqh+oWURHCICmQgZrxnvTN?= =?us-ascii?Q?sRQeAk80qP1ueioBbhnht6FOOt4DVyvBrqIQCrZtfL7rNCPSjFBRPAH4FsT+?= =?us-ascii?Q?adofG7bqAj6SAGcFS8EA6Yz1tiJHlV4lbCBR7Rf3whwu+gYRYtVFvm+aJu6d?= =?us-ascii?Q?B+Z6Z44vZbsgtvkQl4me6ClYQnvOWtdvME2on8bG99iGKiRFS8yQWo/uEV1k?= =?us-ascii?Q?amZOPo4pZl5xb4Bf6NMJMXikt4rFKv/w4f3Xd2WZcPJzXIlzue7i3o3LzwJ8?= =?us-ascii?Q?9fU289hzeVTeqUzyf5fBtUTtcZX/KbXW/PI9BDf0Fhe5fbrFija1sfzLk8GW?= =?us-ascii?Q?b9cLxKThIW4ESAOTP+nSzESi5oeTqtsy1JQCZSD7fjZT93jmHI4UbG2i3MYO?= =?us-ascii?Q?Wa9xJ0jT7jlxu8IamIrvI/3vEi+h2M0CEH3V5vypzBLNzInEtsDeAz5OrWDe?= =?us-ascii?Q?jGV3ibbXgK/ar5Esgq48NuZXnU75ghXlloKO5g4HOn36PJjBzyef8S10DvjY?= =?us-ascii?Q?Bjlq5UHUTKpfFTsNBIuqq4AQTWO/crAgi5SRzy5BC7w0E9PSurpx8KJgxHHM?= =?us-ascii?Q?PdNZL2SIGSxvEBGWgvLXEPvc48RVn7tYDIpXkmSXzSrvB9dDTfSgvilno9kF?= =?us-ascii?Q?R+UdCRCt1Vo0FIUmBA4w2acd1ItPIX6ATipclJVgC4c0CC3pQNoI2iWcSouU?= =?us-ascii?Q?sePQLOeFce3eT8/E6OUqt/ZC+uKy3Xfd2y1ruswuTuTeFih7JUHo88+A+3qd?= =?us-ascii?Q?S/yvmzzvfz95WB+9Ep9y93x11rMEFUs4Yf9NYhj?= X-Microsoft-Antispam-Message-Info: 3kItfXW1IZQ7AtLgo0/BARLWW9t9X+8r/7tl8cWWS2dv46oXQmeEegzh9FSUlH+6aAi2RP1GQ9FzAwVdRaUVMOprw33l6Fc3FyEN7BDCbzZxtQbJZzSQVKteat9N11zQXCShX2s778mw9/8imkJEUi7rt30ivdE0I+Bf8lotdTzSmYr1ippCWRvGKlONuqCN X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4183; 6:YDhEgybPR8wD265yMZccsBhPv/R7M4yCKwBce77UiA0wcKcLK/24oSWl0zgMHIz4geHeR6MBpuaz8bfNnz0IxJ+Hr+M8IvwcqXbvNmYxRW4DfxO5gdul2xp56t4G1FF184EYwBUHrleGtmegDpXfKN6MIZ0KdaVd4lpPWDXFm4gU9VoOA6HVuvfjt2EtPp4oogwxga5CZ+Pf90SGlw+NVvBCpberrXsMwOjA45sJff0KpkQ3vNxNytDpSmWEy1ysZh30qu0+PR2MYuz01xpfK0BHt1rwvuTEyIYz8H+2hKxv2S9gw8vV3fT4MJRkR1uzsFIEVyHhV/hYgbwESdXCTlCfky0FUnjhATqUqkAE3/BDk9VJdk0zVpAXc8tdQlEx2KLEhji0vU4jeT1nVvmaZKNU5ze5Z21HgXMIWgNf223vyrtUee14eyvTbnoTVuaB2BD6TLsogQCKv3u1ZskJGA==; 5:oz7L6tyssQzB+op7WZ+cNTl222bXe/qXfaezlfUFauqgxVW/WOhRuHIkTFg/MM0c+x4kR8cuDbO+ZCzgIm1jOr/qZ+rQjxL30qrT/fVyElAmfPSU8HnDQG8OCIzyznHCyEF1n/ZCJU7zxaQTgcai9vcVs6WzksLbbpmpH7uuHpk=; 24:6a4ayn2F45QBbS6+kJJhhON1qaA9vxx2+fHvtKU0Pn8mdZUb0/YUJoZK0su1dMoHutE+euyILg+rAIwFObnQ8XPR6ldehaDkpi76NGPVIxY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4183; 7:0q6uNEcsNlMcLBZBrGbf+d8xKOox8y6PkSKXHgR3ULEPg1NmZ3UO6Z516FTr7GKFkHnoxdeANxe0d6uEbmVXMuJDJDpQB9T+bgx4FSRZ7cOPaPcVpv1ibsiZ9PsaPrOMMjA0uHEvnduN23yVsySo8WZIsT5A/a7uNhvDeKSmzqCagJI0BDxDdjktT0EfmPTswTeIaWFleVMnEr2T86zDRWon4uU77ILK1XK4PeoCOKgiIGU6vJ9C65WsjZQcS7s1 X-MS-Office365-Filtering-Correlation-Id: b734f546-b100-4d79-3adf-08d5c74e85a0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2018 23:30:40.3696 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b734f546-b100-4d79-3adf-08d5c74e85a0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4183 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_span.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c index da3f7f5..3d187d8 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c @@ -191,7 +191,9 @@ mlxsw_sp_span_entry_bridge_8021q(const struct net_device *br_dev, if (br_vlan_get_info(edev, vid, &vinfo)) return NULL; - if (!(vinfo.flags & BRIDGE_VLAN_INFO_UNTAGGED)) + if (vinfo.flags & BRIDGE_VLAN_INFO_UNTAGGED) + *p_vid = 0; + else *p_vid = vid; return edev; }
When offloading mirroring to gretap or ip6gretap netdevices, an 802.1q bridge is one of the soft devices permissible in the underlay when resolving the packet path. After the packet path is resolved to a particular bridge egress device, flags on packet VLAN determine whether the egressed packet should be tagged. The current logic however only ever sets the VLAN tag, never suppresses it. Thus if there's a VLAN netdevice above the bridge that determines the packet VLAN, that VLAN is never unset, and mirroring is configured with VLAN tagging. Fix by setting the packet VLAN on both branches: set to zero (for unset) when BRIDGE_VLAN_INFO_UNTAGGED, copy the resolved VLAN (e.g. from bridge PVID) otherwise. Signed-off-by: Petr Machata <petrm@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)