- qga/win32: Use rundll for VSS installation - qga/win32: Remove change action from MSI installer - ide: Increment BB in-flight counter for TRIM BH - hw/pci-bridge/pxb: Fix missing swizzle - host-vdpa: make notifiers _init()/_uninit() symmetric - hw/virtio: vdpa: Fix leak of host-notifier memory-region - accel/tcg/cpu-exec: Fix precise single-stepping after interrupt - Allow setting up to 8 bytes with the generic loader - hw/net/virtio-net: make some VirtIONet const - accel/tcg: Optimize jump cache flush during tlb range flush - 9pfs: prevent opening special files (CVE-2023-2861) - tcg: Reduce tcg_assert_listed_vecop() scope - gitlab: Disable plugins for cross-i386-tci - vfio/pci: Fix a segfault in vfio_realize - block/iscsi: fix double-free on BUSY or similar statuses - tests/tcg: fix unused variable in linux-test - hw/net/vmxnet3: allow VMXNET3_MAX_MTU itself as a value - qga/vss-win32: fix warning for clang++-15 - vnc: avoid underflow when accessing user-provided address - block/monitor: Fix crash when executing HMP commit - virtio-gpu: add a FIXME for virtio_gpu_load() - hw/ppc/Kconfig: MAC_NEWWORLD should always select USB_OHCI_PCI - migration: report compress thread pid to libvirt Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
45 lines
1.7 KiB
Diff
45 lines
1.7 KiB
Diff
From f6e12a7c892c5e823157f6b84955544ff659e980 Mon Sep 17 00:00:00 2001
|
|
From: jipengfei <jipengfei_yewu@cmss.chinamobile.com>
|
|
Date: Fri, 30 Jun 2023 22:19:22 +0800
|
|
Subject: [PATCH] hw/net/virtio-net: make some VirtIONet const
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
The VirtIONet structure is not modified in
|
|
virtio_net_supported_guest_offloads().
|
|
Therefore, make it const to allow this function to
|
|
accept const variables.
|
|
|
|
cheery-pick from 705e89cfaafc54491482742a756cf661b48608d2
|
|
|
|
Signed-off-by: jipengfei_yewu <jipengfei_yewu@cmss.chinamobile.com>
|
|
Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
|
|
Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
|
|
Message-Id: <489b09c3998ac09b9135e57a7dd8c56a4be8cdf9.1685704856.git.yin31149@gmail.com>
|
|
Tested-by: Lei Yang <leiyang@redhat.com>
|
|
Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
|
|
Tested-by: Eugenio Pérez <eperezma@redhat.com>
|
|
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
---
|
|
hw/net/virtio-net.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
|
|
index 4946b65e22..3bd786cc22 100644
|
|
--- a/hw/net/virtio-net.c
|
|
+++ b/hw/net/virtio-net.c
|
|
@@ -811,7 +811,7 @@ static uint64_t virtio_net_guest_offloads_by_features(uint32_t features)
|
|
return guest_offloads_mask & features;
|
|
}
|
|
|
|
-static inline uint64_t virtio_net_supported_guest_offloads(VirtIONet *n)
|
|
+static inline uint64_t virtio_net_supported_guest_offloads(const VirtIONet *n)
|
|
{
|
|
VirtIODevice *vdev = VIRTIO_DEVICE(n);
|
|
return virtio_net_guest_offloads_by_features(vdev->guest_features);
|
|
--
|
|
2.41.0.windows.1
|
|
|