Skip to content

Commit

Permalink
pkt_sched: fq: prefetch() fix
Browse files Browse the repository at this point in the history
kbuild bot reported following m68k build error :

  net/sched/sch_fq.c: In function 'fq_dequeue':
>> net/sched/sch_fq.c:491:2: error: implicit declaration of function
'prefetch' [-Werror=implicit-function-declaration]
   cc1: some warnings being treated as errors

While we are fixing this, move this prefetch() call a bit earlier.

Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Aug 30, 2013
1 parent ede23fa commit 08f89b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/sched/sch_fq.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <linux/slab.h>
#include <linux/rbtree.h>
#include <linux/hash.h>
#include <linux/prefetch.h>
#include <net/netlink.h>
#include <net/pkt_sched.h>
#include <net/sock.h>
Expand Down Expand Up @@ -461,6 +462,7 @@ static struct sk_buff *fq_dequeue(struct Qdisc *sch)
}
goto begin;
}
prefetch(&skb->end);
f->time_next_packet = now;
f->credit -= qdisc_pkt_len(skb);

Expand Down Expand Up @@ -488,7 +490,6 @@ static struct sk_buff *fq_dequeue(struct Qdisc *sch)
}
}
out:
prefetch(&skb->end);
sch->qstats.backlog -= qdisc_pkt_len(skb);
qdisc_bstats_update(sch, skb);
sch->q.qlen--;
Expand Down

0 comments on commit 08f89b9

Please sign in to comment.