Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp376205pxb; Wed, 20 Jan 2021 09:04:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHhs/93U56J6Wphzp9FKmw3IyfmUtD1RPAxPnlS4Z0+tCIRlOyKWp3gnyXiiU8oX3nN6jd X-Received: by 2002:a50:eb44:: with SMTP id z4mr7896712edp.167.1611162272995; Wed, 20 Jan 2021 09:04:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611162272; cv=none; d=google.com; s=arc-20160816; b=Jusy9ga7C1oCrBnOej+gBKbljRP1eduv6tJUgmB06iVcGQBBm7PMKYltOH0lvCTSzf W1yv16LBMvaHk902j5rASLMepsthOy0hWH3b2G2MMPl68o4De2b1OrRl2Ur/apb+S6gv 5+WP9J1h5PHW7KH1MVwkFE2LNt43h12ef30p4NEBGyReD/Rk8mMKnxuSh56YajJ8uSJw 9uFmPkZ7vfR6UE5HVOwXKxirhf88M/oLYptst/tyOpho7bfGwaadyx0kCPNFJ491TLmy BdgzAEd42SunmDdhbkWzfmPpzB2PeRsu75jgxRhG9n6nM9ZzFsVcBFVBE0lTHTxOqzcV zgzA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=abCemNnZbDjeu/oUctK2cxc7xVaMrlDXnVpN3gxB6Ik=; b=vuJWnWsw2FrTEE29pHXo1k5Plr4AerkzyQXwgMuQ4waYhr04tF0GEa5FdSzglTXALb LmWcMtvxAmu/H6738HRGxImLBGoNlDzaWnlYfk5mBZC56DqlDCu7PqfNrwjAbLtod2MX Qj10MV0XzEiqOmCDfn5R/qhnJqRlVEl3+m+0cC9k0rCZ5kIp7X9/2C2hoCvjK/KKC+jB GJf6DnsVgppOT39FzptntRLYdqtn3+mdetO8dkx5pnnhLtDpHlViQRCPEIpjYO6TLzjd O8src/cQM3CrbYmktrhP3K5LKSmGE6IyIP9o6Su8OetEcrpYxD0OCZn/4tJYxDK7H6qM ufjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iNIrfR2T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m22si867153ejc.243.2021.01.20.09.03.57; Wed, 20 Jan 2021 09:04:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iNIrfR2T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391771AbhATRDC (ORCPT + 99 others); Wed, 20 Jan 2021 12:03:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:57970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730067AbhATRBg (ORCPT ); Wed, 20 Jan 2021 12:01:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7438C233E2; Wed, 20 Jan 2021 17:00:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611162055; bh=6OUtqhWSO+0DZitUi2hZqE/CxaSo5m2rxUBWTvDjJgA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iNIrfR2TK21i6woG9gWlIsWyB/XFJjVrINhr4DN+OVOiryaEgoF5hdGBsplH+vkyE 8D9N1ykKda3Aiu5ylrrz4NvHGlj1QlRwECK/P5Ls1vF4P8Ng/tFDCu467UiR8sUSHA sp+VNVcbtyFVbwfRUJME8QtX7FYCu/LO4asyKNyEU0vqQW58ZIiSc5XdeVziwb7kw7 Uaiee2/JKVnPu1P6Qamdwr4egWY8umiTs1o3ovHAz2bcLfM5ZQV64L6SN2BfgrEjUk LdjKss75WrHyiCQq84cX4lNkCMLrd2ajrYHiVjDzxfB3S9f8SJ6TDrfiS4Er9v5sYy UCpgPDCW7E6aQ== Date: Wed, 20 Jan 2021 09:00:54 -0800 From: Jakub Kicinski To: Vladimir Oltean , "Bedel, Alban" Cc: Claudiu Manoil , Alexandre Belloni , "UNGLinuxDriver@microchip.com" , "David S. Miller" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net v2] net: mscc: ocelot: Fix multicast to the CPU port Message-ID: <20210120090054.12d56482@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20210119164601.dplx4js4wzhnmw6r@skbuf> References: <20210119140638.203374-1-alban.bedel@aerq.com> <20210119164601.dplx4js4wzhnmw6r@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 19 Jan 2021 16:46:01 +0000 Vladimir Oltean wrote: > On Tue, Jan 19, 2021 at 03:06:38PM +0100, Alban Bedel wrote: > > Multicast entries in the MAC table use the high bits of the MAC > > address to encode the ports that should get the packets. But this port > > mask does not work for the CPU port, to receive these packets on the > > CPU port the MAC_CPU_COPY flag must be set. > > > > Because of this IPv6 was effectively not working because neighbor > > solicitations were never received. This was not apparent before commit > > 9403c158 (net: mscc: ocelot: support IPv4, IPv6 and plain Ethernet mdb > > entries) as the IPv6 entries were broken so all incoming IPv6 > > multicast was then treated as unknown and flooded on all ports. > > > > To fix this problem rework the ocelot_mact_learn() to set the > > MAC_CPU_COPY flag when a multicast entry that target the CPU port is > > added. For this we have to read back the ports endcoded in the pseudo > > MAC address by the caller. It is not a very nice design but that avoid > > changing the callers and should make backporting easier. > > > > Signed-off-by: Alban Bedel > > Fixes: 9403c158b872 ("net: mscc: ocelot: support IPv4, IPv6 and plain Ethernet mdb entries") > > > > --- > > Reviewed-by: Vladimir Oltean > Tested-by: Vladimir Oltean Applied, thanks!