From: Edward Cree <ecree@solarflare.com>
To: David Laight <David.Laight@ACULAB.COM>,
"linux-net-drivers@solarflare.com"
<linux-net-drivers@solarflare.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>
Cc: "bkenward@solarflare.com" <bkenward@solarflare.com>
Subject: Re: [RFC PATCH net-next 2/2] sfc: report 4-tuple UDP hashing to ethtool, if it's enabled
Date: Wed, 28 Sep 2016 15:56:52 +0100 [thread overview]
Message-ID: <e517e28f-9737-59cd-5e0b-96849ab3b198@solarflare.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DB010CF9F@AcuExch.aculab.com>
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
prev parent reply other threads:[~2016-09-28 14:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-27 16:32 [RFC PATCH net-next 0/2] sfc: enable 4-tuple UDP RSS hashing Edward Cree
2016-09-27 16:35 ` [RFC PATCH net-next 1/2] sfc: enable 4-tuple RSS hashing for UDP Edward Cree
2016-09-27 16:35 ` [RFC PATCH net-next 2/2] sfc: report 4-tuple UDP hashing to ethtool, if it's enabled Edward Cree
2016-09-27 18:12 ` Mintz, Yuval
2016-09-28 9:12 ` David Laight
2016-09-28 14:56 ` Edward Cree [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e517e28f-9737-59cd-5e0b-96849ab3b198@solarflare.com \
--to=ecree@solarflare.com \
--cc=David.Laight@ACULAB.COM \
--cc=bkenward@solarflare.com \
--cc=davem@davemloft.net \
--cc=linux-net-drivers@solarflare.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox