path: root/lib/librte_vhost
diff options
authorYuanhan Liu <>2016-04-30 13:28:21 +0800
committerYuanhan Liu <>2016-06-22 09:43:01 +0200
commit004b8ca8b5282b65233e839d6dc0ea8823026c7f (patch)
tree867ab2858036d67568f7568f5905992ea878183d /lib/librte_vhost
parentf0fa04e35e5e5df6ddf78b8818a7b34f74fadb61 (diff)
vhost: reserve few more space for future extension
"virtio_net_device_ops" is the only left open struct that an application can access, therefore, it's the only place that might introduce potential ABI break in future for extension. So, do some reservation for it. 5 should be pretty enough, considering that we have barely touched it for a long while. Another reason to choose 5 is for cache alignment: 5 makes the struct 64 bytes for 64 bit machine. With this, it's confidence to say that we might be able to be free from the ABI violation forever. Signed-off-by: Yuanhan Liu <> Tested-by: Rich Lane <> Acked-by: Rich Lane <>
Diffstat (limited to 'lib/librte_vhost')
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h
index fc1d799..bc2b74b 100644
--- a/lib/librte_vhost/rte_virtio_net.h
+++ b/lib/librte_vhost/rte_virtio_net.h
@@ -66,6 +66,8 @@ struct virtio_net_device_ops {
void (*destroy_device)(int vid); /**< Remove device. */
int (*vring_state_changed)(int vid, uint16_t queue_id, int enable); /**< triggered when a vring is enabled or disabled */
+ void *reserved[5]; /**< Reserved for future extension */