From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-he1eur01on0095.outbound.protection.outlook.com ([104.47.0.95]:24803 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933589AbeCELcF (ORCPT ); Mon, 5 Mar 2018 06:32:05 -0500 Subject: [PATCH net-next 09/12] net: Convert ip_set_net_ops From: Kirill Tkhai To: pablo@netfilter.org, kadlec@blackhole.kfki.hu, fw@strlen.de, stephen@networkplumber.org, davem@davemloft.net, dmitry.tarnyagin@lockless.no, socketcan@hartkopp.net, mkl@pengutronix.de, gerrit@erg.abdn.ac.uk, yoshfuji@linux-ipv6.org, johannes.berg@intel.com, garsilva@embeddedor.com, ross.lagerwall@citrix.com, aconole@bytheb.org, netdev@vger.kernel.org, ktkhai@virtuozzo.com Date: Mon, 05 Mar 2018 14:31:55 +0300 Message-ID: <152024951577.3454.14264548824398031027.stgit@localhost.localdomain> In-Reply-To: <152024910817.3454.18426950407771593279.stgit@localhost.localdomain> References: <152024910817.3454.18426950407771593279.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: These pernet_operations initialize and destroy net_generic(net, ip_set_net_id)-related data. Since ip_set is under CONFIG_IP_SET, it's easy to watch drivers, which depend on this config. All of them are in net/netfilter/ipset directory, except of net/netfilter/xt_set.c. There are no more drivers, which use ip_set, and all of the above don't register another pernet_operations. Also, there are is no indirect users, as header file include/linux/netfilter/ipset/ip_set.h does not define indirect users by something like this: #ifdef CONFIG_IP_SET extern func(void); #else static inline func(void); #endif So, there are no more pernet operations, dereferencing net_generic(net, ip_set_net_id). ip_set_net_ops are OK to be executed in parallel for several net, so we mark them as async. Signed-off-by: Kirill Tkhai --- net/netfilter/ipset/ip_set_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c index 975a85a48d39..2523ebe2b3cc 100644 --- a/net/netfilter/ipset/ip_set_core.c +++ b/net/netfilter/ipset/ip_set_core.c @@ -2094,7 +2094,8 @@ static struct pernet_operations ip_set_net_ops = { .init = ip_set_net_init, .exit = ip_set_net_exit, .id = &ip_set_net_id, - .size = sizeof(struct ip_set_net) + .size = sizeof(struct ip_set_net), + .async = true, }; static int __init