Re: [PATCH net-next] bridge: allow setting hash_max + multicast_router if interface is down

2015-05-21 Thread Cong Wang
On Thu, May 21, 2015 at 8:17 PM, Herbert Xu wrote: > On Thu, May 21, 2015 at 08:11:32PM -0700, Cong Wang wrote: >> >> For me it looks like we do use p->rlist in BH context, but I could easily >> miss something here. > > Because the caller disables BH for us. > Right, I thought port attr setting

Re: [PATCH net-next] bridge: allow setting hash_max + multicast_router if interface is down

2015-05-21 Thread Herbert Xu
On Thu, May 21, 2015 at 08:11:32PM -0700, Cong Wang wrote: > > For me it looks like we do use p->rlist in BH context, but I could easily > miss something here. Because the caller disables BH for us. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gon

Re: [PATCH net-next] bridge: allow setting hash_max + multicast_router if interface is down

2015-05-21 Thread Herbert Xu
On Fri, May 22, 2015 at 02:56:01AM +0200, Linus Lüssing wrote: > Network managers like netifd (used in OpenWRT for instance) try to > configure interface options after creation but before setting the > interface up. > > Unfortunately the sysfs / bridge currently only allows to configure the > hash

Re: [PATCH net-next] bridge: allow setting hash_max + multicast_router if interface is down

2015-05-21 Thread Cong Wang
On Thu, May 21, 2015 at 5:56 PM, Linus Lüssing wrote: > diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c > index 2d69d5c..066199e 100644 > --- a/net/bridge/br_multicast.c > +++ b/net/bridge/br_multicast.c > @@ -1775,8 +1775,6 @@ int br_multicast_set_router(struct net_bridge *br,

Re: [PATCH net-next] bridge: allow setting hash_max + multicast_router if interface is down

2015-05-21 Thread roopa
On 5/21/15, 5:56 PM, Linus Lüssing wrote: Network managers like netifd (used in OpenWRT for instance) try to configure interface options after creation but before setting the interface up. Unfortunately the sysfs / bridge currently only allows to configure the hash_max and multicast_router optio

[PATCH net-next] bridge: allow setting hash_max + multicast_router if interface is down

2015-05-21 Thread Linus Lüssing
Network managers like netifd (used in OpenWRT for instance) try to configure interface options after creation but before setting the interface up. Unfortunately the sysfs / bridge currently only allows to configure the hash_max and multicast_router options when the bridge interface is up. But sinc

Re: [RFC PATCH net-next] bridge: allow setting hash_max + multicast_router if interface is down

2015-05-21 Thread Linus Lüssing
On Thu, May 21, 2015 at 11:49:21AM +0800, Herbert Xu wrote: > The timer operations are all supposed to be idempotent. So enabling > a port twice or stopping it twice should be OK. Oki doki. > > > * Might calls to br_multicast_add_router() via br_multicast_enable_port() > > cause unintended si

Re: [RFC PATCH net-next] bridge: allow setting hash_max + multicast_router if interface is down

2015-05-20 Thread Herbert Xu
On Thu, May 21, 2015 at 04:59:22AM +0200, Linus Lüssing wrote: > > * For i=br_multicast_init(), e=br_multicast_enable() and > s=br_multicast_stop() is the order i->e->s->e->s->e->... always > ensured by the netdev API? Will this work even if I have br_multicast_init always happens first obvio

[RFC PATCH net-next] bridge: allow setting hash_max + multicast_router if interface is down

2015-05-20 Thread Linus Lüssing
Network managers like netifd (used in OpenWRT for instance) try to configure interface options after creation but before setting the interface up. Unfortunately the sysfs / bridge currently only allows to configure the hash_max and multicast_router options when the bridge interface is up. But sinc