]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: plug in qdisc ops change_tx_queue_len
authorCong Wang <xiyou.wangcong@gmail.com>
Fri, 26 Jan 2018 02:26:23 +0000 (18:26 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jan 2018 17:42:15 +0000 (12:42 -0500)
commit0f62a5794ddbe81a1db2dee3d64f2d650f5097bd
tree6318e75ea99c74a81622ebe82ee2c71c9338baf4
parent70ca3501d578853c6a7303ad463b7081c44ff74f
net_sched: plug in qdisc ops change_tx_queue_len

Introduce a new qdisc ops ->change_tx_queue_len() so that
each qdisc could decide how to implement this if it wants.
Previously we simply read dev->tx_queue_len, after pfifo_fast
switches to skb array, we need this API to resize the skb array
when we change dev->tx_queue_len.

To avoid handling race conditions with TX BH, we need to
deactivate all TX queues before change the value and bring them
back after we are done, this also makes implementation easier.

Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sch_generic.h
net/core/dev.c
net/sched/sch_generic.c