diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2013-04-23 09:48:30 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-25 07:43:15 +0200 |
commit | def3117493eafd9dfa1f809d861e0031b2cc8a07 (patch) | |
tree | 93edfbb60f9d57d37d5643062cf3d41befc18579 /include/net/genetlink.h | |
parent | irda: irlmp_reasons[] can be static (diff) | |
download | linux-def3117493eafd9dfa1f809d861e0031b2cc8a07.tar.xz linux-def3117493eafd9dfa1f809d861e0031b2cc8a07.zip |
genl: Allow concurrent genl callbacks.
All genl callbacks are serialized by genl-mutex. This can become
bottleneck in multi threaded case.
Following patch adds an parameter to genl_family so that a
particular family can get concurrent netlink callback without
genl_lock held.
New rw-sem is used to protect genl callback from genl family unregister.
in case of parallel_ops genl-family read-lock is taken for callbacks and
write lock is taken for register or unregistration for any family.
In case of locked genl family semaphore and gel-mutex is locked for
any openration.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/genetlink.h')
-rw-r--r-- | include/net/genetlink.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index bdfbe68c1c3b..93024a47e0e2 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h @@ -50,6 +50,7 @@ struct genl_family { unsigned int version; unsigned int maxattr; bool netnsok; + bool parallel_ops; int (*pre_doit)(struct genl_ops *ops, struct sk_buff *skb, struct genl_info *info); |