From patchwork Sun Jul 22 13:17:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 10539321 X-Patchwork-Delegate: jiri@resnulli.us Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F04C11823 for ; Sun, 22 Jul 2018 13:19:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCF13281F9 for ; Sun, 22 Jul 2018 13:19:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D14F028385; Sun, 22 Jul 2018 13:19:09 +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 02140281F9 for ; Sun, 22 Jul 2018 13:19:09 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41YQF71T6tzDqmj for ; Sun, 22 Jul 2018 23:19:07 +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="mwLL2afX"; 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.8.51; helo=eur04-vi1-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="mwLL2afX"; dkim-atps=neutral Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80051.outbound.protection.outlook.com [40.107.8.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41YQD94yP6zDqyG for ; Sun, 22 Jul 2018 23:18:17 +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=9nck4N5fvv+VWqoLneOYZSn/+LYV0Tt4/GXmLChIxI8=; b=mwLL2afXh7CmufPEtyV2aR9o9H278AaBdkyOMgBuB5xDGclQTTVW8PBzqVQi0+M+Dl4hZgGlKSUA6FJ2I/JYIrhqRF1R0GOEiSqbr9bL8P204POpOeVirbbVrSoZpu+XFnsWaFKXYD+I1elbjx/VOqbLfPuRxj9P81IvXpjYIzk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; Received: from splinter.mtl.com (193.47.165.251) by HE1PR0501MB2331.eurprd05.prod.outlook.com (2603:10a6:3:27::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.20; Sun, 22 Jul 2018 13:18:08 +0000 From: Ido Schimmel To: linux-internal@mellanox.com Subject: [PATCH net-next mlxsw 12/18] mlxsw: spectrum_acl: Encapsulate C-TCAM region in A-TCAM region Date: Sun, 22 Jul 2018 16:17:06 +0300 Message-Id: <20180722131712.30578-13-idosch@mellanox.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180722131712.30578-1-idosch@mellanox.com> References: <20180722131712.30578-1-idosch@mellanox.com> MIME-Version: 1.0 X-Originating-IP: [193.47.165.251] X-ClientProxiedBy: AM0PR01CA0036.eurprd01.prod.exchangelabs.com (2603:10a6:208:69::49) To HE1PR0501MB2331.eurprd05.prod.outlook.com (2603:10a6:3:27::24) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 61a75ec4-d2b4-47f4-a22a-08d5efd59151 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:HE1PR0501MB2331; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2331; 3:gp06ld1SbybNm2BophdDIbkXmptcULT1mw7zzfWm3b8rDEcPrVeaLN+PyNLF5gXjS7MNv4I+y6fSRXj+vXyphYm1MklaFvLnCVaSZbtNnLi0seJ/41lVLGume2gEXwtS0d0k10us5sXsTRx5+quGH8CZOwolyv+iYywfBmuDCAN44AfZ28wDZoNEhOnZxCYCJ38Ud+S6EtgG2p3BQJStGsk2IigZJcOl3R5g3jI1agnYJpUJM6sFbdN8apwD/r1w; 25:O2o0b6xCkhoRQwhIgGMuMPsv7XRe1sHhVrQCh+V7Kv3b8JbwEvx75Cmc8w8OWFb88HSqlPvdtIlEhYWGGozduvCE0w/7NJ7FE0/tJBkSKnz4GB1qlIVwsW/rPlmOkrH7NuvmuJqi6LciOUQPkSp++m05Czrv5viEwsESiEEq4gmj4fCdLzDtoB+7t3ygoUMkoCTvcB17PTNqmRyU5e2SlIMql63rzYtV6LUYGNkH4UnL2SOioZ4XyT7cwtNGNW9vIev5kx2DwYcp8z6jmcKJWnkNC2QaHuuzesJbRtQMb8+2yGq0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p5watPc7W0iWwdNu3khwlin9kzoe+nRdvRXHcafKDZ6/w27agQhH85Mzhq+VNzXQ== 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)(3231311)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:HE1PR0501MB2331; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0501MB2331; X-Forefront-PRVS: 0741C77572 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(376002)(366004)(136003)(346002)(396003)(39860400002)(199004)(189003)(47776003)(956004)(81156014)(106356001)(66066001)(3846002)(6116002)(2361001)(486006)(97736004)(68736007)(81166006)(1076002)(36756003)(4326008)(2906002)(86362001)(16526019)(11346002)(26005)(105586002)(6636002)(386003)(6506007)(478600001)(446003)(8676002)(8936002)(5660300001)(53936002)(48376002)(34206002)(107886003)(50226002)(76176011)(316002)(53416004)(305945005)(476003)(6512007)(25786009)(2616005)(2351001)(37006003)(7736002)(51416003)(16586007)(50466002)(52116002)(6486002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0501MB2331; H:splinter.mtl.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) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0501MB2331; 23:rB/idNYJ2qrf1NCBo70ZSXOJjKSTZg1cSqeaiuY?= W/PqikTASgRWNXYpDk0u8cxapb8+anS12W5OHjCaCon15/b57t76V8tKF5rfekqoDUlyqTKDiCVCuoSWQGBXoxizvEe8E5oRWhqXMX8J5s03eSq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Q+mZWYOTO58oC5kKBlOylpL1N6LEI1UD/928Md9W2tdh9XUlPGlzvybJVqvhV64uKbA== X-Microsoft-Antispam-Message-Info: DoPYvTr3dq/3lwBrZmX6TCpQN1CLjUtcwmWYzr6psTCTbMM6xDgMduWrotXvf9IUB/nmMAFWJQtZtHi/XAXJS9+2H7q21XRBgAgyT0XQcaLRxEXilzcQoY/WgIY0JJFETr54/YtBQlKbu5Lor7E/eIP8HMVfNk2BJzml5Pw2TI6ddVrY2UyO29V1GQHejXfb3N9eS8H9v5xiVQGJ8xWrgs9MQCeCADctxbYlc+lViJL6bq8YRpHZG/3K0DNynKiNVSiR6bVU3VUOXNgFu8zK6s/Ib3M1qM5pc28ppyRfLoRcnY+kOABht6eyymRbymlnRlCFI8zuHSzcmTtStzpF7TfU6pghzH0yY6peIcpfrck= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2331; 6:9yaXUZSOeKbCcEbD37mzX0yecaoCo5pRgBHfxbRiBtLYYzS6Dgb2U+9CyoWZ5MDWFiKhXPvJ6KIHQgNrVA5gLQFCgxa25Dt751iybYFnxPgmHsuMEO4xSTXxLAcXQX/c9Yr4h58nhr44xcZWzjAY4gohoUfwFAVEo6ILktpvb90+Rz9wy3+YJXWJwbX8996bUiOYtIJYQU5xbGJp+ybbk9sG+PexVSs1OUjWwD1QljJywYLbptm7ST2l94kVtfTGpmLMaeKFRrK4tmGxwwI4+rW/iYP6HI/oTFaInMl4s9PYdjdQat7KJvtsVNFLpzESrHlR5x29FpPPuSM7qv0twU3b+onclZasieFcFs1g7Icow4mImMaEa7QWyrvkg+apVorwv+BjKDkb2gMHphu6p0LqPKT8NxtlyFjtr32lVeJ2e5Qk5qEzwURvYLOSGkeU988qLA0PRj6BVVppKO0b2w==; 5:lVEZEAJFH+JETlaNPHXLbofUIEGUyKDpo2spS86mRy/w1DwexHLGwEzn0yeadU+o7GgSW1l83dqynrkL4FUz033rtPktZ3lOFHQJVnSVqIvSArVVoAGen3kimz6GRm+ZF0NYvFgrZrcUruLpgPoLizK7L9BkjOnFApL+x6FaXf8=; 7:Qvb+OAwiIkS/OOa1noLOPuzkTrsPDsM9SgM4Pw96mEASAtLjhjyhOBZv+UHUy0RMWiph1x/9tpjRgjWbJyff84Z42KfCM1pTH1194Y4mucrgBIYijvigVlfqjyeb4Wfb3WlsuPjbVz2r384FaDK9zgMOAyE/ucSYPVgt6d3hd6AjZNOiYKC6YotUUXYt3gXbW6TmsrkG1u90szvqJGdys6F0SbdE4l8VWPGexWOGddlD/LAibV0eofHObbO2ciGe SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2018 13:18:08.1974 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 61a75ec4-d2b4-47f4-a22a-08d5efd59151 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0501MB2331 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 In Spectrum-2 the C-TCAM is only used for rules that can't fit in the A-TCAM due to a limited number of masks per A-TCAM region. In addition, rules inserted into the C-TCAM may affect rules residing in the A-TCAM, by clearing their C-TCAM prune bit. The two regions are thus closely related and can be thought of as if the C-TCAM region is encapsulated in the A-TCAM one. Change the data structures to reflect that before introducing A-TCAM support and make C-TCAM region initialization part of the A-TCAM region initialization sequence. Signed-off-by: Ido Schimmel --- Notes: v2: * Move C-TCAM region init to be part of A-TCAM region init .../ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c | 16 ++++++---------- .../ethernet/mellanox/mlxsw/spectrum_acl_atcam.c | 8 ++++++++ .../ethernet/mellanox/mlxsw/spectrum_acl_tcam.h | 3 +++ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c index 2442decd0652..7e392529a896 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c @@ -45,7 +45,7 @@ struct mlxsw_sp2_acl_tcam { }; struct mlxsw_sp2_acl_tcam_region { - struct mlxsw_sp_acl_ctcam_region cregion; + struct mlxsw_sp_acl_atcam_region aregion; struct mlxsw_sp_acl_tcam_region *region; }; @@ -133,14 +133,10 @@ mlxsw_sp2_acl_tcam_region_init(struct mlxsw_sp *mlxsw_sp, void *region_priv, struct mlxsw_sp_acl_tcam_region *_region) { struct mlxsw_sp2_acl_tcam_region *region = region_priv; - int err; region->region = _region; - err = mlxsw_sp_acl_atcam_region_init(mlxsw_sp, _region); - if (err) - return err; - return mlxsw_sp_acl_ctcam_region_init(mlxsw_sp, ®ion->cregion, + return mlxsw_sp_acl_atcam_region_init(mlxsw_sp, ®ion->aregion, _region); } @@ -149,7 +145,7 @@ mlxsw_sp2_acl_tcam_region_fini(struct mlxsw_sp *mlxsw_sp, void *region_priv) { struct mlxsw_sp2_acl_tcam_region *region = region_priv; - mlxsw_sp_acl_ctcam_region_fini(®ion->cregion); + mlxsw_sp_acl_atcam_region_fini(®ion->aregion); } static int @@ -165,7 +161,7 @@ static void mlxsw_sp2_acl_tcam_chunk_init(void *region_priv, void *chunk_priv, struct mlxsw_sp2_acl_tcam_region *region = region_priv; struct mlxsw_sp2_acl_tcam_chunk *chunk = chunk_priv; - mlxsw_sp_acl_ctcam_chunk_init(®ion->cregion, &chunk->cchunk, + mlxsw_sp_acl_ctcam_chunk_init(®ion->aregion.cregion, &chunk->cchunk, priority); } @@ -186,7 +182,7 @@ static int mlxsw_sp2_acl_tcam_entry_add(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp2_acl_tcam_entry *entry = entry_priv; entry->act_block = rulei->act_block; - return mlxsw_sp_acl_ctcam_entry_add(mlxsw_sp, ®ion->cregion, + return mlxsw_sp_acl_ctcam_entry_add(mlxsw_sp, ®ion->aregion.cregion, &chunk->cchunk, &entry->centry, rulei, true); } @@ -199,7 +195,7 @@ static void mlxsw_sp2_acl_tcam_entry_del(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp2_acl_tcam_chunk *chunk = chunk_priv; struct mlxsw_sp2_acl_tcam_entry *entry = entry_priv; - mlxsw_sp_acl_ctcam_entry_del(mlxsw_sp, ®ion->cregion, + mlxsw_sp_acl_ctcam_entry_del(mlxsw_sp, ®ion->aregion.cregion, &chunk->cchunk, &entry->centry); } diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c index 89c78c62e7e5..93401f08d987 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c @@ -77,6 +77,7 @@ mlxsw_sp_acl_atcam_region_erp_init(struct mlxsw_sp *mlxsw_sp, } int mlxsw_sp_acl_atcam_region_init(struct mlxsw_sp *mlxsw_sp, + struct mlxsw_sp_acl_atcam_region *aregion, struct mlxsw_sp_acl_tcam_region *region) { int err; @@ -90,10 +91,17 @@ int mlxsw_sp_acl_atcam_region_init(struct mlxsw_sp *mlxsw_sp, err = mlxsw_sp_acl_atcam_region_erp_init(mlxsw_sp, region->id); if (err) return err; + err = mlxsw_sp_acl_ctcam_region_init(mlxsw_sp, &aregion->cregion, + region); return 0; } +void mlxsw_sp_acl_atcam_region_fini(struct mlxsw_sp_acl_atcam_region *aregion) +{ + mlxsw_sp_acl_ctcam_region_fini(&aregion->cregion); +} + int mlxsw_sp_acl_atcam_init(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_acl_atcam *atcam) { diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h index 0f242afdf5fe..a982df31cc47 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h @@ -162,6 +162,7 @@ struct mlxsw_sp_acl_atcam { }; struct mlxsw_sp_acl_atcam_region { + struct mlxsw_sp_acl_ctcam_region cregion; struct mlxsw_sp_acl_tcam_region *region; struct mlxsw_sp_acl_atcam *atcam; enum mlxsw_sp_acl_atcam_region_type type; @@ -171,7 +172,9 @@ struct mlxsw_sp_acl_atcam_region { int mlxsw_sp_acl_atcam_region_associate(struct mlxsw_sp *mlxsw_sp, u16 region_id); int mlxsw_sp_acl_atcam_region_init(struct mlxsw_sp *mlxsw_sp, + struct mlxsw_sp_acl_atcam_region *aregion, struct mlxsw_sp_acl_tcam_region *region); +void mlxsw_sp_acl_atcam_region_fini(struct mlxsw_sp_acl_atcam_region *aregion); int mlxsw_sp_acl_atcam_init(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_acl_atcam *atcam); void mlxsw_sp_acl_atcam_fini(struct mlxsw_sp *mlxsw_sp,