Subject: Re: extending feature word.

From: Ben Hutchings <[email-masked]>
Date: Tue, 05 Apr 2011 13:07:41 +0100

On Tue, 2011-04-05 at 13:30 +0200, Michał Mirosław wrote:
> On Sat, Apr 02, 2011 at 08:09:14PM -0700, Mahesh Bandewar wrote:
> > On Sat, Apr 2, 2011 at 5:42 AM, Michał Mirosław <[email-masked]> wrote:
> > > On Fri, Apr 01, 2011 at 07:07:05PM -0700, Mahesh Bandewar wrote:
> > > If you want to split the work, it would be clearer to first convert
> > > hw_features and wanted_features (with all the core code touching it -
> > > this is the easy part), then vlan_features (this includes drivers'
> > > and VLAN code) and then features (it's all over).
> > I like the idea of splitting but it will be only useful when all of it
> > is done and not partially, isn't it? Or am I missing something?
> 
> Since this is a big change, when split it might be easier to follow.
> OTOH, with your idea of macro it might be easier to do incremental
> changes (I think this will be a lot of work for no gain in this case).

I strongly disagree with using macros for this.  They are very likely to
conflict with other identifiers..

We might be able to get away with something like:

	union {
		u32 features;
		u32 feature[N];
	};
	union {
		u32 vlan_features;
		u32 vlan_feature[N];
	};
	union {
		u32 hw_features;
		u32 hw_feature[N];
	};

(assuming hw_features is new enough that there is no need for the
alias).

Anyway, if we're going to put all the feature words in net_device
there's no longer any reason for NETIF_F_LOOPBACK not to be in the first
word.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.