代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/qemu 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 58fe483bf5824db177843675629ed955051078fd Mon Sep 17 00:00:00 2001
From: Jinhua Cao <caojinhua1@huawei.com>
Date: Sat, 12 Feb 2022 17:22:38 +0800
Subject: [PATCH] virtio-net: set the max of queue size to 4096
set the max of virtio-net queue size to 4096. Now the
queue_size of virtio-net is set by rx_queue_size and
tx_queue_size
Signed-off-by: Jinhua Cao <caojinhua1@huawei.com>
---
hw/net/virtio-net.c | 5 +++--
hw/virtio/virtio.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 7f69a4b842..0ae2ddc002 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -710,6 +710,7 @@ static int virtio_net_max_tx_queue_size(VirtIONet *n)
switch(peer->info->type) {
case NET_CLIENT_DRIVER_VHOST_USER:
+ return VIRTIO_NET_VQ_MAX_SIZE;
case NET_CLIENT_DRIVER_VHOST_VDPA:
return VIRTQUEUE_MAX_SIZE;
default:
@@ -3638,12 +3639,12 @@ static void virtio_net_device_realize(DeviceState *dev, Error **errp)
* help from us (using virtio 1 and up).
*/
if (n->net_conf.rx_queue_size < VIRTIO_NET_RX_QUEUE_MIN_SIZE ||
- n->net_conf.rx_queue_size > VIRTQUEUE_MAX_SIZE ||
+ n->net_conf.rx_queue_size > VIRTIO_NET_VQ_MAX_SIZE ||
!is_power_of_2(n->net_conf.rx_queue_size)) {
error_setg(errp, "Invalid rx_queue_size (= %" PRIu16 "), "
"must be a power of 2 between %d and %d.",
n->net_conf.rx_queue_size, VIRTIO_NET_RX_QUEUE_MIN_SIZE,
- VIRTQUEUE_MAX_SIZE);
+ VIRTIO_NET_VQ_MAX_SIZE);
virtio_cleanup(vdev);
return;
}
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 267c1e6fd0..d00effe4d5 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -2338,7 +2338,7 @@ VirtQueue *virtio_add_queue(VirtIODevice *vdev, int queue_size,
break;
}
- if (i == VIRTIO_QUEUE_MAX || queue_size > VIRTQUEUE_MAX_SIZE) {
+ if (i == VIRTIO_QUEUE_MAX) {
qemu_log("unacceptable queue_size (%d) or num (%d)\n",
queue_size, i);
abort();
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。