]> git.baikalelectronics.ru Git - kernel.git/commit
mld: add new workqueues for process mld events
authorTaehee Yoo <ap420073@gmail.com>
Thu, 25 Mar 2021 16:16:56 +0000 (16:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Mar 2021 22:14:56 +0000 (15:14 -0700)
commit76fa0d5bd59a4fef2a64b3aed597d437f2542e4f
treeb1e12395c08baaa2a40006a9924775339c3d4713
parent1913a80165c5522c628491ea5d9fdf0ff8650204
mld: add new workqueues for process mld events

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 | report}_queue are added so it
is per-interface queue.
And mc_{query | report}_work are workqueue structure.

When the query or report event is received, skb is queued to proper
queue and worker function is scheduled immediately.
Workqueues and queues are protected by spinlock, which is
mc_{query | report}_lock, and worker functions are protected by RTNL.

Suggested-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/if_inet6.h
include/net/mld.h
net/ipv6/icmp.c
net/ipv6/mcast.c