Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2906518pxb; Tue, 19 Jan 2021 08:49:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJw8keK79rcv37IFimu6XL/HY21tHxRANbhd33YfomTCzf1BGOgvAOM4zeBkByvcPOMesq8P X-Received: by 2002:a17:906:b244:: with SMTP id ce4mr3438893ejb.159.1611074992975; Tue, 19 Jan 2021 08:49:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611074992; cv=pass; d=google.com; s=arc-20160816; b=OJSuB9qyCx37mQalUnUrA9gnwwoY4jPkF2RLIBoAem1rDJ6l84FeqjMSmQdhUr0GEj m7uGJDsM1QS+u2rx8fdTwRtzKA1krgBaJAPlBbM2spO7UF68Wp0WOFrOtZlzSpo10poR Tv3z41ubP/pcXb3FevPsCnusY+kp7isEFi66/9tzJf86JFYOsMjRNklhMeDjYrdrNSBY fr1Fzxl0+gvTRiZIY8rkG91tzaZn9UAx64pIdK/iVebDjl9gZBQkHjwr/6lcspelwS3c W94EVYb2NmuMbG5dfn4wKx5Ah+JMG0A2pioAZGXN+ac6Cen/yufl0GAi4ipXTRgrhiUd IDTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=10iwHlD7oZ5dA6uy/6nvfJd5fAJgrk0zCLY7/6loHw4=; b=L62JhAtXJRGlW1P6wTAWVSD/7pMDvx1Z7RoN7xD37QIUg6FKrLutLeHys3qSzcWzO/ GDnd9lQpBRn9Uw7oa3t1tVNyCzL5RfkuL3ZiZ4Tcv5dvdhZiXlrwLkFwYaxhvF/3qDmn GOnyQYlmnJTLZO3u5RqB0hSlAwOmhtoWwnhi9fudo1jL4II05gfsshJvE0u9u8LPtI4Y KZAP77IgMqjVP60RrmXZqfTXQx2aqdMNLISHhvJe2410LuC/11PYNyopuGne70DLVTCF p8I8gVk0w8GFsMiPgllTV6nq/d5K65QxiaVqoan/IG8m1649v3Y3uJdv4DMI3bWlqgZp tc2A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=OMSo0v5J; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu13si8106759ejb.588.2021.01.19.08.49.27; Tue, 19 Jan 2021 08:49:52 -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=@nxp.com header.s=selector2 header.b=OMSo0v5J; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387607AbhASQrR (ORCPT + 99 others); Tue, 19 Jan 2021 11:47:17 -0500 Received: from mail-eopbgr80089.outbound.protection.outlook.com ([40.107.8.89]:42562 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731769AbhASQqw (ORCPT ); Tue, 19 Jan 2021 11:46:52 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i05HlaPHrs1czJu3aCo9yF2p+6ApnU8oQ4y0aTtdc80Ha86CoURukZMOspciGq2GF6f8FyD95kuQyXzSeHcF0zaGls6liMPbJ6k0hr8PhL5ZlEs+Pg9c/G1S5m5vhvbZPYRE0NL5+0Ke8x3L1kYugYP5LdkMZbMcflLgZ/eG8/V/Hrlv8r5G/Eyq2eXR9EFyeTsc4dEtvkiguks/GRhbbrs4r3/jZVQY3AAeKn327MQqJChbQoq28Uq576Nh3+FS6IO4lFtyQSFIXRwiVOxGePYpgPqfM4T4PvQSmU3so8z80cUi7tXKCJ7TWtlq/dyGYkjNpY6ev7KHKi7mbEGSoQ== 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-SenderADCheck; bh=10iwHlD7oZ5dA6uy/6nvfJd5fAJgrk0zCLY7/6loHw4=; b=KWgB8lb4fJ6o1sSZKbmkUz6bZC8A+a2rCzTjItucEUllUgOQSjB31WLnAhoHQWVtRY2bTzVGa6sVmA3MWAVIpBryhJa94XVozPzQTNgJMB0Nno3EP0+RzX9y9Yu9E2J252x1vdXnBdxBIfie8pGGkDgv+jLbibngKnkQGpL0KWDv/ZpzFmsu09LTdUbcMBgPtTNX9nY2tPLTlIYVHXs3+FKC8EbeMmzKQbGIWRjNzCJ1VlDE6ulyF+m/OV9ct2GQyMoTWWqtjcsJ8N9ZtqoQ+qDZFEcPKjPzs06YF0mMTmry2lIORtaF1XLLa8WttqBszCvL4DN1Vk3jBpT/rFs8+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=10iwHlD7oZ5dA6uy/6nvfJd5fAJgrk0zCLY7/6loHw4=; b=OMSo0v5JRjKnasbcAU0eiJLw1YyifSEMyd4yHCTquNvqd4Zl5opxOPWwl3lL4iTDquabp8k0ljnxv/Jo4QsXS6lnm5EKVJesiSfw3U0WNlR8WbyCd/wMp3PBUKtjSCaMBxDC9uXBcMCy6Fj6PFmBHoC4Os3aE4y+793Fh9llWT0= Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by VE1PR04MB6701.eurprd04.prod.outlook.com (2603:10a6:803:124::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Tue, 19 Jan 2021 16:46:02 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::2c43:e9c9:db64:fa57]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::2c43:e9c9:db64:fa57%5]) with mapi id 15.20.3763.013; Tue, 19 Jan 2021 16:46:01 +0000 From: Vladimir Oltean To: "Bedel, Alban" CC: Claudiu Manoil , Alexandre Belloni , "UNGLinuxDriver@microchip.com" , "David S. Miller" , Jakub Kicinski , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net v2] net: mscc: ocelot: Fix multicast to the CPU port Thread-Topic: [PATCH net v2] net: mscc: ocelot: Fix multicast to the CPU port Thread-Index: AQHW7mxY7uaoYquUzEO/44xBBVvQwKovKEqA Date: Tue, 19 Jan 2021 16:46:01 +0000 Message-ID: <20210119164601.dplx4js4wzhnmw6r@skbuf> References: <20210119140638.203374-1-alban.bedel@aerq.com> In-Reply-To: <20210119140638.203374-1-alban.bedel@aerq.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: aerq.com; dkim=none (message not signed) header.d=none;aerq.com; dmarc=none action=none header.from=nxp.com; x-originating-ip: [5.12.227.87] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 5c7465ba-c001-49c7-c666-08d8bc99b49e x-ms-traffictypediagnostic: VE1PR04MB6701: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0qVbfHRoeLPxIf4QS0KfPcB3jQmvEnwJhVT56Z32uTv49un1b9NlqjyvdMvLP39fH58aPrIg+x9HugY1vE1IEg1Mj408muz7C0PY6Nqx4xtGqMkkCdPnIIzBa+akpfq/tEXjvzJhVAdDArzN7k3XQh1HUgYzAw+6oRDDoR0INNWgXsQNUJgeXhuGWyBrwEpsBt9PyLf88Q7P6wC3c+kHQ9fvokuBczMtMDQNVWN/cLFkzxhNneeGTIrppD3bW2MbiXBSymjphrILodCLejYgRIp5dVOE1cDjb6x3SiKaIC+NfEK8DxtJFnCNv9aHMQYwb36vOKrkKz+gtPyYZLgEm28ah4VJm0ySERzhMO5sXfQAMejsx9uKnOzRoazbC65ubznWrLrn+LEe5/ps4GdqhQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(7916004)(4636009)(376002)(346002)(396003)(39850400004)(136003)(366004)(6916009)(1076003)(2906002)(6486002)(44832011)(316002)(5660300002)(478600001)(54906003)(8676002)(71200400001)(4326008)(66946007)(186003)(76116006)(66556008)(9686003)(6512007)(64756008)(66446008)(26005)(6506007)(8936002)(66476007)(33716001)(86362001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?0J7sl+rObeoRLq7TZpaZKra4e+dsiDQtwoFPHshtU2fZLUkqc68pdsEtuBSv?= =?us-ascii?Q?g2SGDZpMfDT/HkLSH+GLx6opZo9U3/e44edznFXavEBYrGeIBlLCGcZV+t2u?= =?us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jb+L39P88mej2PhodDm/1mw25wbrOrIwPOzgR?= =?us-ascii?Q?Mv7d?= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c7465ba-c001-49c7-c666-08d8bc99b49e X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jan 2021 16:46:01.8278 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Yl4zNiBDpH7OmR5Cu2gFEmkO10hewzhHeMW+3qnCETfpejF8Aez9x10wZwPPmCr3AFU11QKggvJQYx7oUiYeRw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6701 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. >=20 > 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. >=20 > 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. >=20 > Signed-off-by: Alban Bedel > Fixes: 9403c158b872 ("net: mscc: ocelot: support IPv4, IPv6 and plain Eth= ernet mdb entries") >=20 > --- Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Thanks!=