Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4455336ioa; Wed, 27 Apr 2022 04:22:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkoUPblic+8gRuOq566ZerGXpvHGY2H6U9eh/qSRpGGjwezaEpfFp/bbSI5+C2/9BWiZnM X-Received: by 2002:a65:6543:0:b0:39d:5e6e:24c3 with SMTP id a3-20020a656543000000b0039d5e6e24c3mr23882976pgw.560.1651058556140; Wed, 27 Apr 2022 04:22:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651058556; cv=none; d=google.com; s=arc-20160816; b=EEHPY547yScAdn6OGLIzwqkBtUmV05b0AKiEAe+Okpv+sCUaXTYqS/ovnLJAcyxh3N MmjZWW8Gx3dTT48S2W1pUFKe4OI3dAGvkrudd3tQlie1mxLjmZqlgnk4WuX1c8EOp3uc R4390nzcFYU3Fnm3168bzbrKfrdBM3dG03FgR9mJbKBKllhHI82IX3STTn8dyHTFocrl UUucUKT9jS//UhANLLrrHlLS/NVrWB9b/vldccbrqgUokVHYHxODqGbrmMGRLV5PWjND RJTQ5LtPMAIwS8ZvWYWVZaWxqmjU2/SIFqFSCh1fIFS8wPXJHsbwlz5DOnPXCsdnLQgo p+5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=G3mVnbGokCtzZSKDbd12f6DkUzhi6EcqmsWapKutlms=; b=fO4wvFKBRIthaM/rhtnyIU2h72Q8EkTY4KGPm4zZJ8culNKuPX6if1Ln/6KGFYSo+U W6IKNVZi8XGZXzuHlypvGK7qgmmMsS7Z2FQFhuUz4efHtOx6Hp1NUyPIxjXGfaNuDsmE yNe/FZJeB64Ty0FIAvyvqKXWWKspKdrM3YRmS3m/5XslYC5+0IHoP45GsCscRj+Y56fV CJR9apXWrDT+1vzU38IyI+jgKfv5z2XNUcCrFQyUmIg3myvEyred8tgeiaHGwiW8CeVH fjEQCoxwcj2pXn6Maek8BCTfOBQlf6fcA5a0ctSamtTOyi0qJvkoqrjmSWYnLUa14fIT TbIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=M5H3jVQc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x3-20020a17090a6b4300b001d95eaf6c72si1458862pjl.161.2022.04.27.04.22.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 04:22:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=M5H3jVQc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 571CC476F00; Wed, 27 Apr 2022 03:16:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347836AbiDZJeW (ORCPT + 99 others); Tue, 26 Apr 2022 05:34:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347101AbiDZJFP (ORCPT ); Tue, 26 Apr 2022 05:05:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD1B9FC41B; Tue, 26 Apr 2022 01:44:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E877D60EC3; Tue, 26 Apr 2022 08:44:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06B6BC385AC; Tue, 26 Apr 2022 08:44:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650962648; bh=6XUd9kPN56YUg9VaXhuKM1HVFut7iIMOVAlX9l/yiZU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M5H3jVQc2c1TyJRBSrq9yVehUVszstYbHmlpQKzwRi4MXan04HEXXPl7/lunejNck RADmnfg0zhXVrZ7B2m4rzKytE/+fqWa+duyXlAR/zJbnoo75s76NeJ+ynm+6sbwjqt xsHc5tx6XvMuixiuhqRx4EL6jHaKTcTOMaM9bV/E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vladimir Oltean , Paolo Abeni , Sasha Levin Subject: [PATCH 5.17 042/146] net: mscc: ocelot: fix broken IP multicast flooding Date: Tue, 26 Apr 2022 10:20:37 +0200 Message-Id: <20220426081751.251746086@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081750.051179617@linuxfoundation.org> References: <20220426081750.051179617@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 From: Vladimir Oltean [ Upstream commit 4cf35a2b627a020fe1a6b6fc7a6a12394644e474 ] When the user runs: bridge link set dev $br_port mcast_flood on this command should affect not only L2 multicast, but also IPv4 and IPv6 multicast. In the Ocelot switch, unknown multicast gets flooded according to different PGIDs according to its type, and PGID_MC only handles L2 multicast. Therefore, by leaving PGID_MCIPV4 and PGID_MCIPV6 at their default value of 0, unknown IP multicast traffic is never flooded. Fixes: 421741ea5672 ("net: mscc: ocelot: offload bridge port flags to device") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220415151950.219660-1-vladimir.oltean@nxp.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- drivers/net/ethernet/mscc/ocelot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c index fd3ceb74620d..a314040c1a6a 100644 --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c @@ -2508,6 +2508,8 @@ static void ocelot_port_set_mcast_flood(struct ocelot *ocelot, int port, val = BIT(port); ocelot_rmw_rix(ocelot, val, BIT(port), ANA_PGID_PGID, PGID_MC); + ocelot_rmw_rix(ocelot, val, BIT(port), ANA_PGID_PGID, PGID_MCIPV4); + ocelot_rmw_rix(ocelot, val, BIT(port), ANA_PGID_PGID, PGID_MCIPV6); } static void ocelot_port_set_bcast_flood(struct ocelot *ocelot, int port, -- 2.35.1