Message ID | 20210730072141.1938378-3-hzhou@ovn.org |
---|---|
State | Superseded |
Headers | show |
Series | Use Distributed Gateway Port for ovn-controller scalability. | expand |
diff --git a/controller/binding.c b/controller/binding.c index d50f3affa..f58bb4b17 100644 --- a/controller/binding.c +++ b/controller/binding.c @@ -2613,15 +2613,10 @@ delete_done: b_ctx_out->local_datapaths, b_ctx_out->tracked_dp_bindings); } - - ld = get_local_datapath(b_ctx_out->local_datapaths, - pb->datapath->tunnel_key); - } - - /* Add the peer datapath to the local datapaths if it's - * not present yet. - */ - if (ld) { + } else { + /* Add the peer datapath to the local datapaths if it's + * not present yet. + */ add_local_datapath_peer_port(pb, b_ctx_in, b_ctx_out, ld); } }
The extra get_local_datapath() call seems unnecessary. Remove it and combine the two if-blocks to an if-else block. Signed-off-by: Han Zhou <hzhou@ovn.org> --- controller/binding.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)