diff options
author | Rony Efraim <ronye@mellanox.com> | 2013-06-13 06:19:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-13 20:51:04 -0400 |
commit | 1d8faf48c74b8329a0322dc4b2a2030ae5003c86 (patch) | |
tree | 63471c7ee9379f70e30b27b82cf6f155683b4468 /include/linux | |
parent | 3dc6475c0c9e55ac7f053ad6b8b398e779954545 (diff) |
net/core: Add VF link state control
Add netlink directives and ndo entry to allow for controling
VF link, which can be in one of three states:
Auto - VF link state reflects the PF link state (default)
Up - VF link state is up, traffic from VF to VF works even if
the actual PF link is down
Down - VF link state is down, no traffic from/to this VF, can be of
use while configuring the VF
Signed-off-by: Rony Efraim <ronye@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/if_link.h | 1 | ||||
-rw-r--r-- | include/linux/netdevice.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index c3f817c3eb45..a86784dec3d3 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -12,5 +12,6 @@ struct ifla_vf_info { | |||
12 | __u32 qos; | 12 | __u32 qos; |
13 | __u32 tx_rate; | 13 | __u32 tx_rate; |
14 | __u32 spoofchk; | 14 | __u32 spoofchk; |
15 | __u32 linkstate; | ||
15 | }; | 16 | }; |
16 | #endif /* _LINUX_IF_LINK_H */ | 17 | #endif /* _LINUX_IF_LINK_H */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 8c9fcc42502a..09b4188c1ea7 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -829,6 +829,7 @@ struct netdev_fcoe_hbainfo { | |||
829 | * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting); | 829 | * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting); |
830 | * int (*ndo_get_vf_config)(struct net_device *dev, | 830 | * int (*ndo_get_vf_config)(struct net_device *dev, |
831 | * int vf, struct ifla_vf_info *ivf); | 831 | * int vf, struct ifla_vf_info *ivf); |
832 | * int (*ndo_set_vf_link_state)(struct net_device *dev, int vf, int link_state); | ||
832 | * int (*ndo_set_vf_port)(struct net_device *dev, int vf, | 833 | * int (*ndo_set_vf_port)(struct net_device *dev, int vf, |
833 | * struct nlattr *port[]); | 834 | * struct nlattr *port[]); |
834 | * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb); | 835 | * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb); |
@@ -986,6 +987,8 @@ struct net_device_ops { | |||
986 | int (*ndo_get_vf_config)(struct net_device *dev, | 987 | int (*ndo_get_vf_config)(struct net_device *dev, |
987 | int vf, | 988 | int vf, |
988 | struct ifla_vf_info *ivf); | 989 | struct ifla_vf_info *ivf); |
990 | int (*ndo_set_vf_link_state)(struct net_device *dev, | ||
991 | int vf, int link_state); | ||
989 | int (*ndo_set_vf_port)(struct net_device *dev, | 992 | int (*ndo_set_vf_port)(struct net_device *dev, |
990 | int vf, | 993 | int vf, |
991 | struct nlattr *port[]); | 994 | struct nlattr *port[]); |