net/qede: enable and disable VLAN filtering
[dpdk.git] / drivers / net / qede / qede_ethdev.h
index 1f62283..526d3be 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef _QEDE_ETHDEV_H_
 #define _QEDE_ETHDEV_H_
 
+#include <sys/queue.h>
+
 #include <rte_ether.h>
 #include <rte_ethdev.h>
 #include <rte_dev.h>
 extern char fw_file[];
 
 /* Port/function states */
-enum dev_state {
-       QEDE_START,
-       QEDE_STOP,
-       QEDE_CLOSE
-};
-
-struct qed_int_param {
-       uint32_t int_mode;
-       uint8_t num_vectors;
-       uint8_t min_msix_cnt;
+enum qede_dev_state {
+       QEDE_DEV_INIT, /* Init the chip and Slowpath */
+       QEDE_DEV_CONFIG, /* Create Vport/Fastpath resources */
+       QEDE_DEV_START, /* Start RX/TX queues, enable traffic */
+       QEDE_DEV_STOP, /* Deactivate vport and stop traffic */
 };
 
-struct qed_int_params {
-       struct qed_int_param in;
-       struct qed_int_param out;
-       bool fp_initialized;
+struct qede_vlan_entry {
+       SLIST_ENTRY(qede_vlan_entry) list;
+       uint16_t vid;
 };
 
 /*
@@ -147,24 +143,21 @@ struct qede_dev {
        uint16_t num_queues;
        uint8_t fp_num_tx;
        uint8_t fp_num_rx;
-
-       enum dev_state state;
-
-       /* Vlans */
-       osal_list_t vlan_list;
+       enum qede_dev_state state;
+       SLIST_HEAD(vlan_list_head, qede_vlan_entry)vlan_list_head;
        uint16_t configured_vlans;
-       uint16_t non_configured_vlans;
        bool accept_any_vlan;
-       uint16_t vxlan_dst_port;
-
        struct ether_addr primary_mac;
        bool handle_hw_err;
        char drv_ver[QED_DRV_VER_STR_SIZE];
 };
 
+/* Static functions */
+static int qede_vlan_filter_set(struct rte_eth_dev *eth_dev,
+                               uint16_t vlan_id, int on);
+
 int qed_fill_eth_dev_info(struct ecore_dev *edev,
                                 struct qed_dev_eth_info *info);
 int qede_dev_set_link_state(struct rte_eth_dev *eth_dev, bool link_up);
-void qede_config_rx_mode(struct rte_eth_dev *eth_dev);
 
 #endif /* _QEDE_ETHDEV_H_ */