linux/drivers/net/ethernet/huawei/hinic/hinic_sriov.h

/* SPDX-License-Identifier: GPL-2.0-only */
/* Huawei HiNIC PCI Express Linux driver
 * Copyright(c) 2017 Huawei Technologies Co., Ltd
 */

#ifndef HINIC_SRIOV_H
#define HINIC_SRIOV_H

#include "hinic_hw_dev.h"

#define OS_VF_ID_TO_HW(os_vf_id)
#define HW_VF_ID_TO_OS(hw_vf_id)

enum hinic_sriov_state {};

enum {};

struct hinic_sriov_info {};

struct vf_data_storage {};

struct hinic_register_vf {};

struct hinic_port_mac_update {};

struct hinic_vf_vlan_config {};

int hinic_ndo_set_vf_mac(struct net_device *netdev, int vf, u8 *mac);

int hinic_ndo_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos,
			  __be16 vlan_proto);

int hinic_ndo_get_vf_config(struct net_device *netdev,
			    int vf, struct ifla_vf_info *ivi);

int hinic_ndo_set_vf_trust(struct net_device *netdev, int vf, bool setting);

int hinic_ndo_set_vf_bw(struct net_device *netdev,
			int vf, int min_tx_rate, int max_tx_rate);

int hinic_ndo_set_vf_spoofchk(struct net_device *netdev, int vf, bool setting);

int hinic_ndo_set_vf_link_state(struct net_device *netdev, int vf_id, int link);

void hinic_notify_all_vfs_link_changed(struct hinic_hwdev *hwdev,
				       u8 link_status);

int hinic_pci_sriov_disable(struct pci_dev *dev);

int hinic_vf_func_init(struct hinic_hwdev *hwdev);

void hinic_vf_func_free(struct hinic_hwdev *hwdev);

int hinic_pci_sriov_configure(struct pci_dev *dev, int num_vfs);

#endif