diff options
author | David S. Miller <davem@davemloft.net> | 2017-08-28 15:41:15 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-28 15:41:15 -0700 |
commit | f7423eea52770935e3c36fafe511ef9aa5e0fc6d (patch) | |
tree | ae2185506c426095346e050d13697667947dc828 /drivers | |
parent | ae0078fcf0a5eb3a8623bfb5f988262e0911fdb9 (diff) | |
parent | 18fed7e15d8fd38747819ee8e66c8771e0281226 (diff) |
Merge branch 'mlxsw-dpipe-fixes'
Jiri Pirko says:
====================
mlxsw: spectrum: Fix couple of dpipe ipv4 host table bugs
Arkadi Sharshevsky (1):
mlxsw: spectrum_dpipe: Fix host table dump
Jiri Pirko (1):
mlxsw: spectrum: compile-in dpipe support only if devlink is enabled
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/Makefile | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h | 15 |
3 files changed, 20 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/Makefile b/drivers/net/ethernet/mellanox/mlxsw/Makefile index 62fc42f396bb..f9956f3bc45c 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/Makefile +++ b/drivers/net/ethernet/mellanox/mlxsw/Makefile @@ -16,8 +16,9 @@ mlxsw_spectrum-objs := spectrum.o spectrum_buffers.o \ spectrum_switchdev.o spectrum_router.o \ spectrum_kvdl.o spectrum_acl_tcam.o \ spectrum_acl.o spectrum_flower.o \ - spectrum_cnt.o spectrum_dpipe.o \ + spectrum_cnt.o \ spectrum_fid.o mlxsw_spectrum-$(CONFIG_MLXSW_SPECTRUM_DCB) += spectrum_dcb.o +mlxsw_spectrum-$(CONFIG_NET_DEVLINK) += spectrum_dpipe.o obj-$(CONFIG_MLXSW_MINIMAL) += mlxsw_minimal.o mlxsw_minimal-objs := minimal.o diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c index 3c8599f14bff..3ea13148ed05 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c @@ -516,6 +516,9 @@ start_again: 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; diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h index 7785f9e26a18..c56a3d92a2bb 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h @@ -35,9 +35,24 @@ #ifndef _MLXSW_PIPELINE_H_ #define _MLXSW_PIPELINE_H_ +#if IS_ENABLED(CONFIG_NET_DEVLINK) + int mlxsw_sp_dpipe_init(struct mlxsw_sp *mlxsw_sp); void mlxsw_sp_dpipe_fini(struct mlxsw_sp *mlxsw_sp); +#else + +static inline int mlxsw_sp_dpipe_init(struct mlxsw_sp *mlxsw_sp) +{ + return 0; +} + +static inline void mlxsw_sp_dpipe_fini(struct mlxsw_sp *mlxsw_sp) +{ +} + +#endif + #define MLXSW_SP_DPIPE_TABLE_NAME_ERIF "mlxsw_erif" #define MLXSW_SP_DPIPE_TABLE_NAME_HOST4 "mlxsw_host4" |