]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_vhost/rte_virtio_net.h
vhost: fix fd leaks for vhost-user server mode
[dpdk.git] / lib / librte_vhost / rte_virtio_net.h
index 926039c5afa0f13d8aea0805a8228e8b25089817..56829aaa1804fbc774a7615320d12a6b779ba1b4 100644 (file)
@@ -99,6 +99,21 @@ int rte_vhost_driver_callback_register(struct virtio_net_device_ops const * cons
 /* Start vhost driver session blocking loop. */
 int rte_vhost_driver_session_start(void);
 
+/**
+ * Get the MTU value of the device if set in QEMU.
+ *
+ * @param vid
+ *  virtio-net device ID
+ * @param mtu
+ *  The variable to store the MTU value
+ *
+ * @return
+ *  0: success
+ *  -EAGAIN: device not yet started
+ *  -ENOTSUP: device does not support MTU feature
+ */
+int rte_vhost_get_mtu(int vid, uint16_t *mtu);
+
 /**
  * Get the numa node from which the virtio net device's memory
  * is allocated.