diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-03 10:25:08 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-03 10:25:08 -0400 |
commit | 0a1340c185734a57fbf4775927966ad4a1347b02 (patch) | |
tree | d9ed8f0dd809a7c542a3356601125ea5b5aaa804 /include/net/pkt_sched.h | |
parent | af18ddb8864b096e3ed4732e2d4b21c956dcfe3a (diff) | |
parent | 29454dde27d8e340bb1987bad9aa504af7081eba (diff) |
Merge rsync://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
include/linux/kernel.h
Diffstat (limited to 'include/net/pkt_sched.h')
-rw-r--r-- | include/net/pkt_sched.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index b94d1ad92c4d..1925c65e617b 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -169,17 +169,23 @@ psched_tod_diff(int delta_sec, int bound) | |||
169 | 169 | ||
170 | #define PSCHED_TADD2(tv, delta, tv_res) \ | 170 | #define PSCHED_TADD2(tv, delta, tv_res) \ |
171 | ({ \ | 171 | ({ \ |
172 | int __delta = (tv).tv_usec + (delta); \ | 172 | int __delta = (delta); \ |
173 | (tv_res).tv_sec = (tv).tv_sec; \ | 173 | (tv_res) = (tv); \ |
174 | if (__delta > USEC_PER_SEC) { (tv_res).tv_sec++; __delta -= USEC_PER_SEC; } \ | 174 | while(__delta >= USEC_PER_SEC){ \ |
175 | (tv_res).tv_sec++; \ | ||
176 | __delta -= USEC_PER_SEC; \ | ||
177 | } \ | ||
175 | (tv_res).tv_usec = __delta; \ | 178 | (tv_res).tv_usec = __delta; \ |
176 | }) | 179 | }) |
177 | 180 | ||
178 | #define PSCHED_TADD(tv, delta) \ | 181 | #define PSCHED_TADD(tv, delta) \ |
179 | ({ \ | 182 | ({ \ |
180 | (tv).tv_usec += (delta); \ | 183 | int __delta = (delta); \ |
181 | if ((tv).tv_usec > USEC_PER_SEC) { (tv).tv_sec++; \ | 184 | while(__delta >= USEC_PER_SEC){ \ |
182 | (tv).tv_usec -= USEC_PER_SEC; } \ | 185 | (tv).tv_sec++; \ |
186 | __delta -= USEC_PER_SEC; \ | ||
187 | } \ | ||
188 | (tv).tv_usec = __delta; \ | ||
183 | }) | 189 | }) |
184 | 190 | ||
185 | /* Set/check that time is in the "past perfect"; | 191 | /* Set/check that time is in the "past perfect"; |
@@ -218,12 +224,13 @@ extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, | |||
218 | struct rtattr *tab); | 224 | struct rtattr *tab); |
219 | extern void qdisc_put_rtab(struct qdisc_rate_table *tab); | 225 | extern void qdisc_put_rtab(struct qdisc_rate_table *tab); |
220 | 226 | ||
221 | extern int qdisc_restart(struct net_device *dev); | 227 | extern void __qdisc_run(struct net_device *dev); |
222 | 228 | ||
223 | static inline void qdisc_run(struct net_device *dev) | 229 | static inline void qdisc_run(struct net_device *dev) |
224 | { | 230 | { |
225 | while (!netif_queue_stopped(dev) && qdisc_restart(dev) < 0) | 231 | if (!netif_queue_stopped(dev) && |
226 | /* NOTHING */; | 232 | !test_and_set_bit(__LINK_STATE_QDISC_RUNNING, &dev->state)) |
233 | __qdisc_run(dev); | ||
227 | } | 234 | } |
228 | 235 | ||
229 | extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, | 236 | extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, |