All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuri Benditovich <yuri.benditovich@daynix.com>
To: qemu-devel@nongnu.org, mst@redhat.com, jasowang@redhat.com
Cc: yan@daynix.com
Subject: [PATCH v7 6/7] vmstate.h: provide VMSTATE_VARRAY_UINT16_ALLOC macro
Date: Sun, 29 Mar 2020 18:09:52 +0300	[thread overview]
Message-ID: <20200329150953.23812-7-yuri.benditovich@daynix.com> (raw)
In-Reply-To: <20200329150953.23812-1-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>
---
 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



  parent reply	other threads:[~2020-03-29 15:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-29 15:09 [PATCH v7 0/7] reference implementation of RSS and hash report Yuri Benditovich
2020-03-29 15:09 ` [PATCH v7 1/7] virtio-net: introduce RSS and hash report features Yuri Benditovich
2020-03-29 15:09 ` [PATCH v7 2/7] virtio-net: implement RSS configuration command Yuri Benditovich
2020-03-29 15:09 ` [PATCH v7 3/7] virtio-net: implement RX RSS processing Yuri Benditovich
2020-03-29 15:09 ` [PATCH v7 4/7] tap: allow extended virtio header with hash info Yuri Benditovich
2020-03-29 15:09 ` [PATCH v7 5/7] virtio-net: reference implementation of hash report Yuri Benditovich
2020-03-29 15:09 ` Yuri Benditovich [this message]
2020-03-29 15:09 ` [PATCH v7 7/7] virtio-net: add migration support for RSS and " Yuri Benditovich
2020-03-31 14:26 ` [PATCH v7 0/7] reference implementation of " Michael S. Tsirkin
2020-05-01  4:01   ` Yuri Benditovich
2020-05-01 14:44     ` Michael S. Tsirkin
2020-05-01 16:40       ` Michael S. Tsirkin
2020-05-06  5:37     ` Jason Wang
2020-05-06  8:08       ` Yuri Benditovich
2020-05-01 16:41 ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200329150953.23812-7-yuri.benditovich@daynix.com \
    --to=yuri.benditovich@daynix.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yan@daynix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.