| Submitter | Jiri Pirko |
|---|---|
| Date | Feb. 12, 2013, 10:12 a.m. |
| Message ID | <1360663929-1023-7-git-send-email-jiri@resnulli.us> |
| Download | mbox | patch |
| Permalink | /patch/219764/ |
| State | Accepted |
| Delegated to: | David Miller |
| Headers | show |
Comments
On Tue, 2013-02-12 at 11:12 +0100, Jiri Pirko wrote: > tbf will need to schedule watchdog in ns. No need to convert it twice. > > Signed-off-by: Jiri Pirko <jiri@resnulli.us> > --- > include/net/pkt_sched.h | 10 ++++++++-- > net/sched/sch_api.c | 6 +++--- > 2 files changed, 11 insertions(+), 5 deletions(-) > > diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h > index 66f5ac3..388bf8b 100644 > --- a/include/net/pkt_sched.h > +++ b/include/net/pkt_sched.h > @@ -65,8 +65,14 @@ struct qdisc_watchdog { > }; > > extern void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc); > -extern void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, > - psched_time_t expires); > +extern void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires); > + > +static inline void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, > + psched_time_t expires) > +{ > + qdisc_watchdog_schedule_ns(wd, PSCHED_TICKS2NS(expires)); > +} Acked-by: Eric Dumazet <edumazet@google.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Jiri Pirko <jiri@resnulli.us> Date: Tue, 12 Feb 2013 11:12:04 +0100 > tbf will need to schedule watchdog in ns. No need to convert it twice. > > Signed-off-by: Jiri Pirko <jiri@resnulli.us> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 66f5ac3..388bf8b 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -65,8 +65,14 @@ struct qdisc_watchdog { }; extern void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc); -extern void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, - psched_time_t expires); +extern void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires); + +static inline void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, + psched_time_t expires) +{ + qdisc_watchdog_schedule_ns(wd, PSCHED_TICKS2NS(expires)); +} + extern void qdisc_watchdog_cancel(struct qdisc_watchdog *wd); extern struct Qdisc_ops pfifo_qdisc_ops; diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index d84f7e7..fe1ba54 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -493,7 +493,7 @@ void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc) } EXPORT_SYMBOL(qdisc_watchdog_init); -void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, psched_time_t expires) +void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires) { if (test_bit(__QDISC_STATE_DEACTIVATED, &qdisc_root_sleeping(wd->qdisc)->state)) @@ -502,10 +502,10 @@ void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, psched_time_t expires) qdisc_throttled(wd->qdisc); hrtimer_start(&wd->timer, - ns_to_ktime(PSCHED_TICKS2NS(expires)), + ns_to_ktime(expires), HRTIMER_MODE_ABS); } -EXPORT_SYMBOL(qdisc_watchdog_schedule); +EXPORT_SYMBOL(qdisc_watchdog_schedule_ns); void qdisc_watchdog_cancel(struct qdisc_watchdog *wd) {
tbf will need to schedule watchdog in ns. No need to convert it twice. Signed-off-by: Jiri Pirko <jiri@resnulli.us> --- include/net/pkt_sched.h | 10 ++++++++-- net/sched/sch_api.c | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-)