[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL V2 05/33] vmstate.h: provide VMSTATE_VARRAY_UINT16_ALLOC macro
From: |
Jason Wang |
Subject: |
[PULL V2 05/33] vmstate.h: provide VMSTATE_VARRAY_UINT16_ALLOC macro |
Date: |
Thu, 18 Jun 2020 21:21:20 +0800 |
From: Yuri Benditovich <yuri.benditovich@daynix.com>
Similar to VMSTATE_VARRAY_UINT32_ALLOC, but the size is
16-bit field.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
include/migration/vmstate.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index eafa39f..f68ed7d 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -432,6 +432,16 @@ extern const VMStateInfo vmstate_info_qlist;
.offset = vmstate_offset_pointer(_state, _field, _type), \
}
+#define VMSTATE_VARRAY_UINT16_ALLOC(_field, _state, _field_num, _version,
_info, _type) {\
+ .name = (stringify(_field)), \
+ .version_id = (_version), \
+ .num_offset = vmstate_offset_value(_state, _field_num, uint16_t),\
+ .info = &(_info), \
+ .size = sizeof(_type), \
+ .flags = VMS_VARRAY_UINT16 | VMS_POINTER | VMS_ALLOC, \
+ .offset = vmstate_offset_pointer(_state, _field, _type), \
+}
+
#define VMSTATE_VARRAY_UINT16_UNSAFE(_field, _state, _field_num, _version,
_info, _type) {\
.name = (stringify(_field)), \
.version_id = (_version), \
--
2.5.0
- [PULL V2 00/33] Net patches, Jason Wang, 2020/06/18
- [PULL V2 01/33] virtio-net: implement RSS configuration command, Jason Wang, 2020/06/18
- [PULL V2 03/33] tap: allow extended virtio header with hash info, Jason Wang, 2020/06/18
- [PULL V2 02/33] virtio-net: implement RX RSS processing, Jason Wang, 2020/06/18
- [PULL V2 04/33] virtio-net: reference implementation of hash report, Jason Wang, 2020/06/18
- [PULL V2 07/33] virtio-net: align RSC fields with updated virtio-net header, Jason Wang, 2020/06/18
- [PULL V2 06/33] virtio-net: add migration support for RSS and hash report, Jason Wang, 2020/06/18
- [PULL V2 05/33] vmstate.h: provide VMSTATE_VARRAY_UINT16_ALLOC macro,
Jason Wang <=
- [PULL V2 08/33] Fix tulip breakage, Jason Wang, 2020/06/18
- [PULL V2 10/33] hw/net/tulip: Log descriptor overflows, Jason Wang, 2020/06/18
- [PULL V2 09/33] hw/net/tulip: Fix 'Descriptor Error' definition, Jason Wang, 2020/06/18
- [PULL V2 11/33] net: cadence_gem: Fix debug statements, Jason Wang, 2020/06/18
- [PULL V2 12/33] net: cadence_gem: Fix the queue address update during wrap around, Jason Wang, 2020/06/18
- [PULL V2 13/33] net: cadence_gem: Fix irq update w.r.t queue, Jason Wang, 2020/06/18
- [PULL V2 14/33] net: cadence_gem: Define access permission for interrupt registers, Jason Wang, 2020/06/18
- [PULL V2 15/33] net: cadence_gem: Set ISR according to queue in use, Jason Wang, 2020/06/18
- [PULL V2 16/33] net: cadence_gem: Move tx/rx packet buffert to CadenceGEMState, Jason Wang, 2020/06/18
- [PULL V2 18/33] net: cadence_gem: Add support for jumbo frames, Jason Wang, 2020/06/18