diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/if_link.h | 75 | ||||
-rw-r--r-- | include/linux/netdevice.h | 8 |
2 files changed, 83 insertions, 0 deletions
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index c3af67fce3f..85c812db5a3 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -113,6 +113,8 @@ enum { | |||
113 | IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */ | 113 | IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */ |
114 | IFLA_VFINFO_LIST, | 114 | IFLA_VFINFO_LIST, |
115 | IFLA_STATS64, | 115 | IFLA_STATS64, |
116 | IFLA_VF_PORTS, | ||
117 | IFLA_PORT_SELF, | ||
116 | __IFLA_MAX | 118 | __IFLA_MAX |
117 | }; | 119 | }; |
118 | 120 | ||
@@ -274,4 +276,77 @@ struct ifla_vf_info { | |||
274 | __u32 qos; | 276 | __u32 qos; |
275 | __u32 tx_rate; | 277 | __u32 tx_rate; |
276 | }; | 278 | }; |
279 | |||
280 | /* VF ports management section | ||
281 | * | ||
282 | * Nested layout of set/get msg is: | ||
283 | * | ||
284 | * [IFLA_NUM_VF] | ||
285 | * [IFLA_VF_PORTS] | ||
286 | * [IFLA_VF_PORT] | ||
287 | * [IFLA_PORT_*], ... | ||
288 | * [IFLA_VF_PORT] | ||
289 | * [IFLA_PORT_*], ... | ||
290 | * ... | ||
291 | * [IFLA_PORT_SELF] | ||
292 | * [IFLA_PORT_*], ... | ||
293 | */ | ||
294 | |||
295 | enum { | ||
296 | IFLA_VF_PORT_UNSPEC, | ||
297 | IFLA_VF_PORT, /* nest */ | ||
298 | __IFLA_VF_PORT_MAX, | ||
299 | }; | ||
300 | |||
301 | #define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1) | ||
302 | |||
303 | enum { | ||
304 | IFLA_PORT_UNSPEC, | ||
305 | IFLA_PORT_VF, /* __u32 */ | ||
306 | IFLA_PORT_PROFILE, /* string */ | ||
307 | IFLA_PORT_VSI_TYPE, /* 802.1Qbg (pre-)standard VDP */ | ||
308 | IFLA_PORT_INSTANCE_UUID, /* binary UUID */ | ||
309 | IFLA_PORT_HOST_UUID, /* binary UUID */ | ||
310 | IFLA_PORT_REQUEST, /* __u8 */ | ||
311 | IFLA_PORT_RESPONSE, /* __u16, output only */ | ||
312 | __IFLA_PORT_MAX, | ||
313 | }; | ||
314 | |||
315 | #define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1) | ||
316 | |||
317 | #define PORT_PROFILE_MAX 40 | ||
318 | #define PORT_UUID_MAX 16 | ||
319 | #define PORT_SELF_VF -1 | ||
320 | |||
321 | enum { | ||
322 | PORT_REQUEST_PREASSOCIATE = 0, | ||
323 | PORT_REQUEST_PREASSOCIATE_RR, | ||
324 | PORT_REQUEST_ASSOCIATE, | ||
325 | PORT_REQUEST_DISASSOCIATE, | ||
326 | }; | ||
327 | |||
328 | enum { | ||
329 | PORT_VDP_RESPONSE_SUCCESS = 0, | ||
330 | PORT_VDP_RESPONSE_INVALID_FORMAT, | ||
331 | PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES, | ||
332 | PORT_VDP_RESPONSE_UNUSED_VTID, | ||
333 | PORT_VDP_RESPONSE_VTID_VIOLATION, | ||
334 | PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION, | ||
335 | PORT_VDP_RESPONSE_OUT_OF_SYNC, | ||
336 | /* 0x08-0xFF reserved for future VDP use */ | ||
337 | PORT_PROFILE_RESPONSE_SUCCESS = 0x100, | ||
338 | PORT_PROFILE_RESPONSE_INPROGRESS, | ||
339 | PORT_PROFILE_RESPONSE_INVALID, | ||
340 | PORT_PROFILE_RESPONSE_BADSTATE, | ||
341 | PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES, | ||
342 | PORT_PROFILE_RESPONSE_ERROR, | ||
343 | }; | ||
344 | |||
345 | struct ifla_port_vsi { | ||
346 | __u8 vsi_mgr_id; | ||
347 | __u8 vsi_type_id[3]; | ||
348 | __u8 vsi_type_version; | ||
349 | __u8 pad[3]; | ||
350 | }; | ||
351 | |||
277 | #endif /* _LINUX_IF_LINK_H */ | 352 | #endif /* _LINUX_IF_LINK_H */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c1b2341897c..c3487a6bdf9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -686,6 +686,9 @@ struct netdev_rx_queue { | |||
686 | * int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate); | 686 | * int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate); |
687 | * int (*ndo_get_vf_config)(struct net_device *dev, | 687 | * int (*ndo_get_vf_config)(struct net_device *dev, |
688 | * int vf, struct ifla_vf_info *ivf); | 688 | * int vf, struct ifla_vf_info *ivf); |
689 | * int (*ndo_set_vf_port)(struct net_device *dev, int vf, | ||
690 | * struct nlattr *port[]); | ||
691 | * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb); | ||
689 | */ | 692 | */ |
690 | #define HAVE_NET_DEVICE_OPS | 693 | #define HAVE_NET_DEVICE_OPS |
691 | struct net_device_ops { | 694 | struct net_device_ops { |
@@ -735,6 +738,11 @@ struct net_device_ops { | |||
735 | int (*ndo_get_vf_config)(struct net_device *dev, | 738 | int (*ndo_get_vf_config)(struct net_device *dev, |
736 | int vf, | 739 | int vf, |
737 | struct ifla_vf_info *ivf); | 740 | struct ifla_vf_info *ivf); |
741 | int (*ndo_set_vf_port)(struct net_device *dev, | ||
742 | int vf, | ||
743 | struct nlattr *port[]); | ||
744 | int (*ndo_get_vf_port)(struct net_device *dev, | ||
745 | int vf, struct sk_buff *skb); | ||
738 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) | 746 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) |
739 | int (*ndo_fcoe_enable)(struct net_device *dev); | 747 | int (*ndo_fcoe_enable)(struct net_device *dev); |
740 | int (*ndo_fcoe_disable)(struct net_device *dev); | 748 | int (*ndo_fcoe_disable)(struct net_device *dev); |