Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Andre Valentin <avalentin@marcant.net>
Cc: "DENG Qingfang" <dqfext@gmail.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Vivien Didelot" <vivien.didelot@gmail.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Russell King" <linux@armlinux.org.uk>,
	"open list:NETWORKING DRIVERS" <netdev@vger.kernel.org>,
	"open list" <linux-kernel@vger.kernel.org>,
	"Ansuel Smith" <ansuelsmth@gmail.com>,
	"Jonathan McDowell" <noodles@earth.li>,
	"Michal Vokáč" <vokac.m@gmail.com>,
	"Christian Lamparter" <chunkeey@gmail.com>,
	"Nishka Dasgupta" <nishkadg.linux@gmail.com>,
	"John Crispin" <john@phrozen.org>,
	"Stefan Lippers-Hollmann" <s.l-h@gmx.de>,
	"Hannu Nyman" <hannu.nyman@iki.fi>,
	"Imran Khan" <gururug@gmail.com>,
	"Frank Wunderlich" <frank-w@public-files.de>,
	"Nick Lowe" <nick.lowe@gmail.com>
Subject: Re: [RFC net-next 2/3] net: dsa: qca8k: enable assisted learning on CPU port
Date: Wed, 11 Aug 2021 02:33:58 +0300	[thread overview]
Message-ID: <20210810233358.aqicu4mm75zacr3v@skbuf> (raw)
In-Reply-To: <7af5c79e-fe18-a6fa-4282-1aa2bee187d6@marcant.net>

On Tue, Aug 10, 2021 at 11:09:07PM +0200, Andre Valentin wrote:
> Am 10.08.21 um 19:53 schrieb Vladimir Oltean:
> > On Tue, Aug 10, 2021 at 07:27:05PM +0200, Andre Valentin wrote:
> >> On Sun, Aug 08, 2021 at 1805, DENG Qingfang wrote:
> >>> On Sun, Aug 08, 2021 at 01:25:55AM +0300, Vladimir Oltean wrote:
> >>>> On Sat, Aug 07, 2021 at 08:07:25PM +0800, DENG Qingfang wrote:
> >>>>> Enable assisted learning on CPU port to fix roaming issues.
> >>>>
> >>>> 'roaming issues' implies to me it suffered from blindness to MAC
> >>>> addresses learned on foreign interfaces, which appears to not be true
> >>>> since your previous patch removes hardware learning on the CPU port
> >>>> (=> hardware learning on the CPU port was supported, so there were no
> >>>> roaming issues)
> >>
> >> The issue is with a wifi AP bridged into dsa and previously learned
> >> addresses.
> >>
> >> Test setup:
> >> We have to wifi APs a and b(with qca8k). Client is on AP a.
> >>
> >> The qca8k switch in AP b sees also the broadcast traffic from the client
> >> and takes the address into its fdb.
> >>
> >> Now the client roams to AP b.
> >> The client starts DHCP but does not get an IP. With tcpdump, I see the
> >> packets going through the switch (ap->cpu port->ethernet port) and they
> >> arrive at the DHCP server. It responds, the response packet reaches the
> >> ethernet port of the qca8k, and is not forwarded.
> >>
> >> After about 3 minutes the fdb entry in the qca8k on AP b is
> >> "cleaned up" and the client can immediately get its IP from the DHCP server.
> >>
> >> I hope this helps understanding the background.
> > 
> > How does this differ from what is described in commit d5f19486cee7
> > ("net: dsa: listen for SWITCHDEV_{FDB,DEL}_ADD_TO_DEVICE on foreign
> > bridge neighbors")?
> > 
> I lost a bit, It is a bit different.
> 
> I've been also working a bit on the ipq807x device with such a switch on
> OpenWRT. There is a backport of that commit. To fix the problems described
> by d5f19486cee7, I enabled assisted_learning on qca8k. And it solves the
> problem.
> 
> But initially, the device was unreachable until I created traffic from the device
> to a client (cpu port->ethernet). At first, I did not notice this because a wifi client
> with it's traffic immediately solved the issue automatically.
> Later I verified this in detail.
> 
> Hopefully DENG Qingfang patches help. But I cannot proove atm.

I don't understand. You're saying that when the device sends a packet
from its new position, the switch learns it on the CPU port, and that
fixes the issue?

Isn't that always how issues like that get fixed? If hardware learning
is supported on the CPU port, it is no different than a device roaming
from one switch port to another (but isn't directly connected to that
switch port, otherwise the switch might fast age the port when the
device roams) - it is inaccessible until it says something.

I still have no idea what we're talking about, and why this patch is
necessary. Does the qca8k switch support hardware learning on the CPU
port or not?

  reply	other threads:[~2021-08-10 23:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 12:07 [RFC net-next 0/3] qca8k bridge flags offload DENG Qingfang
2021-08-07 12:07 ` [RFC net-next 1/3] net: dsa: qca8k: offload bridge flags DENG Qingfang
2021-08-07 20:45   ` Vladimir Oltean
2021-08-07 12:07 ` [RFC net-next 2/3] net: dsa: qca8k: enable assisted learning on CPU port DENG Qingfang
2021-08-07 22:25   ` Vladimir Oltean
2021-08-08 16:05     ` DENG Qingfang
2021-08-08 21:10       ` Vladimir Oltean
2021-08-10 17:27       ` Andre Valentin
2021-08-10 17:53         ` Vladimir Oltean
2021-08-10 21:09           ` Andre Valentin
2021-08-10 23:33             ` Vladimir Oltean [this message]
2021-08-07 12:07 ` [RFC net-next 3/3] net: dsa: tag_qca: set offload_fwd_mark DENG Qingfang
2021-08-07 22:57   ` Vladimir Oltean
2021-08-08 16:12     ` DENG Qingfang
2021-08-08 21:14       ` Vladimir Oltean
2021-08-10  6:57 ` [RFC net-next 0/3] qca8k bridge flags offload Jonathan McDowell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210810233358.aqicu4mm75zacr3v@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=avalentin@marcant.net \
    --cc=chunkeey@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=frank-w@public-files.de \
    --cc=gururug@gmail.com \
    --cc=hannu.nyman@iki.fi \
    --cc=john@phrozen.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=nick.lowe@gmail.com \
    --cc=nishkadg.linux@gmail.com \
    --cc=noodles@earth.li \
    --cc=s.l-h@gmx.de \
    --cc=vivien.didelot@gmail.com \
    --cc=vokac.m@gmail.com \
    --subject='Re: [RFC net-next 2/3] net: dsa: qca8k: enable assisted learning on CPU port' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).