1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2020 Intel Corporation 3 */ 4 5 #ifndef _ICE_DCF_ETHDEV_H_ 6 #define _ICE_DCF_ETHDEV_H_ 7 8 #include "base/ice_common.h" 9 #include "base/ice_adminq_cmd.h" 10 11 #include "ice_ethdev.h" 12 #include "ice_dcf.h" 13 14 #define ICE_DCF_MAX_RINGS 1 15 16 struct ice_dcf_queue { 17 uint64_t dummy; 18 }; 19 20 struct ice_dcf_adapter { 21 struct ice_adapter parent; /* Must be first */ 22 struct ice_dcf_hw real_hw; 23 }; 24 25 struct ice_dcf_vf_repr_param { 26 struct ice_dcf_adapter *adapter; 27 uint16_t switch_domain_id; 28 uint16_t vf_id; 29 }; 30 31 struct ice_dcf_vlan { 32 uint16_t tpid; 33 uint16_t vid; 34 }; 35 36 struct ice_dcf_vf_repr { 37 struct ice_dcf_adapter *dcf_adapter; 38 struct rte_ether_addr mac_addr; 39 uint16_t switch_domain_id; 40 uint16_t vf_id; 41 42 bool port_vlan_ena; 43 struct ice_dcf_vlan port_vlan_info; 44 }; 45 46 void ice_dcf_handle_pf_event_msg(struct ice_dcf_hw *dcf_hw, 47 uint8_t *msg, uint16_t msglen); 48 int ice_dcf_init_parent_adapter(struct rte_eth_dev *eth_dev); 49 void ice_dcf_uninit_parent_adapter(struct rte_eth_dev *eth_dev); 50 51 int ice_dcf_vf_repr_init(struct rte_eth_dev *ethdev, void *init_param); 52 int ice_dcf_vf_repr_uninit(struct rte_eth_dev *ethdev); 53 54 #endif /* _ICE_DCF_ETHDEV_H_ */ 55