From 6569d3f419c96b18ea81a41ed13f2306119bcc00 Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Sun, 5 Dec 2010 12:16:40 -0800 Subject: [PATCH] tunneling: Update port pools on config change. We keep track of the number of tunnels using the different types of matching in order to avoid doing the lookup when there are no ports of that type. However, when updating the configuration we weren't changing the port pool counts, which could lead to incorrectly not finding a tunnel on receive. Signed-off-by: Jesse Gross --- datapath/tunnel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datapath/tunnel.c b/datapath/tunnel.c index 0faa4ec8..d8bcb0ff 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -247,6 +247,7 @@ static int add_port(struct vport *vport) err = tbl_insert(port_table, &tnl_vport->tbl_node, mutable_hash(tnl_vport->mutable)); if (err) { + (*find_port_pool(tnl_vport->mutable))--; check_table_empty(); return err; } @@ -282,7 +283,9 @@ static int move_port(struct vport *vport, struct tnl_mutable_config *new_mutable } table_updated: + (*find_port_pool(tnl_vport->mutable))--; assign_config_rcu(vport, new_mutable); + (*find_port_pool(tnl_vport->mutable))++; return 0; } -- 2.30.2