All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][net-next] gianfar: Fix reported sent bytes to BQL for Tx timestamping
@ 2013-04-29 12:57 Claudiu Manoil
  2013-04-29 13:53 ` Eric Dumazet
  0 siblings, 1 reply; 14+ messages in thread
From: Claudiu Manoil @ 2013-04-29 12:57 UTC (permalink / raw)
  To: netdev; +Cc: Paul Gortmaker, David S. Miller

When Tx timestamping is enabled the number of sent bytes reported
to BQL via tx_completed_queue() falls short by GMAC_FCB_LEN +
GMAC_TXPAL_LEN than the number of bytes reported via tx_sent_queue()
on xmit. This leads to BQL stopping transmission errorneously followed
by tx timeout firing.

This fixes the amount of sent bytes reported to BQL on clean_tx_ring
to match the amount reported on xmit, when Tx timestamping enabled.

Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
---
 drivers/net/ethernet/freescale/gianfar.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 2375a01..0d26a8b 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -2539,6 +2539,7 @@ static void gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue)
 			skb_tstamp_tx(skb, &shhwtstamps);
 			bdp->lstatus &= BD_LFLAG(TXBD_WRAP);
 			bdp = next;
+			bytes_sent += GMAC_FCB_LEN + GMAC_TXPAL_LEN;
 		}
 
 		bdp->lstatus &= BD_LFLAG(TXBD_WRAP);
-- 
1.7.11.3

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

end of thread, other threads:[~2013-09-04  2:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-29 12:57 [PATCH][net-next] gianfar: Fix reported sent bytes to BQL for Tx timestamping Claudiu Manoil
2013-04-29 13:53 ` Eric Dumazet
2013-04-29 14:27   ` Claudiu Manoil
2013-04-29 15:23     ` Eric Dumazet
2013-04-29 15:28       ` Eric Dumazet
2013-04-29 15:39         ` Eric Dumazet
2013-04-29 15:42           ` Eric Dumazet
2013-04-29 15:52         ` Claudiu Manoil
2013-04-29 15:59           ` Eric Dumazet
2013-08-30 12:01             ` [PATCH][net-next] gianfar: Fix reported number of sent bytes to BQL Claudiu Manoil
2013-09-03 18:59               ` Florian Fainelli
2013-09-03 19:18                 ` Florian Fainelli
2013-09-04  2:14               ` David Miller
2013-04-29 15:33       ` [PATCH][net-next] gianfar: Fix reported sent bytes to BQL for Tx timestamping Eric Dumazet

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.