Subject: Re: [PATCH 3/3] netdevice: order of synchronization of IFF_PROMISC and IFF_ALLMULTI

From: Wang Chen <[email-masked]>
Date: Wed, 18 Jun 2008 11:22:31 +0800

Jeff Garzik said the following on 2008-6-18 10:52:
> Wang Chen wrote:
>> Jeff,
>> Any suggestion about this?
>> netdevice uses promiscuity as refcnt, and if driver set IFF_PROMISC
>> but don't change promiscuity will break the refcnt.
> 
> Drivers should not be setting IFF_* flags in set_multicast_list().
> 
> The normal logic is that a driver interprets the request implied in
> set_multicast_list ("promisc, all-multi, or select multi?"), and then
> programs the hardware based on that.
> 
> On some hardware, IFF_ALLMULTI requires that the hardware receive all
> packets (promisc).  Even for that case, the driver should -not- be
> setting the IFF_PROMISC flag.  It should be aware of its own hardware
> programming state through some other method.
> 

OK. Roger that.
If Alan does not oppose it, I will send patches to these drivers later.
Thank you :-)