* question about ethtool bits?
@ 2014-11-10 20:47 Jesse Brandeburg
2014-11-11 18:12 ` Ben Hutchings
0 siblings, 1 reply; 2+ messages in thread
From: Jesse Brandeburg @ 2014-11-10 20:47 UTC (permalink / raw)
To: netdev; +Cc: jesse.brandeburg, ben
Ben et al,
So, I was just looking at adding some more types/speeds to
ethtool.h and noticed we are about out of bits in ecmd->advertising
(and others), which are declared u32.
We currently have room for one more type (bit 31) and then all 32 bits
will be full.
Previous solutions have involved adding a new struct member to the end
of ecmd and friends and calling it u32 advertising2 or something.
Another option could be adding a u64, but there may be not fun results
of doing so.
...
#define SUPPORTED_56000baseSR4_Full (1 << 29)
#define SUPPORTED_56000baseLR4_Full (1 << 30)
...
#define ADVERTISED_56000baseSR4_Full (1 << 29)
#define ADVERTISED_56000baseLR4_Full (1 << 30)
in the case of speed there is already a speed_hi, so that gets us 32
bits of speed expressed in Mb/s
These fast networks create so many problems ;-)
There are two u32's reserved at the end of ethtool_cmd.
Suggestions?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: question about ethtool bits?
2014-11-10 20:47 question about ethtool bits? Jesse Brandeburg
@ 2014-11-11 18:12 ` Ben Hutchings
0 siblings, 0 replies; 2+ messages in thread
From: Ben Hutchings @ 2014-11-11 18:12 UTC (permalink / raw)
To: Jesse Brandeburg; +Cc: netdev
[-- Attachment #1: Type: text/plain, Size: 941 bytes --]
On Mon, 2014-11-10 at 12:47 -0800, Jesse Brandeburg wrote:
> Ben et al,
>
> So, I was just looking at adding some more types/speeds to
> ethtool.h and noticed we are about out of bits in ecmd->advertising
> (and others), which are declared u32.
>
> We currently have room for one more type (bit 31) and then all 32 bits
> will be full.
Right, I've been seeing this coming for a while.
[...]
> There are two u32's reserved at the end of ethtool_cmd.
>
> Suggestions?
Any extension needs to be applied to all of advertising, supported and
lp_advertising. So we could take 6 of the 8 reserved bytes and extend
them all by 16 bits.
Whoever does this should add getter/setter functions, as has been done
with the extension of speed.
Ben.
--
Ben Hutchings
Experience is directly proportional to the value of equipment destroyed.
- Carolyn Scheppner
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-11 18:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-10 20:47 question about ethtool bits? Jesse Brandeburg
2014-11-11 18:12 ` Ben Hutchings
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).