Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp492032iog; Thu, 30 Jun 2022 04:59:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u6SfC3rWWSek2mzN6+zgv8lNwiAtub3/fXoHC4gGCxv0F5d3jH3aG0uI9hgjCRt+cubt95 X-Received: by 2002:a17:90b:3850:b0:1ed:7d1:f0a with SMTP id nl16-20020a17090b385000b001ed07d10f0amr10079636pjb.67.1656590341667; Thu, 30 Jun 2022 04:59:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1656590341; cv=pass; d=google.com; s=arc-20160816; b=b2QB5Gq8ezTqD/dpg7zLhHh552Zgyb8HlaiKDQv59bWmChiR6U0i3KvkgI7cflQbcd 23uFM5+hul7LXvYEhXUauhpCP98HRF7eOODkBl3m3sm+8w2P2WEiS8o6xiBYQDBtBhwp 3E65WvrewCtgLaZKWRfYgDaSDdWjZlXclGP5OGKcOVXiZNqRME7m5zd1Y69J+9whqH35 MylXVwo9PZafxl55z3+y7Fs40px8tf9ZuSBldvrt901/Ii7sd+zxJgdQjMlqbykxdtha 59G28DtxX1Z7dhawsH7tpQp2jec5RFrgqXfd7c6qZQzoUqX9sP3depnMoAFf/wtiBEAs pFNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=9PshA7ilwVGhBTPPI5zzfdJSH/qtoYbnKTH+wU1VTMI=; b=rfmQ3V/7JvIlrg2dY++nZ46cUKgodH6vbx+QeW9R2xgVvJsY4Jdf+0qGeAZ4RUefwx FyA498NLomgEcHpDkLd6Ufq28HJBrFuMBlEYWbZthyXqCFKPuTfl7svblmOEo1LIzTWh OA96j0r+/+ci3B4n6K3MbYM2uAWmUQjX4+OBMvM2OF0lzE/5E6DIkEpCG8YosHcyvIjp RkJMikK5Os94k1Ja4jC8SdhLrCHoOip6kL1RQwcoUXi93Pe+j+YqgZjznYnLmFHD9Kjm aDKtfL9Hc4okULsMHSf0Dhz2yVlsvLWFQymcZzHtZIAFhWRixc5+OBGWU5CGUH7GUNcS u/Fw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@plvision.eu header.s=selector2 header.b=qYmr4z1O; arc=pass (i=1 spf=pass spfdomain=plvision.eu dkim=pass dkdomain=plvision.eu dmarc=pass fromdomain=plvision.eu); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=plvision.eu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m5-20020a6545c5000000b003fe26a0ab51si26720808pgr.111.2022.06.30.04.58.49; Thu, 30 Jun 2022 04:59:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@plvision.eu header.s=selector2 header.b=qYmr4z1O; arc=pass (i=1 spf=pass spfdomain=plvision.eu dkim=pass dkdomain=plvision.eu dmarc=pass fromdomain=plvision.eu); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=plvision.eu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234582AbiF3LSl (ORCPT + 99 others); Thu, 30 Jun 2022 07:18:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232504AbiF3LSk (ORCPT ); Thu, 30 Jun 2022 07:18:40 -0400 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130131.outbound.protection.outlook.com [40.107.13.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33CEA4D4C8; Thu, 30 Jun 2022 04:18:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CXngkat+3aouW/Nlm4KXLx4ByURUvnI2cnqmzuKaQsThpMfAzPVJh9/HRDu9Nb2iQemoOrfTXM29FmtQTVeDt6I3SP9TVI+buTKmbJsLAwlWHzB8OlNmDPZW9/57lvRWJtKWPhQMiTwsR96FiNDUfPGiPRSBQEzcZy+vDQ3g2DVi7JFOtQnsrUFkWjRaj0j2Q0ZRfyqrplZzbtCDwS+o0JWVKW+AXgsgf8ycnBXSGBcLSHvDiIeanX7jtv9qAq77yw7n8ioy3AmYS4ItYHs6Wq4J/fVmSi/9D0kDOAAga9KVkzuudGgHi8T2kjbNPae0NT/USV4zSZXneedXCitiSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9PshA7ilwVGhBTPPI5zzfdJSH/qtoYbnKTH+wU1VTMI=; b=XeYIkl2iDrzkQUarkZVtUTHq9OdZt3OpaWTUOjqGX3IauFHBjJMlXUGSO8OCNpSL89j0UFL7dNDoG+HWPRTpPAFHC2wP7UGbuwIksUUGAdMV5ij52yqAqGtlXUHkMAbaWQQnf0BJNC0SAKR8KNwICTJB17yun98zXLMnfN9IUiPfEK4BYmuxEOHNPxmjgsd/p8TBsZfb0lcdA3GtWrp3b9/NlzKSpqU76q9iNsvWWw3WP5RMlc4Ke36A5/M+ZmI7hg0U5/ee94wXovOutpSBzLsU8nTqsyzHFwHcflPZ0hNTUzpn7s5hGhlJDav2AoTyXOJubYIbRRi2JJcwtCZwWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=plvision.eu; dmarc=pass action=none header.from=plvision.eu; dkim=pass header.d=plvision.eu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plvision.eu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9PshA7ilwVGhBTPPI5zzfdJSH/qtoYbnKTH+wU1VTMI=; b=qYmr4z1O4FRdB6FAV7fgO1E3IJJZrJGGMJIB7oecL6MZ83OvSvRbweftzAxFcoi4sDWQMeJCi4UPU35LOj7SbXYDf42Ys8qc72Gp65K6xEJwCQxfWjviPtm+EB2FKlE93y/fyN0g+zo+zHIxSgt4foWA4l7bb3AAuNT4EycPlIo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=plvision.eu; Received: from GV1P190MB2019.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:5b::20) by HE1P190MB0489.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14; Thu, 30 Jun 2022 11:18:35 +0000 Received: from GV1P190MB2019.EURP190.PROD.OUTLOOK.COM ([fe80::25a3:3edc:9320:f35e]) by GV1P190MB2019.EURP190.PROD.OUTLOOK.COM ([fe80::25a3:3edc:9320:f35e%3]) with mapi id 15.20.5373.018; Thu, 30 Jun 2022 11:18:35 +0000 From: Oleksandr Mazur To: netdev@vger.kernel.org, oleksandr.mazur@plvision.eu, Taras Chornyi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org (open list) Cc: lkp@intel.com, linux-kernel@vger.kernel.org, Yevhen Orlov Subject: [PATCH V3 net-next 0/4] net: marvell: prestera: add MDB offloading support Date: Thu, 30 Jun 2022 14:18:18 +0300 Message-Id: <20220630111822.26004-1-oleksandr.mazur@plvision.eu> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-ClientProxiedBy: BE0P281CA0035.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:14::22) To GV1P190MB2019.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:5b::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b52f2a96-39a4-40f0-4340-08da5a8a45d3 X-MS-TrafficTypeDiagnostic: HE1P190MB0489:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OhcCjLTKL557XSafssa3e44t/LEn+ZP7fuAgd2ePnxKstyfox9fpoQV6WFn3kNSRJx9W8MXAU+SKtNPWOJbRDBeeatYgnoHuZax10azzyRUa6qNTV6sUwgDUaJMeIHeEkotBuAXhLjvbzxFCkm5pT3O/3L5z7mqOcjGLpGUl1V1Ybv/iQ0BWOWudThWjAjMQ8ncK9RAc//CnsfHhqXMN5/2k5i4a9v1O8vIx8UxT/LZd6RAOcb0nbQIypV440xxU9nQdOyYE0mUMDu2WL2/CZE5lFbLZwxtvugaD35IXzyleAne4qZDfLsIDaEuuGjhJzsb8lwGRNIbkA6DvVxfegLk7/YhheoM/bEK6c3olEer28A/zYLReXTFqRuLRwXUo95N01mtjmA4/JnEOJ5zaxTdKnstU5XIYb/9doiybNdgDFn1d5raj9ADTbM5tb73cBS4SSCOthCx7EiJo346uBZ7XeRAqC4EX2BL5AXA1vkalEh83f2nPyM6J+gZjFTmUsWJbZKGUSdsyG3vt8my1qAZwYeVjrKp4TjF++kuhsAcE9hnP7Y8GDl8e+3dMWv3ULfUa9PiOwYj6a8LH+cuDKIKHmyLUgLQK6If4U61fS0nL+R24B0dsddenJvtqxg9rL7ctcwCfuuwJ/HFUK2zzktMhbSL+XRU/lfD44UajsZ86lH3++PoSXuqc5FgrG9X+dCk9W3Ng5EfG3oRMowb4poh5fN1c2v0O/qrNbJvKhU2tI0j73OcjRU+oZd4LeOk7wnu87I4H2feCyUVrvse/42NaUaSS03SUFftgYRhxk9Ex3niOuFP6GI1tMk1JiGty X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:GV1P190MB2019.EURP190.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230016)(4636009)(376002)(366004)(346002)(39830400003)(396003)(136003)(5660300002)(66574015)(86362001)(36756003)(6512007)(8936002)(6666004)(52116002)(38100700002)(2616005)(44832011)(26005)(38350700002)(66556008)(186003)(8676002)(107886003)(66476007)(478600001)(2906002)(110136005)(6486002)(4326008)(316002)(66946007)(1076003)(41300700001)(83380400001)(6506007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?RwtdjaFpTlX8Px0FWVt9H5kD96hr5YspCgZdUG0BHCJH5KRuGWW7Qalqe6n7?= =?us-ascii?Q?LNXqgx6xv6zD1tqHJfozb9kxwAKl+Aq5Ztm/tDjmEEb0Rkv5snWhRSExBosS?= =?us-ascii?Q?cMUXJhhpWrxAk6OveLtfkmTMQVuKgHszDUGE9F4UpC4c/j/P+AQizCbIoOzP?= =?us-ascii?Q?c8niStGA7LiUOqT7KH8VRCqSzsYOygXF4RJ47Ksqv55BkYUIGRABHvQLMxYV?= =?us-ascii?Q?p3DS4D6pl4CV0aFEm84v9VcnNVzYQngUTw913aOfzjGELF1N6u7f2Ud1CJEY?= =?us-ascii?Q?Mh9Uy9aFety9f0uf4GslvSXxr4RJYBmcX2tl5UIdvw0cqV/qpafaALcKoUkS?= =?us-ascii?Q?Nahhh4TQ9c3lR/OnsV6mr4SA38vxoG3iHi7qPI/BDNp6dIOcke5vMjHo72lo?= =?us-ascii?Q?SinsKZKtfFWGOXgYXxr4amfs+3qfR/2eRnWX8hJKLD3wzRTbeuq1KNZp4YGB?= =?us-ascii?Q?QYSshyZB/5Ou+zmRzSubavxP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8zBi?= =?us-ascii?Q?AA5vCyRHkERVReK9vV/xMyWqNgW+N+UoRyrMBXTkp0QipTMuuahiWlUfcc6m?= =?us-ascii?Q?ltqqBwuzWX7mzdY6km8X0KBcFanXAUPUVWHwHRkIMYZMF0Sr5GLgjAl1+0w1?= =?us-ascii?Q?9LzH7h6dqMWOFLqtBP9lEqTOkCGP9wotBNyWHjnLLCyB9N5WF66GbgzIcvij?= =?us-ascii?Q?d8NrLPc0J/52XTPFh5v9zSJpXg+NEU4nD2c+Ef7n4TklnYS/7kNuAZvVAqR3?= =?us-ascii?Q?XA=3D=3D?= X-OriginatorOrg: plvision.eu X-MS-Exchange-CrossTenant-Network-Message-Id: b52f2a96-39a4-40f0-4340-08da5a8a45d3 X-MS-Exchange-CrossTenant-AuthSource: GV1P190MB2019.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2022 11:18:35.2774 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 03707b74-30f3-46b6-a0e0-ff0a7438c9c4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: oBYKEzokhDDZzjZXMGmr5JkkHG1ePuVg/o9zMofPpKNg3ieSLPUzpImXmnWzxfFDPTrsQj71EZwMpGbSUuWHOZFGraOjOOdax2cUS4udem0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1P190MB0489 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series adds support for the MDB handling for the marvell Prestera Driver. It's used to propagate IGMP groups registered within the Kernel to the underlying HW (offload registered groups). Features: - define (and implement) main internal MDB-related objects; - define (and implement) main HW APIs for MDB handling; - add MDB handling support for both regular ports as well as Bond interfaces; - Mirrored behavior of Bridge driver upon multicast router appearance (all traffic flooded when there's no mcast router; mcast router receives all mcast traffic, and only group-specific registered mcast traffic is being received by ports who've explicitly joined any group when there's a registered mcast router); - Reworked prestera driver bridge flags (especially multicast) setting - thus making it possible to react over mcast disabled messages properly by offloading this state to the underlying HW (disabling multicast flooding); Limitations: - Not full (partial) IGMPv3 support (due to limited switchdev notification capabilities: MDB events are being propagated only with a single MAC entry, while IGMPv3 has Group-Specific requests and responses); - It's possible that multiple IP groups would receive traffic from other groups, as MDB events are being propagated with a single MAC entry, which makes it possible to map a few IPs over same MAC; Co-developed-by: Yevhen Orlov Signed-off-by: Yevhen Orlov Signed-off-by: Oleksandr Mazur PATCH V3: - add missing function implementations to 2/4 (HW API implementation), only definitions were added int V1, V2, and implementation waas missed by mistake. Reported-by: kernel test robot - fix compiletime warning (unused variable) PATCH V2: - include all the patches of patch series (V1's been sent to closed net-next, also had not all patches included); Oleksandr Mazur (4): net: marvell: prestera: rework bridge flags setting net: marvell: prestera: define MDB/flood domain entries and HW API to offload them to the HW net: marvell: prestera: define and implement MDB / flood domain API for entires creation and deletion net: marvell: prestera: implement software MDB entries allocation .../net/ethernet/marvell/prestera/prestera.h | 47 ++ .../ethernet/marvell/prestera/prestera_hw.c | 126 +-- .../ethernet/marvell/prestera/prestera_hw.h | 15 +- .../ethernet/marvell/prestera/prestera_main.c | 191 +++++ .../marvell/prestera/prestera_switchdev.c | 730 +++++++++++++++++- 5 files changed, 1018 insertions(+), 91 deletions(-) -- 2.17.1