[ovs-dev] [PATCH 05/19] tunneling: Update port pools on config change.

Jesse Gross jesse at nicira.com
Thu Dec 9 06:14:03 UTC 2010


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 <jesse at nicira.com>
---
 datapath/tunnel.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/datapath/tunnel.c b/datapath/tunnel.c
index 2a02a5d..387597f 100644
--- a/datapath/tunnel.c
+++ b/datapath/tunnel.c
@@ -282,7 +282,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;
 }
-- 
1.7.1





More information about the dev mailing list