netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* extending feature word.
@ 2011-04-02  2:07 Mahesh Bandewar
  2011-04-02 12:42 ` Michał Mirosław
  2011-04-08 10:05 ` Michał Mirosław
  0 siblings, 2 replies; 14+ messages in thread
From: Mahesh Bandewar @ 2011-04-02  2:07 UTC (permalink / raw)
  To: linux-netdev, Ben Hutchings, Michał Mirosław,
	David Miller

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..

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

end of thread, other threads:[~2011-04-11 19:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-02  2:07 extending feature word Mahesh Bandewar
2011-04-02 12:42 ` 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

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).