Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2369332pxf; Sat, 3 Apr 2021 22:41:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkxnuBPMviE2WwLdS82n4vf+cnz2P6sy7ZpmlEUPXbnCy7WQcANjv36e9tvNbObMEkMgNH X-Received: by 2002:a17:906:c7cc:: with SMTP id dc12mr3234787ejb.423.1617514867620; Sat, 03 Apr 2021 22:41:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617514867; cv=none; d=google.com; s=arc-20160816; b=erE5622LFjqEY9Iqu5OaCxvBXTzJWFWl3alMX7iF9zXUV5KGYAqlyyQGnbJhkSxjHZ VTCs03x4UrZVu3o/HmInk6DJhg329yS3tKZh+XaVZbJAwAmCO1PB6sfE+l+yb0pubXt9 vf3utjyLkCXcrWkWiadOvtN4L5OUjgGw4Pj163ZO/UsBYchTyjzTKZGMEZR9YN4snVp9 IDgpdufEVtncgnAPUmwnmuJA11M+cfu9+6AkxjwSpi8802CsE5duCev0juY2MgdhZfit 1qx09WWocrgxbNxzZU9FD5kIUmsQ0Sz6b4uLq1svLIXTQ5y5qCrGqeZGgrcTTvPplUGU 6Dcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=OySnLe9hNYOaGbtz68vRjor9ZtZnrRldBCPJ1xXqA+Q=; b=sY1m8VOkhfpWsdihfWEaHuD/j9/CqKPWuQ+uOJOYV1ANEihqde7r/BVweyk6vYdlsu VJUagtvCH+SxEvshwflOJ+j8zLgnxpqFpjorXxcuLr1fAhPw7TLRZL6kkMImMvNfvo3/ QrasDDhfNWY/AGvPZu0MKmyFODT0K9PSvpgMECLmz02tdWBn4zfqMdMqUJEPzyzFRS2t itnQM5dfbWX1PssfYwzCKYZqjkFwxuOfy1sb0TS9M0mDXfABIfK0Bbv+f2uepPg8Hrn/ ZSi9Ac3lua5utbvXmCppyC9nQKqildto5jMQmy57K7St2WTcFbl99Fz8HQjUYyCL3h7q m7+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=Bq17cyiE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si10911189edt.516.2021.04.03.22.40.45; Sat, 03 Apr 2021 22:41:07 -0700 (PDT) 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=@gmx.net header.s=badeba3b8450 header.b=Bq17cyiE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232462AbhDDFfw (ORCPT + 99 others); Sun, 4 Apr 2021 01:35:52 -0400 Received: from mout.gmx.net ([212.227.15.18]:45531 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbhDDFfu (ORCPT ); Sun, 4 Apr 2021 01:35:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1617514530; bh=spnXF9bitaRpIdUoYH0Zqs8FB9jy9Hn4K39Rt8w46BY=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=Bq17cyiE51QPI5XOTEe2o70zo8e8Q32XJItNhcRqbfCfp0p5W+57SXhUppr1HwTX3 0anlTczL6KDRU9BRpkZe8LOkUVpImFjImQR1pFsyHMH9oe+HgwaNgWATPGRVDceZkN ywTtcvB89oWd12LF7krT9igJfIBmoF9jNLFlD55g= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.178.44] ([95.91.192.147]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Md6Mj-1m2XU92nz9-00aEC7; Sun, 04 Apr 2021 07:35:30 +0200 Subject: Re: [PATCH net-next v1 2/9] net: dsa: tag_ar9331: detect IGMP and MLD packets To: Vladimir Oltean Cc: Andrew Lunn , Oleksij Rempel , Vivien Didelot , Florian Fainelli , "David S. Miller" , Jakub Kicinski , Russell King , Pengutronix Kernel Team , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org References: <20210403114848.30528-1-o.rempel@pengutronix.de> <20210403114848.30528-3-o.rempel@pengutronix.de> <20210404000204.kujappopdi3aqjsn@skbuf> From: Oleksij Rempel Message-ID: Date: Sun, 4 Apr 2021 07:35:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210404000204.kujappopdi3aqjsn@skbuf> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:9p/coZq9wZCmxGXl0mqGGX+ODJYTNv+5wpDnyDKmzh/QY3x7NYq Y7zm8poDMRy1j/cGtHaffrWn/f+2uRyfmlIFLrXN6IQ3Hq1nuwNfDcME1+yO3ybxSXx4OSn aHK7aQVyn5pfyDWr5Z+YsvjMSqRDJ+LAOqtOaXiPjgjwx9EazjC87/q0Yt7QPEYAqYQRflo vD5dLzJi6d8q653VrF7rA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:h0x5UH8Rwxs=:7gDkdZV1X2owpN2qm5xMaT 5Q/CNaiW5CNCPTcXP/7yltdtUK601fXnXLQPS+XJXQJFhb7tn6zeIw4eEdVomvC3Aq4/9qIC+ RpbPuD9XfGIJTd1j/GJ8o+8vxOrhMPViJYKfRGS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9v+7c14DbPquLZGXBpJzOG0upQlPElaIVXdCDk6sjEs6bOA C2CsfZ3T1gATQypsM Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 04.04.21 um 02:02 schrieb Vladimir Oltean: > On Sat, Apr 03, 2021 at 07:14:56PM +0200, Oleksij Rempel wrote: >> Am 03.04.21 um 16:49 schrieb Andrew Lunn: >>>> @@ -31,6 +96,13 @@ static struct sk_buff *ar9331_tag_xmit(struct sk_b= uff *skb, >>>> __le16 *phdr; >>>> u16 hdr; >>>> >>>> + if (dp->stp_state =3D=3D BR_STATE_BLOCKING) { >>>> + /* TODO: should we reflect it in the stats? */ >>>> + netdev_warn_once(dev, "%s:%i dropping blocking packet\n", >>>> + __func__, __LINE__); >>>> + return NULL; >>>> + } >>>> + >>>> phdr =3D skb_push(skb, AR9331_HDR_LEN); >>>> >>>> hdr =3D FIELD_PREP(AR9331_HDR_VERSION_MASK, AR9331_HDR_VERSION); >>> >>> Hi Oleksij >>> >>> This change does not seem to fit with what this patch is doing. >> >> done >> >>> I also think it is wrong. You still need BPDU to pass through a >>> blocked port, otherwise spanning tree protocol will be unstable. >> >> We need a better filter, otherwise, in case of software based STP, we a= re leaking packages on >> blocked port. For example DHCP do trigger lots of spam in the kernel lo= g. > > I have no idea whatsoever what 'software based STP' is, if you have > hardware-accelerated forwarding. I do not mean hardware-accelerated forwarding, i mean hardware-accelerated STP port state helpers. >> I'll drop STP patch for now, it will be better to make a generic soft S= TP for all switches without >> HW offloading. For example ksz9477 is doing SW based STP in similar way= . > > How about we discuss first about what your switch is not doing properly? > Have you debugged more than just watching the bridge change port states? > As Andrew said, a port needs to accept and send link-local frames > regardless of the STP state. In the BLOCKING state it must send no other > frames and have address learning disabled. Is this what's happening, is > the switch forwarding frames towards a BLOCKING port? The switch is not forwarding BPDU frame to the CPU port. So, the linux bridge will stack by cycling different state of the port where loop was detected. =2D- Regards, Oleksij