Re: [RFC PATCH net-next v3 14/21] ethtool: provide link mode names as a string set
From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2019-02-21 03:22:06
Also in:
lkml
From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2019-02-21 03:22:06
Also in:
lkml
On 2/18/2019 10:22 AM, Michal Kubecek wrote:
Add table of ethernet link mode names and make it available as a string set to userspace GET_STRSET requests. Signed-off-by: Michal Kubecek <redacted> ---
[snip]
+const char *const link_mode_names[] = {Maybe you can define a macro (totally untested) to build the table an avoid some of the repetition, something like: #define ETHTOOL_LINK_NAME(speed, duplex) \ [ETHTOOL_LINK_MODE_##speed_##duplex_BIT] = stringify(speed ## "/" ## duplex) -- Florian