1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2013 - 2015 Intel Corporation 3 */ 4 5 #ifndef _FM10K_VF_H_ 6 #define _FM10K_VF_H_ 7 8 #include "fm10k_type.h" 9 #include "fm10k_common.h" 10 11 enum fm10k_vf_tlv_msg_id { 12 FM10K_VF_MSG_ID_TEST = 0, /* msg ID reserved for testing */ 13 FM10K_VF_MSG_ID_MSIX, 14 FM10K_VF_MSG_ID_MAC_VLAN, 15 FM10K_VF_MSG_ID_LPORT_STATE, 16 FM10K_VF_MSG_ID_1588, 17 FM10K_VF_MSG_ID_MAX, 18 }; 19 20 enum fm10k_tlv_mac_vlan_attr_id { 21 FM10K_MAC_VLAN_MSG_VLAN, 22 FM10K_MAC_VLAN_MSG_SET, 23 FM10K_MAC_VLAN_MSG_MAC, 24 FM10K_MAC_VLAN_MSG_DEFAULT_MAC, 25 FM10K_MAC_VLAN_MSG_MULTICAST, 26 FM10K_MAC_VLAN_MSG_ID_MAX 27 }; 28 29 enum fm10k_tlv_lport_state_attr_id { 30 FM10K_LPORT_STATE_MSG_DISABLE, 31 FM10K_LPORT_STATE_MSG_XCAST_MODE, 32 FM10K_LPORT_STATE_MSG_READY, 33 FM10K_LPORT_STATE_MSG_MAX 34 }; 35 36 enum fm10k_tlv_1588_attr_id { 37 FM10K_1588_MSG_TIMESTAMP = 0, /* deprecated */ 38 FM10K_1588_MSG_CLK_OFFSET, 39 FM10K_1588_MSG_MAX 40 }; 41 42 #define FM10K_VF_MSG_MSIX_HANDLER(func) \ 43 FM10K_MSG_HANDLER(FM10K_VF_MSG_ID_MSIX, NULL, func) 44 45 s32 fm10k_msg_mac_vlan_vf(struct fm10k_hw *, u32 **, struct fm10k_mbx_info *); 46 extern const struct fm10k_tlv_attr fm10k_mac_vlan_msg_attr[]; 47 #define FM10K_VF_MSG_MAC_VLAN_HANDLER(func) \ 48 FM10K_MSG_HANDLER(FM10K_VF_MSG_ID_MAC_VLAN, \ 49 fm10k_mac_vlan_msg_attr, func) 50 51 s32 fm10k_msg_lport_state_vf(struct fm10k_hw *, u32 **, 52 struct fm10k_mbx_info *); 53 extern const struct fm10k_tlv_attr fm10k_lport_state_msg_attr[]; 54 #define FM10K_VF_MSG_LPORT_STATE_HANDLER(func) \ 55 FM10K_MSG_HANDLER(FM10K_VF_MSG_ID_LPORT_STATE, \ 56 fm10k_lport_state_msg_attr, func) 57 58 extern const struct fm10k_tlv_attr fm10k_1588_msg_attr[]; 59 #define FM10K_VF_MSG_1588_HANDLER(func) \ 60 FM10K_MSG_HANDLER(FM10K_VF_MSG_ID_1588, fm10k_1588_msg_attr, func) 61 62 s32 fm10k_init_ops_vf(struct fm10k_hw *hw); 63 64 void fm10k_update_hw_stats_vf(struct fm10k_hw *hw, 65 struct fm10k_hw_stats *stats); 66 void fm10k_rebind_hw_stats_vf(struct fm10k_hw *hw, 67 struct fm10k_hw_stats *stats); 68 #endif /* _FM10K_VF_H */ 69