1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2014-2020 Broadcom
9 #include <rte_malloc.h>
10 #include <rte_ethdev.h>
12 #define BNXT_MAX_CFA_CODE 65536
13 #define BNXT_VF_IDX_INVALID 0xffff
15 /* Switchdev Port ID Mapping (Per switch domain id).
16 * Lower 15 bits map the VFs (VF_ID). Upper bit maps the PF.
18 #define BNXT_SWITCH_PORT_ID_PF 0x8000
19 #define BNXT_SWITCH_PORT_ID_TRUSTED_VF 0x0
20 #define BNXT_SWITCH_PORT_ID_VF_MASK 0x7FFF
23 bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf);
24 int bnxt_vf_representor_init(struct rte_eth_dev *eth_dev, void *params);
25 int bnxt_vf_representor_uninit(struct rte_eth_dev *eth_dev);
26 int bnxt_vf_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
27 struct rte_eth_dev_info *dev_info);
28 int bnxt_vf_rep_dev_configure_op(struct rte_eth_dev *eth_dev);
30 int bnxt_vf_rep_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_compl);
31 int bnxt_vf_rep_dev_start_op(struct rte_eth_dev *eth_dev);
32 int bnxt_vf_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
33 __rte_unused uint16_t queue_idx,
34 __rte_unused uint16_t nb_desc,
35 __rte_unused unsigned int socket_id,
36 __rte_unused const struct rte_eth_rxconf *
38 __rte_unused struct rte_mempool *mp);
39 int bnxt_vf_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
40 __rte_unused uint16_t queue_idx,
41 __rte_unused uint16_t nb_desc,
42 __rte_unused unsigned int socket_id,
43 __rte_unused const struct rte_eth_txconf *
45 void bnxt_vf_rep_rx_queue_release_op(void *rx_queue);
46 void bnxt_vf_rep_tx_queue_release_op(void *tx_queue);
47 void bnxt_vf_rep_dev_stop_op(struct rte_eth_dev *eth_dev);
48 void bnxt_vf_rep_dev_close_op(struct rte_eth_dev *eth_dev);
49 int bnxt_vf_rep_stats_get_op(struct rte_eth_dev *eth_dev,
50 struct rte_eth_stats *stats);
51 int bnxt_vf_rep_stats_reset_op(struct rte_eth_dev *eth_dev);
52 void bnxt_vf_rep_stop_all(struct bnxt *bp);
53 #endif /* _BNXT_REPS_H_ */