diff options
author | 2023-03-08 18:26:48 +0000 | |
---|---|---|
committer | 2023-03-09 23:24:14 -0800 | |
commit | 62423bd2d2e231951245d77740a58027a2d81ef9 (patch) | |
tree | 9d785db1e4f895065863be64feb283a7573e7ad2 | |
parent | net: phy: smsc: use phy_set_bits in smsc_phy_config_init (diff) | |
download | wireguard-linux-62423bd2d2e231951245d77740a58027a2d81ef9.tar.xz wireguard-linux-62423bd2d2e231951245d77740a58027a2d81ef9.zip |
net: sched: remove qdisc_watchdog->last_expires
This field mirrors hrtimer softexpires, we can instead
use the existing helpers.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20230308182648.1150762-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | include/net/pkt_sched.h | 1 | ||||
-rw-r--r-- | net/sched/sch_api.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 2016839991a4..bb0bd69fb655 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -64,7 +64,6 @@ static inline psched_time_t psched_get_time(void) } struct qdisc_watchdog { - u64 last_expires; struct hrtimer timer; struct Qdisc *qdisc; }; diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index aba789c30a2e..fdb8f429333d 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -639,14 +639,16 @@ void qdisc_watchdog_schedule_range_ns(struct qdisc_watchdog *wd, u64 expires, return; if (hrtimer_is_queued(&wd->timer)) { + u64 softexpires; + + softexpires = ktime_to_ns(hrtimer_get_softexpires(&wd->timer)); /* If timer is already set in [expires, expires + delta_ns], * do not reprogram it. */ - if (wd->last_expires - expires <= delta_ns) + if (softexpires - expires <= delta_ns) return; } - wd->last_expires = expires; hrtimer_start_range_ns(&wd->timer, ns_to_ktime(expires), delta_ns, |