Subject: Re: [PATCH net] net: dsa: sja1105: Fix double delivery of TX timestamps to socket error queue

From: Richard Cochran <[email-masked]>
Date: Thu, 26 Dec 2019 17:52:32 -0800

On Thu, Dec 26, 2019 at 08:24:19PM +0200, Vladimir Oltean wrote:
> How will these drivers not transmit a second hw TX timestamp to the
> stack, if they don't check whether TX timestamping is enabled for
> their netdev?

Ah, so they are checking SKBTX_HW_TSTAMP on the socket without
checking for HWTSTAMP first?  Yeah, that won't work with DSA time
stamping.  But who cares?  Most of the real world doesn't have gigabit
DSA switches in front of MACs that provide 10 gigabit links or higher.

> Of course, at least that breakage is going to be much more binary and
> obvious: PTP simply won't work at all for drivers stacked on top of
> them until they are fixed.

Right, you can fix individual MAC drivers to work with DSA, one by
one.  You are free to try to get the maintainers to ack your fixes.
(But, here is a friendly hint: don't start out by declaring their
drivers "broken").
 
> Does the TI PHYTER driver count?

No.  It really doesn't count.  It won't work together with MAC time
stamping, but this is a known limitation.  That part is 100 mbit only,
and there are very few implementations.  Unfortunately the
so_timestamping API did not foresee the possibility of simultaneous
MAC and PHY time stamping.  Too bad, that's life.  I didn't invent the
API, and I don't have to defend it, either.

Thanks,
Richard