aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sched/sch_generic.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 03cf001adb41..a08a98e7b943 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -311,12 +311,17 @@ static const u8 prio2band[TC_PRIO_MAX+1] =
311 generic prio+fifo combination. 311 generic prio+fifo combination.
312 */ 312 */
313 313
314static int 314static inline struct sk_buff_head *prio2list(struct sk_buff *skb,
315pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc* qdisc) 315 struct Qdisc *qdisc)
316{ 316{
317 struct sk_buff_head *list = qdisc_priv(qdisc); 317 struct sk_buff_head *list = qdisc_priv(qdisc);
318 return list + prio2band[skb->priority & TC_PRIO_MAX];
319}
318 320
319 list += prio2band[skb->priority&TC_PRIO_MAX]; 321static int
322pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc* qdisc)
323{
324 struct sk_buff_head *list = prio2list(skb, qdisc);
320 325
321 if (skb_queue_len(list) < qdisc->dev->tx_queue_len) { 326 if (skb_queue_len(list) < qdisc->dev->tx_queue_len) {
322 qdisc->q.qlen++; 327 qdisc->q.qlen++;
@@ -345,12 +350,8 @@ pfifo_fast_dequeue(struct Qdisc* qdisc)
345static int 350static int
346pfifo_fast_requeue(struct sk_buff *skb, struct Qdisc* qdisc) 351pfifo_fast_requeue(struct sk_buff *skb, struct Qdisc* qdisc)
347{ 352{
348 struct sk_buff_head *list = qdisc_priv(qdisc);
349
350 list += prio2band[skb->priority&TC_PRIO_MAX];
351
352 qdisc->q.qlen++; 353 qdisc->q.qlen++;
353 return __qdisc_requeue(skb, qdisc, list); 354 return __qdisc_requeue(skb, qdisc, prio2list(skb, qdisc));
354} 355}
355 356
356static void 357static void