New upstream version 18.11-rc2
[deb_dpdk.git] / drivers / net / virtio / virtio_pci.h
index a28ba83..e961a58 100644 (file)
@@ -6,6 +6,7 @@
 #define _VIRTIO_PCI_H_
 
 #include <stdint.h>
+#include <stdbool.h>
 
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
@@ -121,6 +122,12 @@ struct virtnet_ctl;
 #define VIRTIO_TRANSPORT_F_START 28
 #define VIRTIO_TRANSPORT_F_END   34
 
+/*
+ * Inorder feature indicates that all buffers are used by the device
+ * in the same order in which they have been made available.
+ */
+#define VIRTIO_F_IN_ORDER 35
+
 /* The Guest publishes the used index for which it expects an interrupt
  * at the end of the avail ring. Host should ignore the avail->flags field. */
 /* The Host publishes the avail index for which it expects a kick
@@ -197,7 +204,6 @@ struct virtio_pci_ops {
                             void *dst, int len);
        void (*write_dev_cfg)(struct virtio_hw *hw, size_t offset,
                              const void *src, int len);
-       void (*reset)(struct virtio_hw *hw);
 
        uint8_t (*get_status)(struct virtio_hw *hw);
        void    (*set_status)(struct virtio_hw *hw, uint8_t status);
@@ -225,14 +231,17 @@ struct virtio_hw {
        uint64_t    req_guest_features;
        uint64_t    guest_features;
        uint32_t    max_queue_pairs;
-       uint16_t    started;
+       bool        started;
        uint16_t        max_mtu;
        uint16_t    vtnet_hdr_size;
        uint8_t     vlan_strip;
        uint8_t     use_msix;
        uint8_t     modern;
        uint8_t     use_simple_rx;
-       uint8_t     use_simple_tx;
+       uint8_t     use_inorder_rx;
+       uint8_t     use_inorder_tx;
+       bool        has_tx_offload;
+       bool        has_rx_offload;
        uint16_t    port_id;
        uint8_t     mac_addr[ETHER_ADDR_LEN];
        uint32_t    notify_off_multiplier;
@@ -248,6 +257,7 @@ struct virtio_hw {
         */
        rte_spinlock_t state_lock;
        struct rte_mbuf **inject_pkts;
+       bool        opened;
 
        struct virtqueue **vqs;
 };