* [PATCH net-next] net: sched: remove qdisc_watchdog->last_expires
@ 2023-03-08 18:26 Eric Dumazet
2023-03-10 7:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2023-03-08 18:26 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: netdev, eric.dumazet, Eric Dumazet
This field mirrors hrtimer softexpires, we can instead
use the existing helpers.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
include/net/pkt_sched.h | 1 -
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 2016839991a428d951c8f7bf2e43e4cb5dd71f4c..bb0bd69fb655d462bdc49934e2e094602ab45394 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 aba789c30a2eb50d339b8a888495b794825e1775..fdb8f429333d26a1380063445ebfc9afad3aef84 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,
--
2.40.0.rc1.284.g88254d51c5-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: sched: remove qdisc_watchdog->last_expires
2023-03-08 18:26 [PATCH net-next] net: sched: remove qdisc_watchdog->last_expires Eric Dumazet
@ 2023-03-10 7:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-03-10 7:30 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, kuba, pabeni, netdev, eric.dumazet
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 8 Mar 2023 18:26:48 +0000 you wrote:
> This field mirrors hrtimer softexpires, we can instead
> use the existing helpers.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
> include/net/pkt_sched.h | 1 -
> net/sched/sch_api.c | 6 ++++--
> 2 files changed, 4 insertions(+), 3 deletions(-)
Here is the summary with links:
- [net-next] net: sched: remove qdisc_watchdog->last_expires
https://git.kernel.org/netdev/net-next/c/62423bd2d2e2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-10 7:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-08 18:26 [PATCH net-next] net: sched: remove qdisc_watchdog->last_expires Eric Dumazet
2023-03-10 7:30 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.