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]
Date:   Wed, 28 Sep 2016 09:12:22 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Edward Cree' <ecree@...arflare.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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ