1c377f1adSIgor Romanov /* SPDX-License-Identifier: BSD-3-Clause 2c377f1adSIgor Romanov * 3c377f1adSIgor Romanov * Copyright(c) 2019-2021 Xilinx, Inc. 4c377f1adSIgor Romanov * Copyright(c) 2019 Solarflare Communications Inc. 5c377f1adSIgor Romanov * 6c377f1adSIgor Romanov * This software was jointly developed between OKTET Labs (under contract 7c377f1adSIgor Romanov * for Solarflare) and Solarflare Communications, Inc. 8c377f1adSIgor Romanov */ 9c377f1adSIgor Romanov 10c377f1adSIgor Romanov #ifndef _SFC_REPR_PROXY_API_H 11c377f1adSIgor Romanov #define _SFC_REPR_PROXY_API_H 12c377f1adSIgor Romanov 13c377f1adSIgor Romanov #include <stdint.h> 14c377f1adSIgor Romanov 15155583abSIgor Romanov #include <rte_ring.h> 16155583abSIgor Romanov #include <rte_mempool.h> 17155583abSIgor Romanov 18c377f1adSIgor Romanov #include "efx.h" 19c377f1adSIgor Romanov 20c377f1adSIgor Romanov #ifdef __cplusplus 21c377f1adSIgor Romanov extern "C" { 22c377f1adSIgor Romanov #endif 23c377f1adSIgor Romanov 24c377f1adSIgor Romanov int sfc_repr_proxy_add_port(uint16_t pf_port_id, uint16_t repr_id, 25c377f1adSIgor Romanov uint16_t rte_port_id, 26ae9aafe4SIvan Malov const efx_mport_sel_t *mport_sel, 27ae9aafe4SIvan Malov efx_pcie_interface_t intf, uint16_t pf, 28ae9aafe4SIvan Malov uint16_t vf); 29c377f1adSIgor Romanov int sfc_repr_proxy_del_port(uint16_t pf_port_id, uint16_t repr_id); 30c377f1adSIgor Romanov 31155583abSIgor Romanov int sfc_repr_proxy_add_rxq(uint16_t pf_port_id, uint16_t repr_id, 32155583abSIgor Romanov uint16_t queue_id, struct rte_ring *rx_ring, 33155583abSIgor Romanov struct rte_mempool *mp); 34155583abSIgor Romanov void sfc_repr_proxy_del_rxq(uint16_t pf_port_id, uint16_t repr_id, 35155583abSIgor Romanov uint16_t queue_id); 36155583abSIgor Romanov 37155583abSIgor Romanov int sfc_repr_proxy_add_txq(uint16_t pf_port_id, uint16_t repr_id, 38155583abSIgor Romanov uint16_t queue_id, struct rte_ring *tx_ring, 39155583abSIgor Romanov efx_mport_id_t *egress_mport); 40155583abSIgor Romanov void sfc_repr_proxy_del_txq(uint16_t pf_port_id, uint16_t repr_id, 41155583abSIgor Romanov uint16_t queue_id); 42155583abSIgor Romanov 4375f080fdSIgor Romanov int sfc_repr_proxy_start_repr(uint16_t pf_port_id, uint16_t repr_id); 4475f080fdSIgor Romanov int sfc_repr_proxy_stop_repr(uint16_t pf_port_id, uint16_t repr_id); 4575f080fdSIgor Romanov 46ae9aafe4SIvan Malov int sfc_repr_proxy_repr_entity_mac_addr_set(uint16_t pf_port_id, 47ae9aafe4SIvan Malov uint16_t repr_id, const struct rte_ether_addr *mac_addr); 48ae9aafe4SIvan Malov 49*ef96f7ebSIvan Malov void sfc_repr_proxy_mport_alias_get(uint16_t pf_port_id, 50*ef96f7ebSIvan Malov efx_mport_id_t *mport_alias); 51*ef96f7ebSIvan Malov 52c377f1adSIgor Romanov #ifdef __cplusplus 53c377f1adSIgor Romanov } 54c377f1adSIgor Romanov #endif 55c377f1adSIgor Romanov #endif /* _SFC_REPR_PROXY_API_H */ 56