net/sfc: handle ingress mport in EF100 Rx prefix
[dpdk.git] / drivers / net / sfc / sfc_repr_proxy_api.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  *
3  * Copyright(c) 2019-2021 Xilinx, Inc.
4  * Copyright(c) 2019 Solarflare Communications Inc.
5  *
6  * This software was jointly developed between OKTET Labs (under contract
7  * for Solarflare) and Solarflare Communications, Inc.
8  */
9
10 #ifndef _SFC_REPR_PROXY_API_H
11 #define _SFC_REPR_PROXY_API_H
12
13 #include <stdint.h>
14
15 #include <rte_ring.h>
16 #include <rte_mempool.h>
17
18 #include "efx.h"
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 int sfc_repr_proxy_add_port(uint16_t pf_port_id, uint16_t repr_id,
25                             uint16_t rte_port_id,
26                             const efx_mport_sel_t *mport_set);
27 int sfc_repr_proxy_del_port(uint16_t pf_port_id, uint16_t repr_id);
28
29 int sfc_repr_proxy_add_rxq(uint16_t pf_port_id, uint16_t repr_id,
30                            uint16_t queue_id, struct rte_ring *rx_ring,
31                            struct rte_mempool *mp);
32 void sfc_repr_proxy_del_rxq(uint16_t pf_port_id, uint16_t repr_id,
33                             uint16_t queue_id);
34
35 int sfc_repr_proxy_add_txq(uint16_t pf_port_id, uint16_t repr_id,
36                            uint16_t queue_id, struct rte_ring *tx_ring,
37                            efx_mport_id_t *egress_mport);
38 void sfc_repr_proxy_del_txq(uint16_t pf_port_id, uint16_t repr_id,
39                             uint16_t queue_id);
40
41 int sfc_repr_proxy_start_repr(uint16_t pf_port_id, uint16_t repr_id);
42 int sfc_repr_proxy_stop_repr(uint16_t pf_port_id, uint16_t repr_id);
43
44 #ifdef __cplusplus
45 }
46 #endif
47 #endif  /* _SFC_REPR_PROXY_API_H */