mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
vhost-user: Add MTU protocol feature and op
This patch implements VHOST_USER_PROTOCOL_F_NET_MTU protocol feature and VHOST_USER_NET_SET_MTU request so that the backend gets notified of the user defined host MTU. If backend supports VHOST_USER_PROTOCOL_F_REPLY_ACK, QEMU assumes MTU is valid if success is returned. Vhost-net driver sends this request through a new vhost_net_set_mtu vhost_ops entry. Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Aaron Conole <aconole@redhat.com> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
283e2c2adc
commit
c5f048d8fb
3 changed files with 52 additions and 0 deletions
|
@ -32,6 +32,7 @@ typedef int (*vhost_backend_memslots_limit)(struct vhost_dev *dev);
|
|||
|
||||
typedef int (*vhost_net_set_backend_op)(struct vhost_dev *dev,
|
||||
struct vhost_vring_file *file);
|
||||
typedef int (*vhost_net_set_mtu_op)(struct vhost_dev *dev, uint16_t mtu);
|
||||
typedef int (*vhost_scsi_set_endpoint_op)(struct vhost_dev *dev,
|
||||
struct vhost_scsi_target *target);
|
||||
typedef int (*vhost_scsi_clear_endpoint_op)(struct vhost_dev *dev,
|
||||
|
@ -83,6 +84,7 @@ typedef struct VhostOps {
|
|||
vhost_backend_cleanup vhost_backend_cleanup;
|
||||
vhost_backend_memslots_limit vhost_backend_memslots_limit;
|
||||
vhost_net_set_backend_op vhost_net_set_backend;
|
||||
vhost_net_set_mtu_op vhost_net_set_mtu;
|
||||
vhost_scsi_set_endpoint_op vhost_scsi_set_endpoint;
|
||||
vhost_scsi_clear_endpoint_op vhost_scsi_clear_endpoint;
|
||||
vhost_scsi_get_abi_version_op vhost_scsi_get_abi_version;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue