]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_switchdev: Check success of FDB add operation
authorShalom Toledo <shalomt@mellanox.com>
Thu, 1 Mar 2018 10:37:05 +0000 (11:37 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 Mar 2018 23:12:44 +0000 (18:12 -0500)
commit69e57372c479786a48d436ccd1d9199bad30c157
tree5c5782c8c5f7692c3609ce30f371e6fc43822eb5
parent860c9f16ec44f1f2dc4f333ce99ae0df795d026f
mlxsw: spectrum_switchdev: Check success of FDB add operation

Until now, we assumed that in case of error when adding FDB entries, the
write operation will fail, but this is not the case. Instead, we need to
check that the number of entries reported in the response is equal to
the number of entries specified in the request.

Fixes: 91747a7223b2 ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
Reported-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Shalom Toledo <shalomt@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c