diff options
| author | Laurent Vivier <lvivier@redhat.com> | 2025-07-09 10:24:21 +0200 |
|---|---|---|
| committer | Jason Wang <jasowang@redhat.com> | 2025-07-14 13:27:09 +0800 |
| commit | 1652f1b335fb5bec921c64ff7f378e6732510ca4 (patch) | |
| tree | e12898426fc54280467eac9723d8de8e87492bbb /include/net/vhost_net.h | |
| parent | bd38794a1119ec8e3f0a7473458ce4cdd229bc42 (diff) | |
| download | focaccia-qemu-1652f1b335fb5bec921c64ff7f378e6732510ca4.tar.gz focaccia-qemu-1652f1b335fb5bec921c64ff7f378e6732510ca4.zip | |
net: Add save_acked_features callback to vhost_net
This commit introduces a save_acked_features function pointer to vhost_net and converts the vhost_net function into a generic dispatcher. The vhost-user backend provides the callback, making its function static. With this change, no other module has a direct dependency on the vhost-user implementation. This cleanup allows for the complete removal of the net/vhost-user.h header file. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include/net/vhost_net.h')
| -rw-r--r-- | include/net/vhost_net.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/vhost_net.h b/include/net/vhost_net.h index a8d281c8f7..eb26ed9bdc 100644 --- a/include/net/vhost_net.h +++ b/include/net/vhost_net.h @@ -8,6 +8,7 @@ struct vhost_net; typedef struct vhost_net VHostNetState; typedef uint64_t (GetAckedFeatures)(NetClientState *nc); +typedef void (SaveAcketFeatures)(NetClientState *nc); typedef struct VhostNetOptions { VhostBackendType backend_type; @@ -16,6 +17,7 @@ typedef struct VhostNetOptions { unsigned int nvqs; const int *feature_bits; GetAckedFeatures *get_acked_features; + SaveAcketFeatures *save_acked_features; void *opaque; } VhostNetOptions; |