From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 net 1/2] net: dsa: sja1105: always enable the INCL_SRCPT option
Date: Thu, 29 Jun 2023 13:19:50 +0300 [thread overview]
Message-ID: <20230629101950.7s3kagwvkzlnu7ao@skbuf> (raw)
In-Reply-To: <f494387c8d55d9b1d5a3e88beedeeb448f2e6cc3.camel@redhat.com>
On Thu, Jun 29, 2023 at 11:36:38AM +0200, Paolo Abeni wrote:
> > The big drawback with INCL_SRCPT is that it makes it impossible to
> > distinguish between an original MAC DA of 01:80:C2:XX:YY:ZZ and
> > 01:80:C2:AA:BB:ZZ, because the tagger just patches MAC DA bytes 3 and 4
> > with zeroes. Only if PTP RX timestamping is enabled, the switch will
> > generate a META follow-up frame containing the RX timestamp and the
> > original bytes 3 and 4 of the MAC DA. Those will be used to patch up the
> > original packet. Nonetheless, in the absence of PTP RX timestamping, we
> > have to live with this limitation, since it is more important to have
> > the more precise source port information for link-local traffic.
>
> What if 2 different DSA are under the same linux bridge, so that the
> host has to forward in S/W the received frames? (and DA is incomplete)
>
> It looks like that such frames will never reach the relevant
> destination?
>
> Is such setup possible/relevant?
>
> Thanks,
>
> Paolo
>
They will have an incorrect MAC DA, with all the consequences of that.
Given the fact that the incl_srcpt was enabled up until now for the
vlan_filtering=1 bridge case only, this was already possible to see.
However it was never reported to me as being a problem, unlike what
is being fixed here.
I see no other escape than to unconditionally enable the send_meta
options as well, so that the overwritten MAC DA bytes can always be
reconstructed from the upcoming meta frames, even though the RX
timestamp (main payload of those meta frames) may or may not be useful.
Doing that might also have the benefit that it simplifies the code,
removing the need for tagger_data->rxtstamp_set_state() and
tagger_data->rxtstamp_get_state(), because with that simplification,
the tagger will always expect meta frames.
Because of the lack of complaints, I was considering that as net-next
material though.
next prev parent reply other threads:[~2023-06-29 10:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 9:42 [PATCH v2 net 0/2] Fix PTP received on wrong port with bridged SJA1105 DSA Vladimir Oltean
2023-06-27 9:42 ` [PATCH v2 net 1/2] net: dsa: sja1105: always enable the INCL_SRCPT option Vladimir Oltean
2023-06-27 15:06 ` Simon Horman
2023-06-29 9:36 ` Paolo Abeni
2023-06-29 10:19 ` Vladimir Oltean [this message]
2023-06-29 11:46 ` Vladimir Oltean
2023-06-29 12:38 ` Paolo Abeni
2023-06-29 12:44 ` Vladimir Oltean
2023-06-27 9:42 ` [PATCH v2 net 2/2] net: dsa: tag_sja1105: always prefer source port information from INCL_SRCPT Vladimir Oltean
2023-06-27 15:07 ` Simon Horman
2023-06-29 12:50 ` [PATCH v2 net 0/2] Fix PTP received on wrong port with bridged SJA1105 DSA patchwork-bot+netdevbpf
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=20230629101950.7s3kagwvkzlnu7ao@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®