xref: /dpdk/drivers/net/sfc/sfc_repr.h (revision 768d1e44dfa50a5c26d04e362d46773dde5932be)
1a62ec905SIgor Romanov /* SPDX-License-Identifier: BSD-3-Clause
2a62ec905SIgor Romanov  *
3a62ec905SIgor Romanov  * Copyright(c) 2019-2021 Xilinx, Inc.
4a62ec905SIgor Romanov  * Copyright(c) 2019 Solarflare Communications Inc.
5a62ec905SIgor Romanov  *
6a62ec905SIgor Romanov  * This software was jointly developed between OKTET Labs (under contract
7a62ec905SIgor Romanov  * for Solarflare) and Solarflare Communications, Inc.
8a62ec905SIgor Romanov  */
9a62ec905SIgor Romanov 
10a62ec905SIgor Romanov #ifndef _SFC_REPR_H
11a62ec905SIgor Romanov #define _SFC_REPR_H
12a62ec905SIgor Romanov 
13a62ec905SIgor Romanov #include <stdint.h>
14a62ec905SIgor Romanov 
15a62ec905SIgor Romanov #include <rte_ethdev.h>
16a62ec905SIgor Romanov 
17a62ec905SIgor Romanov #include "efx.h"
18a62ec905SIgor Romanov 
19a62ec905SIgor Romanov #ifdef __cplusplus
20a62ec905SIgor Romanov extern "C" {
21a62ec905SIgor Romanov #endif
22a62ec905SIgor Romanov 
23a62ec905SIgor Romanov /** Max count of the representor Rx queues */
24a62ec905SIgor Romanov #define SFC_REPR_RXQ_MAX	1
25a62ec905SIgor Romanov 
26a62ec905SIgor Romanov /** Max count of the representor Tx queues */
27a62ec905SIgor Romanov #define SFC_REPR_TXQ_MAX	1
28a62ec905SIgor Romanov 
29*768d1e44SViacheslav Galaktionov struct sfc_repr_entity_info {
30*768d1e44SViacheslav Galaktionov 	enum rte_eth_representor_type type;
31*768d1e44SViacheslav Galaktionov 	efx_pcie_interface_t intf;
32*768d1e44SViacheslav Galaktionov 	uint16_t pf;
33*768d1e44SViacheslav Galaktionov 	uint16_t vf;
34*768d1e44SViacheslav Galaktionov };
35*768d1e44SViacheslav Galaktionov 
36*768d1e44SViacheslav Galaktionov int sfc_repr_create(struct rte_eth_dev *parent,
37*768d1e44SViacheslav Galaktionov 		    struct sfc_repr_entity_info *entity,
38a62ec905SIgor Romanov 		    uint16_t switch_domain_id,
39a62ec905SIgor Romanov 		    const efx_mport_sel_t *mport_sel);
40a62ec905SIgor Romanov 
41a62ec905SIgor Romanov #ifdef __cplusplus
42a62ec905SIgor Romanov }
43a62ec905SIgor Romanov #endif
44a62ec905SIgor Romanov #endif  /* _SFC_REPR_H */
45