Patchwork [10/11] mv643xx_eth: enable transmit time stamping.

login
register
mail settings
Submitter Richard Cochran
Date June 19, 2011, 11:20 a.m.
Message ID <1b5632e5cd90ed390245f3d1264e42fdd760dd7e.1308481492.git.richard.cochran@omicron.at>
Download mbox | patch
Permalink /patch/100957/
State Superseded
Delegated to: David Miller
Headers show

Comments

Richard Cochran - June 19, 2011, 11:20 a.m.
This patch enables software (and phy device) transmit time stamping.
Compile tested only.

Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
---
 drivers/net/mv643xx_eth.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Richard Cochran - June 19, 2011, 6:17 p.m.
On Sun, Jun 19, 2011 at 01:20:06PM +0200, Richard Cochran wrote:
> This patch enables software (and phy device) transmit time stamping.
> Compile tested only.
> 
> Cc: Lennert Buytenhek <buytenh@wantstofly.org>
> Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
> ---
>  drivers/net/mv643xx_eth.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
> index a5d9b1c..c7a8f10 100644
> --- a/drivers/net/mv643xx_eth.c
> +++ b/drivers/net/mv643xx_eth.c
> @@ -884,6 +884,8 @@ static netdev_tx_t mv643xx_eth_xmit(struct sk_buff *skb, struct net_device *dev)
>  	if (!txq_submit_skb(txq, skb)) {
>  		int entries_left;
>  
> +		skb_tx_timestamp(skb);
> +
>  		txq->tx_bytes += skb->len;

And the line above is unsafe, as well.

>  		txq->tx_packets++;
>  
> -- 
> 1.7.0.4
> 
--
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
Eric Dumazet - June 19, 2011, 6:33 p.m.
Le dimanche 19 juin 2011 à 20:17 +0200, Richard Cochran a écrit :
> On Sun, Jun 19, 2011 at 01:20:06PM +0200, Richard Cochran wrote:
> > This patch enables software (and phy device) transmit time stamping.
> > Compile tested only.
> > 
> > Cc: Lennert Buytenhek <buytenh@wantstofly.org>
> > Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
> > ---
> >  drivers/net/mv643xx_eth.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
> > index a5d9b1c..c7a8f10 100644
> > --- a/drivers/net/mv643xx_eth.c
> > +++ b/drivers/net/mv643xx_eth.c
> > @@ -884,6 +884,8 @@ static netdev_tx_t mv643xx_eth_xmit(struct sk_buff *skb, struct net_device *dev)
> >  	if (!txq_submit_skb(txq, skb)) {
> >  		int entries_left;
> >  
> > +		skb_tx_timestamp(skb);
> > +
> >  		txq->tx_bytes += skb->len;
> 
> And the line above is unsafe, as well.
> 

Yes, for sure, please submit patches to fix this (before adding time
stamping patches), as this should go to stable.



--
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
David Miller - June 19, 2011, 7:05 p.m.
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 19 Jun 2011 20:33:18 +0200

> Yes, for sure, please submit patches to fix this (before adding time
> stamping patches), as this should go to stable.

Agreed.
--
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/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index a5d9b1c..c7a8f10 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -884,6 +884,8 @@  static netdev_tx_t mv643xx_eth_xmit(struct sk_buff *skb, struct net_device *dev)
 	if (!txq_submit_skb(txq, skb)) {
 		int entries_left;
 
+		skb_tx_timestamp(skb);
+
 		txq->tx_bytes += skb->len;
 		txq->tx_packets++;