netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: Re: [PATCH net 0/3] Fixes for sja1105 best-effort VLAN filtering
Date: Wed, 7 Apr 2021 23:46:41 +0300	[thread overview]
Message-ID: <20210407204641.ly6hnjgi4kjbn4co@skbuf> (raw)
In-Reply-To: <20210407201452.1703261-1-olteanv@gmail.com>

On Wed, Apr 07, 2021 at 11:14:49PM +0300, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> This series addresses some user complaints regarding best-effort VLAN
> filtering support on sja1105:
> - switch not pushing VLAN tag on egress when it should
> - switch not dropping traffic with unknown VLAN when it should
> - switch not overwriting VLAN flags when it should
> 
> Those bugs are not the reason why it's called best-effort, so we should
> fix them :)
> 
> Vladimir Oltean (3):
>   net: dsa: sja1105: use the bridge pvid in best_effort_vlan_filtering
>     mode
>   net: dsa: sja1105: use 4095 as the private VLAN for untagged traffic
>   net: dsa: sja1105: update existing VLANs from the bridge VLAN list
> 
>  drivers/net/dsa/sja1105/sja1105.h      |  1 +
>  drivers/net/dsa/sja1105/sja1105_main.c | 61 ++++++++++++++++++--------
>  2 files changed, 43 insertions(+), 19 deletions(-)
> 
> -- 
> 2.25.1
> 

Please don't apply these patches yet. I finished regression testing and
it looks like patch 1 breaks PTP for some reason I'm afraid to even think
of now - the RX timestamps are still collected but synchronization looks
flat by around 1 ms.

If my suspicion is right and the VLAN retagging affects PTP traffic too
(which should hit a trap-to-host rule before that even takes place),
then the MAC timestamp might be replaced with a timestamp taken on the
internal loopback port, which would be pretty nasty. Or the strict
delivery order guarantees towards the DSA master (first comes the PTP
frame, then the meta frame holding the RX timestamp) might no longer be
true if the original PTP frame is dropped in hardware because its
VLAN-retagged replacement is sent to the CPU instead? I don't know. I'll
do some more debugging tomorrow.

      parent reply	other threads:[~2021-04-07 20:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 20:14 [PATCH net 0/3] Fixes for sja1105 best-effort VLAN filtering Vladimir Oltean
2021-04-07 20:14 ` [PATCH net 1/3] net: dsa: sja1105: use the bridge pvid in best_effort_vlan_filtering mode Vladimir Oltean
2021-04-07 20:14 ` [PATCH net 2/3] net: dsa: sja1105: use 4095 as the private VLAN for untagged traffic Vladimir Oltean
2021-04-07 20:14 ` [PATCH net 3/3] net: dsa: sja1105: update existing VLANs from the bridge VLAN list Vladimir Oltean
2021-04-07 20:46 ` Vladimir Oltean [this message]

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=20210407204641.ly6hnjgi4kjbn4co@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).