lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM_iQpUpw01S5UJD3aZr2Q2TtSggdemJwYFpP3hekS3MirCOGA@mail.gmail.com>
Date:   Thu, 25 Jan 2018 14:21:24 -0800
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     John Fastabend <john.fastabend@...il.com>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [Patch net-next v2 2/3] net_sched: plug in qdisc ops change_tx_queue_len

On Wed, Jan 24, 2018 at 4:05 PM, John Fastabend
<john.fastabend@...il.com> wrote:
> On 01/23/2018 10:18 AM, Cong Wang wrote:
>> +int dev_qdisc_change_tx_queue_len(struct net_device *dev)
>> +{
>> +     bool up = dev->flags & IFF_UP;
>> +     unsigned int i;
>> +     int ret = 0;
>> +
>> +     if (up)
>> +             dev_deactivate(dev);
>> +
>> +     for (i = 0; i < dev->num_tx_queues; i++) {
>> +             ret = qdisc_change_tx_queue_len(dev, &dev->_tx[i]);
>> +
>> +             /* TODO: revert changes on a partial failure */
>> +             if (ret)
>> +                     break;
>
> After another look it seems we can solve this without too much pain
> by using skb_array_resize_multiple() in patch 3/3. Then pass the
> error pack here via qdisc_change_tx_queue_len and reset queue length
> to orig_length.

Yeah, I was not aware of that API, looks reasonable. But, since you
are referring to dev_qdisc_change_tx_queue_len(), it doesn't help 2/3
because we still have to iterate each tx queue, so the above comment
still stands.

I will update patch 3/3.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ