aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2013-11-25 10:41:28 -0800
committerJesse Gross <jesse@nicira.com>2014-01-06 15:51:27 -0800
commit8f49ce1135676e5790d8ac5f8ecb2a218c07a33a (patch)
treeb84afd96bec73bf6d180c85599762564f783a68b /net/openvswitch
parentopenvswitch: Correct comment. (diff)
downloadlinux-dev-8f49ce1135676e5790d8ac5f8ecb2a218c07a33a.tar.xz
linux-dev-8f49ce1135676e5790d8ac5f8ecb2a218c07a33a.zip
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: Ben Pfaff <blp@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch')
-rw-r--r--net/openvswitch/flow.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/openvswitch/flow.h b/net/openvswitch/flow.h
index 1510f51dbf74..176406d9b779 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;
};
struct sw_flow_mask {