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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJs=3_B74L0wf-3xbAqkQ=eypmO-8FBh--QraLrzF2wkw_1Zow@mail.gmail.com>
Date:   Thu, 14 Jul 2022 10:22:39 +0300
From:   Alvaro Karsz <alvaro.karsz@...id-run.com>
To:     Jason Wang <jasowang@...hat.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

> 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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ