]> git.baikalelectronics.ru Git - kernel.git/commit
sched: add and use qdisc_skb_head helpers
authorFlorian Westphal <fw@strlen.de>
Sat, 17 Sep 2016 22:57:34 +0000 (00:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Sep 2016 05:47:18 +0000 (01:47 -0400)
commit42ce57173f5f3ab702a4778802da3da951ef40b7
tree123595224534ee49f1175b6ef8371728b6d31538
parentb406a837e5e49c1b1c1fd8559d0bcf9c92ce2cc4
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