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, 08 Jan 2014 01:36:38 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Jesse Gross <jesse@...ira.com>, David Miller <davem@...emloft.net>,
	Ben Pfaff <blp@...ira.com>
CC:	netdev@...r.kernel.org, dev@...nvswitch.org,
	Andy Zhou <azhou@...ira.com>
Subject: Re: [PATCH net-next 02/17] openvswitch: Shrink sw_flow_mask by 8
 bytes (64-bit) or 4 bytes (32-bit).

On 07.01.2014 4:16, Jesse Gross wrote:

> From: Ben Pfaff <blp@...ira.com>

> We won't normally have a ton of flow masks but using a size_t to store
> values no bigger than sizeof(struct sw_flow_key) seems excessive.

> This reduces sw_flow_key_range and sw_flow_mask by 4 bytes on 32-bit
> systems.  On 64-bit systems it shrinks sw_flow_key_range by 12 bytes but
> sw_flow_mask only by 8 bytes due to padding.

> Compile tested only.

> Signed-off-by: Ben Pfaff <blp@...ira.com>
> Acked-by: Andy Zhou <azhou@...ira.com>
> Signed-off-by: Jesse Gross <jesse@...ira.com>
> ---
>   net/openvswitch/flow.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

> diff --git a/net/openvswitch/flow.h b/net/openvswitch/flow.h
> index 1510f51..176406d 100644
> --- a/net/openvswitch/flow.h
> +++ b/net/openvswitch/flow.h
> @@ -122,8 +122,8 @@ struct sw_flow_key {
>   } __aligned(BITS_PER_LONG/8); /* Ensure that we can do comparisons as longs. */
>
>   struct sw_flow_key_range {
> -	size_t start;
> -	size_t end;
> +	unsigned short int start;
> +	unsigned short int end;

    *short int* seems somewhat ambiguous, no?

WBR, Sergei

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ