1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2015-2020 3 */ 4 5 #ifndef _TXGBE_VF_H_ 6 #define _TXGBE_VF_H_ 7 8 #include "txgbe_type.h" 9 10 #define TXGBE_VF_MAX_TX_QUEUES 8 11 #define TXGBE_VF_MAX_RX_QUEUES 8 12 13 struct txgbevf_hw_stats { 14 u64 base_vfgprc; 15 u64 base_vfgptc; 16 u64 base_vfgorc; 17 u64 base_vfgotc; 18 u64 base_vfmprc; 19 20 struct{ 21 u64 last_vfgprc; 22 u64 last_vfgptc; 23 u64 last_vfgorc; 24 u64 last_vfgotc; 25 u64 last_vfmprc; 26 u64 vfgprc; 27 u64 vfgptc; 28 u64 vfgorc; 29 u64 vfgotc; 30 u64 vfmprc; 31 } qp[8]; 32 33 u64 saved_reset_vfgprc; 34 u64 saved_reset_vfgptc; 35 u64 saved_reset_vfgorc; 36 u64 saved_reset_vfgotc; 37 u64 saved_reset_vfmprc; 38 }; 39 40 s32 txgbe_init_ops_vf(struct txgbe_hw *hw); 41 s32 txgbe_start_hw_vf(struct txgbe_hw *hw); 42 s32 txgbe_reset_hw_vf(struct txgbe_hw *hw); 43 s32 txgbe_stop_hw_vf(struct txgbe_hw *hw); 44 s32 txgbe_get_mac_addr_vf(struct txgbe_hw *hw, u8 *mac_addr); 45 s32 txgbe_check_mac_link_vf(struct txgbe_hw *hw, u32 *speed, 46 bool *link_up, bool autoneg_wait_to_complete); 47 s32 txgbe_set_rar_vf(struct txgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, 48 u32 enable_addr); 49 s32 txgbevf_set_uc_addr_vf(struct txgbe_hw *hw, u32 index, u8 *addr); 50 s32 txgbe_update_mc_addr_list_vf(struct txgbe_hw *hw, u8 *mc_addr_list, 51 u32 mc_addr_count, txgbe_mc_addr_itr next, 52 bool clear); 53 s32 txgbevf_update_xcast_mode(struct txgbe_hw *hw, int xcast_mode); 54 s32 txgbe_set_vfta_vf(struct txgbe_hw *hw, u32 vlan, u32 vind, 55 bool vlan_on, bool vlvf_bypass); 56 s32 txgbevf_rlpml_set_vf(struct txgbe_hw *hw, u16 max_size); 57 int txgbevf_negotiate_api_version(struct txgbe_hw *hw, int api); 58 int txgbevf_get_queues(struct txgbe_hw *hw, unsigned int *num_tcs, 59 unsigned int *default_tc); 60 61 #endif /* __TXGBE_VF_H__ */ 62