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_SRIOV_H 11 #define _SFC_SRIOV_H 12 13 #include "efx.h" 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 struct sfc_sriov { 20 /** Number of enabled virtual functions */ 21 unsigned int num_vfs; 22 /** PF and VFs vPorts configuration */ 23 efx_vport_config_t *vport_config; 24 /** vSwitch handle */ 25 efx_vswitch_t *vswitch; 26 }; 27 28 struct sfc_adapter; 29 30 int sfc_sriov_attach(struct sfc_adapter *sa); 31 void sfc_sriov_detach(struct sfc_adapter *sa); 32 33 int sfc_sriov_vswitch_create(struct sfc_adapter *sa); 34 void sfc_sriov_vswitch_destroy(struct sfc_adapter *sa); 35 36 #ifdef __cplusplus 37 } 38 #endif 39 #endif /* _SFC_SRIOV_H */ 40