Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f49ce11 authored by Ben Pfaff's avatar Ben Pfaff Committed by Jesse Gross
Browse files

openvswitch: Shrink sw_flow_mask by 8 bytes (64-bit) or 4 bytes (32-bit).



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: default avatarBen Pfaff <blp@nicira.com>
Acked-by: default avatarAndy Zhou <azhou@nicira.com>
Signed-off-by: default avatarJesse Gross <jesse@nicira.com>
parent d1211908
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -122,8 +122,8 @@ struct sw_flow_key {
} __aligned(BITS_PER_LONG/8); /* Ensure that we can do comparisons as longs. */
} __aligned(BITS_PER_LONG/8); /* Ensure that we can do comparisons as longs. */


struct sw_flow_key_range {
struct sw_flow_key_range {
	size_t start;
	unsigned short int start;
	size_t end;
	unsigned short int end;
};
};


struct sw_flow_mask {
struct sw_flow_mask {