mlxsw: spectrum_buffers: Add extack messages for invalid configurations
authorIdo Schimmel <idosch@mellanox.com>
Mon, 22 Apr 2019 12:08:41 +0000 (12:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Apr 2019 05:09:32 +0000 (22:09 -0700)
commit8f6862065d8be320ba45a52c8a361b580722fc18
tree4e5c0b3d9ffe913848b0ee2106a80ad5779de637
parentf2ad1a522e9817fba7799008e0a8dc6f8a32bf7d
mlxsw: spectrum_buffers: Add extack messages for invalid configurations

Add extack messages to better communicate invalid configuration to the
user.

Example:

# devlink sb pool set pci/0000:01:00.0 pool 0 size 104857600 thtype dynamic
Error: mlxsw_spectrum: Exceeded shared buffer size.
devlink answers: Invalid argument

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core.c
drivers/net/ethernet/mellanox/mlxsw/core.h
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c