diff options
author | Mohsin Kazmi <sykazmi@cisco.com> | 2020-04-06 14:19:54 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-04-17 11:28:14 +0000 |
commit | 206acf84d6a04590e385f427edba1094c3bdf195 (patch) | |
tree | c724f0d2fedd494e163394a6a339c18dc72c0a37 /src/vnet/devices/virtio/virtio.h | |
parent | 95eb01fdc65b692065ace6d76870d8cc9f3e2c84 (diff) |
tap: add initial support for tun
Type: feature
Change-Id: I699a01ac925fe5c475a36032edb7018618bb4dd4
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/virtio.h')
-rw-r--r-- | src/vnet/devices/virtio/virtio.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/vnet/devices/virtio/virtio.h b/src/vnet/devices/virtio/virtio.h index e28922bf654..3e8f9416483 100644 --- a/src/vnet/devices/virtio/virtio.h +++ b/src/vnet/devices/virtio/virtio.h @@ -80,11 +80,17 @@ typedef enum #define TX_QUEUE_ACCESS(X) (X/2) #define RX_QUEUE_ACCESS(X) (X/2) +#define foreach_virtio_if_types \ + _ (TAP, 1) \ + _ (TUN, 2) \ + _ (PCI, 3) + typedef enum { - VIRTIO_IF_TYPE_TAP = 1, - VIRTIO_IF_TYPE_PCI, - VIRTIO_IF_N_TYPES, +#define _(a, b) VIRTIO_IF_TYPE_##a = (1 << b), + foreach_virtio_if_types +#undef _ + VIRTIO_IF_N_TYPES = (1 << 4), } virtio_if_type_t; |