From: Kurt Kanzenbach <kurt@kmk-computers.de>
To: Tobias Waldekranz <tobias@waldekranz.com>,
Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org,
Richard Cochran <richardcochran@gmail.com>
Subject: Re: [PATCH net-next v1] net: dsa: mv88e6xxx: Trap PTP traffic
Date: Mon, 13 Dec 2021 19:54:55 +0100 [thread overview]
Message-ID: <877dc8xrls.fsf@kmk-computers.de> (raw)
In-Reply-To: <87r1ai21ac.fsf@waldekranz.com>
On Sun Dec 12 2021, Tobias Waldekranz wrote:
>> Agreed. Some mechanism is required. Any idea how to implement it? In
>> case of PTP the management/policy entries should take precedence.
>
> One approach would be to create a cache containing all static ATU
> entries. That way we can easily track the owner of each entry. There are
> also major performance advantages of being able to update memberships of
> group entries without having to read the entry back from the ATU
> first. This is especially important once we start handling router ports
> correctly, in which case you have to update all active entries on every
> add/remove.
>
> Before going down that route though, I would suggest getting some
> initial feedback from Andrew.
>
> A complicating factor, no matter the implementation, is the relationship
> between the bridge MDB and all other consumers of ATU entries. As an
> example: If the driver first receives an MDB add for one of the L3 PTP
> groups, and then a user starts up ptp4l, the driver can't then go back
> to the bridge and say "remember that group entry that I said I loaded,
> well I have removed it now". So whatever implementation we choose, I
> think it needs to keep a shadow entry for the MDB that can be
> re-inserted if the corresponding management or policy entry is removed.
>
> You may simply want to allow all consumers to register any given group
> with the cache. The cache would then internally elect the "best" entry
> and install that to the ATU. Sort of what zebra/quagga/FRR does for
> dynamic routing. The priority would probably be something like:
>
> 1. Management entry
> 2. Policy entry
> 3. MDB entry
>
> This should still result in the proper forwarding of a registered groups
> that are shadowed by management or policy entries. The bridge would know
> (via skb->offload_fwd_mark) that the packet had not been forwarded in
> hardware and would fallback to software forwarding. If the policy entry
> was later removed (e.g. PTP was shut down) the MDB entry could be
> reinstalled and offloading resumed.
Thanks. This approach makes sense and should solve the problem at hand.
Thanks,
Kurt
next prev parent reply other threads:[~2021-12-13 18:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 17:33 [PATCH net-next v1] net: dsa: mv88e6xxx: Trap PTP traffic Kurt Kanzenbach
2021-12-10 0:07 ` Tobias Waldekranz
2021-12-10 17:39 ` Kurt Kanzenbach
2021-12-11 23:02 ` Tobias Waldekranz
2021-12-13 18:54 ` Kurt Kanzenbach [this message]
2021-12-11 5:14 ` Jakub Kicinski
2021-12-11 15:39 ` Richard Cochran
2021-12-12 15:16 ` Kurt Kanzenbach
2021-12-13 12:10 ` Richard Cochran
2021-12-13 12:31 ` Vladimir Oltean
2021-12-13 15:27 ` Andrew Lunn
2021-12-13 17:11 ` Richard Cochran
2021-12-13 18:58 ` Vladimir Oltean
2021-12-13 16:44 ` Jakub Kicinski
2021-12-13 17:04 ` Richard Cochran
2021-12-13 18:40 ` Kurt Kanzenbach
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=877dc8xrls.fsf@kmk-computers.de \
--to=kurt@kmk-computers.de \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=richardcochran@gmail.com \
--cc=tobias@waldekranz.com \
--cc=vivien.didelot@gmail.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).