Skip to content

Commit 4ba8d97

Browse files
Heng Qidavem330
authored andcommitted
virtio-net: unbreak vq resizing when coalescing is not negotiated
Don't break the resize action if the vq coalescing feature named VIRTIO_NET_F_VQ_NOTF_COAL is not negotiated. Fixes: f61fe5f ("virtio-net: fix the vq coalescing setting for vq resize") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Xuan Zhuo <[email protected]> Acked-by: Eugenio Pé rez <[email protected]> Acked-by: Jason Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b50f2af commit 4ba8d97

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/net/virtio_net.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3749,7 +3749,11 @@ static int virtnet_set_ringparam(struct net_device *dev,
37493749
err = virtnet_send_tx_ctrl_coal_vq_cmd(vi, i,
37503750
vi->intr_coal_tx.max_usecs,
37513751
vi->intr_coal_tx.max_packets);
3752-
if (err)
3752+
3753+
/* Don't break the tx resize action if the vq coalescing is not
3754+
* supported. The same is true for rx resize below.
3755+
*/
3756+
if (err && err != -EOPNOTSUPP)
37533757
return err;
37543758
}
37553759

@@ -3764,7 +3768,7 @@ static int virtnet_set_ringparam(struct net_device *dev,
37643768
vi->intr_coal_rx.max_usecs,
37653769
vi->intr_coal_rx.max_packets);
37663770
mutex_unlock(&vi->rq[i].dim_lock);
3767-
if (err)
3771+
if (err && err != -EOPNOTSUPP)
37683772
return err;
37693773
}
37703774
}

0 commit comments

Comments
 (0)