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
840840 * @OVS_ACTION_ATTR_POP_NSH: pop the outermost NSH header off the packet.
841841 * @OVS_ACTION_ATTR_METER: Run packet through a meter, which may drop the
842842 * 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.
843845 *
844846 * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all
845847 * fields within a header are modifiable, e.g. the IPv4 protocol and fragment
@@ -873,6 +875,7 @@ enum ovs_action_attr { · 27 unmodified lines
873875 OVS_ACTION_ATTR_PUSH_NSH, /* Nested OVS_NSH_KEY_ATTR_*. */
874876 OVS_ACTION_ATTR_POP_NSH, /* No argument. */
875877 OVS_ACTION_ATTR_METER, /* u32 meter ID. */
878+ OVS_ACTION_ATTR_CLONE, /* Nested OVS_CLONE_ATTR_*. */
876879
877880 __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted
878881 * from userspace. */