Thread (61 messages) 61 messages, 10 authors, 2016-02-11

Re: [PATCH v5 3/4] ethdev: redesign link speed config API

From: Marc <hidden>
Date: 2016-02-02 22:31:19

On 2 February 2016 at 03:20, Stephen Hemminger [off-list ref]
wrote:
On Thu, 28 Jan 2016 17:33:20 +0000
Harish Patil [off-list ref] wrote:
quoted
* Added utility MACROs ETH_SPEED_NUM_XXX with the numeric
  values of all supported link speeds, in Mbps.
I would prefer that there were no speed value macros.
Linux used to have these, but people kept adding new hardware speeds
and it soon gets out of date.
I see what you mean, but I am not sure I agree. Link speeds are generally a
reduced amount of items (~20). Though it is true it can eventually grow,
but at small rate. Having numeric constants all over the source seems less
readable and less maintainable (e.g. less "grepable"/"sedable") to me.

If you are going to redo it, then just increase speed to 64 bit, and allow
any non-zero value.
Value is now 32 bits, which I think is enough for future rates in mbps.
Since these constants were there, and before doing something to have to
revert it, can someone else give his/her opinion on this?

If there is consensus, I've no problem on removing it for v8

Thanks
marc
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help