net/mlx4_core: Reduce harmless SRIOV error message to debug level
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Tue, 9 May 2017 11:45:24 +0000 (14:45 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 May 2017 15:22:46 +0000 (11:22 -0400)
commit83bd5118a119cabba47e194bba96641e303aadff
treef0bd6c0d814a9a095f7738f609d5a6d6f37d0acc
parent89c557687a32c294e9d25670a96e9287c09f2d5f
net/mlx4_core: Reduce harmless SRIOV error message to debug level

Under SRIOV resource management, extra counters are allocated to VFs
from a free pool. If that pool is empty, the ALLOC_RES command for
a counter resource fails -- and this generates a misleading error
message in the message log.

Under SRIOV, each VF is allocated (i.e., guaranteed) 2 counters --
one counter per port. For ETH ports, the RoCE driver requests an
additional counter (above the guaranteed counters). If that request
fails, the VF RoCE driver simply uses the default (i.e., guaranteed)
counter for that port.

Thus, failing to allocate an additional counter does not constitute
a  problem, and the error message on the PF when this occurs should
be reduced to debug level.

Finally, to identify the situation that the reason for the failure is
that no resources are available to grant to the VF, we modified the
error returned by mlx4_grant_resource to -EDQUOT (Quota exceeded),
which more accurately describes the error.

Fixes: c3abb51bdb0e ("IB/mlx4: Add RoCE/IB dedicated counters")
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/cmd.c
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c