X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fsfc%2Fsfc_switch.h;h=d187c6dbbb75061d0d3273d442f412dae2cbdb65;hb=96a46ead5b9c3f544703237eb69ba6e2df603f5a;hp=96ece9565413160d3b194522b64238b3ea24acfd;hpb=1fb65e4dae8a5af151bcf8d5bb894a0d3d2c8e52;p=dpdk.git diff --git a/drivers/net/sfc/sfc_switch.h b/drivers/net/sfc/sfc_switch.h index 96ece95654..d187c6dbbb 100644 --- a/drivers/net/sfc/sfc_switch.h +++ b/drivers/net/sfc/sfc_switch.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: BSD-3-Clause * - * Copyright(c) 2019-2020 Xilinx, Inc. + * Copyright(c) 2019-2021 Xilinx, Inc. * Copyright(c) 2019 Solarflare Communications Inc. * * This software was jointly developed between OKTET Labs (under contract @@ -27,6 +27,21 @@ enum sfc_mae_switch_port_type { * and thus refers to its underlying PCIe function */ SFC_MAE_SWITCH_PORT_INDEPENDENT = 0, + /** + * The switch port is operated by a representor RTE ethdev + * and thus refers to the represented PCIe function + */ + SFC_MAE_SWITCH_PORT_REPRESENTOR, +}; + +struct sfc_mae_switch_port_repr_data { + efx_pcie_interface_t intf; + uint16_t pf; + uint16_t vf; +}; + +union sfc_mae_switch_port_data { + struct sfc_mae_switch_port_repr_data repr; }; struct sfc_mae_switch_port_request { @@ -34,11 +49,28 @@ struct sfc_mae_switch_port_request { const efx_mport_sel_t *entity_mportp; const efx_mport_sel_t *ethdev_mportp; uint16_t ethdev_port_id; + union sfc_mae_switch_port_data port_data; }; int sfc_mae_assign_switch_domain(struct sfc_adapter *sa, uint16_t *switch_domain_id); +int sfc_mae_switch_domain_controllers(uint16_t switch_domain_id, + const efx_pcie_interface_t **controllers, + size_t *nb_controllers); + +int sfc_mae_switch_domain_map_controllers(uint16_t switch_domain_id, + efx_pcie_interface_t *controllers, + size_t nb_controllers); + +int sfc_mae_switch_domain_get_controller(uint16_t switch_domain_id, + efx_pcie_interface_t intf, + int *controller); + +int sfc_mae_switch_domain_get_intf(uint16_t switch_domain_id, + int controller, + efx_pcie_interface_t *intf); + int sfc_mae_assign_switch_port(uint16_t switch_domain_id, const struct sfc_mae_switch_port_request *req, uint16_t *switch_port_id);