1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2020 Intel Corporation
5 #ifndef _ICE_DCF_ETHDEV_H_
6 #define _ICE_DCF_ETHDEV_H_
8 #include "base/ice_common.h"
9 #include "base/ice_adminq_cmd.h"
10 #include "base/ice_dcb.h"
11 #include "base/ice_sched.h"
13 #include "ice_ethdev.h"
16 #define ICE_DCF_MAX_RINGS 1
18 struct ice_dcf_queue {
22 struct ice_dcf_repr_info {
23 struct rte_eth_dev *vf_rep_eth_dev;
26 struct ice_dcf_adapter {
27 struct ice_adapter parent; /* Must be first */
28 struct ice_dcf_hw real_hw;
31 struct ice_dcf_repr_info *repr_infos;
34 struct ice_dcf_vf_repr_param {
35 struct rte_eth_dev *dcf_eth_dev;
36 uint16_t switch_domain_id;
48 struct ice_dcf_vf_repr {
49 struct rte_eth_dev *dcf_eth_dev;
50 struct rte_ether_addr mac_addr;
51 uint16_t switch_domain_id;
54 struct ice_dcf_vlan outer_vlan_info; /* DCF always handle outer VLAN */
57 extern const struct rte_tm_ops ice_dcf_tm_ops;
58 void ice_dcf_handle_pf_event_msg(struct ice_dcf_hw *dcf_hw,
59 uint8_t *msg, uint16_t msglen);
60 int ice_dcf_init_parent_adapter(struct rte_eth_dev *eth_dev);
61 void ice_dcf_uninit_parent_adapter(struct rte_eth_dev *eth_dev);
63 int ice_dcf_vf_repr_init(struct rte_eth_dev *vf_rep_eth_dev, void *init_param);
64 int ice_dcf_vf_repr_uninit(struct rte_eth_dev *vf_rep_eth_dev);
65 int ice_dcf_vf_repr_init_vlan(struct rte_eth_dev *vf_rep_eth_dev);
66 void ice_dcf_vf_repr_stop_all(struct ice_dcf_adapter *dcf_adapter);
68 #endif /* _ICE_DCF_ETHDEV_H_ */