aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/pci.h
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-09-01 17:17:44 +0000
committerMohsin Kazmi <sykazmi@cisco.com>2020-09-02 11:50:00 +0000
commit518251bc8a3e67e25a041bf54d6bb01a2233838b (patch)
tree76723810aafe8bc1252ed75f8876e05b6e7546e0 /src/vnet/devices/virtio/pci.h
parent9f1dbd20b30eda4a045fbe86c7a36a80887630e1 (diff)
virtio: add virtio 1.1 api flags
Type: feature Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I95d7fc1cc8db5199570c66535f45e867a7cae676
Diffstat (limited to 'src/vnet/devices/virtio/pci.h')
-rw-r--r--src/vnet/devices/virtio/pci.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vnet/devices/virtio/pci.h b/src/vnet/devices/virtio/pci.h
index f9a58280aae..47c74ab2ec6 100644
--- a/src/vnet/devices/virtio/pci.h
+++ b/src/vnet/devices/virtio/pci.h
@@ -242,6 +242,20 @@ typedef struct _virtio_pci_func
void (*device_debug_config_space) (vlib_main_t * vm, virtio_if_t * vif);
} virtio_pci_func_t;
+#define foreach_virtio_flags \
+ _ (GSO, 0) \
+ _ (CSUM_OFFLOAD, 1) \
+ _ (GRO_COALESCE, 2) \
+ _ (PACKED, 3) \
+ _ (IN_ORDER, 4)
+
+typedef enum
+{
+#define _(a, b) VIRTIO_FLAG_##a = (1 << b),
+ foreach_virtio_flags
+#undef _
+} virtio_flag_t;
+
typedef struct
{
u32 addr;
@@ -253,6 +267,7 @@ typedef struct
u64 features;
u8 gso_enabled;
u8 checksum_offload_enabled;
+ u32 virtio_flags;
clib_error_t *error;
} virtio_pci_create_if_args_t;