All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] tcp: no need to use acceptable for conn_request
@ 2024-02-13 13:12 Jason Xing
  2024-02-13 13:59 ` Eric Dumazet
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jason Xing @ 2024-02-13 13:12 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, dsahern, kuniyu
  Cc: netdev, kerneljasonxing, Jason Xing

From: Jason Xing <kernelxing@tencent.com>

Since tcp_conn_request() always returns zero, there is no need to
keep the dead code. Remove it then.

Link: https://lore.kernel.org/netdev/CANn89iJwx9b2dUGUKFSV3PF=kN5o+kxz3A_fHZZsOS4AnXhBNw@mail.gmail.com/
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jason Xing <kernelxing@tencent.com>
---
 net/ipv4/tcp_input.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 2d20edf652e6..b1c4462a0798 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -6623,7 +6623,6 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
 	const struct tcphdr *th = tcp_hdr(skb);
 	struct request_sock *req;
 	int queued = 0;
-	bool acceptable;
 	SKB_DR(reason);
 
 	switch (sk->sk_state) {
@@ -6649,12 +6648,10 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
 			 */
 			rcu_read_lock();
 			local_bh_disable();
-			acceptable = icsk->icsk_af_ops->conn_request(sk, skb) >= 0;
+			icsk->icsk_af_ops->conn_request(sk, skb);
 			local_bh_enable();
 			rcu_read_unlock();
 
-			if (!acceptable)
-				return 1;
 			consume_skb(skb);
 			return 0;
 		}
-- 
2.37.3


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

* Re: [PATCH net-next] tcp: no need to use acceptable for conn_request
  2024-02-13 13:12 [PATCH net-next] tcp: no need to use acceptable for conn_request Jason Xing
@ 2024-02-13 13:59 ` Eric Dumazet
  2024-02-13 17:40 ` Kuniyuki Iwashima
  2024-02-15 12:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2024-02-13 13:59 UTC (permalink / raw)
  To: Jason Xing; +Cc: davem, kuba, pabeni, dsahern, kuniyu, netdev, Jason Xing

On Tue, Feb 13, 2024 at 2:12 PM Jason Xing <kerneljasonxing@gmail.com> wrote:
>
> From: Jason Xing <kernelxing@tencent.com>
>
> Since tcp_conn_request() always returns zero, there is no need to
> keep the dead code. Remove it then.
>
> Link: https://lore.kernel.org/netdev/CANn89iJwx9b2dUGUKFSV3PF=kN5o+kxz3A_fHZZsOS4AnXhBNw@mail.gmail.com/
> Suggested-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Jason Xing <kernelxing@tencent.com>

Reviewed-by: Eric Dumazet <edumazet@google.com>

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

* Re: [PATCH net-next] tcp: no need to use acceptable for conn_request
  2024-02-13 13:12 [PATCH net-next] tcp: no need to use acceptable for conn_request Jason Xing
  2024-02-13 13:59 ` Eric Dumazet
@ 2024-02-13 17:40 ` Kuniyuki Iwashima
  2024-02-15 12:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Kuniyuki Iwashima @ 2024-02-13 17:40 UTC (permalink / raw)
  To: kerneljasonxing
  Cc: davem, dsahern, edumazet, kernelxing, kuba, kuniyu, netdev, pabeni

From: Jason Xing <kerneljasonxing@gmail.com>
Date: Tue, 13 Feb 2024 21:12:05 +0800
> From: Jason Xing <kernelxing@tencent.com>
> 
> Since tcp_conn_request() always returns zero, there is no need to
> keep the dead code. Remove it then.
> 
> Link: https://lore.kernel.org/netdev/CANn89iJwx9b2dUGUKFSV3PF=kN5o+kxz3A_fHZZsOS4AnXhBNw@mail.gmail.com/
> Suggested-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Jason Xing <kernelxing@tencent.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>


> ---
>  net/ipv4/tcp_input.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 2d20edf652e6..b1c4462a0798 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -6623,7 +6623,6 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
>  	const struct tcphdr *th = tcp_hdr(skb);
>  	struct request_sock *req;
>  	int queued = 0;
> -	bool acceptable;
>  	SKB_DR(reason);
>  
>  	switch (sk->sk_state) {
> @@ -6649,12 +6648,10 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
>  			 */
>  			rcu_read_lock();
>  			local_bh_disable();
> -			acceptable = icsk->icsk_af_ops->conn_request(sk, skb) >= 0;
> +			icsk->icsk_af_ops->conn_request(sk, skb);
>  			local_bh_enable();
>  			rcu_read_unlock();
>  
> -			if (!acceptable)
> -				return 1;
>  			consume_skb(skb);
>  			return 0;
>  		}
> -- 
> 2.37.3

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

* Re: [PATCH net-next] tcp: no need to use acceptable for conn_request
  2024-02-13 13:12 [PATCH net-next] tcp: no need to use acceptable for conn_request Jason Xing
  2024-02-13 13:59 ` Eric Dumazet
  2024-02-13 17:40 ` Kuniyuki Iwashima
@ 2024-02-15 12:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-02-15 12:10 UTC (permalink / raw)
  To: Jason Xing
  Cc: davem, edumazet, kuba, pabeni, dsahern, kuniyu, netdev, kernelxing

Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 13 Feb 2024 21:12:05 +0800 you wrote:
> From: Jason Xing <kernelxing@tencent.com>
> 
> Since tcp_conn_request() always returns zero, there is no need to
> keep the dead code. Remove it then.
> 
> Link: https://lore.kernel.org/netdev/CANn89iJwx9b2dUGUKFSV3PF=kN5o+kxz3A_fHZZsOS4AnXhBNw@mail.gmail.com/
> Suggested-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Jason Xing <kernelxing@tencent.com>
> 
> [...]

Here is the summary with links:
  - [net-next] tcp: no need to use acceptable for conn_request
    https://git.kernel.org/netdev/net-next/c/d25f32722f50

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

end of thread, other threads:[~2024-02-15 12:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 13:12 [PATCH net-next] tcp: no need to use acceptable for conn_request Jason Xing
2024-02-13 13:59 ` Eric Dumazet
2024-02-13 17:40 ` Kuniyuki Iwashima
2024-02-15 12:10 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.