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: <CACGkMEt-KpkKHbnSdDRSSCFgK3qvWvPWRFViWUM2mggiBv0CBg@mail.gmail.com>
Date:   Thu, 14 Jul 2022 18:10:11 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Alvaro Karsz <alvaro.karsz@...id-run.com>
Cc:     Jakub Kicinski <kuba@...nel.org>, netdev <netdev@...r.kernel.org>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH v2] net: virtio_net: notifications coalescing support

On Thu, Jul 14, 2022 at 3:23 PM Alvaro Karsz <alvaro.karsz@...id-run.com> wrote:
>
> > So we use sq->napi.weight as a hint to use tx interrupt or not.
> > We need a safe switching from tx interrupt and skb_orphan(). The
> > current code guarantees this by only allowing the switching when the
> > interface is down.
> > So what I meant for the above "Update NAPI" is, consider that users
> > want to switch from tx_max_coalesced_frames from 0 to 100. This needs
> > to be down when the interface is down, since the driver need to enable
> > tx interrupt mode, otherwise the coalescing is meaningless.
> > This would be much easier if we only have tx interrupt mode, but this
> > requires more work.
>
>
> So, If I understood correctly, you're suggesting to add the following
> part to the
> "interrupt coalescing is negotiated" case:
>
> napi_weight = ec->tx_max_coalesced_frames ? NAPI_POLL_WEIGHT : 0;
> if (napi_weight ^ vi->sq[0].napi.weight) {
>    if (dev->flags & IFF_UP)
>         return -EBUSY;
>     for (i = 0; i < vi->max_queue_pairs; i++)
>         vi->sq[i].napi.weight = napi_weight;
> }
>
> Before sending the control commands to the device.
> Is this right?

I think it should be after the control commands were sent. Other looks fine.

Thanks

>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ