netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mahesh Bandewar <maheshb@google.com>
To: linux-netdev <netdev@vger.kernel.org>,
	"Ben Hutchings" <bhutchings@solarflare.com>,
	"Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
	"David Miller" <davem@davemloft.net>
Subject: extending feature word.
Date: Fri, 1 Apr 2011 19:07:05 -0700	[thread overview]
Message-ID: <BANLkTin52LqjxtVT+_y+gGam-QxeLq_iOA@mail.gmail.com> (raw)

Thanks for your comments on my loop-back patch. I was looking at the
code today from the perspective of extending various "features" for
word to an array of words and as Michael has pointed out, it's a huge
change. So I'm thinking on the following lines
(include/linux/netdevice.h)

+#define DEV_FEATURE_WORDS      2
+#define LEGACY_FEATURE_WORD    0
       /* currently active device features */
-       u32                     features;
+       u32                     features[DEV_FEATURE_WORDS];
       /* user-changeable features */
-       u32                     hw_features;
+       u32                     hw_features[DEV_FEATURE_WORDS];
       /* user-requested features */
-       u32                     wanted_features;
+       u32                     wanted_features[DEV_FEATURE_WORDS];
       /* VLAN feature mask */
-       u32                     vlan_features;
+       u32                     vlan_features[DEV_FEATURE_WORDS];
+#define legacy_features                features[LEGACY_FEATURE_WORD]
+#define legacy_hw_features     hw_features[LEGACY_FEATURE_WORD]
+#define legacy_wanted_features wanted_features[LEGACY_FEATURE_WORD]
+#define legacy_vlan_features    vlan_features[LEGACY_FEATURE_WORD]


So that it will be a matter of -

s/features/legacy_features/
s/hw_features/legacy_hw_features/
s/wanted_features/legacy_wanted_features/
s/vlan_features/legacy_vlan_features/

to start with as a first step. Once this is done, legacy_* can be
changed with respective arrays and modified as per the need. Comments?

--mahesh..

             reply	other threads:[~2011-04-02  2:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-02  2:07 Mahesh Bandewar [this message]
2011-04-02 12:42 ` extending feature word Michał Mirosław
2011-04-03  3:09   ` Mahesh Bandewar
2011-04-05 11:30     ` Michał Mirosław
2011-04-05 12:07       ` Ben Hutchings
2011-04-05 22:15         ` Mahesh Bandewar
2011-04-08 10:05 ` Michał Mirosław
2011-04-08 18:17   ` Mahesh Bandewar
2011-04-10 10:19     ` Michał Mirosław
2011-04-11 18:45       ` Mahesh Bandewar
2011-04-11 18:54         ` Stephen Hemminger
2011-04-11 19:16           ` Mahesh Bandewar
2011-04-11 19:19           ` Michał Mirosław
2011-04-11 19:49             ` Stephen Hemminger

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=BANLkTin52LqjxtVT+_y+gGam-QxeLq_iOA@mail.gmail.com \
    --to=maheshb@google.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=netdev@vger.kernel.org \
    /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).