All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4 net-next] another transmit timestamping driver set
@ 2012-04-27 19:04 Willem de Bruijn
  2012-04-27 19:04 ` [PATCH 1/4] e1000: add transmit timestamping support Willem de Bruijn
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Willem de Bruijn @ 2012-04-27 19:04 UTC (permalink / raw)
  To: davem, netdev, jeffrey.t.kirscher, eilong, aabdulla

This series adds skb_tx_timestamp calls into the ndo_start_xmit
implementations of a few more drivers. All calls are added before
increasing the txqueue write offset, to avoid the race conditions
with the completion handler experienced earlier.

All changes have been tested with the txtimestamp test at
http://kernel.googlecode.com/files/txtimestamp.c before and after
applying the change (to a slightly different kernel, though) to
verify that it actually adds the missing functionality and
introduces no obvious bugs.

Apologies if I missed any driver maintainers.

Signed-off-by Willem de Bruijn <willemb@google.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/4] e1000: add transmit timestamping support
  2012-04-27 19:04 [PATCH 0/4 net-next] another transmit timestamping driver set Willem de Bruijn
@ 2012-04-27 19:04 ` Willem de Bruijn
  2012-04-28  7:47   ` Eric Dumazet
  2012-04-27 19:04 ` [PATCH 2/4] e1000e: " Willem de Bruijn
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 14+ messages in thread
From: Willem de Bruijn @ 2012-04-27 19:04 UTC (permalink / raw)
  To: davem, netdev, jeffrey.t.kirscher, eilong, aabdulla; +Cc: Willem de Bruijn

Signed-off-by: Willem de Bruijn <willemb@google.com>
---
 drivers/net/ethernet/intel/e1000/e1000_main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 3d712f2..40438ea 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -3261,6 +3261,8 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
 	                     nr_frags, mss);
 
 	if (count) {
+		skb_tx_timestamp(skb);
+
 		e1000_tx_queue(adapter, tx_ring, tx_flags, count);
 		/* Make sure there is space in the ring for the next send. */
 		e1000_maybe_stop_tx(netdev, tx_ring, MAX_SKB_FRAGS + 2);
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/4] e1000e: add transmit timestamping support
  2012-04-27 19:04 [PATCH 0/4 net-next] another transmit timestamping driver set Willem de Bruijn
  2012-04-27 19:04 ` [PATCH 1/4] e1000: add transmit timestamping support Willem de Bruijn
@ 2012-04-27 19:04 ` Willem de Bruijn
  2012-04-28  7:47   ` Eric Dumazet
  2012-04-27 19:04 ` [PATCH 3/4] bnx2x: " Willem de Bruijn
  2012-04-27 19:04 ` [PATCH 4/4] forcedeth: " Willem de Bruijn
  3 siblings, 1 reply; 14+ messages in thread
From: Willem de Bruijn @ 2012-04-27 19:04 UTC (permalink / raw)
  To: davem, netdev, jeffrey.t.kirscher, eilong, aabdulla; +Cc: Willem de Bruijn

Signed-off-by: Willem de Bruijn <willemb@google.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 851f793..c5d9ad7 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -5150,6 +5150,8 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
 	/* if count is 0 then mapping error has occurred */
 	count = e1000_tx_map(tx_ring, skb, first, max_per_txd, nr_frags, mss);
 	if (count) {
+		skb_tx_timestamp(skb);
+
 		netdev_sent_queue(netdev, skb->len);
 		e1000_tx_queue(tx_ring, tx_flags, count);
 		/* Make sure there is space in the ring for the next send. */
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/4] bnx2x: add transmit timestamping support
  2012-04-27 19:04 [PATCH 0/4 net-next] another transmit timestamping driver set Willem de Bruijn
  2012-04-27 19:04 ` [PATCH 1/4] e1000: add transmit timestamping support Willem de Bruijn
  2012-04-27 19:04 ` [PATCH 2/4] e1000e: " Willem de Bruijn
@ 2012-04-27 19:04 ` Willem de Bruijn
  2012-04-27 19:30   ` Eilon Greenstein
  2012-04-28  7:48   ` Eric Dumazet
  2012-04-27 19:04 ` [PATCH 4/4] forcedeth: " Willem de Bruijn
  3 siblings, 2 replies; 14+ messages in thread
From: Willem de Bruijn @ 2012-04-27 19:04 UTC (permalink / raw)
  To: davem, netdev, jeffrey.t.kirscher, eilong, aabdulla; +Cc: Willem de Bruijn

Signed-off-by: Willem de Bruijn <willemb@google.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 60d5b54..afa6cbb 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -2953,6 +2953,8 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	netdev_tx_sent_queue(txq, skb->len);
 
+	skb_tx_timestamp(skb);
+
 	txdata->tx_pkt_prod++;
 	/*
 	 * Make sure that the BD data is updated before updating the producer
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/4] forcedeth: add transmit timestamping support
  2012-04-27 19:04 [PATCH 0/4 net-next] another transmit timestamping driver set Willem de Bruijn
                   ` (2 preceding siblings ...)
  2012-04-27 19:04 ` [PATCH 3/4] bnx2x: " Willem de Bruijn
@ 2012-04-27 19:04 ` Willem de Bruijn
  2012-04-28  7:49   ` Eric Dumazet
  3 siblings, 1 reply; 14+ messages in thread
From: Willem de Bruijn @ 2012-04-27 19:04 UTC (permalink / raw)
  To: davem, netdev, jeffrey.t.kirscher, eilong, aabdulla; +Cc: Willem de Bruijn

Insert an skb_tx_timestamp call in both ndo_start_xmit routines
Tested to work for the nv_start_xmit_optimized case

Signed-off-by: Willem de Bruijn <willemb@google.com>
---
 drivers/net/ethernet/nvidia/forcedeth.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index d93a088..928913c 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -2279,6 +2279,8 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	netdev_sent_queue(np->dev, skb->len);
 
+	skb_tx_timestamp(skb);
+
 	np->put_tx.orig = put_tx;
 
 	spin_unlock_irqrestore(&np->lock, flags);
@@ -2426,6 +2428,8 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb,
 
 	netdev_sent_queue(np->dev, skb->len);
 
+	skb_tx_timestamp(skb);
+
 	np->put_tx.ex = put_tx;
 
 	spin_unlock_irqrestore(&np->lock, flags);
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] bnx2x: add transmit timestamping support
  2012-04-27 19:04 ` [PATCH 3/4] bnx2x: " Willem de Bruijn
@ 2012-04-27 19:30   ` Eilon Greenstein
  2012-04-28  7:48   ` Eric Dumazet
  1 sibling, 0 replies; 14+ messages in thread
From: Eilon Greenstein @ 2012-04-27 19:30 UTC (permalink / raw)
  To: Willem de Bruijn; +Cc: davem, netdev, jeffrey.t.kirscher, aabdulla, meravs

On Fri, 2012-04-27 at 15:04 -0400, Willem de Bruijn wrote:
> Signed-off-by: Willem de Bruijn <willemb@google.com>

Acked-by: Eilon Greenstein <eilong@broadcom.com>

Thanks Willem - Merav was just testing exactly the same change, so far
it seems to be working on our side as well :)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/4] e1000: add transmit timestamping support
  2012-04-27 19:04 ` [PATCH 1/4] e1000: add transmit timestamping support Willem de Bruijn
@ 2012-04-28  7:47   ` Eric Dumazet
  2012-05-01  1:46     ` David Miller
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Dumazet @ 2012-04-28  7:47 UTC (permalink / raw)
  To: Willem de Bruijn; +Cc: davem, netdev, jeffrey.t.kirscher, eilong, aabdulla

On Fri, 2012-04-27 at 15:04 -0400, Willem de Bruijn wrote:
> Signed-off-by: Willem de Bruijn <willemb@google.com>
> ---
>  drivers/net/ethernet/intel/e1000/e1000_main.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
> index 3d712f2..40438ea 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
> @@ -3261,6 +3261,8 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
>  	                     nr_frags, mss);
>  
>  	if (count) {
> +		skb_tx_timestamp(skb);
> +
>  		e1000_tx_queue(adapter, tx_ring, tx_flags, count);
>  		/* Make sure there is space in the ring for the next send. */
>  		e1000_maybe_stop_tx(netdev, tx_ring, MAX_SKB_FRAGS + 2);

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/4] e1000e: add transmit timestamping support
  2012-04-27 19:04 ` [PATCH 2/4] e1000e: " Willem de Bruijn
@ 2012-04-28  7:47   ` Eric Dumazet
  2012-05-01  1:46     ` David Miller
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Dumazet @ 2012-04-28  7:47 UTC (permalink / raw)
  To: Willem de Bruijn; +Cc: davem, netdev, jeffrey.t.kirscher, eilong, aabdulla

On Fri, 2012-04-27 at 15:04 -0400, Willem de Bruijn wrote:
> Signed-off-by: Willem de Bruijn <willemb@google.com>
> ---
>  drivers/net/ethernet/intel/e1000e/netdev.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> index 851f793..c5d9ad7 100644
> --- a/drivers/net/ethernet/intel/e1000e/netdev.c
> +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
> @@ -5150,6 +5150,8 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
>  	/* if count is 0 then mapping error has occurred */
>  	count = e1000_tx_map(tx_ring, skb, first, max_per_txd, nr_frags, mss);
>  	if (count) {
> +		skb_tx_timestamp(skb);
> +
>  		netdev_sent_queue(netdev, skb->len);
>  		e1000_tx_queue(tx_ring, tx_flags, count);
>  		/* Make sure there is space in the ring for the next send. */

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] bnx2x: add transmit timestamping support
  2012-04-27 19:04 ` [PATCH 3/4] bnx2x: " Willem de Bruijn
  2012-04-27 19:30   ` Eilon Greenstein
@ 2012-04-28  7:48   ` Eric Dumazet
  2012-05-01  1:46     ` David Miller
  1 sibling, 1 reply; 14+ messages in thread
From: Eric Dumazet @ 2012-04-28  7:48 UTC (permalink / raw)
  To: Willem de Bruijn; +Cc: davem, netdev, jeffrey.t.kirscher, eilong, aabdulla

On Fri, 2012-04-27 at 15:04 -0400, Willem de Bruijn wrote:
> Signed-off-by: Willem de Bruijn <willemb@google.com>
> ---
>  drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> index 60d5b54..afa6cbb 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> @@ -2953,6 +2953,8 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
>  
>  	netdev_tx_sent_queue(txq, skb->len);
>  
> +	skb_tx_timestamp(skb);
> +
>  	txdata->tx_pkt_prod++;
>  	/*
>  	 * Make sure that the BD data is updated before updating the producer

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] forcedeth: add transmit timestamping support
  2012-04-27 19:04 ` [PATCH 4/4] forcedeth: " Willem de Bruijn
@ 2012-04-28  7:49   ` Eric Dumazet
  2012-05-01  1:47     ` David Miller
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Dumazet @ 2012-04-28  7:49 UTC (permalink / raw)
  To: Willem de Bruijn; +Cc: davem, netdev, jeffrey.t.kirscher, eilong, aabdulla

On Fri, 2012-04-27 at 15:04 -0400, Willem de Bruijn wrote:
> Insert an skb_tx_timestamp call in both ndo_start_xmit routines
> Tested to work for the nv_start_xmit_optimized case
> 
> Signed-off-by: Willem de Bruijn <willemb@google.com>
> ---
>  drivers/net/ethernet/nvidia/forcedeth.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
> index d93a088..928913c 100644
> --- a/drivers/net/ethernet/nvidia/forcedeth.c
> +++ b/drivers/net/ethernet/nvidia/forcedeth.c
> @@ -2279,6 +2279,8 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
>  
>  	netdev_sent_queue(np->dev, skb->len);
>  
> +	skb_tx_timestamp(skb);
> +
>  	np->put_tx.orig = put_tx;
>  
>  	spin_unlock_irqrestore(&np->lock, flags);
> @@ -2426,6 +2428,8 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb,
>  
>  	netdev_sent_queue(np->dev, skb->len);
>  
> +	skb_tx_timestamp(skb);
> +
>  	np->put_tx.ex = put_tx;
>  
>  	spin_unlock_irqrestore(&np->lock, flags);

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/4] e1000: add transmit timestamping support
  2012-04-28  7:47   ` Eric Dumazet
@ 2012-05-01  1:46     ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2012-05-01  1:46 UTC (permalink / raw)
  To: eric.dumazet; +Cc: willemb, netdev, jeffrey.t.kirscher, eilong, aabdulla

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 28 Apr 2012 09:47:42 +0200

> On Fri, 2012-04-27 at 15:04 -0400, Willem de Bruijn wrote:
>> Signed-off-by: Willem de Bruijn <willemb@google.com>
...
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/4] e1000e: add transmit timestamping support
  2012-04-28  7:47   ` Eric Dumazet
@ 2012-05-01  1:46     ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2012-05-01  1:46 UTC (permalink / raw)
  To: eric.dumazet; +Cc: willemb, netdev, jeffrey.t.kirscher, eilong, aabdulla

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 28 Apr 2012 09:47:53 +0200

> On Fri, 2012-04-27 at 15:04 -0400, Willem de Bruijn wrote:
>> Signed-off-by: Willem de Bruijn <willemb@google.com>
 ...
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/4] bnx2x: add transmit timestamping support
  2012-04-28  7:48   ` Eric Dumazet
@ 2012-05-01  1:46     ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2012-05-01  1:46 UTC (permalink / raw)
  To: eric.dumazet; +Cc: willemb, netdev, jeffrey.t.kirscher, eilong, aabdulla

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 28 Apr 2012 09:48:39 +0200

> On Fri, 2012-04-27 at 15:04 -0400, Willem de Bruijn wrote:
>> Signed-off-by: Willem de Bruijn <willemb@google.com>
 ...
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/4] forcedeth: add transmit timestamping support
  2012-04-28  7:49   ` Eric Dumazet
@ 2012-05-01  1:47     ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2012-05-01  1:47 UTC (permalink / raw)
  To: eric.dumazet; +Cc: willemb, netdev, jeffrey.t.kirscher, eilong, aabdulla

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 28 Apr 2012 09:49:45 +0200

> On Fri, 2012-04-27 at 15:04 -0400, Willem de Bruijn wrote:
>> Insert an skb_tx_timestamp call in both ndo_start_xmit routines
>> Tested to work for the nv_start_xmit_optimized case
>> 
>> Signed-off-by: Willem de Bruijn <willemb@google.com>
 ...
> Acked-by: Eric Dumazet <edumazet@google.com>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-05-01  1:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-27 19:04 [PATCH 0/4 net-next] another transmit timestamping driver set Willem de Bruijn
2012-04-27 19:04 ` [PATCH 1/4] e1000: add transmit timestamping support Willem de Bruijn
2012-04-28  7:47   ` Eric Dumazet
2012-05-01  1:46     ` David Miller
2012-04-27 19:04 ` [PATCH 2/4] e1000e: " Willem de Bruijn
2012-04-28  7:47   ` Eric Dumazet
2012-05-01  1:46     ` David Miller
2012-04-27 19:04 ` [PATCH 3/4] bnx2x: " Willem de Bruijn
2012-04-27 19:30   ` Eilon Greenstein
2012-04-28  7:48   ` Eric Dumazet
2012-05-01  1:46     ` David Miller
2012-04-27 19:04 ` [PATCH 4/4] forcedeth: " Willem de Bruijn
2012-04-28  7:49   ` Eric Dumazet
2012-05-01  1:47     ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.