Skip to content

Commit 924b171

Browse files
committed
Merge branch 'mlxsw-various-fixes'
Ido Schimmel says: ==================== mlxsw: Various fixes 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. ==================== Link: https://lore.kernel.org/r/20210128144820.3280295-1-idosch@idosch.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 7cfc448 + b6f6881 commit 924b171

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ mlxsw_sp1_span_entry_cpu_deconfigure(struct mlxsw_sp_span_entry *span_entry)
157157

158158
static const
159159
struct mlxsw_sp_span_entry_ops mlxsw_sp1_span_entry_ops_cpu = {
160+
.is_static = true,
160161
.can_handle = mlxsw_sp1_span_cpu_can_handle,
161162
.parms_set = mlxsw_sp1_span_entry_cpu_parms,
162163
.configure = mlxsw_sp1_span_entry_cpu_configure,
@@ -214,6 +215,7 @@ mlxsw_sp_span_entry_phys_deconfigure(struct mlxsw_sp_span_entry *span_entry)
214215

215216
static const
216217
struct mlxsw_sp_span_entry_ops mlxsw_sp_span_entry_ops_phys = {
218+
.is_static = true,
217219
.can_handle = mlxsw_sp_port_dev_check,
218220
.parms_set = mlxsw_sp_span_entry_phys_parms,
219221
.configure = mlxsw_sp_span_entry_phys_configure,
@@ -721,6 +723,7 @@ mlxsw_sp2_span_entry_cpu_deconfigure(struct mlxsw_sp_span_entry *span_entry)
721723

722724
static const
723725
struct mlxsw_sp_span_entry_ops mlxsw_sp2_span_entry_ops_cpu = {
726+
.is_static = true,
724727
.can_handle = mlxsw_sp2_span_cpu_can_handle,
725728
.parms_set = mlxsw_sp2_span_entry_cpu_parms,
726729
.configure = mlxsw_sp2_span_entry_cpu_configure,
@@ -1036,6 +1039,9 @@ static void mlxsw_sp_span_respin_work(struct work_struct *work)
10361039
if (!refcount_read(&curr->ref_count))
10371040
continue;
10381041

1042+
if (curr->ops->is_static)
1043+
continue;
1044+
10391045
err = curr->ops->parms_set(mlxsw_sp, curr->to_dev, &sparms);
10401046
if (err)
10411047
continue;

drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ struct mlxsw_sp_span_entry {
6060
};
6161

6262
struct mlxsw_sp_span_entry_ops {
63+
bool is_static;
6364
bool (*can_handle)(const struct net_device *to_dev);
6465
int (*parms_set)(struct mlxsw_sp *mlxsw_sp,
6566
const struct net_device *to_dev,

tools/testing/selftests/net/forwarding/router_mpath_nh.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ multipath4_test()
203203
t0_rp12=$(link_stats_tx_packets_get $rp12)
204204
t0_rp13=$(link_stats_tx_packets_get $rp13)
205205

206-
ip vrf exec vrf-h1 $MZ -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \
206+
ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \
207207
-d 1msec -t udp "sp=1024,dp=0-32768"
208208

209209
t1_rp12=$(link_stats_tx_packets_get $rp12)

tools/testing/selftests/net/forwarding/router_multipath.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ multipath4_test()
178178
t0_rp12=$(link_stats_tx_packets_get $rp12)
179179
t0_rp13=$(link_stats_tx_packets_get $rp13)
180180

181-
ip vrf exec vrf-h1 $MZ -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \
181+
ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \
182182
-d 1msec -t udp "sp=1024,dp=0-32768"
183183

184184
t1_rp12=$(link_stats_tx_packets_get $rp12)

0 commit comments

Comments
 (0)