[ovs-git] [openvswitch/ovs] 709cf7: ofp-actions: Waste less memory in learn actions.

GitHub noreply at github.com
Wed Aug 31 18:23:09 UTC 2016


  Branch: refs/heads/branch-2.6
  Home:   https://github.com/openvswitch/ovs
  Commit: 709cf76ec9667ad70d600742b8677d1431440738
      https://github.com/openvswitch/ovs/commit/709cf76ec9667ad70d600742b8677d1431440738
  Author: Jarno Rajahalme <jarno at ovn.org>
  Date:   2016-08-31 (Wed, 31 Aug 2016)

  Changed paths:
    M include/openvswitch/meta-flow.h
    M include/openvswitch/ofp-actions.h
    M lib/learn.c
    M lib/meta-flow.c
    M lib/ofp-actions.c

  Log Message:
  -----------
  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 at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>


  Commit: e0626bfb68f40ecbcb437bb65480d35721abfdbe
      https://github.com/openvswitch/ovs/commit/e0626bfb68f40ecbcb437bb65480d35721abfdbe
  Author: Jarno Rajahalme <jarno at ovn.org>
  Date:   2016-08-31 (Wed, 31 Aug 2016)

  Changed paths:
    M include/openvswitch/ofp-actions.h
    M include/ovn/actions.h
    M lib/learn.c
    M lib/ofp-actions.c
    M ofproto/ofproto-dpif-xlate.c
    M ovn/controller/lflow.c
    M ovn/controller/physical.c
    M ovn/controller/pinctrl.c
    M ovn/lib/actions.c
    M ovn/utilities/ovn-trace.c

  Log Message:
  -----------
  ofp-actions: Waste less memory in set field and load actions.

Change the value and mask to be added to the end of the set field
action without any extra bytes, exept for the usual ofp-actions
padding to 8 bytes.  Together with some structure member packing this
saves on average about to 256 bytes for each set field and load action
(as set field internal representation is also used for load actions).

On a specific production data set each flow entry uses on average
about 4.2 load or set field actions.  This means that with this patch
an average of more than 1kb can be saved for each flow with such a
flow table.

Signed-off-by: Jarno Rajahalme <jarno at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/ebe6df9e8d3e...e0626bfb68f4


More information about the git mailing list