Re: [PATCH RFC] ipvs: reschedule new connections if previous was on FIN_

To: Marcelo Ricardo Leitner <mleitner@xxxxxxxxxx>
Subject: Re: [PATCH RFC] ipvs: reschedule new connections if previous was on FIN_WAIT or TIME_WAIT
Cc: lvs-devel@xxxxxxxxxxxxxxx, hannes@xxxxxxxxxx, jbrouer@xxxxxxxxxx
From: Julian Anastasov <ja@xxxxxx>
Date: Tue, 6 Jan 2015 23:06:07 +0200 (EET)

On Tue, 6 Jan 2015, Marcelo Ricardo Leitner wrote:

> >     I guess, we here try to avoid old sync message to
> > expire new connection. The problem is that UDP conns and
> > templates are always IP_VS_CONN_F_INACTIVE, may be a TCP+SCTP
> > protocol check is needed.
> Yes, that's the idea, avoiding the old sync messages. I don't think we need a
> check for protocol here because the outer if() (the one that checks daddr and
> dport) wouldn't happen for UDP, right? Unless it was really recycled.. But
> yeah I missed the template case. Perhaps we can just move this block together
> with the previous if(!).

        OK, just make sure patch has short lines (80):

# scripts/ --strict /tmp/file.patch

>         if (!(flags & IP_VS_CONN_F_TEMPLATE)) {
>                 cp = ip_vs_conn_in_get(param);
>                 if (cp && ((cp->dport != dport) ||
>                            !ip_vs_addr_equal(cp->daf, &cp->daddr, daddr))) {
>                         if (!(flags & IP_VS_CONN_F_INACTIVE)) {
>                                 ip_vs_conn_expire_now(cp);
>                                 __ip_vs_conn_put(cp);
>                                 cp = NULL;
>                         } else {

        I assume we will not stop here sync for some connection that
was normally expired in master but was delayed in backup. TCP sync
starts for EST state, so I think it will hit the above case.

>                                 /* This is the expiration message for the
>                                  * connection that was already replaced, so we
>                                  * just ignore it.
>                                  */
>                                 goto out;
>                         }
>                 }
>         } else {
>                 cp = ip_vs_ct_in_get(param);
>         }


Julian Anastasov <ja@xxxxxx>
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

<Prev in Thread] Current Thread [Next in Thread>