@@ -24,6 +24,14 @@ netdev_tx_t dsa_xmit(struct sk_buff *skb, struct net_device *dev)
dev->stats.tx_packets++;
dev->stats.tx_bytes += skb->len;
+ /* We should call skb_tx_timestamp() at bottom of this function,
+ * just before dev_queue_xmit(), but the skb is going to be
+ * modified by DSA stack so it is going to be NOT recognized
+ * by the ptp_filter called into function skb_clone_tx_timestamp()
+ * [see file linux/net/core/timestamping.c].
+ */
+ skb_tx_timestamp(skb);
+
/*
* Convert the outermost 802.1q tag to a DSA tag for tagged
* packets, or insert a DSA tag between the addresses and
@@ -25,6 +25,14 @@ netdev_tx_t edsa_xmit(struct sk_buff *skb, struct net_device *dev)
dev->stats.tx_packets++;
dev->stats.tx_bytes += skb->len;
+ /* We should call skb_tx_timestamp() at bottom of this function,
+ * just before dev_queue_xmit(), but the skb is going to be
+ * modified by DSA stack so it is going to be NOT recognized
+ * by the ptp_filter called into function skb_clone_tx_timestamp()
+ * [see file linux/net/core/timestamping.c].
+ */
+ skb_tx_timestamp(skb);
+
/*
* Convert the outermost 802.1q tag to a DSA tag and prepend
* a DSA ethertype field is the packet is tagged, or insert
@@ -24,6 +24,14 @@ netdev_tx_t trailer_xmit(struct sk_buff *skb, struct net_device *dev)
dev->stats.tx_packets++;
dev->stats.tx_bytes += skb->len;
+ /* We should call skb_tx_timestamp() at bottom of this function,
+ * just before dev_queue_xmit(), but the skb is going to be
+ * modified by DSA stack so it is going to be NOT recognized
+ * by the ptp_filter called into function skb_clone_tx_timestamp()
+ * [see file linux/net/core/timestamping.c].
+ */
+ skb_tx_timestamp(skb);
+
/*
* We have to make sure that the trailer ends up as the very
* last 4 bytes of the packet. This means that we have to pad
Signed-off-by: Rodolfo Giometti <giometti@linux.it> --- net/dsa/tag_dsa.c | 8 ++++++++ net/dsa/tag_edsa.c | 8 ++++++++ net/dsa/tag_trailer.c | 8 ++++++++ 3 files changed, 24 insertions(+)