[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 6/7] vmstate.h: provide VMSTATE_VARRAY_UINT16_ALLOC macro
From: |
Yuri Benditovich |
Subject: |
[PATCH v6 6/7] vmstate.h: provide VMSTATE_VARRAY_UINT16_ALLOC macro |
Date: |
Fri, 20 Mar 2020 13:57:50 +0200 |
Similar to VMSTATE_VARRAY_UINT32_ALLOC, but the size is
16-bit field.
Signed-off-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Yuri Benditovich <address@hidden>
---
include/migration/vmstate.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index 30667631bc..baaefb6b9b 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.17.1
- [PATCH v6 0/7] reference implementation of RSS and hash report, Yuri Benditovich, 2020/03/20
- [PATCH v6 1/7] virtio-net: introduce RSS and hash report features, Yuri Benditovich, 2020/03/20
- [PATCH v6 4/7] tap: allow extended virtio header with hash info, Yuri Benditovich, 2020/03/20
- [PATCH v6 3/7] virtio-net: implement RX RSS processing, Yuri Benditovich, 2020/03/20
- [PATCH v6 2/7] virtio-net: implement RSS configuration command, Yuri Benditovich, 2020/03/20
- [PATCH v6 6/7] vmstate.h: provide VMSTATE_VARRAY_UINT16_ALLOC macro,
Yuri Benditovich <=
- [PATCH v6 5/7] virtio-net: reference implementation of hash report, Yuri Benditovich, 2020/03/20
- [PATCH v6 7/7] virtio-net: add migration support for RSS and hash report, Yuri Benditovich, 2020/03/20
- Re: [PATCH v6 0/7] reference implementation of RSS and hash report, no-reply, 2020/03/20
- Re: [PATCH v6 0/7] reference implementation of RSS and hash report, Michael S. Tsirkin, 2020/03/26