On Fri, Mar 22, 2019 at 1:29 PM Ben Pfaff <[email protected]> wrote: > > On Thu, Mar 21, 2019 at 09:55:15AM -0700, Han Zhou wrote: > > From: Han Zhou <[email protected]> > > > > Currently, whenever there is activity on the session, the FSM is > > transitioned to ACTIVE. However, this causes reconnect_force_reconnect() > > failed to work once there are traffic received from remote after > > transition to RECONNECT, it will skip the reconnection phase and directly > > go back to ACTIVE for the old session. This patch fixes it so that > > when FSM is in RECONNECT state, it doesn't transition back to ACTIVE > > directly. > > > > Signed-off-by: Han Zhou <[email protected]> > > --- > > lib/reconnect.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/reconnect.c b/lib/reconnect.c > > index 0f21378..e2901ab 100644 > > --- a/lib/reconnect.c > > +++ b/lib/reconnect.c > > @@ -495,7 +495,7 @@ reconnect_connect_failed(struct reconnect *fsm, long > > long int now, int error) > > void > > reconnect_activity(struct reconnect *fsm, long long int now) > > { > > - if (fsm->state != S_ACTIVE) { > > + if (fsm->state != S_ACTIVE && fsm->state != S_RECONNECT) { > > reconnect_transition__(fsm, now, S_ACTIVE); > > } > > I think that the only state where this is useful is S_IDLE. Would > 'fsm->state == S_IDLE' be a better test?
Agree! It will be more accurate. I will send v2. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
