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 <[email protected]> --- controller/binding.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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); } } -- 2.30.2 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
