Re: [PATCH v2] bridge: Fix a deadlock when enabling multicast snooping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +     if (join_snoopers)
> > +             br_multicast_join_snoopers(br);
> > +     else if (leave_snoopers)
> > +             br_multicast_leave_snoopers(br);
> 
> If I'm not missing anything this can be just 1 bool like "change_snoopers" or
> something which if set to true will check BROPT_MULTICAST_ENABLED and
> act accordingly, i.e.
> if (change_snoopers) {
>     if (br_opt_get(br, BROPT_MULTICAST_ENABLED))
>          br_multicast_join_snoopers(br);
>     else
>          br_multicast_leave_snoopers(br); }
> 
> This is not really something critical, just an observation. Up to your
> preference if you decide to leave it with 2 bools. :-)
> 
> Cheers,
>  Nik

I wasn't sure how expensive the call to br_opt_get is, so I used a bool for each.

I just checked and it seems that br_opt_get is probably just as cheap as a bool,
so I'll change it according to what you suggested here.

Thanks for your comments!!

Thanks,
Joseph



[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux