virtio-net: unbreak vq resizing when coalescing is not negotiated
BugLink: https://bugs.launchpad.net/bugs/2083656
[ Upstream commit 4ba8d97083707409822264fd1776aad7233f353e ]
Don't break the resize action if the vq coalescing feature
named VIRTIO_NET_F_VQ_NOTF_COAL is not negotiated.
Fixes: f61fe5f081 ("virtio-net: fix the vq coalescing setting for vq resize")
Signed-off-by: Heng Qi <hengqi@linux.alibaba.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Eugenio Pé rez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
[koichiroden: adjusted context due to missing commit:
4d4ac2ececd3 ("virtio_net: Add a lock for per queue RX coalesce")]
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
@@ -3035,7 +3035,11 @@ static int virtnet_set_ringparam(struct net_device *dev,
|
||||
err = virtnet_send_tx_ctrl_coal_vq_cmd(vi, i,
|
||||
vi->intr_coal_tx.max_usecs,
|
||||
vi->intr_coal_tx.max_packets);
|
||||
if (err)
|
||||
|
||||
/* Don't break the tx resize action if the vq coalescing is not
|
||||
* supported. The same is true for rx resize below.
|
||||
*/
|
||||
if (err && err != -EOPNOTSUPP)
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -3048,7 +3052,7 @@ static int virtnet_set_ringparam(struct net_device *dev,
|
||||
err = virtnet_send_rx_ctrl_coal_vq_cmd(vi, i,
|
||||
vi->intr_coal_rx.max_usecs,
|
||||
vi->intr_coal_rx.max_packets);
|
||||
if (err)
|
||||
if (err && err != -EOPNOTSUPP)
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user