]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_core: Dynamically set guaranteed amount of counters per VF
authorEran Ben Elisha <eranbe@mellanox.com>
Sun, 27 Oct 2019 14:39:15 +0000 (16:39 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Oct 2019 23:29:43 +0000 (16:29 -0700)
commit949146a512ddaa55f2a255b0b817687cff8368df
tree1c1371f4fc74db376ee9f5ed8f92c2b503f87bdf
parentd107ae13182c9cab2adb764ddff5a3e330166ea6
net/mlx4_core: Dynamically set guaranteed amount of counters per VF

Prior to this patch, the amount of counters guaranteed per VF in the
resource tracker was MLX4_VF_COUNTERS_PER_PORT * MLX4_MAX_PORTS. It was
set regardless if the VF was single or dual port.
This caused several VFs to have no guaranteed counters although the
system could satisfy their request.

The fix is to dynamically guarantee counters, based on each VF
specification.

Fixes: 7017fac82c7e ("net/mlx4_core: Adjust counter grant policy in the resource tracker")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c