Thread (31 messages) flat view 31 messages, 5 authors, 2020-07-20

Re: [PATCH v1 3/8] net: dsa: hellcreek: Add PTP clock support

From: Kurt Kanzenbach <kurt@linutronix.de>
Date: 2020-07-13 06:34:06
Also in: linux-devicetree

On Sat Jul 11 2020, Florian Fainelli wrote:
On 7/10/2020 4:36 AM, Kurt Kanzenbach wrote:
quoted
From: Kamil Alkhouri <redacted>

The switch has internal PTP hardware clocks. Add support for it. There are three
clocks:

 * Synchronized
 * Syntonized
 * Free running

Currently the synchronized clock is exported to user space which is a good
default for the beginning. The free running clock might be exported later
e.g. for implementing 802.1AS-2011/2020 Time Aware Bridges (TAB). The switch
also supports cross time stamping for that purpose.

The implementation adds support setting/getting the time as well as offset and
frequency adjustments. However, the clock only holds a partial timeofday
timestamp. This is why we track the seconds completely in software (see overflow
work and last_ts).

Furthermore, add the PTP multicast addresses into the FDB to forward that
packages only to the CPU port where they are processed by a PTP program.

Signed-off-by: Kamil Alkhouri <redacted>
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Are not you missing an depends on PTP_1588_CLOCK somewhere?
Most likely. Thanks!
quoted
---
[snip]
quoted
 
+static int hellcreek_setup_fdb(struct hellcreek *hellcreek)
+{
+	static struct hellcreek_fdb_entry ptp = {
+		/* MAC: 01-1B-19-00-00-00 */
+		.mac	      = { 0x01, 0x1b, 0x19, 0x00, 0x00, 0x00 },
+		.portmask     = 0x03,	/* Management ports */
Should not this depend on the actual number of ports enabled by the user
and so it would be more logical to program those entries (or update
them) at port_enable() time?
For me this is a switch configuration. It means forward all PTP traffic
to the switch's CPU port and therefore it doesn't depend on the enabled
ports.

Thanks,
Kurt

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help