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

GitHub noreply at github.com
Wed Aug 31 15:51:49 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: dfe191d5faa60d34a64e3bd1040fd6fa02b4889c
      https://github.com/openvswitch/ovs/commit/dfe191d5faa60d34a64e3bd1040fd6fa02b4889c
  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: 128684a6613a4f97c12a35b686c658c189238bfa
      https://github.com/openvswitch/ovs/commit/128684a6613a4f97c12a35b686c658c189238bfa
  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/47bf118665a3...128684a6613a


More information about the git mailing list