5c2e0a0b9bb463d06628bdf49137d410d5df9cbc
[dpdk.git] / drivers / net / bnxt / bnxt_reps.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2014-2020 Broadcom
3  * All rights reserved.
4  */
5
6 #ifndef _BNXT_REPS_H_
7 #define _BNXT_REPS_H_
8
9 #include <rte_malloc.h>
10 #include <rte_ethdev.h>
11
12 #define BNXT_MAX_CFA_CODE               65536
13 #define BNXT_VF_IDX_INVALID             0xffff
14
15 uint16_t
16 bnxt_vfr_recv(struct bnxt *bp, uint16_t cfa_code, uint16_t queue_id,
17               struct rte_mbuf *mbuf);
18 int bnxt_vf_representor_init(struct rte_eth_dev *eth_dev, void *params);
19 int bnxt_vf_representor_uninit(struct rte_eth_dev *eth_dev);
20 int bnxt_vf_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
21                                 struct rte_eth_dev_info *dev_info);
22 int bnxt_vf_rep_dev_configure_op(struct rte_eth_dev *eth_dev);
23
24 int bnxt_vf_rep_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_compl);
25 int bnxt_vf_rep_dev_start_op(struct rte_eth_dev *eth_dev);
26 int bnxt_vf_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
27                                   __rte_unused uint16_t queue_idx,
28                                   __rte_unused uint16_t nb_desc,
29                                   __rte_unused unsigned int socket_id,
30                                   __rte_unused const struct rte_eth_rxconf *
31                                   rx_conf,
32                                   __rte_unused struct rte_mempool *mp);
33 int bnxt_vf_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
34                                   __rte_unused uint16_t queue_idx,
35                                   __rte_unused uint16_t nb_desc,
36                                   __rte_unused unsigned int socket_id,
37                                   __rte_unused const struct rte_eth_txconf *
38                                   tx_conf);
39 void bnxt_vf_rep_rx_queue_release_op(void *rx_queue);
40 void bnxt_vf_rep_tx_queue_release_op(void *tx_queue);
41 void bnxt_vf_rep_dev_stop_op(struct rte_eth_dev *eth_dev);
42 void bnxt_vf_rep_dev_close_op(struct rte_eth_dev *eth_dev);
43 int bnxt_vf_rep_stats_get_op(struct rte_eth_dev *eth_dev,
44                              struct rte_eth_stats *stats);
45 int bnxt_vf_rep_stats_reset_op(struct rte_eth_dev *eth_dev);
46 #endif /* _BNXT_REPS_H_ */