Thread (1 message) 1 message, 1 author, 2010-06-16

Re: [PATCH 04/12] phylib: add a way to make PHY time stamps possible.

From: Richard Cochran <richardcochran@gmail.com>
Date: 2010-06-16 06:29:40
Also in: linux-arm-kernel, linux-devicetree, netdev

On Tue, Jun 15, 2010 at 06:08:20PM +0200, Richard Cochran wrote:
+static inline void skb_tx_timetamp(struct phy_device *phy, struct sk_buff *skb)
+{
+	union skb_shared_tx *shtx = skb_tx(skb);
+
+	if (shtx->hardware && phy && phy->drv->txtstamp)
+		phy->drv->txtstamp(phy, skb);
+
+	if (shtx->software && !shtx->in_progress)
+		skb_tstamp_tx(skb, NULL);
+}
I forgot to mention this patch also provides a way to fix the broken
software timestamp fallback mode of the SO_TIMESTAMPING API.

We would have to add this inline call to every MAC driver in an
appropriate spot within the hard_xmit function. It is not too pretty,
but providing this as a compile time option will promote
standardization of the SO_TIMESTAMPING API for applications.

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