[PATCH mptcp-next v2 02/12] tcp: make tcp_rcvbuf_grow() accessible to mptcp code

Paolo Abeni posted 12 patches 3 weeks, 1 day ago
There is a newer version of this series
[PATCH mptcp-next v2 02/12] tcp: make tcp_rcvbuf_grow() accessible to mptcp code
Posted by Paolo Abeni 3 weeks, 1 day ago
To leverage the auto-tuning improvements brought by commit 2da35e4b4df9
("Merge branch 'tcp-receive-side-improvements'"), the MPTCP stack need
to access the mentioned helper.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 include/net/tcp.h    | 1 +
 net/ipv4/tcp_input.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/net/tcp.h b/include/net/tcp.h
index e25340459ce4a..db2a4e05147fa 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -356,6 +356,7 @@ void tcp_delack_timer_handler(struct sock *sk);
 int tcp_ioctl(struct sock *sk, int cmd, int *karg);
 enum skb_drop_reason tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb);
 void tcp_rcv_established(struct sock *sk, struct sk_buff *skb);
+void tcp_rcvbuf_grow(struct sock *sk);
 void tcp_rcv_space_adjust(struct sock *sk);
 int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp);
 void tcp_twsk_destructor(struct sock *sk);
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index b2793e749cfd9..ad09995a1aaec 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -701,7 +701,7 @@ static inline void tcp_rcv_rtt_measure_ts(struct sock *sk,
 	}
 }
 
-static void tcp_rcvbuf_grow(struct sock *sk)
+void tcp_rcvbuf_grow(struct sock *sk)
 {
 	const struct net *net = sock_net(sk);
 	struct tcp_sock *tp = tcp_sk(sk);
-- 
2.51.0
Re: [PATCH mptcp-next v2 02/12] tcp: make tcp_rcvbuf_grow() accessible to mptcp code
Posted by Matthieu Baerts 3 weeks ago
Hi Paolo,

On 18/09/2025 19:14, Paolo Abeni wrote:
> To leverage the auto-tuning improvements brought by commit 2da35e4b4df9
> ("Merge branch 'tcp-receive-side-improvements'"), the MPTCP stack need
> to access the mentioned helper.

Thank you, it looks good to me!

Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH mptcp-next v2 02/12] tcp: make tcp_rcvbuf_grow() accessible to mptcp code
Posted by Geliang Tang 3 weeks ago
On Thu, 2025-09-18 at 19:14 +0200, Paolo Abeni wrote:
> To leverage the auto-tuning improvements brought by commit
> 2da35e4b4df9
> ("Merge branch 'tcp-receive-side-improvements'"), the MPTCP stack
> need
> to access the mentioned helper.
> 
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>

LGTM!

Reviewed-by: Geliang Tang <geliang@kernel.org>
Tested-by: Geliang Tang <geliang@kernel.org>

Thanks,
-Geliang

> ---
>  include/net/tcp.h    | 1 +
>  net/ipv4/tcp_input.c | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/net/tcp.h b/include/net/tcp.h
> index e25340459ce4a..db2a4e05147fa 100644
> --- a/include/net/tcp.h
> +++ b/include/net/tcp.h
> @@ -356,6 +356,7 @@ void tcp_delack_timer_handler(struct sock *sk);
>  int tcp_ioctl(struct sock *sk, int cmd, int *karg);
>  enum skb_drop_reason tcp_rcv_state_process(struct sock *sk, struct
> sk_buff *skb);
>  void tcp_rcv_established(struct sock *sk, struct sk_buff *skb);
> +void tcp_rcvbuf_grow(struct sock *sk);
>  void tcp_rcv_space_adjust(struct sock *sk);
>  int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp);
>  void tcp_twsk_destructor(struct sock *sk);
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index b2793e749cfd9..ad09995a1aaec 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -701,7 +701,7 @@ static inline void tcp_rcv_rtt_measure_ts(struct
> sock *sk,
>  	}
>  }
>  
> -static void tcp_rcvbuf_grow(struct sock *sk)
> +void tcp_rcvbuf_grow(struct sock *sk)
>  {
>  	const struct net *net = sock_net(sk);
>  	struct tcp_sock *tp = tcp_sk(sk);