Skip to content

Commit

Permalink
pkt_sched: fq: remove useless TIME_WAIT check
Browse files Browse the repository at this point in the history
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 <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jan 29, 2015
1 parent 2dbce09 commit 86b3bfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sched/sch_fq.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* net/sched/sch_fq.c Fair Queue Packet Scheduler (per flow pacing)
*
* Copyright (C) 2013 Eric Dumazet <edumazet@google.com>
* Copyright (C) 2013-2015 Eric Dumazet <edumazet@google.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -471,7 +471,7 @@ static struct sk_buff *fq_dequeue(struct Qdisc *sch)
goto out;

rate = q->flow_max_rate;
if (skb->sk && skb->sk->sk_state != TCP_TIME_WAIT)
if (skb->sk)
rate = min(skb->sk->sk_pacing_rate, rate);

if (rate != ~0U) {
Expand Down

0 comments on commit 86b3bfe

Please sign in to comment.