xref: /dpdk/drivers/net/sfc/sfc_repr.h (revision 768d1e44dfa50a5c26d04e362d46773dde5932be)
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_H
11 #define _SFC_REPR_H
12 
13 #include <stdint.h>
14 
15 #include <rte_ethdev.h>
16 
17 #include "efx.h"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 /** Max count of the representor Rx queues */
24 #define SFC_REPR_RXQ_MAX	1
25 
26 /** Max count of the representor Tx queues */
27 #define SFC_REPR_TXQ_MAX	1
28 
29 struct sfc_repr_entity_info {
30 	enum rte_eth_representor_type type;
31 	efx_pcie_interface_t intf;
32 	uint16_t pf;
33 	uint16_t vf;
34 };
35 
36 int sfc_repr_create(struct rte_eth_dev *parent,
37 		    struct sfc_repr_entity_info *entity,
38 		    uint16_t switch_domain_id,
39 		    const efx_mport_sel_t *mport_sel);
40 
41 #ifdef __cplusplus
42 }
43 #endif
44 #endif  /* _SFC_REPR_H */
45