From patchwork Tue Jun 23 22:31:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 217255 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=-17.6 required=3.0 tests=DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT, USER_IN_DEF_DKIM_WL 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 AC11AC433DF for ; Tue, 23 Jun 2020 22:47:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 80CE52078A for ; Tue, 23 Jun 2020 22:47:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="lVwaGH/Y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388505AbgFWWrd (ORCPT ); Tue, 23 Jun 2020 18:47:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388348AbgFWWr2 (ORCPT ); Tue, 23 Jun 2020 18:47:28 -0400 Received: from mail-qv1-xf49.google.com (mail-qv1-xf49.google.com [IPv6:2607:f8b0:4864:20::f49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A1A7C061797 for ; Tue, 23 Jun 2020 15:31:21 -0700 (PDT) Received: by mail-qv1-xf49.google.com with SMTP id n10so314846qvp.17 for ; Tue, 23 Jun 2020 15:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=JXjmqcPdDbbV+2JN9dMNcfWrSWf2OWX382UapR2lx2U=; b=lVwaGH/YWXrPZVddAFrjOQOxP2Z9jDvUQJmpCgtwM+8V59LJNBeKxBwp6dvo1la7/L 4JwjskKv+3cAhEX+jHeQH4wstPmjq3cLud9LmLZjGBBt+HxSzyPQepC4PjagwNuhLFrW EpbWPuxxQsTo00phgu7Jv+qD7WKLoOPy3yuoHATComeFvnOay0yJ+5wUQZ3oklCT4k7T 6qzV+gr9KVe3pYQvTqG80FD760GT38cnjnpFx0CsQ4VmQ7jw8jl6bseIrJlD8tDokAUs lL15qymJz05t3rdU/M51rIngtpYz9tX78aP4jEPdx2YaNP3n6/1g3ixQgQiJRZeLRpqc UAMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=JXjmqcPdDbbV+2JN9dMNcfWrSWf2OWX382UapR2lx2U=; b=MTMXyfA07NUWfNyGBPoksiR5C5V5b0GFFyJUC+7QY1XcIIhGkVS16i7fe+49oUiiWi E54/IeCRbUpPA6e0sXYXGzYEHlLvKVAiTE6USGfv4DLAIOoIhX49fOrgMC+9UjFcqLaS eVGyUB5egrimxiR0S8gmAbl6vxsYJ/IZdFzMH6JWlYq2Opm6rA9qF8iN7yhMLAEt5jWr fB4keNa5FpqbUViKrEGaJxXFxJyGNW8qC1SeiNqCtgNtB/Ea41xZZvi1Iz7L5eY7ym0T oa0NkFwASMyIw5iJODjzC4J82xqLutwcdWjqTjLImBRT8b/BI/o564+1rkM6JEoKk+j2 8vXg== X-Gm-Message-State: AOAM533+hz1kJQRO4x6dhklo7xdZnbyrYtRz9jhI5olmxHYXRXebtR3/ HurMeg1UtoCOQY2waHkjP90b7NtcGxoX5A== X-Google-Smtp-Source: ABdhPJz/Gd/x4kXr+3tInfYIjfXoV7hzpJW7QdDJg4NG6dzW1puVxog2ihrj8XLK9WHsmvcNjtq3owty/7oufw== X-Received: by 2002:a0c:fe01:: with SMTP id x1mr17359qvr.246.1592951480559; Tue, 23 Jun 2020 15:31:20 -0700 (PDT) Date: Tue, 23 Jun 2020 15:31:11 -0700 In-Reply-To: <20200623223115.152832-1-edumazet@google.com> Message-Id: <20200623223115.152832-2-edumazet@google.com> Mime-Version: 1.0 References: <20200623223115.152832-1-edumazet@google.com> X-Mailer: git-send-email 2.27.0.111.gc72c7da667-goog Subject: [PATCH net-next 1/5] tcp: add declarations to avoid warnings From: Eric Dumazet To: "David S . Miller" Cc: netdev , Eric Dumazet , Eric Dumazet Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Remove these errors: net/ipv6/tcp_ipv6.c:1550:29: warning: symbol 'tcp_v6_rcv' was not declared. Should it be static? net/ipv6/tcp_ipv6.c:1770:30: warning: symbol 'tcp_v6_early_demux' was not declared. Should it be static? net/ipv6/tcp_ipv6.c:1550:29: warning: no previous prototype for 'tcp_v6_rcv' [-Wmissing-prototypes] 1550 | INDIRECT_CALLABLE_SCOPE int tcp_v6_rcv(struct sk_buff *skb) | ^~~~~~~~~~ net/ipv6/tcp_ipv6.c:1770:30: warning: no previous prototype for 'tcp_v6_early_demux' [-Wmissing-prototypes] 1770 | INDIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb) | ^~~~~~~~~~~~~~~~~~ Signed-off-by: Eric Dumazet --- include/net/tcp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/net/tcp.h b/include/net/tcp.h index cd9cc348dbf9c62efa30d909f23a0ed1b39e4492..a8c36fa886a48bb3a242d0360a581b2aba49756b 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -934,6 +934,8 @@ static inline int tcp_v6_sdif(const struct sk_buff *skb) } INDIRECT_CALLABLE_DECLARE(void tcp_v6_send_check(struct sock *sk, struct sk_buff *skb)); +INDIRECT_CALLABLE_DECLARE(int tcp_v6_rcv(struct sk_buff *skb)); +INDIRECT_CALLABLE_DECLARE(void tcp_v6_early_demux(struct sk_buff *skb)); #endif From patchwork Tue Jun 23 22:31:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 217254 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=-17.6 required=3.0 tests=DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT, USER_IN_DEF_DKIM_WL 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 3758DC433E2 for ; Tue, 23 Jun 2020 22:47:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B49C20888 for ; Tue, 23 Jun 2020 22:47:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="PMzaoMoM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388353AbgFWWrn (ORCPT ); Tue, 23 Jun 2020 18:47:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388363AbgFWWr2 (ORCPT ); Tue, 23 Jun 2020 18:47:28 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47821C06179A for ; Tue, 23 Jun 2020 15:31:29 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id s7so164210ybg.10 for ; Tue, 23 Jun 2020 15:31:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=QAGTYlOQftLXYS7/9CsPKC7rOAM5RHroAY5bDhFvm+A=; b=PMzaoMoMUxK5uSgL412lKAVSb7bpr3m1iuGvw633YMseUl1xeppLZKW8NB84TE3GVf cyuB6YELlgHTq7amo6tIlHbo5Awv6l4nVzO6tfUt9ocDd01vDXcxSAWFlKXdwb1qdHqG OEW5Omz57BS92kXHCUtigmrL/DCLKDXr6eZ9o7nQejlgM8qHp5Y6oMQCgguvD5QnTNvW wP0vZ6ZzxwAEanbC5FaEpo6uPlmgAveqa5C76QiFGAb6aQ3ZvAciye+CJNOK8QQbYJ/p 1Xcw9hEegu3JjKhPN5+KD/F/i3jorHiw26vBc07Z8yDWo9hq8BqpZ7mUhy1LdVzGmBdH IsGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=QAGTYlOQftLXYS7/9CsPKC7rOAM5RHroAY5bDhFvm+A=; b=OMiSlIT/SEUJhaaeXKzrv7fyuw3qYmzzDWza6aczA92etViF7V3cGz6rsHHUx48SV+ 4ePNH6hyB7kjDU5LF4FPV4sPF8nAXpypxkfzV+/ZQMdH3gAh1u8LjmauNWMRoSKC98aV 7rsT9iwuBkxVui6kPY8yBSDVBkIhr8XU9g+o/AJECXECzXkZ97xq+c8ucnP+A2opFEVM MAwvXZfdmxF2llL73SwnHJAqqAIZIshooWiLETFapTiNBi/OTKT4uPe+3E9b6xZH6ucq LvOXni2go8RxQ8K3Hl+4BiknWWrmawNpv8n10QfQz8FDA96Xqoh8SUzqIUikcTFxmvpz XDJg== X-Gm-Message-State: AOAM532tVsO/3tjmxXNgQjfz+pswrp2gvgUFH8N5N9G0QogK0P5JWcvB WkZWqY/jiGTDk3k9i9xE5IfAylpFCMGwyw== X-Google-Smtp-Source: ABdhPJxYiVC3u7Eb9hbOIt6h31u4WkK8uNBeTJm2w9p4dGbpJ55Tev5XvMeYOP6bVq1drFv24nzX8oYLMMKSuA== X-Received: by 2002:a25:f20d:: with SMTP id i13mr23812135ybe.366.1592951488368; Tue, 23 Jun 2020 15:31:28 -0700 (PDT) Date: Tue, 23 Jun 2020 15:31:14 -0700 In-Reply-To: <20200623223115.152832-1-edumazet@google.com> Message-Id: <20200623223115.152832-5-edumazet@google.com> Mime-Version: 1.0 References: <20200623223115.152832-1-edumazet@google.com> X-Mailer: git-send-email 2.27.0.111.gc72c7da667-goog Subject: [PATCH net-next 4/5] net: move tcp gro declarations to net/tcp.h From: Eric Dumazet To: "David S . Miller" Cc: netdev , Eric Dumazet , Eric Dumazet Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch removes following (C=1 W=1) warnings for CONFIG_RETPOLINE=y : net/ipv4/tcp_offload.c:306:16: warning: symbol 'tcp4_gro_receive' was not declared. Should it be static? net/ipv4/tcp_offload.c:306:17: warning: no previous prototype for 'tcp4_gro_receive' [-Wmissing-prototypes] net/ipv4/tcp_offload.c:319:29: warning: symbol 'tcp4_gro_complete' was not declared. Should it be static? net/ipv4/tcp_offload.c:319:29: warning: no previous prototype for 'tcp4_gro_complete' [-Wmissing-prototypes] CHECK net/ipv6/tcpv6_offload.c net/ipv6/tcpv6_offload.c:16:16: warning: symbol 'tcp6_gro_receive' was not declared. Should it be static? net/ipv6/tcpv6_offload.c:29:29: warning: symbol 'tcp6_gro_complete' was not declared. Should it be static? CC net/ipv6/tcpv6_offload.o net/ipv6/tcpv6_offload.c:16:17: warning: no previous prototype for 'tcp6_gro_receive' [-Wmissing-prototypes] 16 | struct sk_buff *tcp6_gro_receive(struct list_head *head, struct sk_buff *skb) | ^~~~~~~~~~~~~~~~ net/ipv6/tcpv6_offload.c:29:29: warning: no previous prototype for 'tcp6_gro_complete' [-Wmissing-prototypes] 29 | INDIRECT_CALLABLE_SCOPE int tcp6_gro_complete(struct sk_buff *skb, int thoff) | ^~~~~~~~~~~~~~~~~ Signed-off-by: Eric Dumazet --- include/net/tcp.h | 4 ++++ net/ipv4/af_inet.c | 3 --- net/ipv6/ip6_offload.c | 4 +--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index b0f0f93c681c1744560fd229569b59edb1eb20ee..27f848ab39951c9ee5b5d81d7f96d09a4c03e3d6 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1957,6 +1957,10 @@ void tcp_v4_destroy_sock(struct sock *sk); struct sk_buff *tcp_gso_segment(struct sk_buff *skb, netdev_features_t features); struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb); +INDIRECT_CALLABLE_DECLARE(int tcp4_gro_complete(struct sk_buff *skb, int thoff)); +INDIRECT_CALLABLE_DECLARE(struct sk_buff *tcp4_gro_receive(struct list_head *head, struct sk_buff *skb)); +INDIRECT_CALLABLE_DECLARE(int tcp6_gro_complete(struct sk_buff *skb, int thoff)); +INDIRECT_CALLABLE_DECLARE(struct sk_buff *tcp6_gro_receive(struct list_head *head, struct sk_buff *skb)); int tcp_gro_complete(struct sk_buff *skb); void __tcp_v4_send_check(struct sk_buff *skb, __be32 saddr, __be32 daddr); diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 02aa5cb3a4fd15fa219831283dea2992b053c6a8..d8dbff1dd1fa155171b45a2dbf3034563db22db5 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -1432,8 +1432,6 @@ static struct sk_buff *ipip_gso_segment(struct sk_buff *skb, return inet_gso_segment(skb, features); } -INDIRECT_CALLABLE_DECLARE(struct sk_buff *tcp4_gro_receive(struct list_head *, - struct sk_buff *)); INDIRECT_CALLABLE_DECLARE(struct sk_buff *udp4_gro_receive(struct list_head *, struct sk_buff *)); struct sk_buff *inet_gro_receive(struct list_head *head, struct sk_buff *skb) @@ -1608,7 +1606,6 @@ int inet_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len) return -EINVAL; } -INDIRECT_CALLABLE_DECLARE(int tcp4_gro_complete(struct sk_buff *, int)); INDIRECT_CALLABLE_DECLARE(int udp4_gro_complete(struct sk_buff *, int)); int inet_gro_complete(struct sk_buff *skb, int nhoff) { diff --git a/net/ipv6/ip6_offload.c b/net/ipv6/ip6_offload.c index 7fbb44736a34b143baf147d8c5b0331799647738..78eec5b423856c853b6a59adab425dbe29a2c4fc 100644 --- a/net/ipv6/ip6_offload.c +++ b/net/ipv6/ip6_offload.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "ip6_offload.h" @@ -177,8 +178,6 @@ static int ipv6_exthdrs_len(struct ipv6hdr *iph, return len; } -INDIRECT_CALLABLE_DECLARE(struct sk_buff *tcp6_gro_receive(struct list_head *, - struct sk_buff *)); INDIRECT_CALLABLE_DECLARE(struct sk_buff *udp6_gro_receive(struct list_head *, struct sk_buff *)); INDIRECT_CALLABLE_SCOPE struct sk_buff *ipv6_gro_receive(struct list_head *head, @@ -319,7 +318,6 @@ static struct sk_buff *ip4ip6_gro_receive(struct list_head *head, return inet_gro_receive(head, skb); } -INDIRECT_CALLABLE_DECLARE(int tcp6_gro_complete(struct sk_buff *, int)); INDIRECT_CALLABLE_DECLARE(int udp6_gro_complete(struct sk_buff *, int)); INDIRECT_CALLABLE_SCOPE int ipv6_gro_complete(struct sk_buff *skb, int nhoff) { From patchwork Tue Jun 23 22:31:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 217253 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=-17.6 required=3.0 tests=DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT, USER_IN_DEF_DKIM_WL 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 B1FC7C433DF for ; Tue, 23 Jun 2020 22:48:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8C50B2078A for ; Tue, 23 Jun 2020 22:48:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Zx2QL7B8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388679AbgFWWsI (ORCPT ); Tue, 23 Jun 2020 18:48:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388122AbgFWWrV (ORCPT ); Tue, 23 Jun 2020 18:47:21 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99071C06179B for ; Tue, 23 Jun 2020 15:31:31 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id s9so145069ybj.18 for ; Tue, 23 Jun 2020 15:31:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=4Jt/exe2aCimikPbk0dVDesSpmGWpO1f0YIFYhmLyKI=; b=Zx2QL7B8B41mBHVjZU7VGilPeSvpfNMMIKl5/J6c5xIoyRKhCotOCIfv6a2DnAVokl 7HsaQuV/+1MW6oLd6zrtZNWnEg68Zgn4dRMinOqljCsK8B2pyvRJrcDPwuumbPg6aDiz 7SMmdPmOqF6eFtVWCXUvyR2APOHuHk7e5nD9ROvD/HDqIfhTOEK1oCSVJfSkOGlfFIl8 LlRC25d1+sVjn1ZL0j4Y2nlmEXWRIYPneNz85JS9J3whsQgWgqnd8Z1CV2bKLRVpGQN0 IxEtGmTgLR1tQz3YKhYXI+ZzGJt1TxP4Vi2bzyRF6OzxzQ34jLaXFt2sf8M7mY00dg7j D4BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=4Jt/exe2aCimikPbk0dVDesSpmGWpO1f0YIFYhmLyKI=; b=bmG2NndhdzXsTEBQQlNxg2/yn3OmMx5J4QFXfrQUASIcHuwgxXbpe9+zIaRskc3CYe xcrpkFpoYP9cVptXByoX0nvnfnMpH+LKKXY8n25vpoFvxnNC9uwCQVsiXy9Af4n+2QEL 3/+7S9BY50F540RTU2PwWdwWIN5A6HUAgrRYC53RpwF4zzOEFg01kUC1cE1/IXDN9PbA f5IFrC2TSEJM06beShBokMugZJ0VMm2/aw8DSfUsEvXdV8YQcfTh/QyN2614+oByrFU+ TTZH3lPi6+HBx+6xN4RsY6CYhioa8A30ZBUlkIbPyRQTzdMyoQ822bmZjdtBFA3ksy+F p/kA== X-Gm-Message-State: AOAM5314qLKv/g8ocHX9N25DCsi6JAzelJXBOH4ATD9Gu/vc7tEIrHFu fOjK7BgCFluqdIKVIaQ/kst0e8mxpeLBfQ== X-Google-Smtp-Source: ABdhPJyWgkrgyP2+KqtHioIEYnBJkCBb5YJPxKHutzltYjLL8q9J1k1w4JGCzX8eDksn2zi/ieLNY6YKjH+Y6w== X-Received: by 2002:a25:df0b:: with SMTP id w11mr41142058ybg.449.1592951490870; Tue, 23 Jun 2020 15:31:30 -0700 (PDT) Date: Tue, 23 Jun 2020 15:31:15 -0700 In-Reply-To: <20200623223115.152832-1-edumazet@google.com> Message-Id: <20200623223115.152832-6-edumazet@google.com> Mime-Version: 1.0 References: <20200623223115.152832-1-edumazet@google.com> X-Mailer: git-send-email 2.27.0.111.gc72c7da667-goog Subject: [PATCH net-next 5/5] udp: move gro declarations to net/udp.h From: Eric Dumazet To: "David S . Miller" Cc: netdev , Eric Dumazet , Eric Dumazet Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This removes following warnings : CC net/ipv4/udp_offload.o net/ipv4/udp_offload.c:504:17: warning: no previous prototype for 'udp4_gro_receive' [-Wmissing-prototypes] 504 | struct sk_buff *udp4_gro_receive(struct list_head *head, struct sk_buff *skb) | ^~~~~~~~~~~~~~~~ net/ipv4/udp_offload.c:584:29: warning: no previous prototype for 'udp4_gro_complete' [-Wmissing-prototypes] 584 | INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff) | ^~~~~~~~~~~~~~~~~ CHECK net/ipv6/udp_offload.c net/ipv6/udp_offload.c:115:16: warning: symbol 'udp6_gro_receive' was not declared. Should it be static? net/ipv6/udp_offload.c:148:29: warning: symbol 'udp6_gro_complete' was not declared. Should it be static? CC net/ipv6/udp_offload.o net/ipv6/udp_offload.c:115:17: warning: no previous prototype for 'udp6_gro_receive' [-Wmissing-prototypes] 115 | struct sk_buff *udp6_gro_receive(struct list_head *head, struct sk_buff *skb) | ^~~~~~~~~~~~~~~~ net/ipv6/udp_offload.c:148:29: warning: no previous prototype for 'udp6_gro_complete' [-Wmissing-prototypes] 148 | INDIRECT_CALLABLE_SCOPE int udp6_gro_complete(struct sk_buff *skb, int nhoff) | ^~~~~~~~~~~~~~~~~ Signed-off-by: Eric Dumazet --- include/net/udp.h | 7 +++++++ net/ipv4/af_inet.c | 3 --- net/ipv6/ip6_offload.c | 4 +--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/net/udp.h b/include/net/udp.h index a8fa6c0c6dede2f56629165f5a85218f061c6ead..5a2d677432f0fcf7b5731860c21e0f50fb19fb8f 100644 --- a/include/net/udp.h +++ b/include/net/udp.h @@ -27,6 +27,7 @@ #include #include #include +#include /** * struct udp_skb_cb - UDP(-Lite) private variables @@ -166,6 +167,12 @@ static inline void udp_csum_pull_header(struct sk_buff *skb) typedef struct sock *(*udp_lookup_t)(struct sk_buff *skb, __be16 sport, __be16 dport); +INDIRECT_CALLABLE_DECLARE(struct sk_buff *udp4_gro_receive(struct list_head *, + struct sk_buff *)); +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)); 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/ipv4/af_inet.c b/net/ipv4/af_inet.c index d8dbff1dd1fa155171b45a2dbf3034563db22db5..ea6ed6d487ed390d99049864540519108a0647bb 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -1432,8 +1432,6 @@ static struct sk_buff *ipip_gso_segment(struct sk_buff *skb, return inet_gso_segment(skb, features); } -INDIRECT_CALLABLE_DECLARE(struct sk_buff *udp4_gro_receive(struct list_head *, - struct sk_buff *)); struct sk_buff *inet_gro_receive(struct list_head *head, struct sk_buff *skb) { const struct net_offload *ops; @@ -1606,7 +1604,6 @@ int inet_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len) return -EINVAL; } -INDIRECT_CALLABLE_DECLARE(int udp4_gro_complete(struct sk_buff *, int)); int inet_gro_complete(struct sk_buff *skb, int nhoff) { __be16 newlen = htons(skb->len - nhoff); diff --git a/net/ipv6/ip6_offload.c b/net/ipv6/ip6_offload.c index 78eec5b423856c853b6a59adab425dbe29a2c4fc..a80f90bf3ae7dc1aec904fd93b3d8e8c87a926e4 100644 --- a/net/ipv6/ip6_offload.c +++ b/net/ipv6/ip6_offload.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "ip6_offload.h" @@ -178,8 +179,6 @@ static int ipv6_exthdrs_len(struct ipv6hdr *iph, return len; } -INDIRECT_CALLABLE_DECLARE(struct sk_buff *udp6_gro_receive(struct list_head *, - struct sk_buff *)); INDIRECT_CALLABLE_SCOPE struct sk_buff *ipv6_gro_receive(struct list_head *head, struct sk_buff *skb) { @@ -318,7 +317,6 @@ static struct sk_buff *ip4ip6_gro_receive(struct list_head *head, return inet_gro_receive(head, skb); } -INDIRECT_CALLABLE_DECLARE(int udp6_gro_complete(struct sk_buff *, int)); INDIRECT_CALLABLE_SCOPE int ipv6_gro_complete(struct sk_buff *skb, int nhoff) { const struct net_offload *ops;