diff options
author | Steven Luong <sluong@cisco.com> | 2020-11-17 13:30:44 -0800 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2021-01-08 13:10:58 +0000 |
commit | 27ba5008a16eddccc0b285272de7f89fd0aa3a24 (patch) | |
tree | 3065040b62ee15ac45b1c1d77dd7421dcb558a5d /src/vnet/devices/virtio/virtio_std.h | |
parent | ed4b38e868c7cabb8e88cc0f1254c95a8f1c5939 (diff) |
vhost: Add event index for interrupt notification to driver
VPP only supports a poor man's approach for interrupt notification to the
driver. It uses a simple binary flag for "interrupt needed" or "interrupt
not needed". Most drivers support more sophisticated event index already.
This feature is to add the long due missing feature and make it configurable,
off by default.
Type: feature
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I68dab7dd07045cafb49af97b7f70db9b8131ae03
Diffstat (limited to 'src/vnet/devices/virtio/virtio_std.h')
-rw-r--r-- | src/vnet/devices/virtio/virtio_std.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/vnet/devices/virtio/virtio_std.h b/src/vnet/devices/virtio/virtio_std.h index 98befb5c820..619dd66d5ed 100644 --- a/src/vnet/devices/virtio/virtio_std.h +++ b/src/vnet/devices/virtio/virtio_std.h @@ -77,9 +77,17 @@ typedef enum #define VRING_DESC_F_AVAIL (1 << 7) #define VRING_DESC_F_USED (1 << 15) -#define VRING_EVENT_F_ENABLE 0x0 -#define VRING_EVENT_F_DISABLE 0x1 -#define VRING_EVENT_F_DESC 0x2 +#define foreach_virtio_event_idx_flags \ + _ (VRING_EVENT_F_ENABLE, 0) \ + _ (VRING_EVENT_F_DISABLE, 1) \ + _ (VRING_EVENT_F_DESC, 2) + +typedef enum +{ +#define _(f,n) f = n, + foreach_virtio_event_idx_flags +#undef _ +} virtio_event_idx_flags_t; #define VRING_USED_F_NO_NOTIFY 1 #define VRING_AVAIL_F_NO_INTERRUPT 1 |