[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e517e28f-9737-59cd-5e0b-96849ab3b198@solarflare.com>
Date: Wed, 28 Sep 2016 15:56:52 +0100
From: Edward Cree <ecree@...arflare.com>
To: David Laight <David.Laight@...LAB.COM>,
"linux-net-drivers@...arflare.com" <linux-net-drivers@...arflare.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>
CC: "bkenward@...arflare.com" <bkenward@...arflare.com>
Subject: Re: [RFC PATCH net-next 2/2] sfc: report 4-tuple UDP hashing to
ethtool, if it's enabled
On 28/09/16 10:12, David Laight wrote:
> If you invert the above and add a goto...
> if (!efx->rx_hash_udp_4tuple)
> goto set_ip;
I don't mind gotos...
>> case SCTP_V4_FLOW:
>> case AH_ESP_V4_FLOW:
>> case IPV4_FLOW:
> set_ip:
...but this adds a label where we effectively already have one.
I wish C allowed goto case labels.
> It might look better.
> David
It just bugs me that it would have this unnecessary goto and label.
Alternate ways to maybe make it look better, or not:
* Remove the /* else fall further */ comment, does this make the
indentation more or less confusing?
* Include braces on the if, even though there's only one statement
inside.
Also, how strong are people's reaction to this? If it's just "I
personally wouldn't do it that way", then I'm tempted to go ahead
anyway. But if it's "NAK NAK NAK burn the heretic", that's
another matter.
-Ed
Powered by blists - more mailing lists