[ovs-git] [openvswitch/ovs] b940b3: datapath: Support masked set actions.

GitHub noreply at github.com
Fri May 22 18:23:40 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: b940b3d79367b3661479367399e353dabcf9c569
      https://github.com/openvswitch/ovs/commit/b940b3d79367b3661479367399e353dabcf9c569
  Author: Jarno Rajahalme <jrajahalme at nicira.com>
  Date:   2015-05-22 (Fri, 22 May 2015)

  Changed paths:
    M datapath/actions.c
    M datapath/flow_netlink.c
    M datapath/linux/compat/include/linux/openvswitch.h

  Log Message:
  -----------
  datapath: Support masked set actions.

OVS kernel module support for masked set actions in already upstream
in Linux (commit 83d2b9ba1abca241df44a502b6da950a25856b5b).  This
patch adds the same for the OVS tree kernel module.

The existing set action sets many fields at once.  When only a subset
of the IP header fields, for example, should be modified, all the IP
fields need to be exact matched so that the other field values can be
copied to the set action.  A masked set action allows modification of
an arbitrary subset of the supported header bits without requiring the
rest to be matched.

Masked set action is now supported for all writeable key types, except
for the tunnel key.  The set tunnel action is an exception as any
input tunnel info is cleared before action processing starts, so there
is no tunnel info to mask.

The kernel module converts all (non-tunnel) set actions to masked set
actions.  This makes action processing more uniform, and results in
less branching and duplicating the action processing code.  When
returning actions to userspace, the conversion is inverted.  We use a
kernel internal action code to be able to tell the userspace provided
and converted masked set actions apart.

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Acked-by: Jesse Gross <jesse at nicira.com>




More information about the git mailing list