openvswitch: Allow matching on conntrack mark
Allow matching and setting the ct_mark field. As with ct_state and ct_zone, these fields are populated when the CT action is executed. To write to this field, a value and mask can be specified as a nested attribute under the CT action. This data is stored with the conntrack entry, and is executed after the lookup occurs for the CT action. The conntrack entry itself must be committed using the COMMIT flag in the CT action flags for this change to persist. Signed-off-by: Justin Pettit <jpettit@nicira.com> Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7f8a436eaa
commit
182e3042e1
6 changed files with 83 additions and 4 deletions
|
@ -325,6 +325,7 @@ enum ovs_key_attr {
|
|||
* the accepted length of the array. */
|
||||
OVS_KEY_ATTR_CT_STATE, /* u8 bitmask of OVS_CS_F_* */
|
||||
OVS_KEY_ATTR_CT_ZONE, /* u16 connection tracking zone. */
|
||||
OVS_KEY_ATTR_CT_MARK, /* u32 connection tracking mark */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
OVS_KEY_ATTR_TUNNEL_INFO, /* struct ip_tunnel_info */
|
||||
|
@ -613,11 +614,15 @@ struct ovs_action_hash {
|
|||
* enum ovs_ct_attr - Attributes for %OVS_ACTION_ATTR_CT action.
|
||||
* @OVS_CT_ATTR_FLAGS: u32 connection tracking flags.
|
||||
* @OVS_CT_ATTR_ZONE: u16 connection tracking zone.
|
||||
* @OVS_CT_ATTR_MARK: u32 value followed by u32 mask. For each bit set in the
|
||||
* mask, the corresponding bit in the value is copied to the connection
|
||||
* tracking mark field in the connection.
|
||||
*/
|
||||
enum ovs_ct_attr {
|
||||
OVS_CT_ATTR_UNSPEC,
|
||||
OVS_CT_ATTR_FLAGS, /* u8 bitmask of OVS_CT_F_*. */
|
||||
OVS_CT_ATTR_ZONE, /* u16 zone id. */
|
||||
OVS_CT_ATTR_MARK, /* mark to associate with this connection. */
|
||||
__OVS_CT_ATTR_MAX
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue