From: Ricardo Ribalda <ribalda@chromium.org>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
David Ahern <dsahern@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Ricardo Ribalda <ribalda@chromium.org>
Subject: [PATCH] net: Fix build when CONFIG_INET is not enabled
Date: Fri, 11 Feb 2022 17:40:26 +0100 [thread overview]
Message-ID: <20220211164026.409225-1-ribalda@chromium.org> (raw)
If the kernel is configured with CONFIG_NET, but without CONFIG_INET we
get the following error when building:
sock.c:(.text+0x4c17): undefined reference to `__sk_defer_free_flush'
Lets move __sk_defer_free_flush to sock.c
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
net/core/sock.c | 14 ++++++++++++++
net/ipv4/tcp.c | 14 --------------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index 4ff806d71921..b93b93497e7e 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2045,6 +2045,20 @@ static void __sk_destruct(struct rcu_head *head)
sk_prot_free(sk->sk_prot_creator, sk);
}
+void __sk_defer_free_flush(struct sock *sk)
+{
+ struct llist_node *head;
+ struct sk_buff *skb, *n;
+
+ head = llist_del_all(&sk->defer_list);
+ llist_for_each_entry_safe(skb, n, head, ll_node) {
+ prefetch(n);
+ skb_mark_not_on_list(skb);
+ __kfree_skb(skb);
+ }
+}
+EXPORT_SYMBOL(__sk_defer_free_flush);
+
void sk_destruct(struct sock *sk)
{
bool use_call_rcu = sock_flag(sk, SOCK_RCU_FREE);
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 02cb275e5487..bc5b5c29d5c4 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1589,20 +1589,6 @@ void tcp_cleanup_rbuf(struct sock *sk, int copied)
tcp_send_ack(sk);
}
-void __sk_defer_free_flush(struct sock *sk)
-{
- struct llist_node *head;
- struct sk_buff *skb, *n;
-
- head = llist_del_all(&sk->defer_list);
- llist_for_each_entry_safe(skb, n, head, ll_node) {
- prefetch(n);
- skb_mark_not_on_list(skb);
- __kfree_skb(skb);
- }
-}
-EXPORT_SYMBOL(__sk_defer_free_flush);
-
static void tcp_eat_recv_skb(struct sock *sk, struct sk_buff *skb)
{
__skb_unlink(skb, &sk->sk_receive_queue);
--
2.35.1.265.g69c8d7142f-goog
next reply other threads:[~2022-02-11 16:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-11 16:40 Ricardo Ribalda [this message]
2022-02-11 17:24 ` Eric Dumazet
2022-02-11 19:43 ` Ricardo Ribalda
2022-02-11 19:42 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220211164026.409225-1-ribalda@chromium.org \
--to=ribalda@chromium.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®