* [patch net-next 0/2] mlxsw: spectrum: Fix couple of dpipe ipv4 host table bugs
@ 2017-08-26 6:35 Jiri Pirko
2017-08-26 6:35 ` [patch net-next 1/2] mlxsw: spectrum: compile-in dpipe support only if devlink is enabled Jiri Pirko
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jiri Pirko @ 2017-08-26 6:35 UTC (permalink / raw)
To: netdev; +Cc: davem, arkadis, idosch, mlxsw
From: Jiri Pirko <jiri@mellanox.com>
Arkadi Sharshevsky (1):
mlxsw: spectrum_dpipe: Fix host table dump
Jiri Pirko (1):
mlxsw: spectrum: compile-in dpipe support only if devlink is enabled
drivers/net/ethernet/mellanox/mlxsw/Makefile | 3 ++-
drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 3 +++
drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h | 15 +++++++++++++++
3 files changed, 20 insertions(+), 1 deletion(-)
--
2.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread* [patch net-next 1/2] mlxsw: spectrum: compile-in dpipe support only if devlink is enabled
2017-08-26 6:35 [patch net-next 0/2] mlxsw: spectrum: Fix couple of dpipe ipv4 host table bugs Jiri Pirko
@ 2017-08-26 6:35 ` Jiri Pirko
2017-08-26 6:35 ` [patch net-next 2/2] mlxsw: spectrum_dpipe: Fix host table dump Jiri Pirko
2017-08-28 22:41 ` [patch net-next 0/2] mlxsw: spectrum: Fix couple of dpipe ipv4 host table bugs David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2017-08-26 6:35 UTC (permalink / raw)
To: netdev; +Cc: davem, arkadis, idosch, mlxsw
From: Jiri Pirko <jiri@mellanox.com>
Makes no sense to have dpipe compiled in when devlink is not enabled,
because the devlink dpipe registation is noop function. So don't compile
it in. This also fixes missing extern structs errors.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Fixes: a86f030915f2 ("mlxsw: spectrum_dpipe: Add support for IPv4 host table dump")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/Makefile | 3 ++-
drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h | 15 +++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/Makefile b/drivers/net/ethernet/mellanox/mlxsw/Makefile
index 62fc42f..f9956f3 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.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.h
index 7785f9e..c56a3d9 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"
--
2.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* [patch net-next 2/2] mlxsw: spectrum_dpipe: Fix host table dump
2017-08-26 6:35 [patch net-next 0/2] mlxsw: spectrum: Fix couple of dpipe ipv4 host table bugs Jiri Pirko
2017-08-26 6:35 ` [patch net-next 1/2] mlxsw: spectrum: compile-in dpipe support only if devlink is enabled Jiri Pirko
@ 2017-08-26 6:35 ` Jiri Pirko
2017-08-28 22:41 ` [patch net-next 0/2] mlxsw: spectrum: Fix couple of dpipe ipv4 host table bugs David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2017-08-26 6:35 UTC (permalink / raw)
To: netdev; +Cc: davem, arkadis, idosch, mlxsw
From: Arkadi Sharshevsky <arkadis@mellanox.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@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.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
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [patch net-next 0/2] mlxsw: spectrum: Fix couple of dpipe ipv4 host table bugs
2017-08-26 6:35 [patch net-next 0/2] mlxsw: spectrum: Fix couple of dpipe ipv4 host table bugs Jiri Pirko
2017-08-26 6:35 ` [patch net-next 1/2] mlxsw: spectrum: compile-in dpipe support only if devlink is enabled Jiri Pirko
2017-08-26 6:35 ` [patch net-next 2/2] mlxsw: spectrum_dpipe: Fix host table dump Jiri Pirko
@ 2017-08-28 22:41 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-08-28 22:41 UTC (permalink / raw)
To: jiri; +Cc: netdev, arkadis, idosch, mlxsw
From: Jiri Pirko <jiri@resnulli.us>
Date: Sat, 26 Aug 2017 08:35:37 +0200
> From: Jiri Pirko <jiri@mellanox.com>
>
> Arkadi Sharshevsky (1):
> mlxsw: spectrum_dpipe: Fix host table dump
>
> Jiri Pirko (1):
> mlxsw: spectrum: compile-in dpipe support only if devlink is enabled
Series applied, thanks Jiri.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-28 22:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-26 6:35 [patch net-next 0/2] mlxsw: spectrum: Fix couple of dpipe ipv4 host table bugs Jiri Pirko
2017-08-26 6:35 ` [patch net-next 1/2] mlxsw: spectrum: compile-in dpipe support only if devlink is enabled Jiri Pirko
2017-08-26 6:35 ` [patch net-next 2/2] mlxsw: spectrum_dpipe: Fix host table dump Jiri Pirko
2017-08-28 22:41 ` [patch net-next 0/2] mlxsw: spectrum: Fix couple of dpipe ipv4 host table bugs David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).