aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliams, Mitch A <mitch.a.williams@intel.com>2010-02-09 20:43:24 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-12 19:56:07 -0500
commitb280da8d54b8d82b52f368a8703b7ada6c1744d5 (patch)
tree74c425ed74bb00537f8419473cef52a872efcfa2
parentfb8a0d9d1bfd1e4355f307e86a6da7209eefd5f3 (diff)
if_link: Add SR-IOV configuration methods
Add SR-IOV VF management methods to IFLA_LINKINFO. This allows userspace to use rtnetlink to configure VF network devices. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/if_link.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index 6674791622ca..c9bf92cd7653 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -78,6 +78,11 @@ enum {
78#define IFLA_LINKINFO IFLA_LINKINFO 78#define IFLA_LINKINFO IFLA_LINKINFO
79 IFLA_NET_NS_PID, 79 IFLA_NET_NS_PID,
80 IFLA_IFALIAS, 80 IFLA_IFALIAS,
81 IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */
82 IFLA_VF_MAC, /* Hardware queue specific attributes */
83 IFLA_VF_VLAN,
84 IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */
85 IFLA_VFINFO,
81 __IFLA_MAX 86 __IFLA_MAX
82}; 87};
83 88
@@ -196,4 +201,29 @@ enum macvlan_mode {
196 MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ 201 MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */
197}; 202};
198 203
204/* SR-IOV virtual function managment section */
205
206struct ifla_vf_mac {
207 __u32 vf;
208 __u8 mac[32]; /* MAX_ADDR_LEN */
209};
210
211struct ifla_vf_vlan {
212 __u32 vf;
213 __u32 vlan; /* 0 - 4095, 0 disables VLAN filter */
214 __u32 qos;
215};
216
217struct ifla_vf_tx_rate {
218 __u32 vf;
219 __u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */
220};
221
222struct ifla_vf_info {
223 __u32 vf;
224 __u8 mac[32];
225 __u32 vlan;
226 __u32 qos;
227 __u32 tx_rate;
228};
199#endif /* _LINUX_IF_LINK_H */ 229#endif /* _LINUX_IF_LINK_H */