linux/drivers/net/ethernet/sfc/ef10_sriov.c

// SPDX-License-Identifier: GPL-2.0-only
/****************************************************************************
 * Driver for Solarflare network controllers and boards
 * Copyright 2015 Solarflare Communications Inc.
 */
#include <linux/etherdevice.h>
#include <linux/pci.h>
#include <linux/module.h>
#include "net_driver.h"
#include "ef10_sriov.h"
#include "efx.h"
#include "nic.h"
#include "mcdi_pcol.h"

static int efx_ef10_evb_port_assign(struct efx_nic *efx, unsigned int port_id,
				    unsigned int vf_fn)
{}

static int efx_ef10_vswitch_alloc(struct efx_nic *efx, unsigned int port_id,
				  unsigned int vswitch_type)
{}

static int efx_ef10_vswitch_free(struct efx_nic *efx, unsigned int port_id)
{}

static int efx_ef10_vport_alloc(struct efx_nic *efx,
				unsigned int port_id_in,
				unsigned int vport_type,
				u16 vlan,
				unsigned int *port_id_out)
{}

static int efx_ef10_vport_free(struct efx_nic *efx, unsigned int port_id)
{}

static void efx_ef10_sriov_free_vf_vports(struct efx_nic *efx)
{}

static void efx_ef10_sriov_free_vf_vswitching(struct efx_nic *efx)
{}

static int efx_ef10_sriov_assign_vf_vport(struct efx_nic *efx,
					  unsigned int vf_i)
{}

static int efx_ef10_sriov_alloc_vf_vswitching(struct efx_nic *efx)
{}

static int efx_ef10_sriov_restore_vf_vswitching(struct efx_nic *efx)
{}

static int efx_ef10_vadaptor_alloc_set_features(struct efx_nic *efx)
{}

/* On top of the default firmware vswitch setup, create a VEB vswitch and
 * expansion vport for use by this function.
 */
int efx_ef10_vswitching_probe_pf(struct efx_nic *efx)
{}

int efx_ef10_vswitching_probe_vf(struct efx_nic *efx)
{}

int efx_ef10_vswitching_restore_pf(struct efx_nic *efx)
{}

int efx_ef10_vswitching_restore_vf(struct efx_nic *efx)
{}

void efx_ef10_vswitching_remove_pf(struct efx_nic *efx)
{}

void efx_ef10_vswitching_remove_vf(struct efx_nic *efx)
{}

static int efx_ef10_pci_sriov_enable(struct efx_nic *efx, int num_vfs)
{}

/* Disable SRIOV and remove VFs
 * If some VFs are attached to a guest (using Xen, only) nothing is
 * done if force=false, and vports are freed if force=true (for the non
 * attachedc ones, only) but SRIOV is not disabled and VFs are not
 * removed in either case.
 */
static int efx_ef10_pci_sriov_disable(struct efx_nic *efx, bool force)
{}

int efx_ef10_sriov_configure(struct efx_nic *efx, int num_vfs)
{}

int efx_ef10_sriov_init(struct efx_nic *efx)
{}

void efx_ef10_sriov_fini(struct efx_nic *efx)
{}

static int efx_ef10_vport_del_vf_mac(struct efx_nic *efx, unsigned int port_id,
				     u8 *mac)
{}

int efx_ef10_sriov_set_vf_mac(struct efx_nic *efx, int vf_i, const u8 *mac)
{}

int efx_ef10_sriov_set_vf_vlan(struct efx_nic *efx, int vf_i, u16 vlan,
			       u8 qos)
{}

static int efx_ef10_sriov_set_privilege_mask(struct efx_nic *efx, int vf_i,
					     u32 mask, u32 value)
{}

int efx_ef10_sriov_set_vf_spoofchk(struct efx_nic *efx, int vf_i, bool spoofchk)
{}

int efx_ef10_sriov_set_vf_link_state(struct efx_nic *efx, int vf_i,
				     int link_state)
{}

int efx_ef10_sriov_get_vf_config(struct efx_nic *efx, int vf_i,
				 struct ifla_vf_info *ivf)
{}