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: <CACGkMEs=A3tJHf3sFFN++Fb+VL=7P9bWGCynDAVFjtOT-0bYFQ@mail.gmail.com>
Date: Tue, 3 Dec 2024 10:25:14 +0800
From: Jason Wang <jasowang@...hat.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Koichiro Den <koichiro.den@...onical.com>, virtualization@...ts.linux.dev, 
	mst@...hat.com, xuanzhuo@...ux.alibaba.com, eperezma@...hat.com, 
	andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com, 
	pabeni@...hat.com, jiri@...nulli.us, netdev@...r.kernel.org, 
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH net-next] virtio_net: drop netdev_tx_reset_queue() from virtnet_enable_queue_pair()

On Tue, Dec 3, 2024 at 10:14 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Mon, 2 Dec 2024 12:22:53 +0800 Jason Wang wrote:
> > > Fixes: c8bd1f7f3e61 ("virtio_net: add support for Byte Queue Limits")
> > > Cc: <stable@...r.kernel.org> # v6.11+
> > > Signed-off-by: Koichiro Den <koichiro.den@...onical.com>
> >
> > Acked-by: Jason Wang <jasowang@...hat.com>
>
> I see Tx skb flush in:
>
> virtnet_freeze() -> remove_vq_common() -> free_unused_bufs() -> virtnet_sq_free_unused_buf()
>
> do we need to reset the BQL state in that case?

Yes, I think so. And I spot another path which is:

virtnet_tx_resize() -> virtqueue_resize() -> virtnet_sq_free_unused_buf().

> Rule of thumb is netdev_tx_reset_queue() should follow any flush
> (IOW skb freeing not followed by netdev_tx_completed_queue()).
>

Right.

Koichiro, I think this fixes the problem of open/stop but may break
freeze/restore(). Let's fix that.

For resizing, it's a path that has been buggy since the introduction of BQL.

Thanks


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ