summaryrefslogtreecommitdiff
path: root/include/net/if_inet6.h
diff options
context:
space:
mode:
authorTaehee Yoo <ap420073@gmail.com>2021-03-25 19:16:57 +0300
committerDavid S. Miller <davem@davemloft.net>2021-03-27 01:14:56 +0300
commit63ed8de4be81b699ca727e9f8e3344bd487806d7 (patch)
tree6b6e192544d99028be85265b0319489369055975 /include/net/if_inet6.h
parentf185de28d9ae6c978135993769352e523ee8df06 (diff)
downloadlinux-63ed8de4be81b699ca727e9f8e3344bd487806d7.tar.xz
mld: add mc_lock for protecting per-interface mld data
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, it uses RTNL for a long time. So it makes the control-plane bottleneck because of using RTNL. In order to avoid this bottleneck, mc_lock is added. mc_lock protect only per-interface mld data and per-interface mld data is used in the query/report event handler logic. So, no longer rtnl_lock is needed in the query/report event handler logic. Therefore bottleneck will be disappeared by mc_lock. 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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index 882e0f88756f..71bb4cc4d05d 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -190,6 +190,7 @@ struct inet6_dev {
spinlock_t mc_query_lock; /* mld query queue lock */
spinlock_t mc_report_lock; /* mld query report lock */
+ struct mutex mc_lock; /* mld global lock */
struct ifacaddr6 *ac_list;
rwlock_t lock;