From: Andrew Lunn <andrew@lunn.ch>
To: "Allan W. Nielsen" <allan.nielsen@microchip.com>
Cc: "Y.b. Lu" <yangbo.lu@nxp.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH 3/3] ocelot_ace: fix action of trap
Date: Wed, 14 Aug 2019 15:52:27 +0200 [thread overview]
Message-ID: <20190814135227.GC5265@lunn.ch> (raw)
In-Reply-To: <20190814085711.7654bff2u66o4yjj@lx-anielsen.microsemi.net>
On Wed, Aug 14, 2019 at 10:57:12AM +0200, Allan W. Nielsen wrote:
> Hi Y.b. and Andrew,
>
> The 08/14/2019 04:28, Y.b. Lu wrote:
> > > > I'd like to trap all IEEE 1588 PTP Ethernet frames to CPU through etype
> > > 0x88f7.
> > >
> > > Is this the correct way to handle PTP for this switch? For other switches we
> > > don't need such traps. The switch itself identifies PTP frames and forwards
> > > them to the CPU so it can process them.
> > >
> > > I'm just wondering if your general approach is wrong?
> >
> > [Y.b. Lu] PTP messages over Ethernet will use two multicast addresses.
> > 01-80-C2-00-00-0E for peer delay messages.
> Yes, and as you write, this is a BPDU which must not be forwarded (and they are
> not).
>
> > 01-1B-19-00-00-00 for other messages.
> Yes, this is a normal L2 multicast address, which by default are broadcastet.
>
> > But only 01-80-C2-00-00-0E could be handled by hardware filter for BPDU frames
> > (01-80-C2-00-00-0x). For PTP messages handling, trapping them to CPU through
> > VCAP IS2 is the suggested way by Ocelot/Felix.
Hi Allan
The typical userspace for this is linuxptp. It implements Boundary
Clock (BC), Ordinary Clock (OC) and Transparent Clock (TC). On
switches, it works great for L2 PTP. But it has architectural issues
for L3 PTP when used with a bridge. I've no idea if Richard is fixing
this.
> 3) It can be done via 'tc' using the trap action, but I do not know if this is
> the desired way of doing it.
No, it is not. It could be the way you the implement
ptp_clock_info.enable() does the same as what TC could do, but TC
itself is not used, it should all be internal to the driver. And you
might also want to consider hiding such rules from TC, otherwise the
user might remove them and things break.
Andrew
next prev parent reply other threads:[~2019-08-14 13:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 10:48 [PATCH 0/3] ocelot_ace: fix and improve the driver Yangbo Lu
2019-08-12 10:48 ` [PATCH 1/3] ocelot_ace: drop member port from ocelot_ace_rule structure Yangbo Lu
2019-08-12 10:48 ` [PATCH 2/3] ocelot_ace: fix ingress ports setting for rule Yangbo Lu
2019-08-12 12:38 ` Allan W. Nielsen
2019-08-13 2:36 ` Y.b. Lu
2019-08-12 10:48 ` [PATCH 3/3] ocelot_ace: fix action of trap Yangbo Lu
2019-08-12 12:31 ` Allan W. Nielsen
2019-08-13 2:12 ` Y.b. Lu
2019-08-13 6:16 ` Allan W. Nielsen
2019-08-14 4:03 ` Y.b. Lu
2019-08-14 6:45 ` Allan W. Nielsen
2019-08-13 13:42 ` Andrew Lunn
2019-08-14 4:28 ` Y.b. Lu
2019-08-14 8:57 ` Allan W. Nielsen
2019-08-14 13:52 ` Andrew Lunn [this message]
2019-08-15 12:39 ` Y.b. Lu
2019-08-14 13:42 ` Andrew Lunn
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=20190814135227.GC5265@lunn.ch \
--to=andrew@lunn.ch \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=allan.nielsen@microchip.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=yangbo.lu@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).