From patchwork Thu Jul 5 13:58:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 10509393 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 77480603D7 for ; Thu, 5 Jul 2018 14:03:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6496C28985 for ; Thu, 5 Jul 2018 14:03:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 58A9D29094; Thu, 5 Jul 2018 14:03: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 CB9AD29007 for ; Thu, 5 Jul 2018 14:03: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 41M02P0Ph3zF214 for ; Fri, 6 Jul 2018 00:03:41 +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="xNtuUcnB"; 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.4.69; helo=eur03-db5-obe.outbound.protection.outlook.com; envelope-from=idosch@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="xNtuUcnB"; dkim-atps=neutral Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40069.outbound.protection.outlook.com [40.107.4.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41LzxJ40XkzF1r1 for ; Thu, 5 Jul 2018 23:59:16 +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=AeerJow8YKxsM9TDLfLs2upHrlpGaleLHtKPO5QMKfo=; b=xNtuUcnBy1Fum+f97tDjoo51/06rEO0/QFem4bneLh0JACBw1R4M7ShmhYG1STpZmzynGvpWMaqbmg09JiUMy517D/QmoX2RnwRdYCI0BjlHbwBOEQDoJr1ZiUlJ4RsKvSAAbUYeg0/o1CuxOUIg+dpMLQ618TliqN3ImeTwGQ4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; Received: from splinter.mtl.com (193.47.165.251) by VI1PR0501MB2334.eurprd05.prod.outlook.com (2603:10a6:800:2c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.25; Thu, 5 Jul 2018 13:59:03 +0000 From: Ido Schimmel To: idosch@idosch.org Subject: [PATCH net-next mlxsw 3/4] mlxsw: spectrum: Add VRRP traps Date: Thu, 5 Jul 2018 16:58:26 +0300 Message-Id: <20180705135827.14770-4-idosch@mellanox.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180705135827.14770-1-idosch@mellanox.com> References: <20180705135827.14770-1-idosch@mellanox.com> MIME-Version: 1.0 X-Originating-IP: [193.47.165.251] X-ClientProxiedBy: DB6P193CA0012.EURP193.PROD.OUTLOOK.COM (2603:10a6:6:29::22) To VI1PR0501MB2334.eurprd05.prod.outlook.com (2603:10a6:800:2c::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 49833695-c358-49d1-1059-08d5e27f777f X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2334; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2334; 3:TketFRgXbdU25kJZTJNIxx3X/0igiD8ti+ePFnSknrK1xVReynXsmnQJzQEL+YMp2G/oy96GsdKcTaJsD2n0YoBnQH2w7XM9aqxSSpmPRBkzMKs7CmDtivCgMaH7VnUQSYIz6u2YZ0jaH53wAc1sLDLGymaGpdtkhprQ2QxCZU91OIJyVnKjDwDlJBrmo5E9cDNPasI9c33kVI2qyKgGTnOfnyYQcJ2iBhEdZ0hMh9jtn5EOoeBer+/Ejq+ICBMF; 25:nbVYNuXe9E+qdNAlo2lSRT3kRcf5DE+pz5dHv8jzaWLLbJ4kOfAqP8/SUwRmkuSw7+wdSloQRW2jVXKhlcK91fw0r1aqhQ4gXy5aLND0IvMEA2jdQ0M9iQYxYl/INaYgs8T+ZKLNDP7KWMwSNer5OcwHikXSf0R8boxgoDb17j0fnHcvTrZwxFIZ152qh1uKvuGrUzKluRDBMfJs29l4UKAej+U8pt5utx0A+hUzqrmdKJgkRqc6gEGZok6dInRH/ebgg7HdB3RPVSUmctMUs1NHngqublQXKXPrEuykaJYS5cy7sXIf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p7KGrvVkjZ5FtNlKKXK8fudZkZ0HgD/+lkXwg0Q85UuksdybfP2OIpX1WSMVIhCw== X-Microsoft-Antispam-PRVS: 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)(93006095)(93001095)(10201501046)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:VI1PR0501MB2334; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2334; X-Forefront-PRVS: 0724FCD4CD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(136003)(39860400002)(346002)(366004)(376002)(189003)(199004)(107886003)(478600001)(1076002)(97736004)(6116002)(3846002)(2361001)(6916009)(53936002)(4326008)(8936002)(81156014)(81166006)(8676002)(2906002)(305945005)(7736002)(86362001)(25786009)(316002)(2351001)(6512007)(186003)(26005)(76176011)(386003)(6506007)(51416003)(5660300001)(16586007)(52116002)(16526019)(6486002)(50226002)(50466002)(36756003)(47776003)(68736007)(106356001)(105586002)(6666003)(66066001)(53416004)(2616005)(48376002)(486006)(476003)(956004)(11346002)(446003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2334; H:splinter.mtl.com; 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; VI1PR0501MB2334; 23:zFcTM5faiVFHlbnVPch7ZN/Spyo9Em2I22zzFPw?= =?us-ascii?Q?d1jDmWYedari4XSRZrymaVJcJKifajGbr3j8f/tuTmqNLoynaYBQqewtX860?= =?us-ascii?Q?14Ahoe2ka0T+K3TJ639sQ+XzOSU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7HGk9y/IB+3Hi0SymGjl3A4JeOJg6NnLOCvsrYWEp+0Pk7zBEmkR8+ihEX83Ec9eyNkywEnOo/uPYrg+oOXDlFmwpTs9dXch436qU0z1xyvKTatJ57irrAeLP39mwRILkimiifCoUiadb2eE4zFusA==; 5:sqvIUZKDjwBsmC9oKXfV2TihwRjxzYpmVECPL4sRbyTEDcUtDfYj1xIaC18mREs0QV5A5gVLjvs2CudRFjmsD9wzVlg3iLATEvubN+XaZjKeokJz4f10py5hLQkDFNZjO0ya0w6sdKesS+z/0PW/Bi+kJBigDp9jkfdSATgHHQU=; 24:MqdgFVQgFV5wpDGTOoWLHKm2DpVBLuFg4yjxbGB7FEWm7Kdmk6328mI7wLzQcKjUzQrBZoGFDmrrdxlvIuNPROLGKPZZGcuIBZdJgExRV5E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2334; 7:Ld/3FuL+kUh++H0KH/o13ZVutzSt8AkabrjhOaNQ3dwf1VJFLDKeaLhQZDrLa0DF7ARI8nD7UiMdtT9syu1FIZkL8sPpOEFiHyvBt8JOoC1sXtPO2hErDhViulcpRahm0nO9LFzSC8utwDpJHlFyCHqfA/aX41te0sNx8GWEtcElE9d7tZ9oso/XRrVdm9CI8pDlxr1w/dMwF3yHeBbem24hTZfhKfXutaS3gRUis0n25urQ5SpiAruttBHMHgbo X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2018 13:59:03.1048 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 49833695-c358-49d1-1059-08d5e27f777f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2334 X-BeenThere: linux-mlxsw@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: mlxsw driver development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org X-Virus-Scanned: ClamAV using ClamSMTP Virtual Router Redundancy Protocol packets are used to communicate the state of the Master router associated with the virtual router ID (VRID). These are link-local multicast packets sent with IP protocol 112 that are trapped in the router block in the ASIC. Add a trap for these packets and mark the trapped packets to prevent them from potentially being re-flooded by the bridge driver. Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 ++ drivers/net/ethernet/mellanox/mlxsw/trap.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c index a430b6af890a..20fa2371fe7b 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c @@ -3373,6 +3373,8 @@ static const struct mlxsw_listener mlxsw_sp_listener[] = { MLXSW_SP_RXL_MARK(ROUTER_ALERT_IPV4, TRAP_TO_CPU, ROUTER_EXP, false), MLXSW_SP_RXL_MARK(ROUTER_ALERT_IPV6, TRAP_TO_CPU, ROUTER_EXP, false), MLXSW_SP_RXL_MARK(IPIP_DECAP_ERROR, TRAP_TO_CPU, ROUTER_EXP, false), + MLXSW_SP_RXL_MARK(IPV4_VRRP, TRAP_TO_CPU, ROUTER_EXP, false), + MLXSW_SP_RXL_MARK(IPV6_VRRP, TRAP_TO_CPU, ROUTER_EXP, false), /* PKT Sample trap */ MLXSW_RXL(mlxsw_sp_rx_listener_sample_func, PKT_SAMPLE, MIRROR_TO_CPU, false, SP_IP2ME, DISCARD), diff --git a/drivers/net/ethernet/mellanox/mlxsw/trap.h b/drivers/net/ethernet/mellanox/mlxsw/trap.h index 399e9d6993f7..eb437f59640d 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/trap.h +++ b/drivers/net/ethernet/mellanox/mlxsw/trap.h @@ -63,6 +63,7 @@ enum { MLXSW_TRAP_ID_LBERROR = 0x54, MLXSW_TRAP_ID_IPV4_OSPF = 0x55, MLXSW_TRAP_ID_IPV4_PIM = 0x58, + MLXSW_TRAP_ID_IPV4_VRRP = 0x59, MLXSW_TRAP_ID_RPF = 0x5C, MLXSW_TRAP_ID_IP2ME = 0x5F, MLXSW_TRAP_ID_IPV6_UNSPECIFIED_ADDRESS = 0x60, @@ -78,6 +79,7 @@ enum { MLXSW_TRAP_ID_IPV6_ALL_ROUTERS_LINK = 0x6F, MLXSW_TRAP_ID_RTR_INGRESS0 = 0x70, MLXSW_TRAP_ID_IPV6_PIM = 0x79, + MLXSW_TRAP_ID_IPV6_VRRP = 0x7A, MLXSW_TRAP_ID_IPV4_BGP = 0x88, MLXSW_TRAP_ID_IPV6_BGP = 0x89, MLXSW_TRAP_ID_L3_IPV6_ROUTER_SOLICITATION = 0x8A,