net/i40e/base: add flags and fields for double VLAN
[dpdk.git] / drivers / net / i40e / base / i40e_prototype.h
index fcfe497..29c86c7 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _I40E_PROTOTYPE_H_
@@ -38,6 +38,13 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw,
                                void *buff, /* can be NULL */
                                u16  buff_size,
                                struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code
+i40e_asq_send_command_v2(struct i40e_hw *hw,
+                        struct i40e_aq_desc *desc,
+                        void *buff, /* can be NULL */
+                        u16  buff_size,
+                        struct i40e_asq_cmd_details *cmd_details,
+                        enum i40e_admin_queue_err *aq_status);
 #ifdef VF_DRIVER
 bool i40e_asq_done(struct i40e_hw *hw);
 #endif
@@ -73,7 +80,10 @@ enum i40e_status_code i40e_led_get_phy(struct i40e_hw *hw, u16 *led_addr,
                                       u16 *val);
 enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
                                              u32 time, u32 interval);
-
+enum i40e_status_code i40e_led_get_reg(struct i40e_hw *hw, u16 led_addr,
+                                      u32 *reg_val);
+enum i40e_status_code i40e_led_set_reg(struct i40e_hw *hw, u16 led_addr,
+                                      u32 reg_val);
 enum i40e_status_code i40e_get_phy_lpi_status(struct i40e_hw *hw,
                                              struct i40e_hw_port_stats *stats);
 enum i40e_status_code i40e_get_lpi_counters(struct i40e_hw *hw, u32 *tx_counter,
@@ -82,6 +92,9 @@ enum i40e_status_code i40e_lpi_stat_update(struct i40e_hw *hw,
                                           bool offset_loaded, u64 *tx_offset,
                                           u64 *tx_stat, u64 *rx_offset,
                                           u64 *rx_stat);
+enum i40e_status_code i40e_get_lpi_duration(struct i40e_hw *hw,
+                                           struct i40e_hw_port_stats *stat,
+                                           u64 *tx_duration, u64 *rx_duration);
 /* admin send queue commands */
 
 enum i40e_status_code i40e_aq_get_firmware_version(struct i40e_hw *hw,
@@ -114,6 +127,7 @@ enum i40e_status_code i40e_aq_set_phy_int_mask(struct i40e_hw *hw, u16 mask,
                                struct i40e_asq_cmd_details *cmd_details);
 enum i40e_status_code i40e_aq_set_mac_config(struct i40e_hw *hw,
                                u16 max_frame_size, bool crc_en, u16 pacing,
+                               bool auto_drop_blocking_packets,
                                struct i40e_asq_cmd_details *cmd_details);
 enum i40e_status_code i40e_aq_get_local_advt_reg(struct i40e_hw *hw,
                                u64 *advt_reg,
@@ -181,9 +195,19 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw,
 enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 vsi_id,
                        struct i40e_aqc_add_macvlan_element_data *mv_list,
                        u16 count, struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code
+i40e_aq_add_macvlan_v2(struct i40e_hw *hw, u16 seid,
+                      struct i40e_aqc_add_macvlan_element_data *mv_list,
+                      u16 count, struct i40e_asq_cmd_details *cmd_details,
+                      enum i40e_admin_queue_err *aq_status);
 enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 vsi_id,
                        struct i40e_aqc_remove_macvlan_element_data *mv_list,
                        u16 count, struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code
+i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid,
+                         struct i40e_aqc_remove_macvlan_element_data *mv_list,
+                         u16 count, struct i40e_asq_cmd_details *cmd_details,
+                         enum i40e_admin_queue_err *aq_status);
 enum i40e_status_code i40e_aq_add_mirrorrule(struct i40e_hw *hw, u16 sw_seid,
                        u16 rule_type, u16 dest_vsi, u16 count, __le16 *mr_list,
                        struct i40e_asq_cmd_details *cmd_details,
@@ -233,6 +257,10 @@ enum i40e_status_code i40e_aq_write_nvm_config(struct i40e_hw *hw,
                                u8 cmd_flags, void *data, u16 buf_size,
                                u16 element_count,
                                struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code
+i40e_aq_min_rollback_rev_update(struct i40e_hw *hw, u8 mode, u8 module,
+                               u32 min_rrev,
+                               struct i40e_asq_cmd_details *cmd_details);
 enum i40e_status_code i40e_aq_oem_post_update(struct i40e_hw *hw,
                                void *buff, u16 buff_size,
                                struct i40e_asq_cmd_details *cmd_details);
@@ -247,8 +275,10 @@ enum i40e_status_code i40e_aq_update_nvm(struct i40e_hw *hw, u8 module_pointer,
 enum i40e_status_code i40e_aq_rearrange_nvm(struct i40e_hw *hw,
                                u8 rearrange_nvm,
                                struct i40e_asq_cmd_details *cmd_details);
-enum i40e_status_code i40e_aq_nvm_progress(struct i40e_hw *hw, u8 *progress,
-                               struct i40e_asq_cmd_details *cmd_details);
+enum i40e_status_code
+i40e_aq_nvm_update_in_process(struct i40e_hw *hw,
+                             bool update_flow_state,
+                             struct i40e_asq_cmd_details *cmd_details);
 enum i40e_status_code i40e_aq_get_lldp_mib(struct i40e_hw *hw, u8 bridge_type,
                                u8 mib_type, void *buff, u16 buff_size,
                                u16 *local_len, u16 *remote_len,
@@ -441,6 +471,9 @@ enum i40e_status_code i40e_acquire_nvm(struct i40e_hw *hw,
 void i40e_release_nvm(struct i40e_hw *hw);
 enum i40e_status_code i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
                                         u16 *data);
+enum i40e_status_code
+i40e_read_nvm_module_data(struct i40e_hw *hw, u8 module_ptr, u16 module_offset,
+                         u16 data_offset, u16 words_data_size, u16 *data_ptr);
 enum i40e_status_code i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset,
                                           u16 *words, u16 *data);
 enum i40e_status_code i40e_write_nvm_aq(struct i40e_hw *hw, u8 module,
@@ -468,10 +501,8 @@ void i40e_set_pci_config_data(struct i40e_hw *hw, u16 link_status);
 #endif /* PF_DRIVER */
 enum i40e_status_code i40e_enable_eee(struct i40e_hw *hw, bool enable);
 
-#if defined(I40E_QV) || defined(VF_DRIVER)
 enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw);
 
-#endif
 extern struct i40e_rx_ptype_decoded i40e_ptype_lookup[];
 
 STATIC INLINE struct i40e_rx_ptype_decoded decode_rx_desc_ptype(u8 ptype)
@@ -497,6 +528,10 @@ i40e_virtchnl_link_speed(enum i40e_aq_link_speed link_speed)
                return VIRTCHNL_LINK_SPEED_100MB;
        case I40E_LINK_SPEED_1GB:
                return VIRTCHNL_LINK_SPEED_1GB;
+       case I40E_LINK_SPEED_2_5GB:
+               return VIRTCHNL_LINK_SPEED_2_5GB;
+       case I40E_LINK_SPEED_5GB:
+               return VIRTCHNL_LINK_SPEED_5GB;
        case I40E_LINK_SPEED_10GB:
                return VIRTCHNL_LINK_SPEED_10GB;
        case I40E_LINK_SPEED_40GB: