Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4463056ioa; Wed, 27 Apr 2022 04:33:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9mBRlLO/mtNpYmPleBabFnxcgeTypicoP9N/0rUkkFel/lIU7+VLrj+8BKj8jg5Egi/tI X-Received: by 2002:a65:6149:0:b0:3a9:7e8f:6429 with SMTP id o9-20020a656149000000b003a97e8f6429mr23619544pgv.613.1651059183430; Wed, 27 Apr 2022 04:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651059183; cv=none; d=google.com; s=arc-20160816; b=LImhY/4hWqprBiFi7ZL+li+08hObl3iJ7xX6TI6Zf1kODWkHaJShY4nZyfzfe0c/PB LDbsOHNYKm2zO9jWEly1d1qtpqQIO/NsnHBrt6RsH46N0dKRv4uBtvEpgzPnrYs8zjNy moRhxjqisAuwdNbBk6y+hEBITtje7aN9KAafZZ3o9GL5b/VkKNws1nmljP0a6/nmdkfZ C5g/R1DP40gg9+b0vPRodd0RWyWG+x9NdcOcwrXuLKAqZLzRsZLkitjTF3sN0WixTxbo GlbrtZm9xdmtTLEFzC68c8L+6h6mUfGlJVii0ZLFHzvBwvOKmCBt0QWLlWKfLP8L2Z0Y OjTA== 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=gOw/IAv8e8NJ3y0RRmzNVROmyNCvvHbLzXx97boJgO4=; b=CE+cChHh5vwMmGyU93HZX/aim3OxKli3/doW+dVgNjgQR0jqvXB5NaJgzr7Rezmuok 9n0m2Glf8gDQo94TPeAD+CLxDhI5czHIUXcqmimXgEWL8HOhQAlIkPIN9ezAOs99WSLP 0lSTcRBENGFapPy+7XM6cWmmeLl4fTNkIdg+a6isG81CraUMajpgEu/k4waIaHWAZBv1 YGlAp1jFVqvmzpjntGdZ/dAy2PXyW4T0eaUNIPjeWIZmK42BhYDVbM8xvCZ9zmpch1u+ Dr2qi2KOCcBJzcHraW4PkwD/GRtbFHTUHxTIlXJjSoZIT+aTvO02C0gPmv15p8VInKg6 NbQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=19pFd4cl; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id h15-20020a63e14f000000b003991d7df4b8si1213862pgk.652.2022.04.27.04.33.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 04:33:03 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=19pFd4cl; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3F4194892DE; Wed, 27 Apr 2022 03:21:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346872AbiDZJNd (ORCPT + 99 others); Tue, 26 Apr 2022 05:13:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347267AbiDZIvQ (ORCPT ); Tue, 26 Apr 2022 04:51:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4919E55BF; Tue, 26 Apr 2022 01:40:05 -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 ams.source.kernel.org (Postfix) with ESMTPS id CA2E7B81CF0; Tue, 26 Apr 2022 08:40:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16685C385A4; Tue, 26 Apr 2022 08:40:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650962402; bh=rliS89dJcyrybqgaURTUi7V7HnjX9oapKH2QCwTkQFM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=19pFd4clz6loMObAvdmjh3zADxkvWhf2qz+7YYpqOXadAA3LI0FE9ncyhBHJeoMlU zai9Up9CCiTsBylY4HKXbH17VcdG/8Fk45hxWoNWplKzkLXFAkf5m9oGEvpqK8yKcL tiLbCi0Qf7pHbH5468x14YsT6g/e3mFBTihAvSMc= 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.15 044/124] net: mscc: ocelot: fix broken IP multicast flooding Date: Tue, 26 Apr 2022 10:20:45 +0200 Message-Id: <20220426081748.555271039@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081747.286685339@linuxfoundation.org> References: <20220426081747.286685339@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 6aad0953e8fe..a59300d9e000 100644 --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c @@ -1932,6 +1932,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