ethdev: add probing finish function
[dpdk.git] / drivers / net / enic / enic.h
index 1b3813a..ee83fe5 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>
 
 
 #define ENICPMD_FDIR_MAX           64
 
+/*
+ * Interrupt 0: LSC and errors
+ * Interrupt 1: rx queue 0
+ * Interrupt 2: rx queue 1
+ * ...
+ */
+#define ENICPMD_LSC_INTR_OFFSET 0
+#define ENICPMD_RXQ_INTR_OFFSET 1
+
 struct enic_fdir_node {
        struct rte_eth_fdir_filter filter;
        u16 fltr_id;
@@ -92,6 +102,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];
@@ -109,7 +120,9 @@ struct enic {
        u16 max_mtu;
        u8 adv_filters;
        u32 flow_filter_mode;
-       u8 filter_tags;
+       u8 filter_actions; /* HW supported actions */
+       bool vxlan;
+       bool disable_overlay; /* devargs disable_overlay=1 */
 
        unsigned int flags;
        unsigned int priv_flags;
@@ -126,9 +139,9 @@ struct enic {
        struct vnic_cq *cq;
        unsigned int cq_count; /* equals rq_count + wq_count */
 
-       /* interrupt resource */
-       struct vnic_intr intr;
-       unsigned int intr_count;
+       /* interrupt vectors (len = conf_intr_count) */
+       struct vnic_intr *intr;
+       unsigned int intr_count; /* equals enabled interrupts (lsc + rxqs) */
 
        /* software counters */
        struct enic_soft_stats soft_stats;
@@ -160,6 +173,10 @@ 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_offload_mask; /* PKT_TX flags accepted */
 };
 
 /* Compute ethdev's max packet size from MTU */
@@ -275,7 +292,7 @@ int enic_dev_stats_get(struct enic *enic,
 void enic_dev_stats_clear(struct enic *enic);
 void enic_add_packet_filter(struct enic *enic);
 int enic_set_mac_address(struct enic *enic, uint8_t *mac_addr);
-void enic_del_mac_address(struct enic *enic, int mac_index);
+int enic_del_mac_address(struct enic *enic, int mac_index);
 unsigned int enic_cleanup_wq(struct enic *enic, struct vnic_wq *wq);
 void enic_send_pkt(struct enic *enic, struct vnic_wq *wq,
                   struct rte_mbuf *tx_pkt, unsigned short len,