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.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 61F08C433E1 for ; Fri, 19 Jun 2020 21:58:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 45FF42220D for ; Fri, 19 Jun 2020 21:58:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728627AbgFSV60 (ORCPT ); Fri, 19 Jun 2020 17:58:26 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:49514 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728287AbgFSV6V (ORCPT ); Fri, 19 Jun 2020 17:58:21 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1jmP1d-001KZK-SO; Fri, 19 Jun 2020 23:58:17 +0200 Date: Fri, 19 Jun 2020 23:58:17 +0200 From: Andrew Lunn To: Daniel Mack Cc: netdev@vger.kernel.org, Ido Schimmel , Jiri Pirko , Ivan Vecera , Florian Fainelli Subject: Re: Question on DSA switches, IGMP forwarding and switchdev Message-ID: <20200619215817.GN279339@lunn.ch> References: <59c5ede2-8b52-c250-7396-fd7b19ec6bc7@zonque.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59c5ede2-8b52-c250-7396-fd7b19ec6bc7@zonque.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Jun 19, 2020 at 11:31:04PM +0200, Daniel Mack wrote: > Hi, > > I'm working on a custom board featuring a Marvell mv88e6085 Ethernet > switch controlled by the Linux DSA driver, and I'm facing an issue with > IGMP packet flows. > > Consider two Ethernet stations, each connected to the switch on a > dedicated port. A Linux bridge combines the two ports. In my setup, I > need these two stations to send and receive multicast traffic, with IGMP > snooping enabled. > > When an IGMP query enters the switch, it is redirected to the CPU port > as all 'external' ports are configured for IGMP/MLP snooping by the > driver. The issue that I'm seeing is that the Linux bridge does not > forward the IGMP frames to any other port, no matter whether the bridge > is in snooping mode or not. This needs to happen however, otherwise the > stations will not see IGMP queries, and unsolicited membership reports > are not being transferred either. Hi Daniel I think all the testing i've done in this area i've had the bridge acting as the IGMP queirer. Hence it has replied to the query, rather than forward it out other ports. So this could be a bug. > I've traced these frames through the bridge code and figured forwarding > fails in should_deliver() in net/bridge/br_forward.c because > nbp_switchdev_allowed_egress() denies it due to the fact that the frame > has already been forwarded by the same parent device. To get this far, has the bridge determined it is not the elected querier? I guess it must of done. Otherwise it would not be forwarding it. > So my question now is how to fix that. Would the DSA driver need to mark > the ports as independent somehow? The problem here is: https://elixir.bootlin.com/linux/v5.8-rc1/source/net/dsa/tag_edsa.c#L159 Setting offload_fwd_mark means the switch has forwarded the frame as needed to other ports of the switch. If the frame is an IGMP query frame, and the bridge is not the elected quierer, i guess we need to set this false? Or we need an FDB in the switch to forward it. What group address is being used? Andrew