2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-03 07:45:30 +00:00

ofproto-dpif-xlate: Translate timeout policy in ct action

This patch derives the timeout policy based on ct zone from the
internal data structure that we maintain on dpif layer.

It also adds a system traffic test to verify the zone-based conntrack
timeout feature.  The test uses ovs-vsctl commands to configure
the customized ICMP and UDP timeout on zone 5 to a shorter period.
It then injects ICMP and UDP traffic to conntrack, and checks if the
corresponding conntrack entry expires after the predefined timeout.

Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>

ofproto-dpif: Checks if datapath supports OVS_CT_ATTR_TIMEOUT

This patch checks whether datapath supports OVS_CT_ATTR_TIMEOUT. With this
check, ofproto-dpif-xlate can use this information to decide whether to
translate the ct timeout policy.

Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Justin Pettit <jpettit@ovn.org>
This commit is contained in:
Yi-Hung Wei
2019-08-28 15:14:29 -07:00
committed by Justin Pettit
parent ebe62ec1b9
commit 187bb41fbf
12 changed files with 308 additions and 22 deletions

View File

@@ -547,6 +547,19 @@ struct dpif_class {
struct ct_dpif_timeout_policy *tp);
int (*ct_timeout_policy_dump_done)(struct dpif *, void *state);
/* Gets timeout policy based on 'tp_id', 'dl_type' and 'nw_proto'.
* On success, returns 0, stores the timeout policy name in 'tp_name',
* and sets 'is_generic'. 'is_generic' is false if the returned timeout
* policy in the 'dpif' is specific to 'dl_type' and 'nw_proto' in the
* datapath (e.g., the Linux kernel datapath). Sets 'is_generic' to
* true, if the timeout policy supports all OVS supported L3/L4
* protocols.
*
* The caller is responsible for freeing 'tp_name'. */
int (*ct_get_timeout_policy_name)(struct dpif *, uint32_t tp_id,
uint16_t dl_type, uint8_t nw_proto,
char **tp_name, bool *is_generic);
/* IP Fragmentation. */
/* Disables or enables conntrack fragment reassembly. The default