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>
This commit is contained in:
Vladimir Oltean 2019-06-08 15:04:35 +03:00 committed by David S. Miller
parent bb77f36ac2
commit 47ed985e97
6 changed files with 201 additions and 2 deletions

View file

@ -22,6 +22,7 @@
struct sja1105_port {
struct dsa_port *dp;
bool hwts_tx_en;
int mgmt_slot;
};