sched: add and use qdisc_skb_head helpers
commit48da34b7a74201f15315cb1fc40bb9a7bd2b4940
authorFlorian Westphal <fw@strlen.de>
Sat, 17 Sep 2016 22:57:34 +0000 (18 00:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Sep 2016 05:47:18 +0000 (19 01:47 -0400)
tree123595224534ee49f1175b6ef8371728b6d31538
parented760cb8aae7c2b84c193d4a7637b0c9e752f07e
sched: add and use qdisc_skb_head helpers

This change replaces sk_buff_head struct in Qdiscs with new qdisc_skb_head.

Its similar to the skb_buff_head api, but does not use skb->prev pointers.

Qdiscs will commonly enqueue at the tail of a list and dequeue at head.
While skb_buff_head works fine for this, enqueue/dequeue needs to also
adjust the prev pointer of next element.

The ->prev pointer is not required for qdiscs so we can just leave
it undefined and avoid one cacheline write access for en/dequeue.

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sch_generic.h
net/sched/sch_generic.c
net/sched/sch_htb.c
net/sched/sch_netem.c