another transmit timestamping driver set
Subsystems (5)
cover another transmit timestamping driver set
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 <[email protected]>
PATCH 1/4 e1000: add transmit timestamping support
--- drivers/net/ethernet/intel/e1000/e1000_main.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/ethernet/intel/e1000/e1000_main.c +2 -0
@@ -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 );
Signature · 1 line
1.7.7.3
PATCH 3/4 bnx2x: add transmit timestamping support
In reply to Willem de Bruijn--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +2 -0
@@ -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
Signature · 1 line
1.7.7.3
PATCH 2/4 e1000e: add transmit timestamping support
In reply to Willem de Bruijn--- drivers/net/ethernet/intel/e1000e/netdev.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/ethernet/intel/e1000e/netdev.c +2 -0
@@ -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. */
Signature · 1 line
1.7.7.3
PATCH 4/4 forcedeth: add transmit timestamping support
In reply to Willem de BruijnInsert an skb_tx_timestamp call in both ndo_start_xmit routines Tested to work for the nv_start_xmit_optimized case
--- drivers/net/ethernet/nvidia/forcedeth.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/net/ethernet/nvidia/forcedeth.c +4 -0
@@ -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);
Signature · 1 line
1.7.7.3
Re: [PATCH 3/4] bnx2x: add transmit timestamping support
In reply to Willem de BruijnQuoted 1 line · Willem de Bruijn
Signed-off-by Willem de Bruijn <[email protected]>
Thanks Willem - Merav was just testing exactly the same change, so far it seems to be working on our side as well :)
Re: [PATCH 1/4] e1000: add transmit timestamping support
In reply to Willem de BruijnQuoted 10 lines · Willem de Bruijn
Signed-off-by Willem de Bruijn <[email protected]>--- drivers/net/ethernet/intel/e1000/e1000_main.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/net/ethernet/intel/e1000/e1000_main.c +0
-0
drivers/net/ethernet/intel/e1000/e1000_main.c static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, · line 3268
Quoted 8 lines
drivers/net/ethernet/intel/e1000/e1000_main.c +2
-0@@ -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 );
Re: [PATCH 2/4] e1000e: add transmit timestamping support
In reply to Willem de BruijnQuoted 10 lines · Willem de Bruijn
Signed-off-by Willem de Bruijn <[email protected]>--- drivers/net/ethernet/intel/e1000e/netdev.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/net/ethernet/intel/e1000e/netdev.c +0
-0
drivers/net/ethernet/intel/e1000e/netdev.c static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, · line 5157
Quoted 8 lines
drivers/net/ethernet/intel/e1000e/netdev.c +2
-0@@ -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. */
Re: [PATCH 3/4] bnx2x: add transmit timestamping support
In reply to Willem de BruijnQuoted 10 lines · Willem de Bruijn
Signed-off-by Willem de Bruijn <[email protected]>--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +0
-0
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev) · line 2960
Quoted 8 lines
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +2
-0@@ -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
Re: [PATCH 4/4] forcedeth: add transmit timestamping support
In reply to Willem de BruijnQuoted 22 lines · Willem de Bruijn
Insert an
skb_tx_timestampcall in bothndo_start_xmitroutines Tested to work for thenv_start_xmit_optimizedcaseSigned-off-by Willem de Bruijn <[email protected]>--- drivers/net/ethernet/nvidia/forcedeth.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)drivers/net/ethernet/nvidia/forcedeth.c +2
-0@@ -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);
drivers/net/ethernet/nvidia/forcedeth.c static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb, · line 2435
Quoted 8 lines
drivers/net/ethernet/nvidia/forcedeth.c +2
-0@@ -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);
Re: [PATCH 1/4] e1000: add transmit timestamping support
In reply to Eric DumazetFrom: Eric Dumazet <[email protected]>
Date: Sat, 28 Apr 2012 09:47:42 +0200
Quoted 2 lines · Willem de Bruijn
Quoted 1 line
Signed-off-by Willem de Bruijn <[email protected]>
...
Quoted 1 line
Acked-by Eric Dumazet <[email protected]>
Applied.
Re: [PATCH 2/4] e1000e: add transmit timestamping support
In reply to Eric DumazetFrom: Eric Dumazet <[email protected]>
Date: Sat, 28 Apr 2012 09:47:53 +0200
Quoted 2 lines · Willem de Bruijn
Quoted 1 line
Signed-off-by Willem de Bruijn <[email protected]>
...
Quoted 1 line
Acked-by Eric Dumazet <[email protected]>
Applied.
Re: [PATCH 3/4] bnx2x: add transmit timestamping support
In reply to Eric DumazetFrom: Eric Dumazet <[email protected]>
Date: Sat, 28 Apr 2012 09:48:39 +0200
Quoted 2 lines · Willem de Bruijn
Quoted 1 line
Signed-off-by Willem de Bruijn <[email protected]>
...
Quoted 1 line
Acked-by Eric Dumazet <[email protected]>
Applied.
Re: [PATCH 4/4] forcedeth: add transmit timestamping support
In reply to Eric DumazetFrom: Eric Dumazet <[email protected]>
Date: Sat, 28 Apr 2012 09:49:45 +0200
Quoted 5 lines · Willem de Bruijn
Quoted 4 lines
Insert an
skb_tx_timestampcall in bothndo_start_xmitroutines Tested to work for thenv_start_xmit_optimizedcaseSigned-off-by Willem de Bruijn <[email protected]>
...
Quoted 1 line
Acked-by Eric Dumazet <[email protected]>
Applied.