[ovs-dev] [PATCH ovn 2/6] binding.c: Refactor binding_handle_port_binding_changes.

Numan Siddique numans at ovn.org
Tue Aug 17 18:24:38 UTC 2021


On Fri, Aug 13, 2021 at 6:56 PM Han Zhou <hzhou at ovn.org> wrote:
>
> 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 at ovn.org>

I did the scale testing with these patches and it showed great improvements in
the number of OF flows and CPU usage of ovn-controllers.

For the patches - 2 to 6

Acked-by: Numan Siddique <numans at ovn.org>

Thanks
Numan

> ---
>  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
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list