[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9929d2390911242338m6c4b322dod7a8af4c3c386d56@mail.gmail.com>
Date: Tue, 24 Nov 2009 23:38:23 -0800
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>,
"robert@...julf.net" <robert@...julf.net>,
Jesper Dangaard Brouer <hawk@...u.dk>,
Linux Netdev List <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net-next-2.6] ixgbe: Fix TX stats accounting
On Tue, Nov 24, 2009 at 05:23, Eric Dumazet <eric.dumazet@...il.com> wrote:
> Here is an updated version, because ixgbe_get_ethtool_stats()
> needs to call dev_get_stats() or "ethtool -S" wont give
> correct tx_bytes/tx_packets values.
>
> [PATCH net-next-2.6] ixgbe: Fix TX stats accounting
>
> Several cpus can update netdev->stats.tx_bytes & netdev->stats.tx_packets
> in parallel. In this case, TX stats are under estimated and false sharing
> takes place.
>
> After a pktgen session sending exactly 200000000 packets :
> # ifconfig fiber0 | grep TX
> TX packets:198501982 errors:0 dropped:0 overruns:0 carrier:0
>
>
> Multi queue devices should instead use txq->tx_bytes & txq->tx_packets
> in their xmit() method (appropriate txq lock already held by caller, no
> cache line miss), or use appropriate locking.
>
> After patch, same pktgen session gives :
>
> # ifconfig fiber0 | grep TX
> TX packets:200000000 errors:0 dropped:0 overruns:0 carrier:0
>
> Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
> ---
> drivers/net/ixgbe/ixgbe_ethtool.c | 1 +
> drivers/net/ixgbe/ixgbe_main.c | 20 ++++----------------
> 2 files changed, 5 insertions(+), 16 deletions(-)
>
Thanks Eric. I have added the patch to my tree for testing and review.
--
Cheers,
Jeff
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists