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, 26c377f1adSIgor Romanov const efx_mport_sel_t *mport_set); 27c377f1adSIgor Romanov int sfc_repr_proxy_del_port(uint16_t pf_port_id, uint16_t repr_id); 28c377f1adSIgor Romanov 29155583abSIgor Romanov int sfc_repr_proxy_add_rxq(uint16_t pf_port_id, uint16_t repr_id, 30155583abSIgor Romanov uint16_t queue_id, struct rte_ring *rx_ring, 31155583abSIgor Romanov struct rte_mempool *mp); 32155583abSIgor Romanov void sfc_repr_proxy_del_rxq(uint16_t pf_port_id, uint16_t repr_id, 33155583abSIgor Romanov uint16_t queue_id); 34155583abSIgor Romanov 35155583abSIgor Romanov int sfc_repr_proxy_add_txq(uint16_t pf_port_id, uint16_t repr_id, 36155583abSIgor Romanov uint16_t queue_id, struct rte_ring *tx_ring, 37155583abSIgor Romanov efx_mport_id_t *egress_mport); 38155583abSIgor Romanov void sfc_repr_proxy_del_txq(uint16_t pf_port_id, uint16_t repr_id, 39155583abSIgor Romanov uint16_t queue_id); 40155583abSIgor Romanov 41*75f080fdSIgor Romanov int sfc_repr_proxy_start_repr(uint16_t pf_port_id, uint16_t repr_id); 42*75f080fdSIgor Romanov int sfc_repr_proxy_stop_repr(uint16_t pf_port_id, uint16_t repr_id); 43*75f080fdSIgor Romanov 44c377f1adSIgor Romanov #ifdef __cplusplus 45c377f1adSIgor Romanov } 46c377f1adSIgor Romanov #endif 47c377f1adSIgor Romanov #endif /* _SFC_REPR_PROXY_API_H */ 48