netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Flavio Leitner <fbl@redhat.com>
To: Andy Gospodarek <andy@greyhouse.net>
Cc: netdev@vger.kernel.org, bonding-devel@lists.sourceforge.net,
	Jay Vosburgh <fubar@us.ibm.com>
Subject: Re: [PATCH v2] bonding: rejoin multicast groups on VLANs
Date: Tue, 5 Oct 2010 19:07:57 -0300	[thread overview]
Message-ID: <20101005220757.GB19931@redhat.com> (raw)
In-Reply-To: <20101004132409.GA7497@gospo.rdu.redhat.com>

On Mon, Oct 04, 2010 at 09:24:10AM -0400, Andy Gospodarek wrote:
> On Thu, Sep 30, 2010 at 05:45:24PM -0300, Flavio Leitner wrote:
> > It fixes bonding to rejoin multicast groups added
> > to VLAN devices on top of bonding when a failover
> > happens.
> > 
> > Signed-off-by: Flavio Leitner <fleitner@redhat.com>
> > ---
> >  drivers/net/bonding/bond_main.c |   61 +++++++++++++++++++++++++++++++++-----
> >  drivers/net/bonding/bonding.h   |    1 +
> >  2 files changed, 54 insertions(+), 8 deletions(-)
> > 
> [...]
> > @@ -944,7 +979,9 @@ static void bond_mc_swap(struct bonding *bond, struct slave *new_active,
> >  
> >  		netdev_for_each_mc_addr(ha, bond->dev)
> >  			dev_mc_add(new_active->dev, ha->addr);
> > -		bond_resend_igmp_join_requests(bond);
> > +
> > +		/* rejoin multicast groups */
> > +		queue_delayed_work(bond->wq, &bond->mcast_work, 0);
> >  	}
> >  }
> >  
> 
> I was hoping that one patch would just make the changes so
> retransmission was supported on VLANs and the second patch would queue
> the work and add the tunable for multiple retransmissions, but I guess
> it wasn't clear enough.
> 
> I felt like that would divide the patches up into the bug-fix (VLANs +
> multicast not working) and the new feature (multiple retransmissions
> from the workqueue).

I'm not seeing how to that because the first patch changes to send
the membership directly and not using timers anymore, so the call
trace usually is:

 write_lock_bh(&bond->curr_slave_lock); <-- hold lock
 bond_select_active_slave() 
  ->bond_change_active_slave()
     ->bond_mc_swap()
        ->tx membership reports
 

then trying to send the IGMP packet directly, it will end up at:
  bond_start_xmit()
   ->bond_xmit_activebackup() (mode=1, for example)
      ->read_lock(&bond->lock);
      ->read_lock(&bond->curr_slave_lock); <-- deadlock


> I will test these out this morning and make sure things look good.

I have a better patch sequence which I'm planning post replying to
this thread as soon as I finish up testing them. It is still using
workqueue though.

--
Flavio

  reply	other threads:[~2010-10-05 22:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-29  7:12 [PATCH] bonding: rejoin multicast groups on VLANs Flavio Leitner
2010-09-29 13:17 ` Flavio Leitner
2010-09-30 20:45   ` [PATCH v2] " Flavio Leitner
2010-10-04 13:24     ` Andy Gospodarek
2010-10-05 22:07       ` Flavio Leitner [this message]
2010-10-06  0:23         ` [PATCH 1/3] " Flavio Leitner
2010-10-06  3:28           ` David Miller
2010-10-06 12:12             ` Andy Gospodarek
2010-10-06  0:23         ` [PATCH 2/3] bonding: fix to rejoin multicast groups immediately Flavio Leitner
2010-10-06  3:28           ` David Miller
2010-10-06  0:23         ` [PATCH 3/3] bonding: add retransmit membership reports tunable Flavio Leitner
2010-10-06  3:29           ` David Miller
2010-09-30 20:46   ` [PATCH] " Flavio Leitner
2010-09-29 18:44 ` [PATCH] bonding: rejoin multicast groups on VLANs Andy Gospodarek
2010-09-29 19:35   ` Flavio Leitner
2010-09-29 19:54     ` Andy Gospodarek
2010-09-29 20:38       ` Flavio Leitner

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=20101005220757.GB19931@redhat.com \
    --to=fbl@redhat.com \
    --cc=andy@greyhouse.net \
    --cc=bonding-devel@lists.sourceforge.net \
    --cc=fubar@us.ibm.com \
    --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).