All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Julian Anastasov <ja@ssi.bg>
Cc: Hans Schillstrom <hans.schillstrom@ericsson.com>,
	LVS-Devel <lvs-devel@vger.kernel.org>,
	"wensong@linux-vs.org" <wensong@linux-vs.org>,
	"daniel.lezcano@free.fr" <daniel.lezcano@free.fr>
Subject: Re: [v2 PATCH 0/4] IPVS: Backup Adding Ipv6 and Persistence support
Date: Mon, 8 Nov 2010 20:16:02 +0900	[thread overview]
Message-ID: <20101108111600.GA14454@verge.net.au> (raw)
In-Reply-To: <alpine.LFD.2.00.1011081027080.1504@ja.ssi.bg>

On Mon, Nov 08, 2010 at 10:51:58AM +0200, Julian Anastasov wrote:
> 
> 	Hello,
> 
> On Mon, 8 Nov 2010, Simon Horman wrote:
> 
> >>>But dest could be created as part of failover and thus
> >>>exist by the time any packets need to be forwarded, right?
> >>>
> >>>There are cases, such as where the backup is also a real-server
> >>>that its rather inconvenient for svc and dst to exist while
> >>>synchronisation information is being received.
> >>
> >>	OK, then we should not reach request_module,
> >>new arg to ip_vs_pe_get() can specify that we call it
> >>from interrupt, so the PE must be already loaded as module.
> >>Then cp->pe can hold the reference to PE until
> >>we bind the template to svc and dest where svc->pe
> >>should be compared to ct->pe. ct->pe is needed only
> >>for this purpose because later it can be determined
> >>from svc.
> >
> >Do you have a preference for this approach
> >over making ip_vs_pe_sip non-modular?
> 
> 	We already decided about "IPVS: Add persistence engine to
> connection entry", so cp->pe should be attached to backup
> and I hope Hans will add checks for same PE in ip_vs_find_dest
> and ip_vs_try_bind_dest. Then the only problem remains
> to change code so that request_module is not called by
> softirq. If the svc is not created yet in backup to
> load the PE module, it must be loaded manually to
> allow connections with PE to be created. If you still
> prefer to see some code I have to create fresh tree later
> today. May be if Hans uses ip_vs_pe_getbyname instead of
> ip_vs_pe_get that should solve the request_module problem.

I changed things around a bit in "IPVS: Add persistence engine to
connection entry".

	ip_vs_pe_getbyname() became __ip_vs_pe_getbyname()
	ip_vs_pe_get() became ip_vs_pe_getbyname()
	And ip_vs_pe_get() now just takes a reference on the module if its
	loaded.

So yes I agree, except that __ip_vs_pe_getbyname() is the name
of the function that should be called, which needs to be made
un-static and possibly renamed (again).

Also, to __ip_vs_pe_getbyname() calls try_module_get().
Is that safe from interrupt context?

> 	What should we do if PE module is not loaded
> while we are creating connection in backup? We can not
> load modules, may be when connection is bound to
> dest+svc we should inherit the PE from svc->pe ?

If the modules isn't loaded, then svc->pe can't be non-NULL, right?

> May be using request_module_nowait is not an option
> because we risk to try forever if module is not
> present.

That does not sound desirable.

> >> But I see another problem which is not backup
> >> specific: how ip_vs_sip_ct_match knows that ct->pe_data
> >> is created by ip_vs_sip_fill_param and not by another PE?
> >> We need to compare p->pe with cp->pe in ip_vs_ct_in_get
> >> before calling ct_match.
> >
> > Yes, I agree that is a problem.
> >
> > In practice it won't be affecting anyone at this time
> > as there is only one pe.
> >
> > How about this, which applies on top of
> > "IPVS: Add persistence engine to connection entry".
>
>	Yes, it is fine

Thanks. I have pushed "IPVS: Add persistence engine to connection entry",
the change below, and a few other (unrelated) changes that I have been
sitting on into a staging branch of lvs-test-2.6.

I may rebase the staging branch - by which I mean its intended
to be a transient branch - but I figure its better than nothing.

> Signed-off-by: Julian Anastasov <ja@ssi.bg>
> 
> > From: Simon Horman <horms@verge.net.au>
> > Subject: IPVS: Only match pe_data created by the same pe
> >
> > Only match persistence engine data if it was
> > created by the same persistence engine.
> >
> > Reported-by: Julian Anastasov <ja@ssi.bg>
> > Signed-off-by: Simon Horman <horms@verge.net.au>
> >
> > Index: lvs-test-2.6/net/netfilter/ipvs/ip_vs_conn.c
> > ===================================================================
> > --- lvs-test-2.6.orig/net/netfilter/ipvs/ip_vs_conn.c	2010-11-08 15:18:57.000000000 +0900
> > +++ lvs-test-2.6/net/netfilter/ipvs/ip_vs_conn.c	2010-11-08 15:19:02.000000000 +0900
> > @@ -354,7 +354,7 @@ struct ip_vs_conn *ip_vs_ct_in_get(const
> >
> > 	list_for_each_entry(cp, &ip_vs_conn_tab[hash], c_list) {
> > 		if (p->pe_data && p->pe->ct_match) {
> > -			if (p->pe->ct_match(p, cp))
> > +			if (p->pe == cp->pe && p->pe->ct_match(p, cp))
> > 				goto out;
> > 			continue;
> > 		}

  reply	other threads:[~2010-11-08 11:16 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29 12:15 [v2 PATCH 0/4] IPVS: Backup Adding Ipv6 and Persistence support Hans Schillstrom
2010-10-30 14:55 ` Julian Anastasov
2010-10-30 23:16   ` Simon Horman
2010-11-01 10:04     ` Hans Schillstrom
2010-11-01 15:30     ` Hans Schillstrom
2010-11-01 21:56       ` Julian Anastasov
2010-11-03 20:08     ` Hans Schillstrom
2010-11-06  0:56       ` Simon Horman
2010-11-06 10:02         ` Hans Schillstrom
2010-11-06 11:49           ` Simon Horman
2010-11-06 14:07         ` Julian Anastasov
2010-11-06 14:34           ` Simon Horman
2010-11-06 18:57             ` Julian Anastasov
2010-11-08  6:21               ` Simon Horman
2010-11-08  8:51                 ` Julian Anastasov
2010-11-08 11:16                   ` Simon Horman [this message]
2010-11-08 15:07                     ` Hans Schillstrom
2010-11-08 21:45                       ` Simon Horman
2010-11-08 20:59                     ` Julian Anastasov
2010-11-08 21:49                       ` Simon Horman
2010-11-08 23:01                         ` Julian Anastasov
2010-11-09  0:43                           ` Simon Horman
2010-11-08 15:15                 ` Hans Schillstrom
2010-11-08 22:00                   ` Simon Horman
2010-11-08 22:23                     ` Hans Schillstrom
2010-11-09  0:39                       ` Simon Horman
2010-11-08 23:19                     ` Julian Anastasov
2010-11-09  0:48                       ` Simon Horman
2010-11-01 10:03   ` Hans Schillstrom
2010-11-01 21:53     ` Julian Anastasov
2010-11-01 22:47       ` Hans Schillstrom
2010-11-02  0:17         ` Julian Anastasov
2010-11-02  6:13           ` Hans Schillstrom
2010-11-01 12:16   ` [v2 PATCH 0/4] IPVS: Backup Adding Ipv6 and Persistence support -> option_param skip ? Hans Schillstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101108111600.GA14454@verge.net.au \
    --to=horms@verge.net.au \
    --cc=daniel.lezcano@free.fr \
    --cc=hans.schillstrom@ericsson.com \
    --cc=ja@ssi.bg \
    --cc=lvs-devel@vger.kernel.org \
    --cc=wensong@linux-vs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.