Skip to content

Commit 142537e

Browse files
Eric Dumazetdavem330
authored andcommitted
net_sched: sch_fq: switch to CLOCK_TAI
TCP will soon provide per skb->tstamp with earliest departure time, so that sch_fq does not have to determine departure time by looking at socket sk_pacing_rate. We chose in linux-4.19 CLOCK_TAI as the clock base for transports, qdiscs, and NIC offloads. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 2fd66ff commit 142537e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

net/sched/sch_fq.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ static void fq_check_throttled(struct fq_sched_data *q, u64 now)
460460
static struct sk_buff *fq_dequeue(struct Qdisc *sch)
461461
{
462462
struct fq_sched_data *q = qdisc_priv(sch);
463-
u64 now = ktime_get_ns();
463+
u64 now = ktime_get_tai_ns();
464464
struct fq_flow_head *head;
465465
struct sk_buff *skb;
466466
struct fq_flow *f;
@@ -823,7 +823,7 @@ static int fq_init(struct Qdisc *sch, struct nlattr *opt,
823823
q->fq_trees_log = ilog2(1024);
824824
q->orphan_mask = 1024 - 1;
825825
q->low_rate_threshold = 550000 / 8;
826-
qdisc_watchdog_init(&q->watchdog, sch);
826+
qdisc_watchdog_init_clockid(&q->watchdog, sch, CLOCK_TAI);
827827

828828
if (opt)
829829
err = fq_change(sch, opt, extack);
@@ -878,7 +878,7 @@ static int fq_dump_stats(struct Qdisc *sch, struct gnet_dump *d)
878878
st.flows_plimit = q->stat_flows_plimit;
879879
st.pkts_too_long = q->stat_pkts_too_long;
880880
st.allocation_errors = q->stat_allocation_errors;
881-
st.time_next_delayed_flow = q->time_next_delayed_flow - ktime_get_ns();
881+
st.time_next_delayed_flow = q->time_next_delayed_flow - ktime_get_tai_ns();
882882
st.flows = q->flows;
883883
st.inactive_flows = q->inactive_flows;
884884
st.throttled_flows = q->throttled_flows;

0 commit comments

Comments
 (0)