mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
datapath: Convert kernel priority actions into match/set.
Following patch adds skb-priority to flow key. So userspace will know what was priority when packet arrived and we can remove the pop/reset priority action. It's no longer necessary to have a special action for pop that is based on the kernel remembering original skb->priority. Userspace can just emit a set priority action with the original value. Since the priority field is a match field with just a normal set action, we can convert it into the new model for actions that are based on matches. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com> Bug #7715
This commit is contained in:
@@ -263,6 +263,7 @@ struct ovs_flow_stats {
|
||||
|
||||
enum ovs_key_attr {
|
||||
OVS_KEY_ATTR_UNSPEC,
|
||||
OVS_KEY_ATTR_PRIORITY, /* 32-bit skb->priority */
|
||||
OVS_KEY_ATTR_TUN_ID, /* 64-bit tunnel ID */
|
||||
OVS_KEY_ATTR_IN_PORT, /* 32-bit OVS dp port number */
|
||||
OVS_KEY_ATTR_ETHERNET, /* struct ovs_key_ethernet */
|
||||
@@ -449,9 +450,6 @@ enum ovs_userspace_attr {
|
||||
* header.
|
||||
* @OVS_ACTION_ATTR_SET: Replaces the contents of an existing header.
|
||||
* The argument takes the same form as %OVS_ACTION_ATTR_PUSH.
|
||||
* @OVS_ACTION_ATTR_SET_PRIORITY: Sets skb->priority to 32-bit number passed
|
||||
* as argument.
|
||||
* @OVS_ACTION_ATTR_POP_PRIORITY: Restore skb->priority to original value.
|
||||
* @OVS_ACTION_ATTR_SAMPLE: Probabilitically executes actions, as specified in
|
||||
* the nested %OVS_SAMPLE_ATTR_* attributes.
|
||||
*
|
||||
@@ -466,8 +464,6 @@ enum ovs_action_attr {
|
||||
OVS_ACTION_ATTR_PUSH, /* One nested OVS_KEY_ATTR_*. */
|
||||
OVS_ACTION_ATTR_POP, /* u16 OVS_KEY_ATTR_*. */
|
||||
OVS_ACTION_ATTR_SET, /* One nested OVS_KEY_ATTR_*. */
|
||||
OVS_ACTION_ATTR_SET_PRIORITY, /* u32 skb->priority value. */
|
||||
OVS_ACTION_ATTR_POP_PRIORITY, /* No argument. */
|
||||
OVS_ACTION_ATTR_SAMPLE, /* Nested OVS_SAMPLE_ATTR_*. */
|
||||
__OVS_ACTION_ATTR_MAX
|
||||
};
|
||||
|
Reference in New Issue
Block a user