* [PATCH net 0/2] mlxsw: Various fixes
@ 2021-01-28 14:48 Ido Schimmel
2021-01-28 14:48 ` [PATCH net 1/2] selftests: forwarding: Specify interface when invoking mausezahn Ido Schimmel
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Ido Schimmel @ 2021-01-28 14:48 UTC (permalink / raw)
To: netdev; +Cc: davem, kuba, jiri, danieller, mlxsw, Ido Schimmel
From: Ido Schimmel <idosch@nvidia.com>
Patch #1 fixes wrong invocation of mausezahn in a couple of selftests.
The tests started failing after Fedora updated their libnet package from
version 1.1.6 to 1.2.1. With the fix the tests pass regardless of libnet
version.
Patch #2 fixes an issue in the mirroring to CPU code that results in
policer configuration being overwritten.
Danielle Ratson (1):
selftests: forwarding: Specify interface when invoking mausezahn
Ido Schimmel (1):
mlxsw: spectrum_span: Do not overwrite policer configuration
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c | 6 ++++++
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h | 1 +
tools/testing/selftests/net/forwarding/router_mpath_nh.sh | 2 +-
tools/testing/selftests/net/forwarding/router_multipath.sh | 2 +-
4 files changed, 9 insertions(+), 2 deletions(-)
--
2.29.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH net 1/2] selftests: forwarding: Specify interface when invoking mausezahn
2021-01-28 14:48 [PATCH net 0/2] mlxsw: Various fixes Ido Schimmel
@ 2021-01-28 14:48 ` Ido Schimmel
2021-01-28 14:48 ` [PATCH net 2/2] mlxsw: spectrum_span: Do not overwrite policer configuration Ido Schimmel
2021-01-28 21:20 ` [PATCH net 0/2] mlxsw: Various fixes patchwork-bot+netdevbpf
2 siblings, 0 replies; 10+ messages in thread
From: Ido Schimmel @ 2021-01-28 14:48 UTC (permalink / raw)
To: netdev; +Cc: davem, kuba, jiri, danieller, mlxsw, Ido Schimmel
From: Danielle Ratson <danieller@nvidia.com>
Specify the interface through which packets should be transmitted so
that the test will pass regardless of the libnet version against which
mausezahn is linked.
Fixes: cab14d1087d9 ("selftests: Add version of router_multipath.sh using nexthop objects")
Fixes: 3d578d879517 ("selftests: forwarding: Test IPv4 weighted nexthops")
Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
tools/testing/selftests/net/forwarding/router_mpath_nh.sh | 2 +-
tools/testing/selftests/net/forwarding/router_multipath.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/router_mpath_nh.sh b/tools/testing/selftests/net/forwarding/router_mpath_nh.sh
index 388e4492b81b..76efb1f8375e 100755
--- a/tools/testing/selftests/net/forwarding/router_mpath_nh.sh
+++ b/tools/testing/selftests/net/forwarding/router_mpath_nh.sh
@@ -203,7 +203,7 @@ multipath4_test()
t0_rp12=$(link_stats_tx_packets_get $rp12)
t0_rp13=$(link_stats_tx_packets_get $rp13)
- ip vrf exec vrf-h1 $MZ -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \
+ ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \
-d 1msec -t udp "sp=1024,dp=0-32768"
t1_rp12=$(link_stats_tx_packets_get $rp12)
diff --git a/tools/testing/selftests/net/forwarding/router_multipath.sh b/tools/testing/selftests/net/forwarding/router_multipath.sh
index 79a209927962..464821c587a5 100755
--- a/tools/testing/selftests/net/forwarding/router_multipath.sh
+++ b/tools/testing/selftests/net/forwarding/router_multipath.sh
@@ -178,7 +178,7 @@ multipath4_test()
t0_rp12=$(link_stats_tx_packets_get $rp12)
t0_rp13=$(link_stats_tx_packets_get $rp13)
- ip vrf exec vrf-h1 $MZ -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \
+ ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \
-d 1msec -t udp "sp=1024,dp=0-32768"
t1_rp12=$(link_stats_tx_packets_get $rp12)
--
2.29.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH net 2/2] mlxsw: spectrum_span: Do not overwrite policer configuration
2021-01-28 14:48 [PATCH net 0/2] mlxsw: Various fixes Ido Schimmel
2021-01-28 14:48 ` [PATCH net 1/2] selftests: forwarding: Specify interface when invoking mausezahn Ido Schimmel
@ 2021-01-28 14:48 ` Ido Schimmel
2021-01-28 21:20 ` [PATCH net 0/2] mlxsw: Various fixes patchwork-bot+netdevbpf
2 siblings, 0 replies; 10+ messages in thread
From: Ido Schimmel @ 2021-01-28 14:48 UTC (permalink / raw)
To: netdev; +Cc: davem, kuba, jiri, danieller, mlxsw, Ido Schimmel
From: Ido Schimmel <idosch@nvidia.com>
The purpose of the delayed work in the SPAN module is to potentially
update the destination port and various encapsulation parameters of SPAN
agents that point to a VLAN device or a GRE tap. The destination port
can change following the insertion of a new route, for example.
SPAN agents that point to a physical port or the CPU port are static and
never change throughout the lifetime of the SPAN agent. Therefore, skip
over them in the delayed work.
This fixes an issue where the delayed work overwrites the policer
that was set on a SPAN agent pointing to the CPU. Modifying the delayed
work to inherit the original policer configuration is error-prone, as
the same will be needed for any new parameter.
Fixes: 4039504e6a0c ("mlxsw: spectrum_span: Allow setting policer on a SPAN agent")
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c | 6 ++++++
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
index c6c5826aba41..1892cea05ee7 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
@@ -157,6 +157,7 @@ mlxsw_sp1_span_entry_cpu_deconfigure(struct mlxsw_sp_span_entry *span_entry)
static const
struct mlxsw_sp_span_entry_ops mlxsw_sp1_span_entry_ops_cpu = {
+ .is_static = true,
.can_handle = mlxsw_sp1_span_cpu_can_handle,
.parms_set = mlxsw_sp1_span_entry_cpu_parms,
.configure = mlxsw_sp1_span_entry_cpu_configure,
@@ -214,6 +215,7 @@ mlxsw_sp_span_entry_phys_deconfigure(struct mlxsw_sp_span_entry *span_entry)
static const
struct mlxsw_sp_span_entry_ops mlxsw_sp_span_entry_ops_phys = {
+ .is_static = true,
.can_handle = mlxsw_sp_port_dev_check,
.parms_set = mlxsw_sp_span_entry_phys_parms,
.configure = mlxsw_sp_span_entry_phys_configure,
@@ -721,6 +723,7 @@ mlxsw_sp2_span_entry_cpu_deconfigure(struct mlxsw_sp_span_entry *span_entry)
static const
struct mlxsw_sp_span_entry_ops mlxsw_sp2_span_entry_ops_cpu = {
+ .is_static = true,
.can_handle = mlxsw_sp2_span_cpu_can_handle,
.parms_set = mlxsw_sp2_span_entry_cpu_parms,
.configure = mlxsw_sp2_span_entry_cpu_configure,
@@ -1036,6 +1039,9 @@ static void mlxsw_sp_span_respin_work(struct work_struct *work)
if (!refcount_read(&curr->ref_count))
continue;
+ if (curr->ops->is_static)
+ continue;
+
err = curr->ops->parms_set(mlxsw_sp, curr->to_dev, &sparms);
if (err)
continue;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h
index d907718bc8c5..aa1cd409c0e2 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h
@@ -60,6 +60,7 @@ struct mlxsw_sp_span_entry {
};
struct mlxsw_sp_span_entry_ops {
+ bool is_static;
bool (*can_handle)(const struct net_device *to_dev);
int (*parms_set)(struct mlxsw_sp *mlxsw_sp,
const struct net_device *to_dev,
--
2.29.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH net 0/2] mlxsw: Various fixes
2021-01-28 14:48 [PATCH net 0/2] mlxsw: Various fixes Ido Schimmel
2021-01-28 14:48 ` [PATCH net 1/2] selftests: forwarding: Specify interface when invoking mausezahn Ido Schimmel
2021-01-28 14:48 ` [PATCH net 2/2] mlxsw: spectrum_span: Do not overwrite policer configuration Ido Schimmel
@ 2021-01-28 21:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 10+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-01-28 21:20 UTC (permalink / raw)
To: Ido Schimmel; +Cc: netdev, davem, kuba, jiri, danieller, mlxsw, idosch
Hello:
This series was applied to netdev/net.git (refs/heads/master):
On Thu, 28 Jan 2021 16:48:18 +0200 you wrote:
> From: Ido Schimmel <idosch@nvidia.com>
>
> Patch #1 fixes wrong invocation of mausezahn in a couple of selftests.
> The tests started failing after Fedora updated their libnet package from
> version 1.1.6 to 1.2.1. With the fix the tests pass regardless of libnet
> version.
>
> [...]
Here is the summary with links:
- [net,1/2] selftests: forwarding: Specify interface when invoking mausezahn
https://git.kernel.org/netdev/net/c/11df27f7fdf0
- [net,2/2] mlxsw: spectrum_span: Do not overwrite policer configuration
https://git.kernel.org/netdev/net/c/b6f6881aaf23
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH net 0/2] mlxsw: Various fixes
@ 2020-07-10 13:41 Ido Schimmel
2020-07-10 21:34 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: Ido Schimmel @ 2020-07-10 13:41 UTC (permalink / raw)
To: netdev; +Cc: davem, kuba, jiri, mlxsw, Ido Schimmel
From: Ido Schimmel <idosch@mellanox.com>
Fix two issues found by syzkaller.
Patch #1 removes inappropriate usage of WARN_ON() following memory
allocation failure. Constantly triggered when syzkaller injects faults.
Patch #2 fixes a use-after-free that can be triggered by 'devlink dev
info' following a failed devlink reload.
Ido Schimmel (2):
mlxsw: spectrum_router: Remove inappropriate usage of WARN_ON()
mlxsw: pci: Fix use-after-free in case of failed devlink reload
drivers/net/ethernet/mellanox/mlxsw/pci.c | 54 +++++++++++++------
.../ethernet/mellanox/mlxsw/spectrum_router.c | 2 +-
2 files changed, 39 insertions(+), 17 deletions(-)
--
2.26.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net 0/2] mlxsw: Various fixes
2020-07-10 13:41 Ido Schimmel
@ 2020-07-10 21:34 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2020-07-10 21:34 UTC (permalink / raw)
To: idosch; +Cc: netdev, kuba, jiri, mlxsw, idosch
From: Ido Schimmel <idosch@idosch.org>
Date: Fri, 10 Jul 2020 16:41:37 +0300
> From: Ido Schimmel <idosch@mellanox.com>
>
> Fix two issues found by syzkaller.
>
> Patch #1 removes inappropriate usage of WARN_ON() following memory
> allocation failure. Constantly triggered when syzkaller injects faults.
>
> Patch #2 fixes a use-after-free that can be triggered by 'devlink dev
> info' following a failed devlink reload.
Series applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH net 0/2] mlxsw: Various fixes
@ 2020-05-21 12:11 Ido Schimmel
2020-05-22 23:08 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: Ido Schimmel @ 2020-05-21 12:11 UTC (permalink / raw)
To: netdev; +Cc: davem, kuba, jiri, mlxsw, Ido Schimmel
From: Ido Schimmel <idosch@mellanox.com>
Patch #1 from Jiri fixes a use-after-free discovered while fuzzing mlxsw
/ devlink with syzkaller.
Patch #2 from Amit works around a limitation in new versions of arping,
which is used in several selftests.
Amit Cohen (1):
selftests: mlxsw: qos_mc_aware: Specify arping timeout as an integer
Jiri Pirko (1):
mlxsw: spectrum: Fix use-after-free of split/unsplit/type_set in case
reload fails
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 14 ++++++++++++--
drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 8 ++++++++
.../selftests/drivers/net/mlxsw/qos_mc_aware.sh | 2 +-
3 files changed, 21 insertions(+), 3 deletions(-)
--
2.26.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net 0/2] mlxsw: Various fixes
2020-05-21 12:11 Ido Schimmel
@ 2020-05-22 23:08 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2020-05-22 23:08 UTC (permalink / raw)
To: idosch; +Cc: netdev, kuba, jiri, mlxsw, idosch
From: Ido Schimmel <idosch@idosch.org>
Date: Thu, 21 May 2020 15:11:43 +0300
> From: Ido Schimmel <idosch@mellanox.com>
>
> Patch #1 from Jiri fixes a use-after-free discovered while fuzzing mlxsw
> / devlink with syzkaller.
>
> Patch #2 from Amit works around a limitation in new versions of arping,
> which is used in several selftests.
Series applied, thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH net 0/2] mlxsw: Various fixes
@ 2019-03-12 8:40 Ido Schimmel
2019-03-12 21:55 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: Ido Schimmel @ 2019-03-12 8:40 UTC (permalink / raw)
To: netdev; +Cc: davem, Jiri Pirko, mlxsw, Vadim Pasternak, Ido Schimmel
Patch #1 fixes the recently introduced QSFP thermal zones to correctly
work with split ports, where several ports are mapped to the same
module.
Patch #2 initializes the base MAC in the minimal driver. The driver is
using the base MAC as its parent ID and without initializing it, it is
reported as all zeroes to user space.
Jiri Pirko (1):
mlxsw: minimal: Initialize base_mac
Vadim Pasternak (1):
mlxsw: core: Prevent duplication during QSFP module initialization
.../ethernet/mellanox/mlxsw/core_thermal.c | 21 ++++++++++---------
drivers/net/ethernet/mellanox/mlxsw/minimal.c | 18 ++++++++++++++++
2 files changed, 29 insertions(+), 10 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net 0/2] mlxsw: Various fixes
2019-03-12 8:40 Ido Schimmel
@ 2019-03-12 21:55 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2019-03-12 21:55 UTC (permalink / raw)
To: idosch; +Cc: netdev, jiri, mlxsw, vadimp
From: Ido Schimmel <idosch@mellanox.com>
Date: Tue, 12 Mar 2019 08:40:40 +0000
> Patch #1 fixes the recently introduced QSFP thermal zones to correctly
> work with split ports, where several ports are mapped to the same
> module.
>
> Patch #2 initializes the base MAC in the minimal driver. The driver is
> using the base MAC as its parent ID and without initializing it, it is
> reported as all zeroes to user space.
Applied, thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-01-28 21:21 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 14:48 [PATCH net 0/2] mlxsw: Various fixes Ido Schimmel
2021-01-28 14:48 ` [PATCH net 1/2] selftests: forwarding: Specify interface when invoking mausezahn Ido Schimmel
2021-01-28 14:48 ` [PATCH net 2/2] mlxsw: spectrum_span: Do not overwrite policer configuration Ido Schimmel
2021-01-28 21:20 ` [PATCH net 0/2] mlxsw: Various fixes patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2020-07-10 13:41 Ido Schimmel
2020-07-10 21:34 ` David Miller
2020-05-21 12:11 Ido Schimmel
2020-05-22 23:08 ` David Miller
2019-03-12 8:40 Ido Schimmel
2019-03-12 21:55 ` 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).