aboutsummaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorEugenio Pérez <eperezma@redhat.com>2022-08-23 20:30:35 +0200
committerJason Wang <jasowang@redhat.com>2022-09-02 10:22:39 +0800
commit539573c317dc0b8d50a128db60550f2f2898d2fc (patch)
tree4feb1d596fa4513ee1ea950bc4e8d753d8b7fedb /include/net
parentbe4278b65fc1be8fce87e1e7c01bc52602d304eb (diff)
downloadqemu-539573c317dc0b8d50a128db60550f2f2898d2fc.zip
qemu-539573c317dc0b8d50a128db60550f2f2898d2fc.tar.gz
qemu-539573c317dc0b8d50a128db60550f2f2898d2fc.tar.bz2
vhost_net: add NetClientState->load() callback
It allows per-net client operations right after device's successful start. In particular, to load the device status. Vhost-vdpa net will use it to add the CVQ buffers to restore the device status. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/net.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/net.h b/include/net/net.h
index 476ad45..81d0b21 100644
--- a/include/net/net.h
+++ b/include/net/net.h
@@ -45,6 +45,7 @@ typedef struct NICConf {
typedef void (NetPoll)(NetClientState *, bool enable);
typedef bool (NetCanReceive)(NetClientState *);
typedef int (NetStart)(NetClientState *);
+typedef int (NetLoad)(NetClientState *);
typedef void (NetStop)(NetClientState *);
typedef ssize_t (NetReceive)(NetClientState *, const uint8_t *, size_t);
typedef ssize_t (NetReceiveIOV)(NetClientState *, const struct iovec *, int);
@@ -74,6 +75,7 @@ typedef struct NetClientInfo {
NetReceiveIOV *receive_iov;
NetCanReceive *can_receive;
NetStart *start;
+ NetLoad *load;
NetStop *stop;
NetCleanup *cleanup;
LinkStatusChanged *link_status_changed;