Re: [Patch net-next 2/3] net_sched: plug in qdisc ops change_tx_queue_len

2018-01-23 Thread John Fastabend
On 01/23/2018 10:07 AM, Cong Wang wrote: > On Mon, Jan 22, 2018 at 2:44 PM, Cong Wang wrote: >> >> Good point, but netdev_for_each_tx_queue() doesn't handle errors >> in current code base, it is not trivial to make it returning int to reflect >> errors, since we have to rollback a partial failure

Re: [Patch net-next 2/3] net_sched: plug in qdisc ops change_tx_queue_len

2018-01-23 Thread John Fastabend
On 01/23/2018 10:07 AM, Cong Wang wrote: > On Mon, Jan 22, 2018 at 2:44 PM, Cong Wang wrote: >> >> Good point, but netdev_for_each_tx_queue() doesn't handle errors >> in current code base, it is not trivial to make it returning int to reflect >> errors, since we have to rollback a partial failure

Re: [Patch net-next 2/3] net_sched: plug in qdisc ops change_tx_queue_len

2018-01-23 Thread Cong Wang
On Mon, Jan 22, 2018 at 2:44 PM, Cong Wang wrote: > > Good point, but netdev_for_each_tx_queue() doesn't handle errors > in current code base, it is not trivial to make it returning int to reflect > errors, since we have to rollback a partial failure too. I think for now we can just check for err

Re: [Patch net-next 2/3] net_sched: plug in qdisc ops change_tx_queue_len

2018-01-22 Thread Cong Wang
On Sun, Jan 21, 2018 at 2:12 PM, John Fastabend wrote: > On 01/19/2018 03:09 PM, Cong Wang wrote: > > hmm what happens if the resize fails in the next patch, > >> >> +static void pfifo_fast_change_tx_queue_len(struct Qdisc *sch, unsigned int >> new_len) >> +{ >> + struct pfifo_fast_priv *priv

Re: [Patch net-next 2/3] net_sched: plug in qdisc ops change_tx_queue_len

2018-01-21 Thread John Fastabend
On 01/19/2018 03:09 PM, Cong Wang wrote: > 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

[Patch net-next 2/3] net_sched: plug in qdisc ops change_tx_queue_len

2018-01-19 Thread Cong Wang
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 rac