lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9a26eed3-f69a-b5fd-66e1-b926c6e92c2f@gmail.com>
Date:   Wed, 20 Feb 2019 19:21:58 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Michal Kubecek <mkubecek@...e.cz>, netdev@...r.kernel.org
Cc:     David Miller <davem@...emloft.net>, Andrew Lunn <andrew@...n.ch>,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Jiri Pirko <jiri@...nulli.us>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH net-next v3 14/21] ethtool: provide link mode names as
 a string set



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 <mkubecek@...e.cz>
> ---

[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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ