mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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>
This commit is contained in:
parent
be4278b65f
commit
539573c317
2 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue