net/ngbe: support Rx/Tx burst mode info
[dpdk.git] / drivers / net / ixgbe / ixgbe_ethdev.h
index ae88b97..876b670 100644 (file)
@@ -6,6 +6,7 @@
 #define _IXGBE_ETHDEV_H_
 
 #include <stdint.h>
+#include <sys/queue.h>
 
 #include "base/ixgbe_type.h"
 #include "base/ixgbe_dcb.h"
 /* The overhead from MTU to max frame size. */
 #define IXGBE_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
 
+/* The max frame size with default MTU */
+#define IXGBE_ETH_MAX_LEN  (RTE_ETHER_MTU + IXGBE_ETH_OVERHEAD)
+
 /* bit of VXLAN tunnel type | 7 bits of zeros  | 8 bits of zeros*/
 #define IXGBE_FDIR_VXLAN_TUNNEL_TYPE    0x8000
 /* bit of NVGRE tunnel type | 7 bits of zeros  | 8 bits of zeros*/
 #define IXGBE_FDIR_NVGRE_TUNNEL_TYPE    0x0
 
 #define IXGBE_RSS_OFFLOAD_ALL ( \
-       ETH_RSS_IPV4 | \
-       ETH_RSS_NONFRAG_IPV4_TCP | \
-       ETH_RSS_NONFRAG_IPV4_UDP | \
-       ETH_RSS_IPV6 | \
-       ETH_RSS_NONFRAG_IPV6_TCP | \
-       ETH_RSS_NONFRAG_IPV6_UDP | \
-       ETH_RSS_IPV6_EX | \
-       ETH_RSS_IPV6_TCP_EX | \
-       ETH_RSS_IPV6_UDP_EX)
+       RTE_ETH_RSS_IPV4 | \
+       RTE_ETH_RSS_NONFRAG_IPV4_TCP | \
+       RTE_ETH_RSS_NONFRAG_IPV4_UDP | \
+       RTE_ETH_RSS_IPV6 | \
+       RTE_ETH_RSS_NONFRAG_IPV6_TCP | \
+       RTE_ETH_RSS_NONFRAG_IPV6_UDP | \
+       RTE_ETH_RSS_IPV6_EX | \
+       RTE_ETH_RSS_IPV6_TCP_EX | \
+       RTE_ETH_RSS_IPV6_UDP_EX)
 
 #define IXGBE_VF_IRQ_ENABLE_MASK        3          /* vf irq enable mask */
 #define IXGBE_VF_MAXMSIVECTOR           1
@@ -241,7 +245,6 @@ struct ixgbe_hwstrip {
  * VF data which used by PF host only
  */
 #define IXGBE_MAX_VF_MC_ENTRIES                30
-#define IXGBE_MAX_MR_RULE_ENTRIES      4 /* number of mirroring rules supported */
 #define IXGBE_MAX_UTA                   128
 
 struct ixgbe_uta_info {
@@ -250,13 +253,6 @@ struct ixgbe_uta_info {
        uint32_t uta_shadow[IXGBE_MAX_UTA];
 };
 
-#define IXGBE_MAX_MIRROR_RULES 4  /* Maximum nb. of mirror rules. */
-
-struct ixgbe_mirror_info {
-       struct rte_eth_mirror_conf mr_conf[IXGBE_MAX_MIRROR_RULES];
-       /**< store PF mirror rules configuration*/
-};
-
 struct ixgbe_vf_info {
        uint8_t vf_mac_addresses[RTE_ETHER_ADDR_LEN];
        uint16_t vf_mc_hashes[IXGBE_MAX_VF_MC_ENTRIES];
@@ -485,7 +481,6 @@ struct ixgbe_adapter {
        struct ixgbe_vfta           shadow_vfta;
        struct ixgbe_hwstrip            hwstrip;
        struct ixgbe_dcb_config     dcb_config;
-       struct ixgbe_mirror_info    mr_data;
        struct ixgbe_vf_info        *vfdata;
        struct ixgbe_uta_info       uta_info;
 #ifdef RTE_LIBRTE_IXGBE_BYPASS
@@ -586,9 +581,9 @@ void ixgbe_dev_clear_queues(struct rte_eth_dev *dev);
 
 void ixgbe_dev_free_queues(struct rte_eth_dev *dev);
 
-void ixgbe_dev_rx_queue_release(void *rxq);
+void ixgbe_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid);
 
-void ixgbe_dev_tx_queue_release(void *txq);
+void ixgbe_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid);
 
 int  ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
                uint16_t nb_rx_desc, unsigned int socket_id,
@@ -599,10 +594,7 @@ int  ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
                uint16_t nb_tx_desc, unsigned int socket_id,
                const struct rte_eth_txconf *tx_conf);
 
-uint32_t ixgbe_dev_rx_queue_count(struct rte_eth_dev *dev,
-               uint16_t rx_queue_id);
-
-int ixgbe_dev_rx_descriptor_done(void *rx_queue, uint16_t offset);
+uint32_t ixgbe_dev_rx_queue_count(void *rx_queue);
 
 int ixgbe_dev_rx_descriptor_status(void *rx_queue, uint16_t offset);
 int ixgbe_dev_tx_descriptor_status(void *tx_queue, uint16_t offset);
@@ -678,13 +670,25 @@ int ixgbe_add_del_ethertype_filter(struct rte_eth_dev *dev,
 int ixgbe_syn_filter_set(struct rte_eth_dev *dev,
                        struct rte_eth_syn_filter *filter,
                        bool add);
+
+/**
+ * l2 tunnel configuration.
+ */
+struct ixgbe_l2_tunnel_conf {
+       enum rte_eth_tunnel_type l2_tunnel_type;
+       uint16_t ether_type; /* ether type in l2 header */
+       uint32_t tunnel_id; /* port tag id for e-tag */
+       uint16_t vf_id; /* VF id for tag insertion */
+       uint32_t pool; /* destination pool for tag based forwarding */
+};
+
 int
 ixgbe_dev_l2_tunnel_filter_add(struct rte_eth_dev *dev,
-                              struct rte_eth_l2_tunnel_conf *l2_tunnel,
+                              struct ixgbe_l2_tunnel_conf *l2_tunnel,
                               bool restore);
 int
 ixgbe_dev_l2_tunnel_filter_del(struct rte_eth_dev *dev,
-                              struct rte_eth_l2_tunnel_conf *l2_tunnel);
+                              struct ixgbe_l2_tunnel_conf *l2_tunnel);
 void ixgbe_filterlist_init(void);
 void ixgbe_filterlist_flush(void);
 /*