* [PATCH net-next] tcp: remove unused parameter of tcp_sacktag_bsearch()
@ 2019-02-25 9:42 Taehee Yoo
2019-02-25 15:47 ` Eric Dumazet
2019-02-25 17:38 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Taehee Yoo @ 2019-02-25 9:42 UTC (permalink / raw)
To: davem, edumazet, netdev; +Cc: Taehee Yoo
parameter state in the tcp_sacktag_bsearch() is not used.
So, it can be removed.
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
---
net/ipv4/tcp_input.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 7a027dec649b..6ac274249961 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1574,9 +1574,7 @@ static struct sk_buff *tcp_sacktag_walk(struct sk_buff *skb, struct sock *sk,
return skb;
}
-static struct sk_buff *tcp_sacktag_bsearch(struct sock *sk,
- struct tcp_sacktag_state *state,
- u32 seq)
+static struct sk_buff *tcp_sacktag_bsearch(struct sock *sk, u32 seq)
{
struct rb_node *parent, **p = &sk->tcp_rtx_queue.rb_node;
struct sk_buff *skb;
@@ -1598,13 +1596,12 @@ static struct sk_buff *tcp_sacktag_bsearch(struct sock *sk,
}
static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk,
- struct tcp_sacktag_state *state,
u32 skip_to_seq)
{
if (skb && after(TCP_SKB_CB(skb)->seq, skip_to_seq))
return skb;
- return tcp_sacktag_bsearch(sk, state, skip_to_seq);
+ return tcp_sacktag_bsearch(sk, skip_to_seq);
}
static struct sk_buff *tcp_maybe_skipping_dsack(struct sk_buff *skb,
@@ -1617,7 +1614,7 @@ static struct sk_buff *tcp_maybe_skipping_dsack(struct sk_buff *skb,
return skb;
if (before(next_dup->start_seq, skip_to_seq)) {
- skb = tcp_sacktag_skip(skb, sk, state, next_dup->start_seq);
+ skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq);
skb = tcp_sacktag_walk(skb, sk, NULL, state,
next_dup->start_seq, next_dup->end_seq,
1);
@@ -1758,8 +1755,7 @@ tcp_sacktag_write_queue(struct sock *sk, const struct sk_buff *ack_skb,
/* Head todo? */
if (before(start_seq, cache->start_seq)) {
- skb = tcp_sacktag_skip(skb, sk, state,
- start_seq);
+ skb = tcp_sacktag_skip(skb, sk, start_seq);
skb = tcp_sacktag_walk(skb, sk, next_dup,
state,
start_seq,
@@ -1785,7 +1781,7 @@ tcp_sacktag_write_queue(struct sock *sk, const struct sk_buff *ack_skb,
goto walk;
}
- skb = tcp_sacktag_skip(skb, sk, state, cache->end_seq);
+ skb = tcp_sacktag_skip(skb, sk, cache->end_seq);
/* Check overlap against next cached too (past this one already) */
cache++;
continue;
@@ -1796,7 +1792,7 @@ tcp_sacktag_write_queue(struct sock *sk, const struct sk_buff *ack_skb,
if (!skb)
break;
}
- skb = tcp_sacktag_skip(skb, sk, state, start_seq);
+ skb = tcp_sacktag_skip(skb, sk, start_seq);
walk:
skb = tcp_sacktag_walk(skb, sk, next_dup, state,
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] tcp: remove unused parameter of tcp_sacktag_bsearch()
2019-02-25 9:42 [PATCH net-next] tcp: remove unused parameter of tcp_sacktag_bsearch() Taehee Yoo
@ 2019-02-25 15:47 ` Eric Dumazet
2019-02-25 17:38 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2019-02-25 15:47 UTC (permalink / raw)
To: Taehee Yoo; +Cc: David Miller, netdev, Yuchung Cheng
On Mon, Feb 25, 2019 at 1:42 AM Taehee Yoo <ap420073@gmail.com> wrote:
>
> parameter state in the tcp_sacktag_bsearch() is not used.
> So, it can be removed.
Yes, this is a nice cleanup that should have followed commit
737ff314563ca27f044f9a3a041e9d42491ef7ce ("tcp: use sequence distance
to detect reordering")
since it removed fack_count
Signed-off-by: Eric Dumazet <edumazet@google.com>
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] tcp: remove unused parameter of tcp_sacktag_bsearch()
2019-02-25 9:42 [PATCH net-next] tcp: remove unused parameter of tcp_sacktag_bsearch() Taehee Yoo
2019-02-25 15:47 ` Eric Dumazet
@ 2019-02-25 17:38 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-02-25 17:38 UTC (permalink / raw)
To: ap420073; +Cc: edumazet, netdev
From: Taehee Yoo <ap420073@gmail.com>
Date: Mon, 25 Feb 2019 18:42:33 +0900
> parameter state in the tcp_sacktag_bsearch() is not used.
> So, it can be removed.
>
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Applied, thanks Taehee.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-25 17:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-25 9:42 [PATCH net-next] tcp: remove unused parameter of tcp_sacktag_bsearch() Taehee Yoo
2019-02-25 15:47 ` Eric Dumazet
2019-02-25 17:38 ` David Miller
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).