net/mlx5e: Receive buffer configuration
authorHuy Nguyen <huyn@mellanox.com>
Thu, 22 Mar 2018 02:10:22 +0000 (21:10 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 24 May 2018 21:23:33 +0000 (14:23 -0700)
commit0696d60853d58f1b9431bc689e4e4526845b790a
tree08ef41cc3e91aa751867ddc25c4e55329c510dec
parent50b4a3c23646254c7345f3663ff1e0a6cbcd9abb
net/mlx5e: Receive buffer configuration

Add APIs for buffer configuration based on the changes in
pfc configuration, cable len, buffer size configuration,
and priority to buffer mapping.

Note that the xoff fomula is as below
  xoff = ((301+2.16 * len [m]) * speed [Gbps] + 2.72 MTU [B]
  xoff_threshold = buffer_size - xoff
  xon_threshold = xoff_threshold - MTU

Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/Makefile
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.h [new file with mode: 0644]