[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 73/83] vhost: move and rename the conn retry times
|
From: |
Michael S. Tsirkin |
|
Subject: |
[PULL 73/83] vhost: move and rename the conn retry times |
|
Date: |
Wed, 18 Oct 2023 11:58:56 -0400 |
From: Li Feng <fengli@smartx.com>
Multiple devices need this macro, move it to a common header.
Signed-off-by: Li Feng <fengli@smartx.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <20231009044735.941655-3-fengli@smartx.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/virtio/vhost.h | 2 ++
hw/block/vhost-user-blk.c | 4 +---
hw/virtio/vhost-user-gpio.c | 3 +--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h
index 00e0a669b8..5e8183f64a 100644
--- a/include/hw/virtio/vhost.h
+++ b/include/hw/virtio/vhost.h
@@ -8,6 +8,8 @@
#define VHOST_F_DEVICE_IOTLB 63
#define VHOST_USER_F_PROTOCOL_FEATURES 30
+#define VU_REALIZE_CONN_RETRIES 3
+
/* Generic structures common for any vhost based device. */
struct vhost_inflight {
diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
index eecf3f7a81..3c69fa47d5 100644
--- a/hw/block/vhost-user-blk.c
+++ b/hw/block/vhost-user-blk.c
@@ -32,8 +32,6 @@
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
-#define REALIZE_CONNECTION_RETRIES 3
-
static const int user_feature_bits[] = {
VIRTIO_BLK_F_SIZE_MAX,
VIRTIO_BLK_F_SEG_MAX,
@@ -482,7 +480,7 @@ static void vhost_user_blk_device_realize(DeviceState *dev,
Error **errp)
s->inflight = g_new0(struct vhost_inflight, 1);
s->vhost_vqs = g_new0(struct vhost_virtqueue, s->num_queues);
- retries = REALIZE_CONNECTION_RETRIES;
+ retries = VU_REALIZE_CONN_RETRIES;
assert(!*errp);
do {
if (*errp) {
diff --git a/hw/virtio/vhost-user-gpio.c b/hw/virtio/vhost-user-gpio.c
index 3d7fae3984..fc784e4213 100644
--- a/hw/virtio/vhost-user-gpio.c
+++ b/hw/virtio/vhost-user-gpio.c
@@ -15,7 +15,6 @@
#include "standard-headers/linux/virtio_ids.h"
#include "trace.h"
-#define REALIZE_CONNECTION_RETRIES 3
#define VHOST_NVQS 2
/* Features required from VirtIO */
@@ -365,7 +364,7 @@ static void vu_gpio_device_realize(DeviceState *dev, Error
**errp)
qemu_chr_fe_set_handlers(&gpio->chardev, NULL, NULL, vu_gpio_event, NULL,
dev, NULL, true);
- retries = REALIZE_CONNECTION_RETRIES;
+ retries = VU_REALIZE_CONN_RETRIES;
g_assert(!*errp);
do {
if (*errp) {
--
MST
- [PULL 66/83] hw/isa/piix: Reuse PIIX3 base class' realize method in PIIX4, (continued)
- [PULL 66/83] hw/isa/piix: Reuse PIIX3 base class' realize method in PIIX4, Michael S. Tsirkin, 2023/10/18
- [PULL 67/83] hw/isa/piix: Rename functions to be shared for PCI interrupt triggering, Michael S. Tsirkin, 2023/10/18
- [PULL 65/83] hw/isa/piix: Share PIIX3's base class with PIIX4, Michael S. Tsirkin, 2023/10/18
- [PULL 69/83] hw/isa/piix: Resolve duplicate code regarding PCI interrupt wiring, Michael S. Tsirkin, 2023/10/18
- [PULL 63/83] hw/isa/piix: Allow for optional PIT creation in PIIX3, Michael S. Tsirkin, 2023/10/18
- [PULL 71/83] hw/i386/pc_piix: Make PIIX4 south bridge usable in PC machine, Michael S. Tsirkin, 2023/10/18
- [PULL 60/83] hw/isa/piix4: Reuse struct PIIXState from PIIX3, Michael S. Tsirkin, 2023/10/18
- [PULL 68/83] hw/isa/piix: Reuse PIIX3's PCI interrupt triggering in PIIX4, Michael S. Tsirkin, 2023/10/18
- [PULL 72/83] vhost-user-common: send get_inflight_fd once, Michael S. Tsirkin, 2023/10/18
- [PULL 74/83] vhost-user-scsi: support reconnect to backend, Michael S. Tsirkin, 2023/10/18
- [PULL 73/83] vhost: move and rename the conn retry times,
Michael S. Tsirkin <=
- [PULL 75/83] vhost-user-scsi: start vhost when guest kicks, Michael S. Tsirkin, 2023/10/18
- [PULL 76/83] vhost-user: fix lost reconnect, Michael S. Tsirkin, 2023/10/18
- [PULL 77/83] hw/i386/cxl: ensure maxram is greater than ram size for calculating cxl range, Michael S. Tsirkin, 2023/10/18
- [PULL 70/83] hw/isa/piix: Implement multi-process QEMU support also for PIIX4, Michael S. Tsirkin, 2023/10/18
- [PULL 79/83] hw/cxl: Add QTG _DSM support for ACPI0017 device, Michael S. Tsirkin, 2023/10/18
- [PULL 78/83] tests/acpi: Allow update of DSDT.cxl, Michael S. Tsirkin, 2023/10/18
- [PULL 80/83] tests/acpi: Update DSDT.cxl with QTG DSM, Michael S. Tsirkin, 2023/10/18
- [PULL 82/83] MAINTAINERS: Add include/hw/intc/i8259.h to the PC chip section, Michael S. Tsirkin, 2023/10/18
- [PULL 81/83] vhost-user: Fix protocol feature bit conflict, Michael S. Tsirkin, 2023/10/18
- [PULL 83/83] intel-iommu: Report interrupt remapping faults, fix return value, Michael S. Tsirkin, 2023/10/18