Commit 08f89b98 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

pkt_sched: fq: prefetch() fix

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: default avatarWu Fengguang <fengguang.wu@intel.com>
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ede23fa8
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/rbtree.h> #include <linux/rbtree.h>
#include <linux/hash.h> #include <linux/hash.h>
#include <linux/prefetch.h>
#include <net/netlink.h> #include <net/netlink.h>
#include <net/pkt_sched.h> #include <net/pkt_sched.h>
#include <net/sock.h> #include <net/sock.h>
...@@ -461,6 +462,7 @@ static struct sk_buff *fq_dequeue(struct Qdisc *sch) ...@@ -461,6 +462,7 @@ static struct sk_buff *fq_dequeue(struct Qdisc *sch)
} }
goto begin; goto begin;
} }
prefetch(&skb->end);
f->time_next_packet = now; f->time_next_packet = now;
f->credit -= qdisc_pkt_len(skb); f->credit -= qdisc_pkt_len(skb);
...@@ -488,7 +490,6 @@ static struct sk_buff *fq_dequeue(struct Qdisc *sch) ...@@ -488,7 +490,6 @@ static struct sk_buff *fq_dequeue(struct Qdisc *sch)
} }
} }
out: out:
prefetch(&skb->end);
sch->qstats.backlog -= qdisc_pkt_len(skb); sch->qstats.backlog -= qdisc_pkt_len(skb);
qdisc_bstats_update(sch, skb); qdisc_bstats_update(sch, skb);
sch->q.qlen--; sch->q.qlen--;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment