net/qede/base: upgrade to FW 8.37.7.0
[dpdk.git] / drivers / net / enic / enic.h
index 5f15e44..775cd5d 100644 (file)
@@ -17,6 +17,7 @@
 #include "vnic_rss.h"
 #include "enic_res.h"
 #include "cq_enet_desc.h"
+#include <stdbool.h>
 #include <sys/queue.h>
 #include <rte_spinlock.h>
 
@@ -37,6 +38,7 @@
 #define ENIC_PAGE_SIZE          4096
 #define PAGE_ROUND_UP(x) \
        ((((unsigned long)(x)) + ENIC_PAGE_SIZE-1) & (~(ENIC_PAGE_SIZE-1)))
+#define VNIC_FLOW_COUNTER_UPDATE_MSECS 100
 
 #define ENICPMD_VFIO_PATH          "/dev/vfio/vfio"
 /*#define ENIC_DESC_COUNT_MAKE_ODD (x) do{if ((~(x)) & 1) { (x)--; } }while(0)*/
@@ -49,6 +51,9 @@
 
 #define ENICPMD_FDIR_MAX           64
 
+/* HW default VXLAN port */
+#define ENIC_DEFAULT_VXLAN_PORT           4789
+
 /*
  * Interrupt 0: LSC and errors
  * Interrupt 1: rx queue 0
@@ -90,6 +95,7 @@ struct rte_flow {
        LIST_ENTRY(rte_flow) next;
        u16 enic_filter_id;
        struct filter_v2 enic_filter;
+       int counter_idx; /* NIC allocated counter index (-1 = invalid) */
 };
 
 /* Per-instance private data structure */
@@ -101,6 +107,7 @@ struct enic {
        struct vnic_dev *vdev;
 
        unsigned int port_id;
+       bool overlay_offload;
        struct rte_eth_dev *rte_dev;
        struct enic_fdir fdir;
        char bdf_name[ENICPMD_BDF_LENGTH];
@@ -119,6 +126,12 @@ struct enic {
        u8 adv_filters;
        u32 flow_filter_mode;
        u8 filter_actions; /* HW supported actions */
+       bool vxlan;
+       bool disable_overlay; /* devargs disable_overlay=1 */
+       bool nic_cfg_chk;     /* NIC_CFG_CHK available */
+       bool udp_rss_weak;    /* Bodega style UDP RSS */
+       uint8_t ig_vlan_rewrite_mode; /* devargs ig-vlan-rewrite */
+       uint16_t vxlan_port;  /* current vxlan port pushed to NIC */
 
        unsigned int flags;
        unsigned int priv_flags;
@@ -154,6 +167,7 @@ struct enic {
        rte_spinlock_t mtu_lock;
 
        LIST_HEAD(enic_flows, rte_flow) flows;
+       int max_flow_counter;
        rte_spinlock_t flows_lock;
 
        /* RSS */
@@ -169,6 +183,11 @@ struct enic {
        uint64_t rss_hf; /* ETH_RSS flags */
        union vnic_rss_key rss_key;
        union vnic_rss_cpu rss_cpu;
+
+       uint64_t rx_offload_capa; /* DEV_RX_OFFLOAD flags */
+       uint64_t tx_offload_capa; /* DEV_TX_OFFLOAD flags */
+       uint64_t tx_queue_offload_capa; /* DEV_TX_OFFLOAD flags */
+       uint64_t tx_offload_mask; /* PKT_TX flags accepted */
 };
 
 /* Compute ethdev's max packet size from MTU */
@@ -297,11 +316,15 @@ int enic_clsf_init(struct enic *enic);
 void enic_clsf_destroy(struct enic *enic);
 uint16_t enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
                        uint16_t nb_pkts);
+uint16_t enic_noscatter_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+                                 uint16_t nb_pkts);
 uint16_t enic_dummy_recv_pkts(void *rx_queue,
                              struct rte_mbuf **rx_pkts,
                              uint16_t nb_pkts);
 uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
                        uint16_t nb_pkts);
+uint16_t enic_simple_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+                              uint16_t nb_pkts);
 uint16_t enic_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
                        uint16_t nb_pkts);
 int enic_set_mtu(struct enic *enic, uint16_t new_mtu);