question about ethtool bits?
Subsystems (2)
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?
Quoted 8 lines · Jesse Brandeburg
Ben et al,
So, I was just looking at adding some more types/speeds to
ethtool.hand noticed we are about out of bits inecmd->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.
[...]
Quoted 3 lines
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.
Signature · 3 lines
Ben Hutchings
Experience is directly proportional to the value of equipment destroyed.
- Carolyn Scheppner