79c4324644
Change-Id: I2d302dda68298877c65c99147f5bf22186a59aac
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
|
|
|