summaryrefslogtreecommitdiff
path: root/include/net/mld.h
diff options
context:
space:
mode:
authorTaehee Yoo <ap420073@gmail.com>2021-03-25 19:16:56 +0300
committerDavid S. Miller <davem@davemloft.net>2021-03-27 01:14:56 +0300
commitf185de28d9ae6c978135993769352e523ee8df06 (patch)
treeb1e12395c08baaa2a40006a9924775339c3d4713 /include/net/mld.h
parent88e2ca3080947fe22eb520c1f8231e79a105d011 (diff)
downloadlinux-f185de28d9ae6c978135993769352e523ee8df06.tar.xz
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>
Diffstat (limited to 'include/net/mld.h')
-rw-r--r--include/net/mld.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/mld.h b/include/net/mld.h
index 496bddb59942..c07359808493 100644
--- a/include/net/mld.h
+++ b/include/net/mld.h
@@ -92,6 +92,9 @@ struct mld2_query {
#define MLD_EXP_MIN_LIMIT 32768UL
#define MLDV1_MRD_MAX_COMPAT (MLD_EXP_MIN_LIMIT - 1)
+#define MLD_MAX_QUEUE 8
+#define MLD_MAX_SKBS 32
+
static inline unsigned long mldv2_mrc(const struct mld2_query *mlh2)
{
/* RFC3810, 5.1.3. Maximum Response Code */