Netdev List
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Edward Cree' <ecree@solarflare.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 09:12:22 +0000	[thread overview]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6DB010CF9F@AcuExch.aculab.com> (raw)
In-Reply-To: <8341c601-674a-74ff-c6dd-689c19b3ce7f@solarflare.com>

From: Edward Cree
> Sent: 27 September 2016 17:36
...
> +		case UDP_V4_FLOW:
> +			if (efx->rx_hash_udp_4tuple)
> +				/* fall through */
> +			/* else fall further! */

If you invert the above and add a goto...
			if (!efx->rx_hash_udp_4tuple)
				goto set_ip;

>  		case TCP_V4_FLOW:
> -			info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
> +				info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
>  			/* fall through */
> -		case UDP_V4_FLOW:
>  		case SCTP_V4_FLOW:
>  		case AH_ESP_V4_FLOW:
>  		case IPV4_FLOW:
    set_ip:
>  			info->data |= RXH_IP_SRC | RXH_IP_DST;
>  			min_revision = EFX_REV_FALCON_B0;
>  			break;

It might look better.

	David


  parent reply	other threads:[~2016-09-28  9:15 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 [this message]
2016-09-28 14:56     ` Edward Cree

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=063D6719AE5E284EB5DD2968C1650D6DB010CF9F@AcuExch.aculab.com \
    --to=david.laight@aculab.com \
    --cc=bkenward@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --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