[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170826063539.2741-3-jiri@resnulli.us>
Date: Sat, 26 Aug 2017 08:35:39 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, arkadis@...lanox.com, idosch@...lanox.com,
mlxsw@...lanox.com
Subject: [patch net-next 2/2] mlxsw: spectrum_dpipe: Fix host table dump
From: Arkadi Sharshevsky <arkadis@...lanox.com>
During the neighbor traversal the neighbors from different families
should be ignored.
Fixes: c58035a74aba ("mlxsw: spectrum_dpipe: Add support for IPv4 host table dump")
Signed-off-by: Arkadi Sharshevsky <arkadis@...lanox.com>
Signed-off-by: Jiri Pirko <jiri@...lanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
index 3c8599f..3ea1314 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
@@ -516,6 +516,9 @@ mlxsw_sp_dpipe_table_host_entries_get(struct mlxsw_sp *mlxsw_sp,
rif_neigh_count = 0;
mlxsw_sp_rif_neigh_for_each(neigh_entry, rif) {
+ if (mlxsw_sp_neigh_entry_type(neigh_entry) != type)
+ continue;
+
if (rif_neigh_count < rif_neigh_skip)
goto skip;
--
2.9.3
Powered by blists - more mailing lists