]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: forwarding: devlink_lib: Split devlink_..._set() into save & set
authorPetr Machata <petrm@nvidia.com>
Wed, 30 Sep 2020 10:49:07 +0000 (12:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Sep 2020 21:06:54 +0000 (14:06 -0700)
commita784d53909110c1d3b9ecb2620c73f80f135f9f6
treee8c0d47d50569cce45e77da4c6b02dbac5f9f03b
parent3fbd451c707ea6c950142f131d2e31bb652c2ba4
selftests: forwarding: devlink_lib: Split devlink_..._set() into save & set

Changing pool type from static to dynamic causes reinterpretation of
threshold values. They therefore need to be saved before pool type is
changed, then the pool type can be changed, and then the new values need
to be set up.

For that reason, set cannot subsume save, because it would be saving the
wrong thing, with possibly a nonsensical value, and restore would then fail
to restore the nonsensical value.

Thus extract a _save() from each of the relevant _set()'s. This way it is
possible to save everything up front, then to tweak it, and then restore in
the required order.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/drivers/net/mlxsw/qos_ets_strict.sh
tools/testing/selftests/drivers/net/mlxsw/qos_mc_aware.sh
tools/testing/selftests/drivers/net/mlxsw/sch_ets.sh
tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh
tools/testing/selftests/net/forwarding/devlink_lib.sh