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, 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 B519AC43381 for ; Thu, 28 Feb 2019 06:59:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69CE8218AE for ; Thu, 28 Feb 2019 06:59:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="dM2mVx9E" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731161AbfB1G7V (ORCPT ); Thu, 28 Feb 2019 01:59:21 -0500 Received: from mail-eopbgr150075.outbound.protection.outlook.com ([40.107.15.75]:47522 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727645AbfB1G7V (ORCPT ); Thu, 28 Feb 2019 01:59:21 -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=YkejUDzsXCe/Fk7AEBnloosD/y6BcTMBh7f3jXFGJ1Q=; b=dM2mVx9EeTHyeq8xC9CWeZI9anS7B56pEbBFD/mkEdS7myDlwyu+KHs5ko6NB+ZywkDEIdn/3Yj1f3cEIqeMCXpQvUqEvmkUCadgkdnv+OtoAvr5nCDErTKvvtFD8hUGowuh6d+Z1FX6LLCgwM2DhbxLN3+1bfrejHA5BygkSGE= Received: from AM6PR05MB5240.eurprd05.prod.outlook.com (20.177.196.214) by AM6PR05MB4168.eurprd05.prod.outlook.com (52.135.160.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.15; Thu, 28 Feb 2019 06:59:16 +0000 Received: from AM6PR05MB5240.eurprd05.prod.outlook.com ([fe80::458c:8deb:ca54:1327]) by AM6PR05MB5240.eurprd05.prod.outlook.com ([fe80::458c:8deb:ca54:1327%2]) with mapi id 15.20.1665.015; Thu, 28 Feb 2019 06:59:16 +0000 From: Ido Schimmel To: "netdev@vger.kernel.org" CC: "davem@davemloft.net" , Jiri Pirko , mlxsw , Ido Schimmel Subject: [PATCH net-next 00/14] mlxsw: spectrum_acl: Split rehash work into chunks Thread-Topic: [PATCH net-next 00/14] mlxsw: spectrum_acl: Split rehash work into chunks Thread-Index: AQHUzzMe4nkyTztn/k2VMwqaLcWHmA== Date: Thu, 28 Feb 2019 06:59:15 +0000 Message-ID: <20190228065850.7471-1-idosch@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6PR08CA0025.eurprd08.prod.outlook.com (2603:10a6:20b:c0::13) 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: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 34f93058-646a-4528-0af4-08d69d4a408d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR05MB4168; x-ms-traffictypediagnostic: AM6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fjD2sdvcFciC5vu9+GVmcMKMWQNZBNs5sqjy+nJviQyVCwA3qH1EL6avG?= =?iso-8859-1?Q?5fY9bHLsUNYcVb1hsmsCVe+ihZXVA0B6wB6Przaxsg1O59D2ivPzu+dkyx?= =?iso-8859-1?Q?bvRz9APNULBex8kEud/naBZMHSjN36BjGUaBI2UcYGfL+/NpD/GeEVyi1E?= =?iso-8859-1?Q?LPP8Nl4Nq5oGGnWR+JkrzV27bjTaSLMLaq8zCEuwYh61pw0aQj1gWyb+g/?= =?iso-8859-1?Q?mU0AZfiAxL8t5e+DfyPjOA280QUkM9CDevLKo0qw3e+Nie/sIfOhWyEuJ6?= =?iso-8859-1?Q?XRmZl3BlbT5vI0Z2NHKYRrpuswgckz9MHhD8q2gN+8sduG/JvfmRBRaH/n?= =?iso-8859-1?Q?AJUzl8YANQ9wwYIrpWwof2Ouk/BSnTQnThY8lbaXD/xQZqXxxWrce3vPIH?= =?iso-8859-1?Q?myP0NX8QISyAGDyr6jf11xViMLGVVQ8rkg9Pl+1n/xFs+uUEcxzWXU3kyg?= =?iso-8859-1?Q?1MpZFQBsGMp929pOsN71liV?= x-microsoft-antispam-prvs: x-forefront-prvs: 0962D394D2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39860400002)(376002)(366004)(136003)(396003)(189003)(199004)(97736004)(86362001)(478600001)(99286004)(8676002)(2906002)(5660300002)(1730700003)(54906003)(81156014)(81166006)(2616005)(476003)(6512007)(1076003)(4326008)(316002)(105586002)(50226002)(66066001)(8936002)(106356001)(25786009)(107886003)(53936002)(6436002)(68736007)(2351001)(2501003)(486006)(5640700003)(6486002)(7736002)(6916009)(14454004)(305945005)(102836004)(26005)(36756003)(6116002)(3846002)(6506007)(386003)(14444005)(186003)(256004)(52116002)(71200400001)(71190400001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR05MB4168;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: kJZfkr2SBQwV9/6WzdwWRh/+bLaTV//DvnXCSzhuY7Qcp78F6JjKSU1nlf15nd2x896GVrSM41bL7pqYOMUSraO3+1sft+7C7lTWENIiweaa1+V5P7260oVflsgo0P1mos/VCLTMqtnE3+1F4gwtekfmW7LuyfnukGeAoGWPYYzZuqo1g/UX0NAhcyjV4aDn3TWVf+V/rMpZrveamJuIR7qQiG5qXwxobBUQ/4tCDqQT3m6GyW7L62Y5A3iXdH2TjD8tdt/G/jelsGgfZW6SvEED9yVZixTRRWq67ZCOPhG720WqBZhkNedEhZ6Vy9/eqItCIkeQgtqvbHTuMK7BzrmrFU3bphgoibU+iqcjSZgNz0ITM+nnqLPjNucszZ+7U1gDH7yMTVNnHlDMUl4J4cPZPVD6bIWQ+eaZRf45kDw= 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: 34f93058-646a-4528-0af4-08d69d4a408d X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Feb 2019 06:59:15.9022 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4168 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Jiri says: When rehash happens on a vregion with many rules and they are being migrated, it might take significant time to finish the job. During that time vregion->lock is taken which prevents rules from being added/deleted from the vregion. Aim of this patchset is to allow to interrupt migration of rules during rehash, reschedule and give chance for rules to be added/deleted. Then continue migration in another execution of scheduled work. Jiri Pirko (14): mlxsw: spectrum_acl: Push rehash dw struct into rehash sub-struct mlxsw: spectrum_acl: Don't migrate already migrated entry mlxsw: spectrum_acl: Introduce new rehash context struct and save hint_priv there mlxsw: spectrum_acl: Push rehash start/end code into separate functions mlxsw: spectrum_acl: Push code start/end from mlxsw_sp_acl_tcam_vregion_migrate() mlxsw: spectrum_acl: assign vregion->region by the newly created region mlxsw: spectrum_acl: assign vchunk->chunk by the newly created chunk mlxsw: spectrum_acl: Rename variables in mlxsw_sp_acl_tcam_ventry_migrate() mlxsw: spectrum_acl: Put this_is_rollback to rehash context struct mlxsw: spectrum_acl: Put vchunk migrate start/end code into separate functions mlxsw: spectrum_acl: Do rollback as another call to mlxsw_sp_acl_tcam_vchunk_migrate_all() mlxsw: spectrum_acl: Allow to interrupt/continue rehash work mlxsw: spectrum_acl: Remember where to continue rehash migration mlxsw: spectrum_acl: Make mlxsw_sp_acl_tcam_vregion_rehash() return void .../mellanox/mlxsw/spectrum_acl_tcam.c | 411 ++++++++++++------ 1 file changed, 286 insertions(+), 125 deletions(-) --=20 2.20.1