From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF8C1C43381 for ; Tue, 19 Feb 2019 16:05:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7E3C4217D9 for ; Tue, 19 Feb 2019 16:05:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IapCejxc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727519AbfBSQFl (ORCPT ); Tue, 19 Feb 2019 11:05:41 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:43545 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbfBSQFl (ORCPT ); Tue, 19 Feb 2019 11:05:41 -0500 Received: by mail-qt1-f193.google.com with SMTP id y4so23662440qtc.10 for ; Tue, 19 Feb 2019 08:05:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:from:to:cc:subject:in-reply-to:references :mime-version:content-disposition:content-transfer-encoding; bh=IZVaR1aQmxeVxYCYWyjJYgYk29JSFjQiLvkw4VY5dEk=; b=IapCejxcYqrkCw0+9BxunxnZoAfXGb2pg0MwEjTBiJXNn8KDoIIvE9ZgdzWl9/1Ew7 gV0JKM41IBuW7jGJKQ2I+Be72ijAVpbnFOTsfXKa36AFFFXN7mwhGnI0G+ZuTEync8j7 I/A7PtoEMVJFhK4kqkN29oa7O5DUQO+Q4l1YabA8PdizFc8BpcBMxUcbZssiwjuBm0u2 dZThA1+6C0MmefpX7hTN3FD+vbtPYF8dWI9okX8ZxhuvltsqOH7RTrcR3p+Tf3dUXUmO FZWjVx1OLwLUuCQDOzC5W94IprWWfjW4dIkPlP1+NAkvPrNrpLzu2SCnbAP7pM1z3dGF pQTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:from:to:cc:subject:in-reply-to :references:mime-version:content-disposition :content-transfer-encoding; bh=IZVaR1aQmxeVxYCYWyjJYgYk29JSFjQiLvkw4VY5dEk=; b=VnyOof7+i7fofAH/vUFNkV8UIeRzWUIjMpt2FDpwVxUSU0ePgyTOmWFNKj4cL1TgiG cPL8pE5jZlGJadpu8TUgV9rsJflyQ0XSsmyqwiyeXDonhlQ5PV6Y8sN1VMtm5LTUvvyk r50thf31tcCeF/ZaJA5INtP7SbgXdN9CQIaArzWWZAKjuwvYuTyemsnbc+i3TrK9I7v0 sgcan21QcKhJALLUXH4M8mOdJhINX8DL2Ea/Q6ZTfBYIOCcaGwxvrL/wbwz5iX7SS8Sz 9mNATTwdbmNi5VU195KN05pTLnd3J/rB5822/fbDwm3SqJrm0WymZTtzk2MyLoVFvMDe P2WQ== X-Gm-Message-State: AHQUAubdIpHx3kUUYmm6v2g1KiRLLpYdJdhA8W7MAyvbb+/BfO6E44W4 LckeMoE7nxcQUcQd+Mkmb40= X-Google-Smtp-Source: AHgI3IZ6zwTdxBJ5v9tJiXRRxRBEUd1L+pycy2dHg8SWBiPnj6mIx05hS2dTVt3wTdN4BW5I3Qe0mA== X-Received: by 2002:ac8:3774:: with SMTP id p49mr23113490qtb.388.1550592339621; Tue, 19 Feb 2019 08:05:39 -0800 (PST) Received: from localhost (modemcable249.105-163-184.mc.videotron.ca. [184.163.105.249]) by smtp.gmail.com with ESMTPSA id c73sm13986778qka.37.2019.02.19.08.05.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Feb 2019 08:05:38 -0800 (PST) Date: Tue, 19 Feb 2019 11:05:37 -0500 Message-ID: <20190219110537.GD27578@t480s.localdomain> From: Vivien Didelot To: Russell King - ARM Linux admin Cc: Andrew Lunn , Florian Fainelli , Heiner Kallweit , "David S. Miller" , netdev@vger.kernel.org Subject: Re: [PATCH net-next v2 3/3] net: dsa: mv88e6xxx: default to multicast and unicast flooding In-Reply-To: <20190218125345.eq3mhmgsmgm7jmem@shell.armlinux.org.uk> References: <20190217163114.yomawlljyxlqy3ob@shell.armlinux.org.uk> <20190218125345.eq3mhmgsmgm7jmem@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Russell, On Mon, 18 Feb 2019 12:53:45 +0000, Russell King - ARM Linux admin wrote: > On Sun, Feb 17, 2019 at 04:32:40PM +0000, Russell King wrote: > > Switches work by learning the MAC address for each attached station by > > monitoring traffic from each station. When a station sends a packet, > > the switch records which port the MAC address is connected to. > > > > With IPv4 networking, before communication commences with a neighbour, > > an ARP packet is broadcasted to all stations asking for the MAC address > > corresponding with the IPv4. The desired station responds with an ARP > > reply, and the ARP reply causes the switch to learn which port the > > station is connected to. > > > > With IPv6 networking, the situation is rather different. Rather than > > broadcasting ARP packets, a "neighbour solicitation" is multicasted > > rather than broadcasted. This multicast needs to reach the intended > > station in order for the neighbour to be discovered. > > > > Once a neighbour has been discovered, and entered into the sending > > stations neighbour cache, communication can restart at a point later > > without sending a new neighbour solicitation, even if the entry in > > the neighbour cache is marked as stale. This can be after the MAC > > address has expired from the forwarding cache of the DSA switch - > > when that occurs, there is a long pause in communication. Thank you for the very informative message above. > > Our DSA implementation for mv88e6xxx switches has defaulted to having > > multicast and unicast flooding disabled. As per the above description, > > this is fine for IPv4 networking, since the broadcasted ARP queries > > will be sent to and received by all stations on the same network. > > However, this breaks IPv6 very badly - blocking neighbour solicitations > > and later causing connections to stall. > > > > The defaults that the Linux bridge code expect from bridges are that > > unknown unicast frames and unknown multicast frames are flooded to > > all stations, which is at odds to the defaults adopted by our DSA > > implementation for mv88e6xxx switches. > > > > This commit enables by default flooding of both unknown unicast and > > unknown multicast frames. This means that mv88e6xxx DSA switches now > > behave as per the bridge(8) man page, and IPv6 works flawlessly through > > such a switch. > > Thinking about this a bit more, this approach probably isn't the best. > If we have a port that goes through this life-cycle: > > 1. assigned to a bridge > 2. configured not to flood > 3. reassigned to a new bridge > > the port will retain its settings from the first bridge, which will be > at odds with the settings that the Linux bridge code expects and the > settings visible to the user. > > So, how about this, which basically reverts this patch and applies the > flood settings each time a port joins a bridge, and clears them when > the port leaves a bridge. Isn't the bridge code programming flooding on the port correctly on leave/join, because the BR_*FLOOD flags have been learned? I would expect that. Thanks, Vivien