aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/mellanox
diff options
context:
space:
mode:
authorXuan Zhuo <xuanzhuo@linux.alibaba.com>2022-08-01 14:38:21 +0800
committerMichael S. Tsirkin <mst@redhat.com>2022-08-11 04:06:38 -0400
commitda802961832f9852886304290135457519815497 (patch)
tree15d1e1ab7b0387b95bfc5931a98f3ff12e77f9fc /drivers/platform/mellanox
parentdrivers/virtio: Clarify CONFIG_VIRTIO_MEM for unsupported architectures (diff)
downloadlinux-dev-da802961832f9852886304290135457519815497.tar.xz
linux-dev-da802961832f9852886304290135457519815497.zip
virtio: record the maximum queue num supported by the device.
virtio-net can display the maximum (supported by hardware) ring size in ethtool -g eth0. When the subsequent patch implements vring reset, it can judge whether the ring size passed by the driver is legal based on this. Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20220801063902.129329-2-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/platform/mellanox')
-rw-r--r--drivers/platform/mellanox/mlxbf-tmfifo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
index 38800e86ed8a..1ae3c56b66b0 100644
--- a/drivers/platform/mellanox/mlxbf-tmfifo.c
+++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
@@ -959,6 +959,8 @@ static int mlxbf_tmfifo_virtio_find_vqs(struct virtio_device *vdev,
goto error;
}
+ vq->num_max = vring->num;
+
vqs[i] = vq;
vring->vq = vq;
vq->priv = vring;