Patchwork net: fixup tx time stamping for uml vde driver.

login
register
mail settings
Submitter Paul Chavent
Date Dec. 5, 2012, 2:20 p.m.
Message ID <1354717253-8737-1-git-send-email-paul.chavent@onera.fr>
Download mbox | patch
Permalink /patch/203881/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

Paul Chavent - Dec. 5, 2012, 2:20 p.m.
Call skb_tx_timestamp after write completion.

Signed-off-by: Paul Chavent <paul.chavent@onera.fr>
---
 arch/um/drivers/vde_kern.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
Richard Cochran - Dec. 6, 2012, 6:55 a.m.
On Wed, Dec 05, 2012 at 03:20:53PM +0100, Paul Chavent wrote:
> Call skb_tx_timestamp after write completion.
> 
> Signed-off-by: Paul Chavent <paul.chavent@onera.fr>

The subject line would better describe the changes if it would read,
"enable tx time stamping in the uml vde driver."

Can you please also add support for ethtool get_ts_info?

Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/um/drivers/vde_kern.c b/arch/um/drivers/vde_kern.c
index 6a365fa..38fea2f 100644
--- a/arch/um/drivers/vde_kern.c
+++ b/arch/um/drivers/vde_kern.c
@@ -52,9 +52,13 @@  static int vde_write(int fd, struct sk_buff *skb, struct uml_net_private *lp)
 {
 	struct vde_data *pri = (struct vde_data *) &lp->user;
 
-	if (pri->conn != NULL)
-		return vde_user_write((void *)pri->conn, skb->data,
-				      skb->len);
+	if (pri->conn != NULL) {
+		int count;
+		count = vde_user_write((void *)pri->conn, skb->data,
+				       skb->len);
+		skb_tx_timestamp(skb);
+		return count;
+	}
 
 	printk(KERN_ERR "vde_write - we have no VDECONN to write to");
 	return -EBADF;