]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0c795be48a86941fc574eabac75ff79fffbdc039
tree68f577e1164bbf95a81be7bcb7497a0de4e06acd
parente4c67243abd5acd9ad5ae8f4eb0c92c934f66e6a
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