From: David Miller <davem@davemloft.net>
To: paul.gortmaker@windriver.com
Cc: netdev@vger.kernel.org, claudiu.manoil@freescale.com,
eric.dumazet@gmail.com
Subject: Re: [PATCH net-next 0/2] gianfar: make local stats atomic64
Date: Wed, 13 Feb 2013 13:18:54 -0500 (EST) [thread overview]
Message-ID: <20130213.131854.1897343233438268526.davem@davemloft.net> (raw)
In-Reply-To: <1360715064-2689-1-git-send-email-paul.gortmaker@windriver.com>
From: Paul Gortmaker <paul.gortmaker@windriver.com>
Date: Tue, 12 Feb 2013 19:24:22 -0500
> Eric noticed that the handling of local u64 ethtool counters for
> this driver commonly found on Freescale ppc-32 boards was racy.
>
> However, before converting them over to atomic64_t, I noticed
> that an internal struct was being used to determine the offsets
> for exporting this data into the ethtool buffer, and in doing
> so, it assumed that the counters would always be u64. Rather
> than keep this implicit assumption, a simple code cleanup gets
> rid of the struct completely, and leaves less conversion sites.
>
> The alternative solution would have been to take advantage of
> the fact that the counters are all relating to error conditions,
> and hence make them internally u32. In doing so, we'd be assuming
> that U32_MAX of any particular error condition is highly unlikely.
> This might have made sense if any increments were in a hot path.
>
> Tested with "ethtool -S eth0" on sbc8548 board.
...
> git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux.git gfar-ethtool-atomic
Pulled, thanks Paul.
prev parent reply other threads:[~2013-02-13 18:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-13 0:24 [PATCH net-next 0/2] gianfar: make local stats atomic64 Paul Gortmaker
2013-02-13 0:24 ` [PATCH net-next 1/2] gianfar: remove largely unused gfar_stats struct Paul Gortmaker
2013-02-13 13:13 ` Claudiu Manoil
2013-02-13 0:24 ` [PATCH net-next 2/2] gianfar: convert u64 status counters to atomic64_t Paul Gortmaker
2013-02-13 15:22 ` Claudiu Manoil
2013-02-13 16:14 ` Eric Dumazet
2013-02-13 17:47 ` Claudiu Manoil
2013-02-13 18:03 ` Eric Dumazet
2013-02-13 18:18 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130213.131854.1897343233438268526.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=claudiu.manoil@freescale.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).