]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:15:59 +0000 (13:15 +0100)
commit96baf617757f85037e3159cb1b1b7dedecae7787
treefde2e7313a4620a6ea03c3c2ac741b20434f9fed
parentf87e841469ae4eae032cb5391dcff2bd11d90300
net/mlx4_core: Dynamically set guaranteed amount of counters per VF

BugLink: https://bugs.launchpad.net/bugs/1853208
[ Upstream commit e19868efea0c103f23b4b7e986fd0a703822111f ]

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: 9de92c60beaa ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c