From patchwork Wed Apr 25 09:12:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 10361969 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 7660C60225 for ; Wed, 25 Apr 2018 09:12:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6476526E55 for ; Wed, 25 Apr 2018 09:12:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 594B528AFD; Wed, 25 Apr 2018 09:12:21 +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 8FEFE26E55 for ; Wed, 25 Apr 2018 09:12:20 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40WDwy28qvzF24N for ; Wed, 25 Apr 2018 19:12:18 +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="L1Gm4ICD"; 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.3.76; helo=eur03-am5-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="L1Gm4ICD"; dkim-atps=neutral Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30076.outbound.protection.outlook.com [40.107.3.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40WDws4rRvzDrDT for ; Wed, 25 Apr 2018 19:12:13 +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=wCbbIk9+sYfW+FrGMxLfjtlBH41vYjwWVHrDt/pLkUM=; b=L1Gm4ICD5KrYA2CQX/V/BHMQSIwr/5D9Pu4EwVIJe8BVkuIkjiHK7hUIGN5nSDXwZfX0eqRMkX0MPKqj4BVrd9sBTuRcVVLYdf0NqRMmSuXzY00N1sDnYWv94jVsr4wOy2dkFcwNTTSoIBuOsa5eq/at/iDKjkXngRyJJtvbM8g= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; Received: from localhost (193.47.165.251) by AM4PR0501MB2324.eurprd05.prod.outlook.com (2603:10a6:200:53::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.13; Wed, 25 Apr 2018 09:12:05 +0000 Date: Wed, 25 Apr 2018 12:12:00 +0300 From: Ido Schimmel To: linux-mlxsw@lists.ozlabs.org, linux-internal@mellanox.com Subject: Re: [PATCH net-next internal 0/2] mlxsw: Reject unsupported FIB configurations Message-ID: <20180425091200.GA29940@splinter.mtl.com> References: <20180424141744.9147-1-idosch@mellanox.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180424141744.9147-1-idosch@mellanox.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Originating-IP: [193.47.165.251] X-ClientProxiedBy: VI1PR08CA0126.eurprd08.prod.outlook.com (2603:10a6:800:d4::28) To AM4PR0501MB2324.eurprd05.prod.outlook.com (2603:10a6:200:53::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM4PR0501MB2324; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0501MB2324; 3:g0CcQClgBoxbzaajTGhqTmHX+ep0zN1tSlO62Z2KoNdkPWsENDx2OnuZRnnD4sETJe4xsV+p02oQMshlM9qZURMuH9tccCpoQmpOgwfL3viIBSfeJmY2m8t2nZDLSjkdqOZhNLjhsigF0U3X7wZKICYHUufuAPT+ud6VLSFSJlOZ/zngxsXnmZfi6yrZQVs5Fm25ODqHkrqbs6o9qrFWwDpfqZvH1XyKAYZsBMe3JzkcNM3mFW1udY3xNwaOtimh; 25:zLjuc6+MZ/hvLBhpzYIWIYU789ykQsqvpTEYvI9osmjPI9HUNSLJC7hn6Hw17yi/s9uWgPR7bpxJyl3z4w7uPk9CdB0S4pN5BX2MkJvCTavyQTHNycJp52u9Ju39YxjbQyNwLB4ypibiAzuAe6k/uc+scrxIaA8Nll8lAqPHXdq9DhyrG9NalDmTT+KF/1SpCt5GgGXPI/gDT05yMZW0q0Y0z4J/5bM7+Q81jGQZlHCiRKHofRH1X2htJS2oh3mzueYDkdSQabgj6fiMvo/w9dxMKdHoPN/iyXJrG7lhSBzwkXTi4ASgClIMrdyCdGLYiOeRGtbdcjJVtQauD67Hvw==; 31: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G1vnQVau1nqq15MIPzyZdjoUDNpVXcj1ouK6uM1elwQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231232)(944501410)(52105095)(93006095)(93001095)(3002001)(6055026)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:AM4PR0501MB2324; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0501MB2324; X-Forefront-PRVS: 06530126A4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(346002)(39860400002)(396003)(366004)(376002)(39380400002)(189003)(199004)(97736004)(25786009)(76506005)(59450400001)(6496006)(76176011)(33896004)(9686003)(105586002)(50466002)(52116002)(26005)(386003)(186003)(16526019)(106356001)(229853002)(33656002)(5660300001)(8936002)(8676002)(7736002)(6486002)(3846002)(6116002)(6636002)(6666003)(58126008)(6246003)(316002)(446003)(81156014)(16586007)(53936002)(81166006)(956004)(11346002)(476003)(2906002)(1076002)(486006)(23726003)(478600001)(47776003)(575784001)(86362001)(68736007)(66066001)(305945005)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR0501MB2324; H:localhost; 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; AM4PR0501MB2324; 23:X4rjb/FXO/CbixOnrfIjagPy9LTAVce7MxMOZVv?= =?us-ascii?Q?g/x7plE6UHIXYNam2mjqW1zwOCt+L3b7o9lQdhvLqt0wrUeLpeU3bhsb99Uv?= =?us-ascii?Q?u8zh6ei0K7znUZOXVtzyfW7ql7pSm2vxSdw1aq4lwNlGRHVY3e2iF+6iBJr3?= =?us-ascii?Q?0mO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BS8kIf9gwm4QGjvbS1s?= =?us-ascii?Q?FfqjvrJlbeZJLq7imGa1RBXfqIJOGzSEudHoYia3hWuqjMAVwEZlPsqit9LE?= =?us-ascii?Q?CqPj3X8zZRClLs4udV03l3W0GO295NsWW8vKvbfpe3jYEGtWq05AIJZfS/pb?= =?us-ascii?Q?M/JDIK/fIHeXSEmoR9uL6yk7nj0ilGFNpna8AQHKevjuOQPwzbP3ZKvgqX7j?= =?us-ascii?Q?mOLCY1UkkMUwzSEb9ecDwu22g3MuYn+5p2Zib2IpwXj4/sYybe+SpoYtuVvy?= =?us-ascii?Q?L/W4A0yvIm61vzhotuk2JNMM=3D?= X-Microsoft-Antispam-Message-Info: sqmlaBWjNJ/oarX7ynS1n1IORAo7+rakds1LnS/8K7b6dVccoD7BhODeKc5fNziFHUFdegeXjG+gY09jV82f6PtePxjLag8q0uMZGDgN4Xki3dB8VFcKcPMpSoQBU2F3bv8iExT93o7a+8VbmNyLW0JbNbvs4GcHobscXdocfgCm1rYSAl6ZlZV7g/C82OCN X-Microsoft-Exchange-Diagnostics: 1; AM4PR0501MB2324; 6:3wl2wuuo9BVKjKpug/EUfB/wQSxLnCK74Pthh+DHKTGViojIorpxc6Hb9LgeI2PxT09QYcRa20E6d0k7m7KACUDY0RLW7CSnVk3GncOZBJq/A/vnkq2Qw/lgJwSLumPBQxuCtwoJsgpZG/Jd6CVBBwyIGiD56TsrOr2PEojMkgCZCHRQ9zlb2jZOrqj+5K3wZosDN3rhUetjSMZZd5TlcV5502EyUNP9qN6VkgdWNMV52bC0YeYBKlZsQ8lR2weKrWYwutU92lWvjg3ltfWRA69Z2q+Cc232Div7z853yGD2lGTS5Lvut/Kc+Uo4RsW2EBkRr/wMgc9kwfhaTBiQ6YujqyD7hPUZSvAnfdAhNAJxRL/QI1Ru9DQC+q3SdNI27nRC5wLk95yJC2IdefuqmpHmkpDZbkKDSXjXNDOCTuNTdtm2FW+ThM62OvvcctbPqcxUzfiO4YzxV6yhlbkeeQ==; 5:awrleW+GSaVZstPL2nLwdCZPNvLzIWUgWdPM9yXRXBFfuTrn65ywg/T37BoSLoxK+MSvx7ewBFofCbFnVh7yHv2nYhNC5PoTcrIgqWpVNo9c7fQlcrrsMEzAa3r/oAXyXREcFj1X6cyG2hcVX+Lu+x4CDhXer8aDKF/NJh3CAOE=; 24:1TqQ8Ye9zAYHUi46bjhB0UzxcO0LvnuONWhBefJR8PZZ0/CGJaneUAUyUVYqY7PMrw1hpuCMNpNgzzDVmXnmf574YNsCkq8MfpfEk1r4Pxc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM4PR0501MB2324; 7:IRsYz7+cWrMEdZswU+AiJbSNWBVxgnHzmP53ov8ZLk8+us7/MHOsDxBArbz0SBwK/4sUY3im2+qI3O0uSYRucmzN8W+hrQ3He0bo2wzrV5bG3wxf1h2TP5Hnt45mi+EoS0B9hD+MvgOCkMNdXFXC7tOT0xCCG+qU+k30Z8PkrC/D6ggX05ePuimFJP1/0WcUmU9vHpWjKUBYZqZ3ox3BuqMMSyM5zSVAL5U/fG4OY8I4TEfAgScopIriGQ9fSUnV X-MS-Office365-Filtering-Correlation-Id: 3ed368b3-fc58-477d-ef96-08d5aa8c9dab X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2018 09:12:05.7625 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3ed368b3-fc58-477d-ef96-08d5aa8c9dab X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0501MB2324 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: , Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org Sender: "Linux-mlxsw" X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Apr 24, 2018 at 05:17:42PM +0300, Ido Schimmel wrote: > Recently it became possible for listeners of the FIB notification chain > to veto operations such as addition of routes and rules. > > Adjust the mlxsw driver to take advantage of it and return an error for > unsupported FIB rules and for routes configured after the abort > mechanism was triggered (due to exceeded resources for example). I'll apply this set for now. I had to patch router_scale.sh to prevent it from failing: Reviewed-by: Yuval Mintz diff --git a/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh index 12722835129e..2fe0c155f4cc 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh @@ -95,8 +95,7 @@ router_routes_create() done done - ip -b $ROUTE_FILE - check_err $? "Route insertion failed" + ip -b $ROUTE_FILE &> /dev/null } router_routes_destroy() @@ -115,10 +114,6 @@ router_test() RET=0 router_routes_create $route_count - check_err $? "Route insertaion failed" - if [[ $RET -ne 0 ]]; then - return - fi router_offload_validate $route_count check_err_fail $should_fail $? "Offload of $route_count routes"