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 6B04EC00319 for ; Sun, 24 Feb 2019 06:46:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 29FA120663 for ; Sun, 24 Feb 2019 06:46:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="RJoibUX6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726508AbfBXGq0 (ORCPT ); Sun, 24 Feb 2019 01:46:26 -0500 Received: from mail-eopbgr80082.outbound.protection.outlook.com ([40.107.8.82]:37246 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725928AbfBXGq0 (ORCPT ); Sun, 24 Feb 2019 01:46:26 -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=VPv8oP+xX0bQDcsxenb840Dur0ZKW+QpV5gtonV4Sv8=; b=RJoibUX6cUCYH2ikK5f0WIJhLD7kO9RNcVAIXcM333gukKzCoWk3b4uxHRs7D0GlU7DJsPVKYEOo0OwObBAxLIh1FRKfvc7Pc60iFWRKVq72kLNYbH523XVD9krJQ7catgNGGciKksuHVAHfqxRw/k9ORXaAvV1sIWi/A7CEp9Y= Received: from AM6PR05MB5240.eurprd05.prod.outlook.com (20.177.196.214) by AM6PR05MB4343.eurprd05.prod.outlook.com (52.135.162.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.18; Sun, 24 Feb 2019 06:46:22 +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.1643.019; Sun, 24 Feb 2019 06:46:22 +0000 From: Ido Schimmel To: "netdev@vger.kernel.org" CC: "davem@davemloft.net" , Jiri Pirko , mlxsw , Ido Schimmel Subject: [PATCH net-next 00/15] mlxsw: spectrum_acl: Don't take rtnl mutex for region rehash Thread-Topic: [PATCH net-next 00/15] mlxsw: spectrum_acl: Don't take rtnl mutex for region rehash Thread-Index: AQHUzAynj/F5x44JOkiinntE8pGv6g== Date: Sun, 24 Feb 2019 06:46:21 +0000 Message-ID: <20190224064525.14913-1-idosch@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6P194CA0033.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:90::46) To AM6PR05MB5240.eurprd05.prod.outlook.com (2603:10a6:20b:64::22) 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: bdab165e-944d-4068-10c2-08d69a23c982 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600110)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:AM6PR05MB4343; x-ms-traffictypediagnostic: AM6PR05MB4343: x-microsoft-exchange-diagnostics: =?iso-8859-1?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86FgdGS8ePb/ckRHa+KI6Pv+nC?= =?iso-8859-1?Q?xMYLtxjfX6GbnICGv5fKBLjFhP98j8I4RshjuY2EVpqYoH9R1MZusJZs5A?= =?iso-8859-1?Q?QIx+veSE3C55CmUuTeAXRfXcKbrXqxmHaeMU79GqDSINTF/rXvfT+G0TQ9?= =?iso-8859-1?Q?ShUOtsw+brfTJObfi/7kPJQBoQNj2Gtffwe2XAoMFEMa+DwovECpFcgmPh?= =?iso-8859-1?Q?YD5tBN2Mn7fpMc99ZZcemGzHMVNEOrpzBYwziyhIPv/78T80GOsrnq8Zwi?= =?iso-8859-1?Q?rhj1ILjBMM/IuTXgov3UT/htD/pufNjq/NINQ4VrVWovwKOdmAfzjyEEE7?= =?iso-8859-1?Q?iqXSsONF7DyhcJmQnBvURbFvPJb+7vNVnBLmGlipgZr0bh2Km07Hd/k7ex?= =?iso-8859-1?Q?jPiaNhVvN8vzScqocJguPSb3qCWwmPvKbtF7LR5ROdgpYmrEcOKzJAE31W?= =?iso-8859-1?Q?Et69FYcMujW3bSmRfzUuVBsORAwa1lxFCdYscIt4XY1wQ=3D=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09583628E0 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(396003)(136003)(376002)(346002)(39850400004)(199004)(189003)(102836004)(5660300002)(3846002)(14444005)(8936002)(6116002)(5640700003)(256004)(6506007)(386003)(1076003)(71200400001)(71190400001)(14454004)(6512007)(6436002)(81166006)(2351001)(81156014)(1730700003)(6346003)(50226002)(26005)(6916009)(107886003)(2906002)(99286004)(86362001)(2501003)(486006)(2616005)(4326008)(54906003)(66066001)(316002)(476003)(53936002)(68736007)(52116002)(7736002)(6486002)(8676002)(478600001)(106356001)(305945005)(105586002)(25786009)(186003)(36756003)(97736004);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR05MB4343;H:AM6PR05MB5240.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 8Ug/LWkwgUW9Dg7qOSAy+0EMe5mKU2qgf23ofwMfaTmrdrjVM7lSUe8ljaistRiT9S0gQO80ckybM53Ng9Psy3/EbvPQAr7E9gFSHPHAEiR0uwUM3A71B9jiy66k5G2UFtDt9he0cNQhNE+grpgL5phwJ8PCqIYpiDusDZKTQIivlQooK2kPZeztrSiEYGhIVMAz3XoGwJPdhUUvM4WKDs3LCu/SA8wPvB9RlbRUcDbVxcG6o2VQAFKEwwRlMf6DO+rULV3wx4Ifte1U/umJbllIaQk1G2BTj1kNEkf4yp6CNJK5ER0A4+fh7ZckB6PMffdkFF0U4hPkID7dAez93UiZlbg0OuOD3pqijdsqSbHg/4dZ7yxBAES4s4mY0nxwfOs/D4EgjU4kZnEZ3r2Q8VLHYxcMCmoxd74cSAwQMQc= 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: bdab165e-944d-4068-10c2-08d69a23c982 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Feb 2019 06:46:21.0227 (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: AM6PR05MB4343 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Jiri says: During region rehash, a new region is created with a more optimized set of masks (ERPs). When transitioning to the new region, all the rules from the old region are copied one-by-one to the new region. This transition can be time consuming and currently done under RTNL lock. In order to remove RTNL lock dependency during region rehash, introduce multiple smaller locks guarding dedicated structures or parts of them. That is the vast majority of this patchset. Only patch #1 is simple cleanup and patches 12-15 are improving or introducing new selftests. Jiri Pirko (15): mlxsw: spectrum_acl: Remove unused ops field from group structure mlxsw: spectrum_acl: Split TCAM group structure into two mlxsw: spectrum_acl: Introduce a mutex to guard region list updates mlxsw: spectrum_acl: Refactor vregion association code mlxsw: spectrum_acl: Introduce vregion mutex mlxsw: spectrum_acl: Introduce mutex to guard Bloom Filter updates mlxsw: spectrum_acl: Introduce a mutex to guard objagg instance manipulation mlxsw: spectrum_acl: Enable vregion rehash per-profile mlxsw: spectrum_acl: Don't take rtnl lock during vregion_rehash_intrvl_set() mlxsw: spectrum_acl: Remove RTNL lock assertions from ERP code mlxsw: spectrum_acl: Don't take mutex in mlxsw_sp_acl_tcam_vregion_rehash_work() selftests: mlxsw: spectrum-2: Add IPv6 variant of simple delta rehash test mlxsw: spectrum_acl: Add vregion migration end tracepoint selftests: mlxsw: spectrum-2: Check migrate end trace selftests: mlxsw: spectrum-2: Add massive delta rehash test .../mlxsw/spectrum_acl_bloom_filter.c | 34 +- .../mellanox/mlxsw/spectrum_acl_erp.c | 31 +- .../mellanox/mlxsw/spectrum_acl_tcam.c | 446 +++++++++++------- .../mellanox/mlxsw/spectrum_acl_tcam.h | 3 + include/trace/events/mlxsw.h | 20 + .../drivers/net/mlxsw/spectrum-2/tc_flower.sh | 245 ++++++++++ 6 files changed, 592 insertions(+), 187 deletions(-) --=20 2.20.1