Thread (10 messages) flat view 10 messages, 3 authors, 2021-06-07

RE: [PATCH net-next] virtio_net: set link state down when virtqueue is broken

From: wangyunjian <hidden>
Date: 2021-05-27 03:06:32

-----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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help