1 /* SPDX-License-Identifier: BSD-3-Clause
3 * Copyright(c) 2019-2021 Xilinx, Inc.
4 * Copyright(c) 2019 Solarflare Communications Inc.
6 * This software was jointly developed between OKTET Labs (under contract
7 * for Solarflare) and Solarflare Communications, Inc.
23 /** Options for MAE switch port type */
24 enum sfc_mae_switch_port_type {
26 * The switch port is operated by a self-sufficient RTE ethdev
27 * and thus refers to its underlying PCIe function
29 SFC_MAE_SWITCH_PORT_INDEPENDENT = 0,
31 * The switch port is operated by a representor RTE ethdev
32 * and thus refers to the represented PCIe function
34 SFC_MAE_SWITCH_PORT_REPRESENTOR,
37 struct sfc_mae_switch_port_request {
38 enum sfc_mae_switch_port_type type;
39 const efx_mport_sel_t *entity_mportp;
40 const efx_mport_sel_t *ethdev_mportp;
41 uint16_t ethdev_port_id;
44 int sfc_mae_assign_switch_domain(struct sfc_adapter *sa,
45 uint16_t *switch_domain_id);
47 int sfc_mae_assign_switch_port(uint16_t switch_domain_id,
48 const struct sfc_mae_switch_port_request *req,
49 uint16_t *switch_port_id);
51 int sfc_mae_switch_port_by_ethdev(uint16_t switch_domain_id,
52 uint16_t ethdev_port_id,
53 efx_mport_sel_t *mport_sel);
58 #endif /* _SFC_SWITCH_H */