Skip to content

Commit 86b3bfe

Browse files
edumazetdavem330
authored andcommitted
pkt_sched: fq: remove useless TIME_WAIT check
TIME_WAIT sockets are not owning any skb. ip_send_unicast_reply() and tcp_v6_send_response() both use regular sockets. We can safely remove a test in sch_fq and save one cache line miss, as sk_state is far away from sk_pacing_rate. Tested at Google for about one year. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2dbce09 commit 86b3bfe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/sched/sch_fq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* net/sched/sch_fq.c Fair Queue Packet Scheduler (per flow pacing)
33
*
4-
* Copyright (C) 2013 Eric Dumazet <[email protected]>
4+
* Copyright (C) 2013-2015 Eric Dumazet <[email protected]>
55
*
66
* This program is free software; you can redistribute it and/or
77
* modify it under the terms of the GNU General Public License
@@ -471,7 +471,7 @@ static struct sk_buff *fq_dequeue(struct Qdisc *sch)
471471
goto out;
472472

473473
rate = q->flow_max_rate;
474-
if (skb->sk && skb->sk->sk_state != TCP_TIME_WAIT)
474+
if (skb->sk)
475475
rate = min(skb->sk->sk_pacing_rate, rate);
476476

477477
if (rate != ~0U) {

0 commit comments

Comments
 (0)