[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110222211743.GA9935@rere.qmqm.pl>
Date: Tue, 22 Feb 2011 22:17:43 +0100
From: Michał Mirosław <mirq-linux@...e.qmqm.pl>
To: Ben Hutchings <bhutchings@...arflare.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH ethtool 2/3] ethtool: Regularise handling of offload
flags
On Mon, Feb 21, 2011 at 04:59:08PM +0000, Ben Hutchings wrote:
> Use the new ETHTOOL_{G,S}FEATURES operations where available, and
> use the new structure and netif feature flags in any case.
[...]
> --- a/ethtool.c
> +++ b/ethtool.c
[...]
> +static int dump_offload(const struct ethtool_get_features_block *features)
> {
[...]
> + u32 value;
> + int i;
> +
> + for (i = 0; i < ARRAY_SIZE(off_feature_def); i++) {
> + value = off_feature_def[i].value;
> + printf("%s: %s%s%s\n",
> + off_feature_def[i].long_name,
> + (features->active & value) ? "on" : "off",
> + (features->requested & ~features->active & value) ?
> + " [requested on]" : "",
> + (~features->available & value) ? " [unchangeable]" : "");
> + }
This would be clearer if '[requested XXX]' part was shown only when the
offload's state is different than requested.
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists