From patchwork Tue Feb 2 13:55:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 375889 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16FB5C433E9 for ; Tue, 2 Feb 2021 14:38:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D5A7364F50 for ; Tue, 2 Feb 2021 14:38:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234676AbhBBOiQ (ORCPT ); Tue, 2 Feb 2021 09:38:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:51352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231262AbhBBORr (ORCPT ); Tue, 2 Feb 2021 09:17:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2DECB64FC7; Tue, 2 Feb 2021 13:55:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612274152; bh=mfmlJHMI6yFr64wRzHKtS4W4P42yrVgDCbbvPMoKAGY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NoxQLkdyV4FP7VWWxxoG8/TpmyzxT3yA3k6n03uZ+AzksrQbhchiBrL0NhXvDFzxX J/BnHcIiixqzcPJO7TacexxGvlXOdn00VtjHzki3C3raoE4xhGBL86KpbCu7aXaeJL jLkaVvgKWAuW20Vwh2Y8OR8KgxpN+ytCs5eaCwF+RZfhB2RM4xQrDN8xIqJqE7Qv86 Ppmb4ReBz9zdnjA3O1akQqkydM7SMnhyBMuNCtugT7gbn3F5AwXY1Psr1Z8wEUesqe 0NEpzOHWKs0rCYV9WDdyX1pAdrMm41aVkB8RjJSHkiun5AMUjYscnP0VDpU9TIKQxw KvUD2zgyqsnHQ== From: Leon Romanovsky To: Jakub Kicinski , "David S. Miller" , Pablo Neira Ayuso Cc: Leon Romanovsky , coreteam@netfilter.org, Eric Dumazet , Florian Westphal , Hideaki YOSHIFUJI , Jozsef Kadlecsik , Julian Anastasov , linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org, Matteo Croce , netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, Simon Horman Subject: [PATCH net 1/4] ipv6: silence compilation warning for non-IPV6 builds Date: Tue, 2 Feb 2021 15:55:41 +0200 Message-Id: <20210202135544.3262383-2-leon@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210202135544.3262383-1-leon@kernel.org> References: <20210202135544.3262383-1-leon@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Leon Romanovsky The W=1 compilation of allmodconfig generates the following warning: net/ipv6/icmp.c:448:6: warning: no previous prototype for 'icmp6_send' [-Wmissing-prototypes] 448 | void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info, | ^~~~~~~~~~ In such configuration, the icmp6_send() is not used outside of icmp.c, so close its EXPORT_SYMBOL and add "static" word to limit the scope. Fixes: cc7a21b6fbd9 ("ipv6: icmp6: avoid indirect call for icmpv6_send()") Signed-off-by: Leon Romanovsky --- net/ipv6/icmp.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.29.2 diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index f3d05866692e..5d4232b492dc 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -445,6 +445,9 @@ static int icmp6_iif(const struct sk_buff *skb) /* * Send an ICMP message in response to a packet in error */ +#if !IS_BUILTIN(CONFIG_IPV6) +static +#endif void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info, const struct in6_addr *force_saddr) { @@ -634,7 +637,10 @@ void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info, out_bh_enable: local_bh_enable(); } + +#if IS_BUILTIN(CONFIG_IPV6) EXPORT_SYMBOL(icmp6_send); +#endif /* Slightly more convenient version of icmp6_send. */ From patchwork Tue Feb 2 13:55:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 375890 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 844C2C433DB for ; Tue, 2 Feb 2021 14:37:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 45FB964EAC for ; Tue, 2 Feb 2021 14:37:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234491AbhBBOhc (ORCPT ); Tue, 2 Feb 2021 09:37:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:51360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231270AbhBBORr (ORCPT ); Tue, 2 Feb 2021 09:17:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 88C1564FC9; Tue, 2 Feb 2021 13:55:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612274156; bh=DR0Ao7cYzAFwiQZi+Sf24cz1CDI9PHhlVdfFgDadyMs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QlcB7nd4RJe57D3/ViU+Q+KQbLURKQKpBZsn7jgpVKIgMv2prrmmdqfKm2pEonFv3 PuXfa/TBYbqB1pVYfj1h+o17M1UxS2U8jvkMNdfYHrvNFYlY0JBrdXiIx5/++tq39I Pk9rn1X0SfZUIrnYl/PArrVQR/6ITsoHxSK0z6EH+t4m5ceeSApG46QYfryT0rLPKo 08sR2h8/LWZacRA/KbS0Gnhojjy7ZpWCwgPov8xsmcUUbAGjnP0jPbIIOvHG+jxJsm s02UNd9nSYDcD0nfv19UqvbDP2uGhU+cTZGyj0sMDtDkitroGXGQApYZ6mGeviUkKp 59IXCB/MIr3rg== From: Leon Romanovsky To: Jakub Kicinski , "David S. Miller" , Pablo Neira Ayuso Cc: Leon Romanovsky , coreteam@netfilter.org, Eric Dumazet , Florian Westphal , Hideaki YOSHIFUJI , Jozsef Kadlecsik , Julian Anastasov , linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org, Matteo Croce , netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, Simon Horman Subject: [PATCH net 2/4] ipv6: move udp declarations to net/udp.h Date: Tue, 2 Feb 2021 15:55:42 +0200 Message-Id: <20210202135544.3262383-3-leon@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210202135544.3262383-1-leon@kernel.org> References: <20210202135544.3262383-1-leon@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Leon Romanovsky Fix the following compilation warning: net/ipv6/udp.c:1031:30: warning: no previous prototype for 'udp_v6_early_demux' [-Wmissing-prototypes] 1031 | INDIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb) | ^~~~~~~~~~~~~~~~~~ net/ipv6/udp.c:1072:29: warning: no previous prototype for 'udpv6_rcv' [-Wmissing-prototypes] 1072 | INDIRECT_CALLABLE_SCOPE int udpv6_rcv(struct sk_buff *skb) | ^~~~~~~~~ Fixes: 97ff7ffb11fe ("net: use indirect calls helpers at early demux stage") Signed-off-by: Leon Romanovsky --- include/net/udp.h | 3 +++ net/ipv6/ip6_input.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) -- 2.29.2 diff --git a/include/net/udp.h b/include/net/udp.h index 877832bed471..ff2de866bca4 100644 --- a/include/net/udp.h +++ b/include/net/udp.h @@ -173,6 +173,9 @@ INDIRECT_CALLABLE_DECLARE(int udp4_gro_complete(struct sk_buff *, int)); INDIRECT_CALLABLE_DECLARE(struct sk_buff *udp6_gro_receive(struct list_head *, struct sk_buff *)); INDIRECT_CALLABLE_DECLARE(int udp6_gro_complete(struct sk_buff *, int)); +INDIRECT_CALLABLE_DECLARE(void udp_v6_early_demux(struct sk_buff *)); +INDIRECT_CALLABLE_DECLARE(int udpv6_rcv(struct sk_buff *)); + struct sk_buff *udp_gro_receive(struct list_head *head, struct sk_buff *skb, struct udphdr *uh, struct sock *sk); int udp_gro_complete(struct sk_buff *skb, int nhoff, udp_lookup_t lookup); diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index e96304d8a4a7..e9d2a4a409aa 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c @@ -32,6 +32,7 @@ #include #include +#include #include #include @@ -44,7 +45,6 @@ #include #include -INDIRECT_CALLABLE_DECLARE(void udp_v6_early_demux(struct sk_buff *)); INDIRECT_CALLABLE_DECLARE(void tcp_v6_early_demux(struct sk_buff *)); static void ip6_rcv_finish_core(struct net *net, struct sock *sk, struct sk_buff *skb) @@ -352,7 +352,6 @@ void ipv6_list_rcv(struct list_head *head, struct packet_type *pt, ip6_sublist_rcv(&sublist, curr_dev, curr_net); } -INDIRECT_CALLABLE_DECLARE(int udpv6_rcv(struct sk_buff *)); INDIRECT_CALLABLE_DECLARE(int tcp_v6_rcv(struct sk_buff *)); /* From patchwork Tue Feb 2 13:55:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 375014 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50A02C43381 for ; Tue, 2 Feb 2021 14:39:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2952464DD5 for ; Tue, 2 Feb 2021 14:39:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234687AbhBBOiU (ORCPT ); Tue, 2 Feb 2021 09:38:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:51486 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231600AbhBBORu (ORCPT ); Tue, 2 Feb 2021 09:17:50 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 77DB264FCE; Tue, 2 Feb 2021 13:56:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612274163; bh=zu3Gt86SXPGyJWhY6nCI9luwiVCzfhk0z+r+Ls5Rfsc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eBcIfldF414TuIyses6UVoMzupyh9IaC8jGkXzEkvrIw6yjqvDx9iLphF60SKQIRm lKKxzJkgwuvIPZGq5oNzAPHmF9r87EVhenxbMmUE5SnQMujkPrdL71l6KZDJ7/hFSg SW8oDI8/Y4ck4lGfXsx6r2pEW9ZKdXmTLk8FdMIdj8mC4E17RunuRENEACZiDd5LXo i2b6MqkLDeBUw3SmWi1lYiCHpJaUY4Df6c/uFYWfTRFhR6oE+MGoYR/+Jpqh7FO6IK B1aVroWkbFqbzQi89Kf94TxN1Lq2CdgNFNOAF7IvipR5XlYH8iNvSoXTN2TKgR23m+ BcNc+r+KE5Z4w== From: Leon Romanovsky To: Jakub Kicinski , "David S. Miller" , Pablo Neira Ayuso Cc: Leon Romanovsky , coreteam@netfilter.org, Eric Dumazet , Florian Westphal , Hideaki YOSHIFUJI , Jozsef Kadlecsik , Julian Anastasov , linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org, Matteo Croce , netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, Simon Horman Subject: [PATCH net 3/4] net/core: move ipv6 gro function declarations to net/ipv6 Date: Tue, 2 Feb 2021 15:55:43 +0200 Message-Id: <20210202135544.3262383-4-leon@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210202135544.3262383-1-leon@kernel.org> References: <20210202135544.3262383-1-leon@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Leon Romanovsky Fir the following compilation warnings: 1031 | INDIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb) net/ipv6/ip6_offload.c:182:41: warning: no previous prototype for ‘ipv6_gro_receive’ [-Wmissing-prototypes] 182 | INDIRECT_CALLABLE_SCOPE struct sk_buff *ipv6_gro_receive(struct list_head *head, | ^~~~~~~~~~~~~~~~ net/ipv6/ip6_offload.c:320:29: warning: no previous prototype for ‘ipv6_gro_complete’ [-Wmissing-prototypes] 320 | INDIRECT_CALLABLE_SCOPE int ipv6_gro_complete(struct sk_buff *skb, int nhoff) | ^~~~~~~~~~~~~~~~~ net/ipv6/ip6_offload.c:182:41: warning: no previous prototype for ‘ipv6_gro_receive’ [-Wmissing-prototypes] 182 | INDIRECT_CALLABLE_SCOPE struct sk_buff *ipv6_gro_receive(struct list_head *head, | ^~~~~~~~~~~~~~~~ net/ipv6/ip6_offload.c:320:29: warning: no previous prototype for ‘ipv6_gro_complete’ [-Wmissing-prototypes] 320 | INDIRECT_CALLABLE_SCOPE int ipv6_gro_complete(struct sk_buff *skb, int nhoff) Fixes: aaa5d90b395a ("net: use indirect call wrappers at GRO network layer") Signed-off-by: Leon Romanovsky --- include/net/ipv6.h | 3 +++ net/core/dev.c | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) -- 2.29.2 diff --git a/include/net/ipv6.h b/include/net/ipv6.h index bd1f396cc9c7..68676e6bd4b1 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -1265,4 +1265,7 @@ static inline void ip6_sock_set_recvpktinfo(struct sock *sk) release_sock(sk); } +INDIRECT_CALLABLE_DECLARE(struct sk_buff *ipv6_gro_receive(struct list_head *, + struct sk_buff *)); +INDIRECT_CALLABLE_DECLARE(int ipv6_gro_complete(struct sk_buff *, int)); #endif /* _NET_IPV6_H */ diff --git a/net/core/dev.c b/net/core/dev.c index c360bb5367e2..9a3d8768524b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -101,6 +101,7 @@ #include #include #include +#include #include #include #include @@ -5743,7 +5744,6 @@ static void gro_normal_one(struct napi_struct *napi, struct sk_buff *skb) } INDIRECT_CALLABLE_DECLARE(int inet_gro_complete(struct sk_buff *, int)); -INDIRECT_CALLABLE_DECLARE(int ipv6_gro_complete(struct sk_buff *, int)); static int napi_gro_complete(struct napi_struct *napi, struct sk_buff *skb) { struct packet_offload *ptype; @@ -5914,8 +5914,6 @@ static void gro_flush_oldest(struct napi_struct *napi, struct list_head *head) INDIRECT_CALLABLE_DECLARE(struct sk_buff *inet_gro_receive(struct list_head *, struct sk_buff *)); -INDIRECT_CALLABLE_DECLARE(struct sk_buff *ipv6_gro_receive(struct list_head *, - struct sk_buff *)); static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb) { u32 hash = skb_get_hash_raw(skb) & (GRO_HASH_BUCKETS - 1); From patchwork Tue Feb 2 13:55:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 375016 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54972C433E0 for ; Tue, 2 Feb 2021 14:38:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C68064DD5 for ; Tue, 2 Feb 2021 14:38:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234523AbhBBOiB (ORCPT ); Tue, 2 Feb 2021 09:38:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:51384 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231499AbhBBORr (ORCPT ); Tue, 2 Feb 2021 09:17:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0966264FCD; Tue, 2 Feb 2021 13:55:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612274159; bh=uqEQxgxP/Gh6jkafzcZMwsNruCxCCpY2QrRHAchjz/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AJZKCAkxo4iNw6GvoaohZFZ6alAc19sFBqoWDRu0qkz7f0ZiSqji/3BwP2DQizckW fRCRjI2NTiTh4HFtW09AF6rjvmTdGcbbCFqEdIZ0kAJYrmdiCtMrPEuD4IN5B0NoHN WQ7J+ebZG6SJdlu1w8kHoaIB0H2kINRmq+k14SML6PRIIMoJCf/mwHEc8g6Sn6uuPB 9ztrCNZy9RseBE9g48WJ1yyI4PSypSHvbw6W7/XfdLfgT+1RiaEuTyEzr1DmCXFzvR +67DFBd9dAd0Yd7JEfyZgxSstDlupg0aeJVm+Fad5uyt/lyxFU43SDI3UNHASfsRej 9xDdTDpTFlGOA== From: Leon Romanovsky To: Jakub Kicinski , "David S. Miller" , Pablo Neira Ayuso Cc: Leon Romanovsky , coreteam@netfilter.org, Eric Dumazet , Florian Westphal , Hideaki YOSHIFUJI , Jozsef Kadlecsik , Julian Anastasov , linux-kernel@vger.kernel.org, lvs-devel@vger.kernel.org, Matteo Croce , netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, Simon Horman Subject: [PATCH net 4/4] netfilter: move handlers to net/ip_vs.h Date: Tue, 2 Feb 2021 15:55:44 +0200 Message-Id: <20210202135544.3262383-5-leon@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210202135544.3262383-1-leon@kernel.org> References: <20210202135544.3262383-1-leon@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Leon Romanovsky Fix the following compilation warnings: net/netfilter/ipvs/ip_vs_proto_tcp.c:147:1: warning: no previous prototype for 'tcp_snat_handler' [-Wmissing-prototypes] 147 | tcp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, | ^~~~~~~~~~~~~~~~ net/netfilter/ipvs/ip_vs_proto_udp.c:136:1: warning: no previous prototype for 'udp_snat_handler' [-Wmissing-prototypes] 136 | udp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, | ^~~~~~~~~~~~~~~~ Fixes: 6ecd754883da ("ipvs: use indirect call wrappers") Signed-off-by: Leon Romanovsky --- include/net/ip_vs.h | 11 +++++++++++ net/netfilter/ipvs/ip_vs_core.c | 12 ------------ 2 files changed, 11 insertions(+), 12 deletions(-) -- 2.29.2 diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index d609e957a3ec..7cb5a1aace40 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -1712,4 +1712,15 @@ ip_vs_dest_conn_overhead(struct ip_vs_dest *dest) atomic_read(&dest->inactconns); } +#ifdef CONFIG_IP_VS_PROTO_TCP +INDIRECT_CALLABLE_DECLARE(int + tcp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, + struct ip_vs_conn *cp, struct ip_vs_iphdr *iph)); +#endif + +#ifdef CONFIG_IP_VS_PROTO_UDP +INDIRECT_CALLABLE_DECLARE(int + udp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, + struct ip_vs_conn *cp, struct ip_vs_iphdr *iph)); +#endif #endif /* _NET_IP_VS_H */ diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c index 54e086c65721..0c132ff9b446 100644 --- a/net/netfilter/ipvs/ip_vs_core.c +++ b/net/netfilter/ipvs/ip_vs_core.c @@ -68,18 +68,6 @@ EXPORT_SYMBOL(ip_vs_get_debug_level); #endif EXPORT_SYMBOL(ip_vs_new_conn_out); -#ifdef CONFIG_IP_VS_PROTO_TCP -INDIRECT_CALLABLE_DECLARE(int - tcp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, - struct ip_vs_conn *cp, struct ip_vs_iphdr *iph)); -#endif - -#ifdef CONFIG_IP_VS_PROTO_UDP -INDIRECT_CALLABLE_DECLARE(int - udp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, - struct ip_vs_conn *cp, struct ip_vs_iphdr *iph)); -#endif - #if defined(CONFIG_IP_VS_PROTO_TCP) && defined(CONFIG_IP_VS_PROTO_UDP) #define SNAT_CALL(f, ...) \ INDIRECT_CALL_2(f, tcp_snat_handler, udp_snat_handler, __VA_ARGS__)