* [PATCH net] tcp: Add a stub for sk_defer_free_flush()
@ 2022-01-20 12:34 Gal Pressman
2022-01-20 12:39 ` Eric Dumazet
2022-01-21 6:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 6+ messages in thread
From: Gal Pressman @ 2022-01-20 12:34 UTC (permalink / raw)
To: Eric Dumazet, Jakub Kicinski, David S. Miller
Cc: netdev, Tariq Toukan, Saeed Mahameed, Gal Pressman, kernel test robot
When compiling the kernel with CONFIG_INET disabled, the
sk_defer_free_flush() should be defined as a nop.
This resolves the following compilation error:
ld: net/core/sock.o: in function `sk_defer_free_flush':
./include/net/tcp.h:1378: undefined reference to `__sk_defer_free_flush'
Fixes: 79074a72d335 ("net: Flush deferred skb free on socket destroy")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
---
include/net/tcp.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 44e442bf23f9..b9fc978fb2ca 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1369,6 +1369,7 @@ static inline bool tcp_checksum_complete(struct sk_buff *skb)
bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb);
+#ifdef CONFIG_INET
void __sk_defer_free_flush(struct sock *sk);
static inline void sk_defer_free_flush(struct sock *sk)
@@ -1377,6 +1378,9 @@ static inline void sk_defer_free_flush(struct sock *sk)
return;
__sk_defer_free_flush(sk);
}
+#else
+static inline void sk_defer_free_flush(struct sock *sk) {}
+#endif
int tcp_filter(struct sock *sk, struct sk_buff *skb);
void tcp_set_state(struct sock *sk, int state);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net] tcp: Add a stub for sk_defer_free_flush()
2022-01-20 12:34 [PATCH net] tcp: Add a stub for sk_defer_free_flush() Gal Pressman
@ 2022-01-20 12:39 ` Eric Dumazet
2022-01-20 16:05 ` Jakub Kicinski
2022-01-21 6:00 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2022-01-20 12:39 UTC (permalink / raw)
To: Gal Pressman
Cc: Jakub Kicinski, David S. Miller, netdev, Tariq Toukan,
Saeed Mahameed, kernel test robot
On Thu, Jan 20, 2022 at 4:34 AM Gal Pressman <gal@nvidia.com> wrote:
>
> When compiling the kernel with CONFIG_INET disabled, the
> sk_defer_free_flush() should be defined as a nop.
>
> This resolves the following compilation error:
> ld: net/core/sock.o: in function `sk_defer_free_flush':
> ./include/net/tcp.h:1378: undefined reference to `__sk_defer_free_flush'
Yes, this is one way to fix this, thanks.
Reviewed-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net] tcp: Add a stub for sk_defer_free_flush()
2022-01-20 12:39 ` Eric Dumazet
@ 2022-01-20 16:05 ` Jakub Kicinski
2022-01-20 16:13 ` Eric Dumazet
0 siblings, 1 reply; 6+ messages in thread
From: Jakub Kicinski @ 2022-01-20 16:05 UTC (permalink / raw)
To: Gal Pressman, Tariq Toukan
Cc: Eric Dumazet, David S. Miller, netdev, Saeed Mahameed, kernel test robot
On Thu, 20 Jan 2022 04:39:19 -0800 Eric Dumazet wrote:
> On Thu, Jan 20, 2022 at 4:34 AM Gal Pressman <gal@nvidia.com> wrote:
> > When compiling the kernel with CONFIG_INET disabled, the
> > sk_defer_free_flush() should be defined as a nop.
> >
> > This resolves the following compilation error:
> > ld: net/core/sock.o: in function `sk_defer_free_flush':
> > ./include/net/tcp.h:1378: undefined reference to `__sk_defer_free_flush'
>
> Yes, this is one way to fix this, thanks.
Yeah.. isn't it better to move __sk_defer_free_flush and co.
out of TCP code?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net] tcp: Add a stub for sk_defer_free_flush()
2022-01-20 16:05 ` Jakub Kicinski
@ 2022-01-20 16:13 ` Eric Dumazet
2022-01-20 16:25 ` Jakub Kicinski
0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2022-01-20 16:13 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Gal Pressman, Tariq Toukan, David S. Miller, netdev,
Saeed Mahameed, kernel test robot
On Thu, Jan 20, 2022 at 8:05 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Thu, 20 Jan 2022 04:39:19 -0800 Eric Dumazet wrote:
> > On Thu, Jan 20, 2022 at 4:34 AM Gal Pressman <gal@nvidia.com> wrote:
> > > When compiling the kernel with CONFIG_INET disabled, the
> > > sk_defer_free_flush() should be defined as a nop.
> > >
> > > This resolves the following compilation error:
> > > ld: net/core/sock.o: in function `sk_defer_free_flush':
> > > ./include/net/tcp.h:1378: undefined reference to `__sk_defer_free_flush'
> >
> > Yes, this is one way to fix this, thanks.
>
> Yeah.. isn't it better to move __sk_defer_free_flush and co.
> out of TCP code?
sk->defer_list is currently only fed from tcp_eat_recv_skb(),
I guess we can leave the code, until we have another user than TCP ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net] tcp: Add a stub for sk_defer_free_flush()
2022-01-20 16:13 ` Eric Dumazet
@ 2022-01-20 16:25 ` Jakub Kicinski
0 siblings, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2022-01-20 16:25 UTC (permalink / raw)
To: Eric Dumazet
Cc: Gal Pressman, Tariq Toukan, David S. Miller, netdev,
Saeed Mahameed, kernel test robot
On Thu, 20 Jan 2022 08:13:24 -0800 Eric Dumazet wrote:
> On Thu, Jan 20, 2022 at 8:05 AM Jakub Kicinski <kuba@kernel.org> wrote:
> > On Thu, 20 Jan 2022 04:39:19 -0800 Eric Dumazet wrote:
> > > Yes, this is one way to fix this, thanks.
> >
> > Yeah.. isn't it better to move __sk_defer_free_flush and co.
> > out of TCP code?
>
> sk->defer_list is currently only fed from tcp_eat_recv_skb(),
> I guess we can leave the code, until we have another user than TCP ?
I was mostly thinking of a way to avoid the #ifdef-inery
but I guess it's not too bad
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net] tcp: Add a stub for sk_defer_free_flush()
2022-01-20 12:34 [PATCH net] tcp: Add a stub for sk_defer_free_flush() Gal Pressman
2022-01-20 12:39 ` Eric Dumazet
@ 2022-01-21 6:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-21 6:00 UTC (permalink / raw)
To: Gal Pressman; +Cc: edumazet, kuba, davem, netdev, tariqt, saeedm, lkp
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 20 Jan 2022 14:34:40 +0200 you wrote:
> When compiling the kernel with CONFIG_INET disabled, the
> sk_defer_free_flush() should be defined as a nop.
>
> This resolves the following compilation error:
> ld: net/core/sock.o: in function `sk_defer_free_flush':
> ./include/net/tcp.h:1378: undefined reference to `__sk_defer_free_flush'
>
> [...]
Here is the summary with links:
- [net] tcp: Add a stub for sk_defer_free_flush()
https://git.kernel.org/netdev/net/c/48cec899e357
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-01-21 6:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-20 12:34 [PATCH net] tcp: Add a stub for sk_defer_free_flush() Gal Pressman
2022-01-20 12:39 ` Eric Dumazet
2022-01-20 16:05 ` Jakub Kicinski
2022-01-20 16:13 ` Eric Dumazet
2022-01-20 16:25 ` Jakub Kicinski
2022-01-21 6:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).