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 2a10d7586..aa032789c 100644 --- a/controller/binding.c +++ b/controller/binding.c @@ -2386,15 +2386,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->sbrec_datapath_binding_by_key, b_ctx_in->sbrec_port_binding_by_datapath, -- 2.30.2 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
