From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B37A3C282C2 for ; Wed, 6 Feb 2019 19:42:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E0432080D for ; Wed, 6 Feb 2019 19:42:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="xNYM2Ss1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727133AbfBFTmL (ORCPT ); Wed, 6 Feb 2019 14:42:11 -0500 Received: from mail-eopbgr10078.outbound.protection.outlook.com ([40.107.1.78]:52096 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727091AbfBFTmJ (ORCPT ); Wed, 6 Feb 2019 14:42:09 -0500 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=CQX0so6jREefaNlYfpb8RyVpwJ0F9Cd+5/n9plkoPoc=; b=xNYM2Ss1DotcErETs49p7PcP1GnLyaxH1YfyB6ZSJU8oRMYOwxfJxsXFgeLIa950zQiz0Jt71ES48QeE/svXp4h4IAnIb0mq8LrJm9o0qfY6Xxh2Us0OTjkj+z3cAno4GrZKRg1MVY5NjTVCikZsuw4P6xMLJCCgYPwOm4H0k34= Received: from AM6PR05MB5240.eurprd05.prod.outlook.com (20.177.196.214) by AM6PR05MB4376.eurprd05.prod.outlook.com (52.135.162.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.19; Wed, 6 Feb 2019 19:42:00 +0000 Received: from AM6PR05MB5240.eurprd05.prod.outlook.com ([fe80::3542:889c:3a85:3866]) by AM6PR05MB5240.eurprd05.prod.outlook.com ([fe80::3542:889c:3a85:3866%5]) with mapi id 15.20.1601.016; Wed, 6 Feb 2019 19:42:00 +0000 From: Ido Schimmel To: "netdev@vger.kernel.org" CC: "davem@davemloft.net" , Jiri Pirko , Alexander Petrovskiy , "dsahern@gmail.com" , mlxsw , Ido Schimmel Subject: [PATCH net-next 0/2] mlxsw: Offload blackhole routes Thread-Topic: [PATCH net-next 0/2] mlxsw: Offload blackhole routes Thread-Index: AQHUvlQH507DIQPxfkeegIzNXWkcAw== Date: Wed, 6 Feb 2019 19:42:00 +0000 Message-ID: <20190206194140.18606-1-idosch@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM5PR0601CA0030.eurprd06.prod.outlook.com (2603:10a6:203:68::16) To AM6PR05MB5240.eurprd05.prod.outlook.com (2603:10a6:20b:64::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-originating-ip: [37.142.229.58] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM6PR05MB4376;6:4ecmSB12FuDa6Nw5hHtT+cwOeBiMfGnwUOyMKWtjgCziS3Y4GpvyLkizhCoN8TGUuJrBgv9uwKu0iQ2Gy020CaWMZnGxsX/xLoSd6uYk8R1M+zFAUChAK25XdTYi/sxKZ1nxB47EWQ1QQE1A3us/oRKR31lg5DJkJwo+4uZpF+E28OGqiP9B2g+W9X/hFDOYeXFU/DJ07Vywr7NPGNYUvxBPIZc/tNs1N9EJVA0YcCw4kWgnyAp2Ex+4kvRRHetzKqJOOxi2N+ZFnjydOikupLr7FHc8iT6BSiWbF6lsXzpvy6kM9vBa24rMDO5B24mSCf/FhRLrOZR1+g9+D1jl8R5y2S72dEys8edocbfYBueFb+hOl1Zjn+eliPo6qoGbpj7v5nD3Lw2bS0t9TYJ15Frq5bbfTclUasHkGQJ0fo5aedTnCyShKMXT1/HrFOon9z97bjJUdMIHujr5/C3ZXA==;5:aWwlzN4Dv6aN+AvPE3DcD09ZT67ip0MCfr6zt2YZd0GnobvdUDMMeOJ9kvz6CYuRh2VVHQs7+Trzh3xTn621bqrbR3yoIg+r9er7hHZu6Qkwx8UKpW7+EDXABiLomlFOICgThKktAh45+H6JfzRsLvIn7AgJerBAqHU4Ht2PLRWINrZwlWP99F98bjLs08vnVG/H1wny7cfC5pJv4weaPw==;7:lUkxfe0VqVgICzmxxuDb8Vo+E/OnGcgmKUt8VJnAY1UZ4d1ubN+ZesUIxDHeKRD59FzJDiru0JZyb+w4m0KuSx6IxjOeTmvD/3Br5GZBI2UNf43Ca2ZYrw16gpy/t76vZmg9spMk9Rs6EzX1aSRpVA== x-ms-office365-filtering-correlation-id: 0001b5cf-755a-49ab-be1e-08d68c6b2944 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR05MB4376; x-ms-traffictypediagnostic: AM6PR05MB4376: x-microsoft-antispam-prvs: x-forefront-prvs: 0940A19703 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(396003)(136003)(376002)(346002)(39860400002)(189003)(199004)(8936002)(476003)(54906003)(53936002)(2616005)(105586002)(99286004)(305945005)(107886003)(486006)(316002)(386003)(6506007)(2906002)(6916009)(97736004)(52116002)(2501003)(36756003)(256004)(106356001)(6436002)(7736002)(26005)(14454004)(186003)(50226002)(3846002)(102836004)(6116002)(86362001)(81156014)(81166006)(1730700003)(25786009)(8676002)(68736007)(5640700003)(4744005)(478600001)(6486002)(66066001)(6512007)(66574012)(1076003)(71200400001)(71190400001)(2351001)(4326008);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR05MB4376;H:AM6PR05MB5240.eurprd05.prod.outlook.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: VsEUP/c2GtZzmL/YRhvs/IzYH+kSZzER0l2S4NqVertMSi/T16/CttFCYU8P/Mw+eKIlMXLk8Jm9M8BT4edrr4uFOFWHvKnwxvFF2TPQM9uAJGyMrn1WfkxkdlMyzQBzvs99zgbdoA0A5fHtEXD+kW23q6rr63UjyhABtlmWihG3u96duh20iHUxD/XrzhEgt8UsdxExjzto1ZETT4W2vYm35rx4xrkG8x/s2cs4Z+WaQDnB2WdRG+DYD4Fn6fBnDq5C22+XvbdyjPPMDkD68QcXeLVrf9wFBLfpp6paS0lVXeZcu3kWP8uOT1j4+WpPz1WZUrp2duifpe3vDMUiGKIt6LZtyq12H95CHC3WY261JI4VHjUOR00sPJpWbLzN6SJcQFqvcp5nlJ8u4LyJDljau9sUnQ0UALNE0s6RwvU= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0001b5cf-755a-49ab-be1e-08d68c6b2944 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Feb 2019 19:41:59.4209 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4376 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Blackhole routes are routes that cause matching packets to be silently dropped. This is in contrast to unreachable routes that generate an ICMP host unreachable packet in response. The driver currently programs both route types with a trap action and lets the kernel drop matching packets. This is sub-optimal as packets routed using a blackhole route can be directly dropped by the ASIC. Patch #1 alters mlxsw to program blackhole routes with a discard action. Patch #2 adds a matching test. Ido Schimmel (2): mlxsw: spectrum_router: Offload blackhole routes selftests: mlxsw: Add a test for blackhole routes .../ethernet/mellanox/mlxsw/spectrum_router.c | 27 ++- .../drivers/net/mlxsw/blackhole_routes.sh | 200 ++++++++++++++++++ 2 files changed, 225 insertions(+), 2 deletions(-) create mode 100755 tools/testing/selftests/drivers/net/mlxsw/blackhole_rou= tes.sh --=20 2.20.1