Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net-next] tcp: avoid indirect call in tcp_new_space()
@ 2021-07-21  9:06 Eric Dumazet
  2021-07-21 16:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2021-07-21  9:06 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski; +Cc: netdev, Eric Dumazet, Eric Dumazet

From: Eric Dumazet <edumazet@google.com>

For tcp sockets, sk->sk_write_space is most probably sk_stream_write_space().

Other sk->sk_write_space() calls in TCP are slow path and do not deserve
any change.

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/ipv4/tcp_input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 149ceb5c94ffcd4499d3054fae31bd296a9e0bcd..bef2c8b64d83a0f3d4cca90f9b12912bf3d00807 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5383,7 +5383,7 @@ static void tcp_new_space(struct sock *sk)
 		tp->snd_cwnd_stamp = tcp_jiffies32;
 	}
 
-	sk->sk_write_space(sk);
+	INDIRECT_CALL_1(sk->sk_write_space, sk_stream_write_space, sk);
 }
 
 static void tcp_check_space(struct sock *sk)
-- 
2.32.0.402.g57bb445576-goog


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] tcp: avoid indirect call in tcp_new_space()
  2021-07-21  9:06 [PATCH net-next] tcp: avoid indirect call in tcp_new_space() Eric Dumazet
@ 2021-07-21 16:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-21 16:10 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: davem, kuba, netdev, edumazet

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Wed, 21 Jul 2021 02:06:14 -0700 you wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> For tcp sockets, sk->sk_write_space is most probably sk_stream_write_space().
> 
> Other sk->sk_write_space() calls in TCP are slow path and do not deserve
> any change.
> 
> [...]

Here is the summary with links:
  - [net-next] tcp: avoid indirect call in tcp_new_space()
    https://git.kernel.org/netdev/net-next/c/739b2adf99e9

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] 2+ messages in thread

end of thread, other threads:[~2021-07-21 16:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21  9:06 [PATCH net-next] tcp: avoid indirect call in tcp_new_space() Eric Dumazet
2021-07-21 16:10 ` 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).