summaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4/cmd.h
diff options
context:
space:
mode:
authorIdo Shamay <idos@mellanox.com>2015-04-02 16:31:16 +0300
committerDavid S. Miller <davem@davemloft.net>2015-04-02 16:25:03 -0400
commitcda373f4849d5dd6fedceb4aeba35682a0e1a833 (patch)
tree5af89f4d32eaf487d59f27b711178025e49538f1 /include/linux/mlx4/cmd.h
parent08068cd5683f11e4505aa9c8cc6ed5942f8ad299 (diff)
downloadlinux-cda373f4849d5dd6fedceb4aeba35682a0e1a833.tar.gz
linux-cda373f4849d5dd6fedceb4aeba35682a0e1a833.tar.bz2
linux-cda373f4849d5dd6fedceb4aeba35682a0e1a833.zip
net/mlx4_en: Enable TX rate limit per VF
Support granular QoS per VF, by implementing the ndo_set_vf_rate. Enforce a rate limit per VF when called, and enabled only for VFs in VST mode with user priority supported by the device. We don't enforce VFs to be in VST mode at the moment of configuration, but rather save the given rate limit and enforce it when the VF is moved to VST with user priority which is supported (currently 0). VST<->VGT or VST qos value state changes are disallowed when a rate limit is configured. Minimum BW share is not supported yet. Signed-off-by: Ido Shamay <idos@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4/cmd.h')
-rw-r--r--include/linux/mlx4/cmd.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h
index 88326ed0033a..a788839f54bb 100644
--- a/include/linux/mlx4/cmd.h
+++ b/include/linux/mlx4/cmd.h
@@ -296,6 +296,8 @@ void mlx4_free_cmd_mailbox(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbo
u32 mlx4_comm_get_version(void);
int mlx4_set_vf_mac(struct mlx4_dev *dev, int port, int vf, u64 mac);
int mlx4_set_vf_vlan(struct mlx4_dev *dev, int port, int vf, u16 vlan, u8 qos);
+int mlx4_set_vf_rate(struct mlx4_dev *dev, int port, int vf, int min_tx_rate,
+ int max_tx_rate);
int mlx4_set_vf_spoofchk(struct mlx4_dev *dev, int port, int vf, bool setting);
int mlx4_get_vf_config(struct mlx4_dev *dev, int port, int vf, struct ifla_vf_info *ivf);
int mlx4_set_vf_link_state(struct mlx4_dev *dev, int port, int vf, int link_state);