]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: sja1105: Add logic for TX timestamping
authorVladimir Oltean <olteanv@gmail.com>
Sat, 8 Jun 2019 12:04:35 +0000 (15:04 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 8 Jun 2019 22:20:40 +0000 (15:20 -0700)
commita3fb8ef5e5bad6ed0ff833dbec3c8065bbe4d7fa
treec70af72c3b2ca53b3f97d1f124d159b5c79ae8a1
parenta5f151145c938f461d33bd1db3e6385f4a7088ae
net: dsa: sja1105: Add logic for TX timestamping

On TX, timestamping is performed synchronously from the
port_deferred_xmit worker thread.
In management routes, the switch is requested to take egress timestamps
(again partial), which are reconstructed and appended to a clone of the
skb that was just sent.  The cloning is done by DSA and we retrieve the
pointer from the structure that DSA keeps in skb->cb.
Then these clones are enqueued to the socket's error queue for
application-level processing.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105.h
drivers/net/dsa/sja1105/sja1105_main.c
drivers/net/dsa/sja1105/sja1105_ptp.c
drivers/net/dsa/sja1105/sja1105_ptp.h
drivers/net/dsa/sja1105/sja1105_spi.c
include/linux/dsa/sja1105.h