1ae06c70bSJeff Kirsher /* SPDX-License-Identifier: GPL-2.0 */
251dce24bSJeff Kirsher /* Copyright(c) 2013 - 2018 Intel Corporation. */
35cb8db4aSAlexander Duyck 
45cb8db4aSAlexander Duyck #ifndef _FM10K_VF_H_
55cb8db4aSAlexander Duyck #define _FM10K_VF_H_
65cb8db4aSAlexander Duyck 
75cb8db4aSAlexander Duyck #include "fm10k_type.h"
85cb8db4aSAlexander Duyck #include "fm10k_common.h"
95cb8db4aSAlexander Duyck 
105cb8db4aSAlexander Duyck enum fm10k_vf_tlv_msg_id {
115cb8db4aSAlexander Duyck 	FM10K_VF_MSG_ID_TEST = 0,	/* msg ID reserved for testing */
125cb8db4aSAlexander Duyck 	FM10K_VF_MSG_ID_MSIX,
135cb8db4aSAlexander Duyck 	FM10K_VF_MSG_ID_MAC_VLAN,
145cb8db4aSAlexander Duyck 	FM10K_VF_MSG_ID_LPORT_STATE,
155cb8db4aSAlexander Duyck 	FM10K_VF_MSG_ID_MAX,
165cb8db4aSAlexander Duyck };
175cb8db4aSAlexander Duyck 
185cb8db4aSAlexander Duyck enum fm10k_tlv_mac_vlan_attr_id {
195cb8db4aSAlexander Duyck 	FM10K_MAC_VLAN_MSG_VLAN,
205cb8db4aSAlexander Duyck 	FM10K_MAC_VLAN_MSG_SET,
215cb8db4aSAlexander Duyck 	FM10K_MAC_VLAN_MSG_MAC,
225cb8db4aSAlexander Duyck 	FM10K_MAC_VLAN_MSG_DEFAULT_MAC,
235cb8db4aSAlexander Duyck 	FM10K_MAC_VLAN_MSG_MULTICAST,
245cb8db4aSAlexander Duyck 	FM10K_MAC_VLAN_MSG_ID_MAX
255cb8db4aSAlexander Duyck };
265cb8db4aSAlexander Duyck 
275cb8db4aSAlexander Duyck enum fm10k_tlv_lport_state_attr_id {
285cb8db4aSAlexander Duyck 	FM10K_LPORT_STATE_MSG_DISABLE,
295cb8db4aSAlexander Duyck 	FM10K_LPORT_STATE_MSG_XCAST_MODE,
305cb8db4aSAlexander Duyck 	FM10K_LPORT_STATE_MSG_READY,
315cb8db4aSAlexander Duyck 	FM10K_LPORT_STATE_MSG_MAX
325cb8db4aSAlexander Duyck };
335cb8db4aSAlexander Duyck 
345cb8db4aSAlexander Duyck #define FM10K_VF_MSG_MSIX_HANDLER(func) \
355cb8db4aSAlexander Duyck 	 FM10K_MSG_HANDLER(FM10K_VF_MSG_ID_MSIX, NULL, func)
365cb8db4aSAlexander Duyck 
375cb8db4aSAlexander Duyck s32 fm10k_msg_mac_vlan_vf(struct fm10k_hw *, u32 **, struct fm10k_mbx_info *);
385cb8db4aSAlexander Duyck extern const struct fm10k_tlv_attr fm10k_mac_vlan_msg_attr[];
395cb8db4aSAlexander Duyck #define FM10K_VF_MSG_MAC_VLAN_HANDLER(func) \
405cb8db4aSAlexander Duyck 	FM10K_MSG_HANDLER(FM10K_VF_MSG_ID_MAC_VLAN, \
415cb8db4aSAlexander Duyck 			  fm10k_mac_vlan_msg_attr, func)
425cb8db4aSAlexander Duyck 
435cb8db4aSAlexander Duyck s32 fm10k_msg_lport_state_vf(struct fm10k_hw *, u32 **,
445cb8db4aSAlexander Duyck 			     struct fm10k_mbx_info *);
455cb8db4aSAlexander Duyck extern const struct fm10k_tlv_attr fm10k_lport_state_msg_attr[];
465cb8db4aSAlexander Duyck #define FM10K_VF_MSG_LPORT_STATE_HANDLER(func) \
475cb8db4aSAlexander Duyck 	FM10K_MSG_HANDLER(FM10K_VF_MSG_ID_LPORT_STATE, \
485cb8db4aSAlexander Duyck 			  fm10k_lport_state_msg_attr, func)
495cb8db4aSAlexander Duyck 
50f329ad73SBruce Allan extern const struct fm10k_info fm10k_vf_info;
515cb8db4aSAlexander Duyck #endif /* _FM10K_VF_H */
52