Messages in this thread | | | Subject | Re: [PATCH net-next-2.6] igmp: RCU conversion of in_dev->mc_list | From | Eric Dumazet <> | Date | Fri, 12 Nov 2010 15:26:14 +0100 |
| |
Le vendredi 12 novembre 2010 à 14:34 +0100, Eric Dumazet a écrit : > Le vendredi 12 novembre 2010 à 10:22 +0100, Eric Dumazet a écrit : > > Le vendredi 12 novembre 2010 à 16:19 +0800, Américo Wang a écrit : > > > On Fri, Nov 12, 2010 at 08:27:54AM +0100, Eric Dumazet wrote: > > > > > >A RCU conversion is far more complex. > > > > > > > > > > Yup. > > > > > > Well, actually this is easy in this case. > > > > I'll post a patch to do this RCU conversion. > > > > > > Note : compile tested only, I'll appreciate if someone can test it ;) > > Note: one patch from net-2.6 is not yet included in net-next-2.6, so > please make sure you have it before testing ;) > > ( http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=18943d292facbc70e6a36fc62399ae833f64671b ) > > > Thanks > > [PATCH net-next-2.6] igmp: RCU conversion of in_dev->mc_list > > in_dev->mc_list is protected by one rwlock (in_dev->mc_list_lock). > > This can easily be converted to a RCU protection. > > Writers hold RTNL, so mc_list_lock is removed, not replaced by a > spinlock. > > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> > Cc: Cypher Wu <cypher.w@gmail.com> > Cc: Américo Wang <xiyou.wangcong@gmail.com> > ---
...
> void ip_mc_up(struct in_device *in_dev) > { > - struct ip_mc_list *i; > + struct ip_mc_list *pmc; > > ASSERT_RTNL(); > > ip_mc_inc_group(in_dev, IGMP_ALL_HOSTS); > > - for (i=in_dev->mc_list; i; i=i->next) > - igmp_group_added(i); > + for_each_pmc_rtnl(in_dev, pmc); > + igmp_group_added(pmc); > }
Oops there is an extra ; after the for_each_pmc_rtnl(in_dev, pmc)
should be
for_each_pmc_rtnl(in_dev, pmc) igmp_group_added(pmc);
-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |