*/
int rte_vhost_get_negotiated_features(int vid, uint64_t *features);
+/**
+ * Get the protocol feature bits after negotiation
+ *
+ * @param vid
+ * Vhost device ID
+ * @param protocol_features
+ * A pointer to store the queried protocol feature bits
+ * @return
+ * 0 on success, -1 on failure
+ */
+__rte_experimental
+int
+rte_vhost_get_negotiated_protocol_features(int vid,
+ uint64_t *protocol_features);
+
/* Register callbacks. */
int rte_vhost_driver_callback_register(const char *path,
struct vhost_device_ops const * const ops);
rte_vhost_async_channel_unregister;
rte_vhost_submit_enqueue_burst;
rte_vhost_poll_enqueue_completed;
+
+ # added in 21.05
+ rte_vhost_get_negotiated_protocol_features;
};
return 0;
}
+int
+rte_vhost_get_negotiated_protocol_features(int vid,
+ uint64_t *protocol_features)
+{
+ struct virtio_net *dev;
+
+ dev = get_device(vid);
+ if (dev == NULL || protocol_features == NULL)
+ return -1;
+
+ *protocol_features = dev->protocol_features;
+ return 0;
+}
+
int
rte_vhost_get_mem_table(int vid, struct rte_vhost_memory **mem)
{