History

openvswitch: kernel datapath clone action

Add 'clone' action to kernel datapath by using existing functions. When actions within clone don't modify the current flow, the flow key is not cloned before executing clone actions. This is a follow up patch for this incomplete work: https://patchwork.ozlabs.org/patch/722096/ v1 -> v2: Refactor as advised by reviewer.

Yifeng Sun committed 8 years ago

Commit b2335041 parent 20fbdc34 files · +114 −0Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/openvswitch.h+3−0
@@ -840,6 +840,8 @@ struct ovs_action_push_eth { · 839 unmodified lines
840 * @OVS_ACTION_ATTR_POP_NSH: pop the outermost NSH header off the packet.840 * @OVS_ACTION_ATTR_POP_NSH: pop the outermost NSH header off the packet.
841 * @OVS_ACTION_ATTR_METER: Run packet through a meter, which may drop the841 * @OVS_ACTION_ATTR_METER: Run packet through a meter, which may drop the
842 * packet, or modify the packet (e.g., change the DSCP field).842 * packet, or modify the packet (e.g., change the DSCP field).
843 * @OVS_ACTION_ATTR_CLONE: make a copy of the packet and execute a list of
844 * actions without affecting the original packet and key.
843 *845 *
844 * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all846 * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all
845 * fields within a header are modifiable, e.g. the IPv4 protocol and fragment847 * fields within a header are modifiable, e.g. the IPv4 protocol and fragment
@@ -873,6 +875,7 @@ enum ovs_action_attr { · 27 unmodified lines
873 OVS_ACTION_ATTR_PUSH_NSH, /* Nested OVS_NSH_KEY_ATTR_*. */875 OVS_ACTION_ATTR_PUSH_NSH, /* Nested OVS_NSH_KEY_ATTR_*. */
874 OVS_ACTION_ATTR_POP_NSH, /* No argument. */876 OVS_ACTION_ATTR_POP_NSH, /* No argument. */
875 OVS_ACTION_ATTR_METER, /* u32 meter ID. */877 OVS_ACTION_ATTR_METER, /* u32 meter ID. */
878 OVS_ACTION_ATTR_CLONE, /* Nested OVS_CLONE_ATTR_*. */
876 879
877 __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted880 __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted
878 * from userspace. */881 * from userspace. */