]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Rate limit tables support
authorYevgeny Petrilin <yevgenyp@mellanox.com>
Thu, 23 Jun 2016 14:02:37 +0000 (17:02 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jun 2016 08:10:40 +0000 (04:10 -0400)
commitc44b7e79b1733ec78c5e163630395766a71f8b48
tree2e59ace67ce4eb2d55cf9e38fd04f08525e39047
parent1d46800852102dc4571ed05555a1a7790dbc9b30
net/mlx5: Rate limit tables support

Configuring and managing HW rate limit tables.
The HW holds a table of rate limits, each rate is
associated with an index in that table.
Later a Send Queue uses this index to set the rate limit.
Multiple Send Queues can have the same rate limit, which is
represented by a single entry in this table.
Even though a rate can be shared, each queue is being rate
limited independently of others.

The SW shadow of this table holds the rate itself,
the index in the HW table and the refcount (number of queues)
working with this rate.

The exported functions are mlx5_rl_add_rate and mlx5_rl_remove_rate.
Number of different rates and their values are derived
from HW capabilities.

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/Makefile
drivers/net/ethernet/mellanox/mlx5/core/fw.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/rl.c [new file with mode: 0644]
include/linux/mlx5/device.h
include/linux/mlx5/driver.h