net/mlx5e: Add TXQ set max rate support
authorYevgeny Petrilin <yevgenyp@mellanox.com>
Thu, 23 Jun 2016 14:02:38 +0000 (17:02 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jun 2016 08:10:40 +0000 (04:10 -0400)
commit507f0c817f7a28bbf4facb3a8dca72a68bc25248
tree1ddb791ba6ac57bd9a8273d4bc42d01cd832542b
parent1466cc5b23d18e7b6b8f1a45443d595393dbcae7
net/mlx5e: Add TXQ set max rate support

Implement set_maxrate ndo.
Use the rate index from the hardware table to attach to channel SQ/TXQ.
In case of failure to configure new rate, the queue remains with
unlimited rate.

We save the configuration on priv structure and apply it each time
Send Queues are being reinitialized (after open/close) operations.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c