aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/if_link.h3
-rw-r--r--include/linux/netdevice.h8
-rw-r--r--include/uapi/linux/if_link.h9
3 files changed, 15 insertions, 5 deletions
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index a86784dec3d3..119130e9298b 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -10,8 +10,9 @@ struct ifla_vf_info {
10 __u8 mac[32]; 10 __u8 mac[32];
11 __u32 vlan; 11 __u32 vlan;
12 __u32 qos; 12 __u32 qos;
13 __u32 tx_rate;
14 __u32 spoofchk; 13 __u32 spoofchk;
15 __u32 linkstate; 14 __u32 linkstate;
15 __u32 min_tx_rate;
16 __u32 max_tx_rate;
16}; 17};
17#endif /* _LINUX_IF_LINK_H */ 18#endif /* _LINUX_IF_LINK_H */
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index f4ad247fd324..9ec3a945caf2 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -850,7 +850,8 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
850 * SR-IOV management functions. 850 * SR-IOV management functions.
851 * int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac); 851 * int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac);
852 * int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan, u8 qos); 852 * int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan, u8 qos);
853 * int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate); 853 * int (*ndo_set_vf_rate)(struct net_device *dev, int vf, int min_tx_rate,
854 * int max_tx_rate);
854 * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting); 855 * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting);
855 * int (*ndo_get_vf_config)(struct net_device *dev, 856 * int (*ndo_get_vf_config)(struct net_device *dev,
856 * int vf, struct ifla_vf_info *ivf); 857 * int vf, struct ifla_vf_info *ivf);
@@ -1044,8 +1045,9 @@ struct net_device_ops {
1044 int queue, u8 *mac); 1045 int queue, u8 *mac);
1045 int (*ndo_set_vf_vlan)(struct net_device *dev, 1046 int (*ndo_set_vf_vlan)(struct net_device *dev,
1046 int queue, u16 vlan, u8 qos); 1047 int queue, u16 vlan, u8 qos);
1047 int (*ndo_set_vf_tx_rate)(struct net_device *dev, 1048 int (*ndo_set_vf_rate)(struct net_device *dev,
1048 int vf, int rate); 1049 int vf, int min_tx_rate,
1050 int max_tx_rate);
1049 int (*ndo_set_vf_spoofchk)(struct net_device *dev, 1051 int (*ndo_set_vf_spoofchk)(struct net_device *dev,
1050 int vf, bool setting); 1052 int vf, bool setting);
1051 int (*ndo_get_vf_config)(struct net_device *dev, 1053 int (*ndo_get_vf_config)(struct net_device *dev,
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 9a7f7ace6649..622e7910b8cc 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -399,9 +399,10 @@ enum {
399 IFLA_VF_UNSPEC, 399 IFLA_VF_UNSPEC,
400 IFLA_VF_MAC, /* Hardware queue specific attributes */ 400 IFLA_VF_MAC, /* Hardware queue specific attributes */
401 IFLA_VF_VLAN, 401 IFLA_VF_VLAN,
402 IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ 402 IFLA_VF_TX_RATE, /* Max TX Bandwidth Allocation */
403 IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */ 403 IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */
404 IFLA_VF_LINK_STATE, /* link state enable/disable/auto switch */ 404 IFLA_VF_LINK_STATE, /* link state enable/disable/auto switch */
405 IFLA_VF_RATE, /* Min and Max TX Bandwidth Allocation */
405 __IFLA_VF_MAX, 406 __IFLA_VF_MAX,
406}; 407};
407 408
@@ -423,6 +424,12 @@ struct ifla_vf_tx_rate {
423 __u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */ 424 __u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */
424}; 425};
425 426
427struct ifla_vf_rate {
428 __u32 vf;
429 __u32 min_tx_rate; /* Min Bandwidth in Mbps */
430 __u32 max_tx_rate; /* Max Bandwidth in Mbps */
431};
432
426struct ifla_vf_spoofchk { 433struct ifla_vf_spoofchk {
427 __u32 vf; 434 __u32 vf;
428 __u32 setting; 435 __u32 setting;