New upstream version 18.11-rc4
[deb_dpdk.git] / drivers / net / avf / avf_rxtx.h
index d1701cd..ffc835d 100644 (file)
 #define AVF_VPMD_DESCS_PER_LOOP  4
 #define AVF_VPMD_TX_MAX_FREE_BUF 64
 
-#define AVF_SIMPLE_FLAGS ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \
-                         ETH_TXQ_FLAGS_NOOFFLOADS)
+#define AVF_NO_VECTOR_FLAGS (                           \
+               DEV_TX_OFFLOAD_MULTI_SEGS |              \
+               DEV_TX_OFFLOAD_VLAN_INSERT |             \
+               DEV_TX_OFFLOAD_SCTP_CKSUM |              \
+               DEV_TX_OFFLOAD_UDP_CKSUM |               \
+               DEV_TX_OFFLOAD_TCP_CKSUM)
 
 #define DEFAULT_TX_RS_THRESH     32
 #define DEFAULT_TX_FREE_THRESH   32
                PKT_TX_TCP_SEG)
 
 #define AVF_TX_OFFLOAD_MASK (  \
+               PKT_TX_OUTER_IPV6 |              \
+               PKT_TX_OUTER_IPV4 |              \
+               PKT_TX_IPV6 |                    \
+               PKT_TX_IPV4 |                    \
                PKT_TX_VLAN_PKT |                \
                PKT_TX_IP_CKSUM |                \
                PKT_TX_L4_MASK |                 \
@@ -125,7 +133,7 @@ struct avf_tx_queue {
 
        uint16_t port_id;
        uint16_t queue_id;
-       uint32_t txq_flags;
+       uint64_t offloads;
        uint16_t next_dd;              /* next to set RS, for VPMD */
        uint16_t next_rs;              /* next to check DD,  for VPMD */
 
@@ -197,17 +205,17 @@ int avf_txq_vec_setup(struct avf_tx_queue *txq);
 
 static inline
 void avf_dump_rx_descriptor(struct avf_rx_queue *rxq,
-                           const void *desc,
+                           const volatile void *desc,
                            uint16_t rx_id)
 {
 #ifdef RTE_LIBRTE_AVF_16BYTE_RX_DESC
-       const union avf_16byte_rx_desc *rx_desc = desc;
+       const volatile union avf_16byte_rx_desc *rx_desc = desc;
 
        printf("Queue %d Rx_desc %d: QW0: 0x%016"PRIx64" QW1: 0x%016"PRIx64"\n",
               rxq->queue_id, rx_id, rx_desc->read.pkt_addr,
               rx_desc->read.hdr_addr);
 #else
-       const union avf_32byte_rx_desc *rx_desc = desc;
+       const volatile union avf_32byte_rx_desc *rx_desc = desc;
 
        printf("Queue %d Rx_desc %d: QW0: 0x%016"PRIx64" QW1: 0x%016"PRIx64
               " QW2: 0x%016"PRIx64" QW3: 0x%016"PRIx64"\n", rxq->queue_id,
@@ -221,10 +229,10 @@ void avf_dump_rx_descriptor(struct avf_rx_queue *rxq,
  */
 static inline
 void avf_dump_tx_descriptor(const struct avf_tx_queue *txq,
-                           const void *desc, uint16_t tx_id)
+                           const volatile void *desc, uint16_t tx_id)
 {
-       char *name;
-       const struct avf_tx_desc *tx_desc = desc;
+       const char *name;
+       const volatile struct avf_tx_desc *tx_desc = desc;
        enum avf_tx_desc_dtype_value type;
 
        type = (enum avf_tx_desc_dtype_value)rte_le_to_cpu_64(