[Bridge] [PATCHv2 net] net: bridge: mcast: QRI must be less than QI

2021-10-19 Thread Hangbin Liu
Based on RFC3376 8.3: The number of seconds represented by the [Query Response Interval] must be less than the [Query Interval]. Fixes: d902eee43f19 ("bridge: Add multicast count/interval sysfs entries") Signed-off-by: Hangbin Liu --- net/bridge/br_multicast.c| 27

[Bridge] [PATCH net] net: bridge: mcast: QRI must be less than QI

2021-10-19 Thread Hangbin Liu
Based on RFC3376 8.3: The number of seconds represented by the [Query Response Interval] must be less than the [Query Interval]. Fixes: d902eee43f19 ("bridge: Add multicast count/interval sysfs entries") Signed-off-by: Hangbin Liu --- net/bridge/br_multicast.c| 27

Re: [Bridge] [PATCH net] net: bridge: mcast: Do not allow users to set IGMP counter/timer to zero

2021-10-19 Thread Hangbin Liu
On Tue, Oct 19, 2021 at 07:09:42PM +0300, Nikolay Aleksandrov wrote: > > I started this patch when I saw there is not limit for setting > > multicast_membership_interval to 0, which will cause bridge remove the > > mdb directly after adding. Do you think this is a problem. > > > > And what about

Re: [Bridge] [PATCH net] net: bridge: mcast: Do not allow users to set IGMP counter/timer to zero

2021-10-19 Thread Nikolay Aleksandrov via Bridge
On 19/10/2021 08:43, Hangbin Liu wrote: > Hi Nikolay, > > On Mon, Oct 18, 2021 at 01:28:14PM +0300, Nikolay Aleksandrov wrote: >> On 18/10/2021 11:26, Hangbin Liu wrote: >>> There is no meaning to set an IGMP counter/timer to 0. Or it will cause >>> unexpected behavior. E.g. if set

[Bridge] [PATCH v3 net-next] net: make use of helper netif_is_bridge_master()

2021-10-19 Thread Kyungrok Chung
Make use of netdev helper functions to improve code readability. Replace 'dev->priv_flags & IFF_EBRIDGE' with netif_is_bridge_master(dev). Signed-off-by: Kyungrok Chung --- v1->v2: - Apply fixes to batman-adv, core too. v2->v3: - Fix wrong logic. net/batman-adv/multicast.c | 2 +-

[Bridge] [PATCH v2 net-next] net: make use of helper netif_is_bridge_master()

2021-10-19 Thread Kyungrok Chung
Make use of netdev helper functions to improve code readability. Replace 'dev->priv_flags & IFF_EBRIDGE' with netif_is_bridge_master(dev). Signed-off-by: Kyungrok Chung --- v1->v2: - Apply fixes to batman-adv, core too. net/batman-adv/multicast.c | 2 +- net/bridge/br.c

[Bridge] [PATCH net-next] net: bridge: make use of helper netif_is_bridge_master()

2021-10-19 Thread Kyungrok Chung
Make use of netdev helper functions to improve code readability. Replace 'dev->priv_flags & IFF_EBRIDGE' with netif_is_bridge_master(dev). Signed-off-by: Kyungrok Chung --- net/bridge/br.c | 4 ++-- net/bridge/br_fdb.c | 6 +++--- net/bridge/br_if.c | 2