aboutsummaryrefslogtreecommitdiff
path: root/include/net/if_inet6.h
diff options
context:
space:
mode:
authorTaehee Yoo2021-03-25 16:16:56 +0000
committerDavid S. Miller2021-03-26 15:14:56 -0700
commitf185de28d9ae6c978135993769352e523ee8df06 (patch)
treeb1e12395c08baaa2a40006a9924775339c3d4713 /include/net/if_inet6.h
parent88e2ca3080947fe22eb520c1f8231e79a105d011 (diff)
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/if_inet6.h')
-rw-r--r--include/net/if_inet6.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index 521158e05c18..882e0f88756f 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -125,7 +125,6 @@ struct ifmcaddr6 {
unsigned int mca_flags;
int mca_users;
refcount_t mca_refcnt;
- spinlock_t mca_lock;
unsigned long mca_cstamp;
unsigned long mca_tstamp;
struct rcu_head rcu;
@@ -183,6 +182,14 @@ struct inet6_dev {
struct delayed_work mc_gq_work; /* general query work */
struct delayed_work mc_ifc_work; /* interface change work */
struct delayed_work mc_dad_work; /* dad complete mc work */
+ struct delayed_work mc_query_work; /* mld query work */
+ struct delayed_work mc_report_work; /* mld report work */
+
+ struct sk_buff_head mc_query_queue; /* mld query queue */
+ struct sk_buff_head mc_report_queue; /* mld report queue */
+
+ spinlock_t mc_query_lock; /* mld query queue lock */
+ spinlock_t mc_report_lock; /* mld query report lock */
struct ifacaddr6 *ac_list;
rwlock_t lock;