Subject: Re: [PATCH] Add ethtool to mii advertisment conversion helpers

From: Ben Hutchings <[email-masked]>
Date: Thu, 17 Nov 2011 02:29:27 +0000

On Wed, 2011-11-16 at 20:38 -0500, David Miller wrote:
> From: "Michael Chan" <[email-masked]>
> Date: Wed, 16 Nov 2011 17:21:32 -0800
> 
> > 
> > On Wed, 2011-11-16 at 17:16 -0800, Matt Carlson wrote:
> >> > Finally, do these need to be inline?
> >> 
> >> I don't have a strong preference here either.  Phy code tends to be
> >> slower, so there isn't really a strong performance argument.  The
> >> implementations don't seem to be so large to argue against it though.
> >> Would you prefer they not be inlined?
> >> 
> > 
> > Since we are defining these in .h file, they need to be inline, right?
> > Otherwise multiple source files including the same .h file will have
> > conflict.
> 
> Yes, if you keep them in the header you have to keep them inline.
> 
> Ben, by suggesting to not inline them, is implicitly saying to put
> them out in a seperate *.c file somewhere, perhaps net/core/ethtool.c
> or similar.  With appropriate EXPORT_SYMBOL() added.

I was thinking of putting them in drivers/net/mii.c, like the other
functions declared extern in include/linux/mii.h.  That would require
'select MII' in Kconfig for the drivers using them.

Ben.

-- 
Ben Hutchings, Staff 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.