mlxsw: Add extack messages for port_{un, }split failures
authorDavid Ahern <dsahern@gmail.com>
Tue, 5 Jun 2018 15:14:11 +0000 (08:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jun 2018 16:32:38 +0000 (12:32 -0400)
commit3fcc773be62a9c42dc9a5c1108da298fb9f66cfa
tree68f577e1164bbf95a81be7bcb7497a0de4e06acd
parent7fa76d777ec53eeece1546b737a3b93b37639575
mlxsw: Add extack messages for port_{un, }split failures

Return messages in extack for port split/unsplit errors. e.g.,
    $ devlink port split swp1s1 count 4
    Error: mlxsw_spectrum: Port cannot be split further.
    devlink answers: Invalid argument

    $ devlink port unsplit swp4
    Error: mlxsw_spectrum: Port was not split.
    devlink answers: Invalid argument

Signed-off-by: David Ahern <dsahern@gmail.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@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.c