From: Alexander Duyck <alexander.h.duyck@intel.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
davem@davemloft.net, netdev@vger.kernel.org, gospo@redhat.com,
sassmann@redhat.com
Subject: Re: [net-next 9/9] ixgbe: Cleanup holes in flags after removing several of them
Date: Thu, 19 Jul 2012 09:11:27 -0700 [thread overview]
Message-ID: <500831AF.6020402@intel.com> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B6F98@saturn3.aculab.com>
On 07/19/2012 01:33 AM, David Laight wrote:
>> This change is just meant to defragment the flags as there are several
> hole
>> that have been introduced since several features, or the flags for
> them,
>> have been removed.
> Doesn't this sort of change just make it difficult for people who are
> looking at hexdumps of memory but don't have exactly the right header
> file to hand?
These are private flags held inside of the driver and never exposed
externally to user space. If we have to go through a hexdump to try and
figure out the state of the driver I would certainly hope we have the
header file in hand. Knowing what bits we use is kind of pointless if
we don't know where the flags are being stored within the adapter
structure itself.
> It doesn't really gain anything much either.
I never did say it gains us much. It is mostly just housekeeping in
order to make it clear where the available bits are in the flags fields.
> I can (just) imagine reordering flags so that the commonly
> tested ones are in the low bits so that they can be tested
> with small immediate constants - saving an instruction.
> But that isn't what is being done here.
>
> David
On x86 it seems like gcc is converting all of the flag tests to "testb"
assembly ops and just using an offset within the flags field to access
bits 8 through 31. It doesn't seem like there would be much of an
advantage to reordering the flags unless we need to optimize for the
cases where we are testing multiple flags. Even in that case we would
probably just want to align things so that when we access multiple flags
they are in the same 8 bit field.
Thanks,
Alex
next prev parent reply other threads:[~2012-07-19 16:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 20:31 [net-next 0/9][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2012-07-18 20:31 ` [net-next 1/9] ixgbevf: fix VF untagging when 802.1 prio is set Jeff Kirsher
2012-07-18 20:31 ` [net-next 2/9] ixgbevf: Do not rewind the Rx ring before bumping tail Jeff Kirsher
2012-07-18 20:31 ` [net-next 3/9] ixgbevf: Add netdev to ring structure Jeff Kirsher
2012-07-18 20:31 ` [net-next 4/9] ixgbevf: Consolidate Tx context descriptor creation code Jeff Kirsher
2012-07-18 20:31 ` [net-next 5/9] ixgbevf: Fix multiple issues in ixgbevf_get/set_ringparam Jeff Kirsher
2012-07-18 20:31 ` [net-next 6/9] ixgbe: Update configure virtualization to allow for multiple PF pools Jeff Kirsher
2012-07-18 20:31 ` [net-next 7/9] ixgbe: Add support for SR-IOV w/ DCB or RSS Jeff Kirsher
2012-07-18 20:31 ` [net-next 8/9] ixgbe: Retire RSS enabled and capable flags Jeff Kirsher
2012-07-18 20:31 ` [net-next 9/9] ixgbe: Cleanup holes in flags after removing several of them Jeff Kirsher
2012-07-19 8:33 ` David Laight
2012-07-19 16:11 ` Alexander Duyck [this message]
2012-07-19 15:26 ` [net-next 0/9][pull request] Intel Wired LAN Driver Updates David Miller
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=500831AF.6020402@intel.com \
--to=alexander.h.duyck@intel.com \
--cc=David.Laight@ACULAB.COM \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.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).