Re: [PATCH net-next v3 0/7] mld: change context from atomic to sleepable

2021-03-25 Thread Taehee Yoo
On 3/26/21 1:16 AM, Taehee Yoo wrote: This patchset changes the context of MLD module. Before this patchset, MLD functions are atomic context so it couldn't use sleepable functions and flags. There are several reasons why MLD functions are under atomic context. 1. It uses timer API. Timer

[PATCH net-next v3 7/7] mld: add mc_lock for protecting per-interface mld data

2021-03-25 Thread Taehee Yoo
The purpose of this lock is to avoid a bottleneck in the query/report event handler logic. By previous patches, almost all mld data is protected by RTNL. So, the query and report event handler, which is data path logic acquires RTNL too. Therefore if a lot of query and report events are received,

[PATCH net-next v3 6/7] mld: add new workqueues for process mld events

2021-03-25 Thread Taehee Yoo
When query/report packets are received, mld module processes them. But they are processed under BH context so it couldn't use sleepable functions. So, in order to switch context, the two workqueues are added which processes query and report event. In the struct inet6_dev, mc_{query |

[PATCH net-next v3 5/7] mld: convert ifmcaddr6 to RCU

2021-03-25 Thread Taehee Yoo
The ifmcaddr6 has been protected by inet6_dev->lock(rwlock) so that the critical section is atomic context. In order to switch this context, changing locking is needed. The ifmcaddr6 actually already protected by RTNL So if it's converted to use RCU, its control path context can be switched to

[PATCH net-next v3 4/7] mld: convert ip6_sf_list to RCU

2021-03-25 Thread Taehee Yoo
The ip6_sf_list has been protected by mca_lock(spin_lock) so that the critical section is atomic context. In order to switch this context, changing locking is needed. The ip6_sf_list actually already protected by RTNL So if it's converted to use RCU, its control path context can be switched to

[PATCH net-next v3 0/7] mld: change context from atomic to sleepable

2021-03-25 Thread Taehee Yoo
This patchset changes the context of MLD module. Before this patchset, MLD functions are atomic context so it couldn't use sleepable functions and flags. There are several reasons why MLD functions are under atomic context. 1. It uses timer API. Timer expiration functions are executed in the

[PATCH net-next v3 3/7] mld: convert ipv6_mc_socklist->sflist to RCU

2021-03-25 Thread Taehee Yoo
The sflist has been protected by rwlock so that the critical section is atomic context. In order to switch this context, changing locking is needed. The sflist actually already protected by RTNL So if it's converted to use RCU, its control path context can be switched to sleepable. Suggested-by:

[PATCH net-next v3 2/7] mld: get rid of inet6_dev->mc_lock

2021-03-25 Thread Taehee Yoo
The purpose of mc_lock is to protect inet6_dev->mc_tomb. But mc_tomb is already protected by RTNL and all functions, which manipulate mc_tomb are called under RTNL. So, mc_lock is not needed. Furthermore, it is spinlock so the critical section is atomic. In order to reduce atomic context, it

[PATCH net-next v3 1/7] mld: convert from timer to delayed work

2021-03-25 Thread Taehee Yoo
mcast.c has several timers for delaying works. Timer's expire handler is working under atomic context so it can't use sleepable things such as GFP_KERNEL, mutex, etc. In order to use sleepable APIs, it converts from timers to delayed work. But there are some critical sections, which is used by

Re: Batman adv selective broadcast mechanism

2021-03-25 Thread oytunyapar
Hi Linus, Thank you for the answer. Configuring batman-adv from /sys is deprecated in the last version (batctl is the only way now). I am not sure how to apply this patch. What do you suggest as a proper way of doing this? Regards. Oytun