]> git.proxmox.com Git - ovs.git/commit - lib/ofp-actions.c
ofp-actions: Waste less memory in learn actions.
authorJarno Rajahalme <jarno@ovn.org>
Wed, 31 Aug 2016 15:43:48 +0000 (08:43 -0700)
committerJarno Rajahalme <jarno@ovn.org>
Wed, 31 Aug 2016 15:43:48 +0000 (08:43 -0700)
commitdfe191d5faa60d34a64e3bd1040fd6fa02b4889c
treecbed0e4dc2384d2a97ab211d540e61b1370cfda0
parent47bf118665a3d0f3c153d1fe80e9af02ac9a4e9c
ofp-actions: Waste less memory in learn actions.

Make the immediate data member 'src_imm' of a learn spec allocated at
the end of the action for just the right size.  This, together with
some structure packing saves on average of ~128 bytes for each learn
spec in each learn action.  Typical learn actions have about 4 specs
each, so this amounts to saving about 0.5kb for each learn action.

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
include/openvswitch/meta-flow.h
include/openvswitch/ofp-actions.h
lib/learn.c
lib/meta-flow.c
lib/ofp-actions.c