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>
This commit is contained in:
commit
924b171c29
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue