-----Original Message-----
From: Jakub Kicinski [mailto:kuba@kernel.org]
Sent: Thursday, May 27, 2021 8:28 AM
To: wangyunjian <redacted>
Cc: netdev@vger.kernel.org; davem@davemloft.net; mst@redhat.com;
jasowang@redhat.com; virtualization@lists.linux-foundation.org;
dingxiaoxiong [off-list ref]
Subject: Re: [PATCH net-next] virtio_net: set link state down when virtqueue is
broken
On Wed, 26 May 2021 19:39:51 +0800 wangyunjian wrote:
quoted
+ for (i = 0; i < vi->max_queue_pairs; i++) {
+ if (virtqueue_is_broken(vi->rq[i].vq) ||
virtqueue_is_broken(vi->sq[i].vq)) {quoted
+ netif_carrier_off(netdev);
+ netif_tx_stop_all_queues(netdev);
+ vi->broken = true;
Can't comment on the virtio specifics but the lack of locking between this and
the code in virtnet_config_changed_work() seems surprising.
Thanks for your suggestion, will fix it in next version.
Yunjian