[ovs-dev] [PATCH 2/6] rconn: New function rconn_is_reliable().

Yifeng Sun pkusunyifeng at gmail.com
Tue Oct 30 21:35:55 UTC 2018


Looks good, thanks!

Reviewed-by: Yifeng Sun <pkusunyifeng at gmail.com>


On Mon, Oct 29, 2018 at 3:58 PM Ben Pfaff <blp at ovn.org> wrote:

> This will have its first user in an upcoming commit.
>
> Signed-off-by: Ben Pfaff <blp at ovn.org>
> ---
>  include/openvswitch/rconn.h | 1 +
>  lib/rconn.c                 | 7 +++++++
>  2 files changed, 8 insertions(+)
>
> diff --git a/include/openvswitch/rconn.h b/include/openvswitch/rconn.h
> index 5dc988af1dda..fd60a6ce1dea 100644
> --- a/include/openvswitch/rconn.h
> +++ b/include/openvswitch/rconn.h
> @@ -79,6 +79,7 @@ const char *rconn_get_name(const struct rconn *);
>  void rconn_set_name(struct rconn *, const char *new_name);
>  const char *rconn_get_target(const struct rconn *);
>
> +bool rconn_is_reliable(const struct rconn *);
>  bool rconn_is_alive(const struct rconn *);
>  bool rconn_is_connected(const struct rconn *);
>  bool rconn_is_admitted(const struct rconn *);
> diff --git a/lib/rconn.c b/lib/rconn.c
> index 3fabc504fba0..48ae8c6a72e5 100644
> --- a/lib/rconn.c
> +++ b/lib/rconn.c
> @@ -883,6 +883,13 @@ rconn_get_target(const struct rconn *rc)
>      return rc->target;
>  }
>
> +/* Returns true if 'rconn' will reconnect if it disconnects. */
> +bool
> +rconn_is_reliable(const struct rconn *rconn)
> +{
> +    return rconn->reliable;
> +}
> +
>  /* Returns true if 'rconn' is connected or in the process of reconnecting,
>   * false if 'rconn' is disconnected and will not reconnect on its own. */
>  bool
> --
> 2.16.1
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list