X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbnxt%2Fbnxt_reps.h;h=8d6139f2b70a3bdb5f49a15b3cb5c0d2904f76f7;hb=21b1677d87a23a9695be0cbcbdf38607a2d58f84;hp=418b95afcd2ace4d7729564f60239b6ee9269ee2;hpb=1e18ec58ed5c142d3ff37324c88a32d03abf9ec9;p=dpdk.git diff --git a/drivers/net/bnxt/bnxt_reps.h b/drivers/net/bnxt/bnxt_reps.h index 418b95afcd..8d6139f2b7 100644 --- a/drivers/net/bnxt/bnxt_reps.h +++ b/drivers/net/bnxt/bnxt_reps.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2014-2020 Broadcom + * Copyright(c) 2014-2021 Broadcom * All rights reserved. */ @@ -12,34 +12,42 @@ #define BNXT_MAX_CFA_CODE 65536 #define BNXT_VF_IDX_INVALID 0xffff +/* Switchdev Port ID Mapping (Per switch domain id). + * Lower 15 bits map the VFs (VF_ID). Upper bit maps the PF. + */ +#define BNXT_SWITCH_PORT_ID_PF 0x8000 +#define BNXT_SWITCH_PORT_ID_TRUSTED_VF 0x0 +#define BNXT_SWITCH_PORT_ID_VF_MASK 0x7FFF + uint16_t bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf); -int bnxt_vf_representor_init(struct rte_eth_dev *eth_dev, void *params); -int bnxt_vf_representor_uninit(struct rte_eth_dev *eth_dev); -int bnxt_vf_rep_dev_info_get_op(struct rte_eth_dev *eth_dev, +int bnxt_representor_init(struct rte_eth_dev *eth_dev, void *params); +int bnxt_representor_uninit(struct rte_eth_dev *eth_dev); +int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *dev_info); -int bnxt_vf_rep_dev_configure_op(struct rte_eth_dev *eth_dev); +int bnxt_rep_dev_configure_op(struct rte_eth_dev *eth_dev); -int bnxt_vf_rep_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_compl); -int bnxt_vf_rep_dev_start_op(struct rte_eth_dev *eth_dev); -int bnxt_vf_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev, +int bnxt_rep_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_compl); +int bnxt_rep_dev_start_op(struct rte_eth_dev *eth_dev); +int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev, __rte_unused uint16_t queue_idx, __rte_unused uint16_t nb_desc, __rte_unused unsigned int socket_id, __rte_unused const struct rte_eth_rxconf * rx_conf, __rte_unused struct rte_mempool *mp); -int bnxt_vf_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev, +int bnxt_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev, __rte_unused uint16_t queue_idx, __rte_unused uint16_t nb_desc, __rte_unused unsigned int socket_id, __rte_unused const struct rte_eth_txconf * tx_conf); -void bnxt_vf_rep_rx_queue_release_op(void *rx_queue); -void bnxt_vf_rep_tx_queue_release_op(void *tx_queue); -void bnxt_vf_rep_dev_stop_op(struct rte_eth_dev *eth_dev); -void bnxt_vf_rep_dev_close_op(struct rte_eth_dev *eth_dev); -int bnxt_vf_rep_stats_get_op(struct rte_eth_dev *eth_dev, +void bnxt_rep_rx_queue_release_op(void *rx_queue); +void bnxt_rep_tx_queue_release_op(void *tx_queue); +int bnxt_rep_dev_stop_op(struct rte_eth_dev *eth_dev); +int bnxt_rep_dev_close_op(struct rte_eth_dev *eth_dev); +int bnxt_rep_stats_get_op(struct rte_eth_dev *eth_dev, struct rte_eth_stats *stats); -int bnxt_vf_rep_stats_reset_op(struct rte_eth_dev *eth_dev); +int bnxt_rep_stats_reset_op(struct rte_eth_dev *eth_dev); +int bnxt_rep_stop_all(struct bnxt *bp); #endif /* _BNXT_REPS_H_ */