net/qede: refactoring vport handling code
[dpdk.git] / drivers / net / qede / qede_ethdev.h
index 8342b99..62b1de4 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <rte_ether.h>
 #include <rte_ethdev.h>
+#include <rte_ethdev_pci.h>
 #include <rte_dev.h>
 #include <rte_ip.h>
 
@@ -36,6 +37,7 @@
 #include "base/ecore_sp_commands.h"
 #include "base/ecore_l2.h"
 #include "base/ecore_dev_api.h"
+#include "base/ecore_l2.h"
 
 #include "qede_logs.h"
 #include "qede_if.h"
@@ -49,7 +51,7 @@
 /* Driver versions */
 #define QEDE_PMD_VER_PREFIX            "QEDE PMD"
 #define QEDE_PMD_VERSION_MAJOR         2
-#define QEDE_PMD_VERSION_MINOR         0
+#define QEDE_PMD_VERSION_MINOR         4
 #define QEDE_PMD_VERSION_REVISION       0
 #define QEDE_PMD_VERSION_PATCH         1
 
@@ -188,13 +190,13 @@ struct qede_dev {
        struct qede_fastpath *fp_array;
        uint8_t num_tc;
        uint16_t mtu;
+       uint16_t new_mtu;
        bool rss_enable;
        struct rte_eth_rss_conf rss_conf;
        uint16_t rss_ind_table[ECORE_RSS_IND_TABLE_SIZE];
        uint64_t rss_hf;
        uint8_t rss_key_len;
-       uint32_t flags;
-       bool gro_disable;
+       bool enable_lro;
        uint16_t num_queues;
        uint8_t fp_num_tx;
        uint8_t fp_num_rx;
@@ -211,31 +213,19 @@ struct qede_dev {
        uint16_t num_tunn_filters;
        uint16_t vxlan_filter_type;
        struct qede_fdir_info fdir_info;
+       bool vlan_strip_flg;
        char drv_ver[QEDE_PMD_DRV_VER_STR_SIZE];
 };
 
-/* Static functions */
-static int qede_vlan_filter_set(struct rte_eth_dev *eth_dev,
-                               uint16_t vlan_id, int on);
-
-static int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
-                               struct rte_eth_rss_conf *rss_conf);
-
-static int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
-                               struct rte_eth_rss_reta_entry64 *reta_conf,
-                               uint16_t reta_size);
-
-static void qede_init_rss_caps(uint8_t *rss_caps, uint64_t hf);
+/* Non-static functions */
+int qede_config_rss(struct rte_eth_dev *eth_dev);
 
-static inline uint32_t qede_rx_cqe_to_pkt_type(uint16_t flags);
+int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
+                        struct rte_eth_rss_conf *rss_conf);
 
-static uint16_t qede_fdir_construct_pkt(struct rte_eth_dev *eth_dev,
-                                       struct rte_eth_fdir_filter *fdir,
-                                       void *buff,
-                                       struct ecore_arfs_config_params *param);
-
-/* Non-static functions */
-void qede_init_rss_caps(uint8_t *rss_caps, uint64_t hf);
+int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
+                        struct rte_eth_rss_reta_entry64 *reta_conf,
+                        uint16_t reta_size);
 
 int qed_fill_eth_dev_info(struct ecore_dev *edev,
                                 struct qed_dev_eth_info *info);
@@ -252,6 +242,17 @@ int qede_ntuple_filter_conf(struct rte_eth_dev *eth_dev,
 
 int qede_check_fdir_support(struct rte_eth_dev *eth_dev);
 
+uint16_t qede_fdir_construct_pkt(struct rte_eth_dev *eth_dev,
+                                struct rte_eth_fdir_filter *fdir,
+                                void *buff,
+                                struct ecore_arfs_config_params *params);
+
 void qede_fdir_dealloc_resc(struct rte_eth_dev *eth_dev);
 
+int qede_activate_vport(struct rte_eth_dev *eth_dev, bool flg);
+
+int qede_update_mtu(struct rte_eth_dev *eth_dev, uint16_t mtu);
+
+int qede_enable_tpa(struct rte_eth_dev *eth_dev, bool flg);
+
 #endif /* _QEDE_ETHDEV_H_ */