net/mlx4_core: Add basic support for QP max-rate limiting
authorOr Gerlitz <ogerlitz@mellanox.com>
Wed, 18 Mar 2015 12:57:34 +0000 (14:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Mar 2015 18:55:19 +0000 (14:55 -0400)
commitfc31e2560a2443410fe45c27116fae736541a7b5
tree6b2d25803b612cb1fcb2038d069d4063a843a4eb
parent822b3b2ebfff8e9b3d006086c527738a7ca00cd0
net/mlx4_core: Add basic support for QP max-rate limiting

Add the low-level device commands and definitions used for QP max-rate limiting.

This is done through the following elements:

  - read rate-limit device caps in QUERY_DEV_CAP: number of different
    rates and the min/max rates in Kbs/Mbs/Gbs units

  - enhance the QP context struct to contain rate limit units and value

  - allow to do run time rate-limit setting to QPs through the
    update-qp firmware command

  - QP rate-limiting is disallowed for VFs

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/fw.c
drivers/net/ethernet/mellanox/mlx4/fw.h
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/qp.c
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
include/linux/mlx4/device.h
include/linux/mlx4/qp.h