From: Hans Schillstrom <hans@schillstrom.com>
To: Julian Anastasov <ja@ssi.bg>
Cc: Simon Horman <horms@verge.net.au>,
lvs-devel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 03/12] ipvs: prefer NETDEV_DOWN event to free cached dsts
Date: Thu, 07 Mar 2013 08:43:10 +0100 [thread overview]
Message-ID: <1362642190.17102.134.camel@hawk.mlab.se> (raw)
In-Reply-To: <alpine.LFD.2.00.1303062310520.1899@ja.ssi.bg>
[-- Attachment #1: Type: text/plain, Size: 2612 bytes --]
Hello
On Wed, 2013-03-06 at 23:21 +0200, Julian Anastasov wrote:
> Hello,
>
> On Wed, 6 Mar 2013, Hans Schillstrom wrote:
>
> > Hi Julian
> >
> > On Wed, 2013-03-06 at 10:42 +0200, Julian Anastasov wrote:
> > > The real server becomes unreachable on down event,
> > > no need to wait device unregistration. Should help in
> > > releasing dsts early before dst->dev is replaced with lo.
> >
> > Have you test this in a network namespace ?
> > i.e. kill the namespace with heave traffic through it
>
> This should not be a problem. Even without ns exit
> situation, we can have a case where device goes down,
> the output routes will start to fail and we will
> not cache route anymore. It can happen while the
> input device floods us with requests.
I've gone through the unregister code a couple of times now
and in theory it should work.
The test suit have also been running without problem
> > From what I remember this was a tricky area...
> >
> > I have some test cases for this, should I run them ?
>
> If it is easy...
>
> > > Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off by: Hans Schillstrom <hans@schillstrom.com>
> > > ---
> > > net/netfilter/ipvs/ip_vs_ctl.c | 8 +++-----
> > > 1 files changed, 3 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
> > > index c68198b..76fc8f2 100644
> > > --- a/net/netfilter/ipvs/ip_vs_ctl.c
> > > +++ b/net/netfilter/ipvs/ip_vs_ctl.c
> > > @@ -1512,10 +1512,8 @@ __ip_vs_dev_reset(struct ip_vs_dest *dest, struct net_device *dev)
> > > spin_unlock_bh(&dest->dst_lock);
> > >
> > > }
> > > -/*
> > > - * Netdev event receiver
> > > - * Currently only NETDEV_UNREGISTER is handled, i.e. if we hold a reference to
> > > - * a device that is "unregister" it must be released.
> > > +/* Netdev event receiver
> > > + * Currently only NETDEV_DOWN is handled to release refs to cached dsts
> > > */
> > > static int ip_vs_dst_event(struct notifier_block *this, unsigned long event,
> > > void *ptr)
> > > @@ -1527,7 +1525,7 @@ static int ip_vs_dst_event(struct notifier_block *this, unsigned long event,
> > > struct ip_vs_dest *dest;
> > > unsigned int idx;
> > >
> > > - if (event != NETDEV_UNREGISTER || !ipvs)
> > > + if (event != NETDEV_DOWN || !ipvs)
> > > return NOTIFY_DONE;
> > > IP_VS_DBG(3, "%s() dev=%s\n", __func__, dev->name);
> > > EnterFunction(2);
> >
> >
> > Regards
> > Hans
>
> Regards
>
> --
> Julian Anastasov <ja@ssi.bg>
Regargs
Hans
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 6177 bytes --]
next prev parent reply other threads:[~2013-03-07 7:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 8:42 [PATCH net-next 00/12] IPVS optimizations Julian Anastasov
2013-03-06 8:42 ` [PATCH net-next 01/12] net: add dst_get_noref and refdst_ptr helpers Julian Anastasov
2013-03-06 8:42 ` [PATCH net-next 02/12] ipvs: avoid routing by TOS for real server Julian Anastasov
2013-03-06 8:42 ` [PATCH net-next 03/12] ipvs: prefer NETDEV_DOWN event to free cached dsts Julian Anastasov
2013-03-06 9:56 ` Hans Schillstrom
2013-03-06 21:21 ` Julian Anastasov
2013-03-07 7:43 ` Hans Schillstrom [this message]
2013-03-06 8:42 ` [PATCH net-next 04/12] ipvs: convert the IP_VS_XMIT macros to functions Julian Anastasov
2013-03-06 8:42 ` [PATCH net-next 05/12] ipvs: rename functions related to dst_cache reset Julian Anastasov
2013-03-06 8:42 ` [PATCH net-next 06/12] ipvs: optimize dst usage for real server Julian Anastasov
2013-03-06 20:18 ` David Miller
2013-03-06 21:58 ` Julian Anastasov
2013-03-06 22:06 ` David Miller
2013-03-07 0:14 ` Julian Anastasov
2013-03-06 8:42 ` [PATCH net-next 07/12] ipvs: convert app locks Julian Anastasov
2013-03-06 8:42 ` [PATCH net-next 08/12] ipvs: remove rs_lock by using RCU Julian Anastasov
2013-03-06 8:42 ` [PATCH net-next 09/12] ipvs: convert locks used in persistence engines Julian Anastasov
2013-03-06 8:42 ` [PATCH net-next 10/12] ipvs: convert connection locking Julian Anastasov
2013-03-06 8:42 ` [PATCH net-next 11/12] ipvs: reorder keys in connection structure Julian Anastasov
2013-03-06 9:43 ` Hans Schillstrom
2013-03-06 21:01 ` Julian Anastasov
2013-03-07 7:49 ` Hans Schillstrom
2013-03-07 23:23 ` Julian Anastasov
2013-03-06 8:42 ` [PATCH net-next 12/12] ipvs: avoid kmem_cache_zalloc in ip_vs_conn_new Julian Anastasov
2013-03-07 10:09 ` [PATCH net-next 00/12] IPVS optimizations Jesper Dangaard Brouer
2013-03-07 23:46 ` Julian Anastasov
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=1362642190.17102.134.camel@hawk.mlab.se \
--to=hans@schillstrom.com \
--cc=horms@verge.net.au \
--cc=ja@ssi.bg \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).