diff options
| author | Yi-Hung Wei <yihung.wei@gmail.com> | 2019-03-26 14:31:14 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-03-28 19:53:29 -0400 |
| commit | 06bd2bdf19d2f3d22731625e1a47fa1dff5ac407 (patch) | |
| tree | d423ed0696ae9fa847e8ed2585da5b1eb4afdfd1 /include/uapi/linux | |
| parent | 717700d183d65bd2e6511566aa6d32395419d158 (diff) | |
openvswitch: Add timeout support to ct action
Add support for fine-grain timeout support to conntrack action.
The new OVS_CT_ATTR_TIMEOUT attribute of the conntrack action
specifies a timeout to be associated with this connection.
If no timeout is specified, it acts as is, that is the default
timeout for the connection will be automatically applied.
Example usage:
$ nfct timeout add timeout_1 inet tcp syn_sent 100 established 200
$ ovs-ofctl add-flow br0 in_port=1,ip,tcp,action=ct(commit,timeout=timeout_1)
CC: Pravin Shelar <pshelar@ovn.org>
CC: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/openvswitch.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index dfabacee6903..0cac5d802c6a 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h | |||
| @@ -734,6 +734,7 @@ struct ovs_action_hash { | |||
| 734 | * be received on NFNLGRP_CONNTRACK_NEW and NFNLGRP_CONNTRACK_DESTROY groups, | 734 | * be received on NFNLGRP_CONNTRACK_NEW and NFNLGRP_CONNTRACK_DESTROY groups, |
| 735 | * respectively. Remaining bits control the changes for which an event is | 735 | * respectively. Remaining bits control the changes for which an event is |
| 736 | * delivered on the NFNLGRP_CONNTRACK_UPDATE group. | 736 | * delivered on the NFNLGRP_CONNTRACK_UPDATE group. |
| 737 | * @OVS_CT_ATTR_TIMEOUT: Variable length string defining conntrack timeout. | ||
| 737 | */ | 738 | */ |
| 738 | enum ovs_ct_attr { | 739 | enum ovs_ct_attr { |
| 739 | OVS_CT_ATTR_UNSPEC, | 740 | OVS_CT_ATTR_UNSPEC, |
| @@ -746,6 +747,8 @@ enum ovs_ct_attr { | |||
| 746 | OVS_CT_ATTR_NAT, /* Nested OVS_NAT_ATTR_* */ | 747 | OVS_CT_ATTR_NAT, /* Nested OVS_NAT_ATTR_* */ |
| 747 | OVS_CT_ATTR_FORCE_COMMIT, /* No argument */ | 748 | OVS_CT_ATTR_FORCE_COMMIT, /* No argument */ |
| 748 | OVS_CT_ATTR_EVENTMASK, /* u32 mask of IPCT_* events. */ | 749 | OVS_CT_ATTR_EVENTMASK, /* u32 mask of IPCT_* events. */ |
| 750 | OVS_CT_ATTR_TIMEOUT, /* Associate timeout with this connection for | ||
| 751 | * fine-grain timeout tuning. */ | ||
| 749 | __OVS_CT_ATTR_MAX | 752 | __OVS_CT_ATTR_MAX |
| 750 | }; | 753 | }; |
| 751 | 754 | ||
