On Sun, Jan 21, 2018 at 2:12 PM, John Fastabend
<john.fastab...@gmail.com> 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 = qdisc_priv(sch);
>> +     int prio;
>> +
>> +     for (prio = 0; prio < PFIFO_FAST_BANDS; prio++) {
>> +             struct skb_array *q = band2list(priv, prio);
>> +
>> +             skb_array_resize(q, new_len, GFP_KERNEL);
>> +     }
>> +}
>> +
>
> Here skb_array_resize() can fail with ENOMEM, do we need to unwind the
> change and push the error up the stack?

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.

Reply via email to