diff mbox series

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

Message ID 20181029225751.5936-2-blp@ovn.org
State Accepted
Headers show
Series [ovs-dev,1/6] connmgr: Modernize coding style. | expand

Commit Message

Ben Pfaff Oct. 29, 2018, 10:57 p.m. UTC
This will have its first user in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 include/openvswitch/rconn.h | 1 +
 lib/rconn.c                 | 7 +++++++
 2 files changed, 8 insertions(+)

Comments

Yifeng Sun Oct. 30, 2018, 9:35 p.m. UTC | #1
Looks good, thanks!

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


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

> This will have its first user in an upcoming commit.
>
> Signed-off-by: Ben Pfaff <blp@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@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Ben Pfaff Oct. 31, 2018, 8:40 p.m. UTC | #2
Thanks for the reviews, I applied patches 1 and 2.

Do you plan to review further patches?  I understand that patch 3 is
more ambitious, so I'd be happy to ask someone else, if you do not want
to invest the time.

On Tue, Oct 30, 2018 at 02:35:55PM -0700, Yifeng Sun wrote:
> Looks good, thanks!
> 
> Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
> 
> 
> On Mon, Oct 29, 2018 at 3:58 PM Ben Pfaff <blp@ovn.org> wrote:
> 
> > This will have its first user in an upcoming commit.
> >
> > Signed-off-by: Ben Pfaff <blp@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@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
Ben Pfaff Oct. 31, 2018, 8:47 p.m. UTC | #3
On Wed, Oct 31, 2018 at 01:40:59PM -0700, Ben Pfaff wrote:
> Thanks for the reviews, I applied patches 1 and 2.
> 
> Do you plan to review further patches?  I understand that patch 3 is
> more ambitious, so I'd be happy to ask someone else, if you do not want
> to invest the time.

Well, actually I guess it's patch 4 that gets harder.  3 isn't too bad.
Yifeng Sun Oct. 31, 2018, 9:20 p.m. UTC | #4
Yes, I am reviewing 3. Please ask someone else to review 4+.

Thanks.
Yifeng

On Wed, Oct 31, 2018 at 1:47 PM Ben Pfaff <blp@ovn.org> wrote:

> On Wed, Oct 31, 2018 at 01:40:59PM -0700, Ben Pfaff wrote:
> > Thanks for the reviews, I applied patches 1 and 2.
> >
> > Do you plan to review further patches?  I understand that patch 3 is
> > more ambitious, so I'd be happy to ask someone else, if you do not want
> > to invest the time.
>
> Well, actually I guess it's patch 4 that gets harder.  3 isn't too bad.
>
diff mbox series

Patch

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