summaryrefslogtreecommitdiff
path: root/ofproto
diff options
context:
space:
mode:
authorWilliam Tu <u9012063@gmail.com>2020-04-29 12:25:11 -0700
committerWilliam Tu <u9012063@gmail.com>2020-05-01 08:22:45 -0700
commit2078901a4c142d25d1fae8710f4d38938385c954 (patch)
treeaa8faa2bc512bdc8fee15462cdac00072fb74537 /ofproto
parent5519e384f6a17f564fef4c5eb39e471e16c77235 (diff)
downloadopenvswitch-2078901a4c142d25d1fae8710f4d38938385c954.tar.gz
userspace: Add conntrack timeout policy support.
Commit 1f1613183733 ("ct-dpif, dpif-netlink: Add conntrack timeout policy support") adds conntrack timeout policy for kernel datapath. This patch enables support for the userspace datapath. I tested using the 'make check-system-userspace' which checks the timeout policies for ICMP and UDP cases. Signed-off-by: William Tu <u9012063@gmail.com> Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
Diffstat (limited to 'ofproto')
-rw-r--r--ofproto/ofproto-dpif.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index d21874b46..7e10375f2 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -5426,7 +5426,8 @@ clear_existing_ct_timeout_policies(struct dpif_backer *backer)
static void
ct_zone_config_init(struct dpif_backer *backer)
{
- backer->tp_ids = id_pool_create(0, MAX_TIMEOUT_POLICY_ID);
+ backer->tp_ids = id_pool_create(DEFAULT_TP_ID + 1,
+ MAX_TIMEOUT_POLICY_ID - 1);
cmap_init(&backer->ct_zones);
hmap_init(&backer->ct_tps);
ovs_list_init(&backer->ct_tp_kill_list);