[ovs-dev] [PATCH ovn] ovn-northd: Clarify lsp's 'enabled' and 'up' column handling.

Numan Siddique nusiddiq at redhat.com
Fri Aug 9 18:16:29 UTC 2019


On Fri, Aug 9, 2019 at 11:33 PM Justin Pettit <jpettit at ovn.org> wrote:

> Signed-off-by: Justin Pettit <jpettit at ovn.org>
>

Thanks. This looks good to me.

Acked-by: Numan Siddique <nusiddiq at redhat.com>



> ---
>  northd/ovn-northd.c | 8 ++++++--
>  ovn-nb.xml          | 1 +
>  2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index e6953a405..e86134414 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -3488,16 +3488,20 @@ build_port_security_ip(enum ovn_pipeline pipeline,
> struct ovn_port *op,
>
>  }
>
> +/* Returns true if the logical switch port 'enabled' column is empty or
> + * set to true.  Otherwise, returns false. */
>  static bool
>  lsp_is_enabled(const struct nbrec_logical_switch_port *lsp)
>  {
> -    return !lsp->enabled || *lsp->enabled;
> +    return !lsp->n_enabled || *lsp->enabled;
>  }
>
> +/* Returns true only if the logical switch port 'up' column is set to
> true.
> + * Otherwise, if the column is not set or set to false, returns false. */
>  static bool
>  lsp_is_up(const struct nbrec_logical_switch_port *lsp)
>  {
> -    return lsp->up && *lsp->up;
> +    return lsp->n_up && *lsp->up;
>  }
>
>  static bool
> diff --git a/ovn-nb.xml b/ovn-nb.xml
> index f5f10a5c1..e1661907d 100644
> --- a/ovn-nb.xml
> +++ b/ovn-nb.xml
> @@ -730,6 +730,7 @@
>            table="Binding"/> table, <code>ovn-northd</code> sets this
>            column to <code>true</code>; otherwise, or if the port
>            becomes unbound later, it sets it to <code>false</code>.
> +          If this column is empty, the port is not considered up.
>            This allows the CMS to wait for a VM's (or container's)
>            networking to become active before it allows the VM (or
>            container) to start.
> --
> 2.17.1
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list