diff options
author | Eugenio Pérez | 2022-08-23 20:30:30 +0200 |
---|---|---|
committer | Jason Wang | 2022-09-02 04:22:39 +0200 |
commit | eb92b75380fc0f2368e22be45d1e2d1e2cd2f79c (patch) | |
tree | 15623b775f40a11c800b1bd07353816cf6f8de8f /include/net | |
parent | vhost: Do not depend on !NULL VirtQueueElement on vhost_svq_flush (diff) | |
download | qemu-eb92b75380fc0f2368e22be45d1e2d1e2cd2f79c.tar.gz qemu-eb92b75380fc0f2368e22be45d1e2d1e2cd2f79c.tar.xz qemu-eb92b75380fc0f2368e22be45d1e2d1e2cd2f79c.zip |
vhost_net: Add NetClientInfo start callback
This is used by the backend to perform actions before the device is
started.
In particular, vdpa net use it to map CVQ buffers to the device, so it
can send control commands using them.
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.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/net.h b/include/net/net.h index 523136c7ac..ad9e80083a 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -44,6 +44,7 @@ typedef struct NICConf { typedef void (NetPoll)(NetClientState *, bool enable); typedef bool (NetCanReceive)(NetClientState *); +typedef int (NetStart)(NetClientState *); typedef ssize_t (NetReceive)(NetClientState *, const uint8_t *, size_t); typedef ssize_t (NetReceiveIOV)(NetClientState *, const struct iovec *, int); typedef void (NetCleanup) (NetClientState *); @@ -71,6 +72,7 @@ typedef struct NetClientInfo { NetReceive *receive_raw; NetReceiveIOV *receive_iov; NetCanReceive *can_receive; + NetStart *start; NetCleanup *cleanup; LinkStatusChanged *link_status_changed; QueryRxFilter *query_rx_filter; |