aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
diff options
context:
space:
mode:
authorYufeng Mo <moyufeng@huawei.com>2019-10-08 09:20:04 +0800
committerJakub Kicinski <jakub.kicinski@netronome.com>2019-10-08 17:18:04 -0700
commit6430f744a45adb722dc51982a7df7ac1367dc90d (patch)
treef087f3863c769aa0f27595de52b0c80c1e58883a /drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
parenttun: fix memory leak in error path (diff)
downloadlinux-dev-6430f744a45adb722dc51982a7df7ac1367dc90d.tar.xz
linux-dev-6430f744a45adb722dc51982a7df7ac1367dc90d.zip
net: hns3: add support for setting VF link status on the host
This patch adds support to configure VF link properties. The options are auto, enable, and disable. Even if the PF is down, the communication between VFs will be normal if the VFs are set to enable. The commands are as follows: 'ip link set <pf> vf <vf_id> state <auto|enable|disable>' change the VF status 'ip link show' show the setting status Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
index 3e9574a9e22d..6a3ccdac6aa8 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
@@ -885,6 +885,11 @@ struct hclge_port_base_vlan_config {
struct hclge_vlan_info vlan_info;
};
+struct hclge_vf_info {
+ int link_state;
+ u8 mac[ETH_ALEN];
+};
+
struct hclge_vport {
u16 alloc_tqps; /* Allocated Tx/Rx queues */
@@ -916,6 +921,7 @@ struct hclge_vport {
unsigned long state;
unsigned long last_active_jiffies;
u32 mps; /* Max packet size */
+ struct hclge_vf_info vf_info;
struct list_head uc_mac_list; /* Store VF unicast table */
struct list_head mc_mac_list; /* Store VF multicast table */