Skip to content

Commit 70e2c86

Browse files
committed
Merge: [RHEL10.0 P2] selftest: backport stable commits from upstream
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/181 JIRA: https://issues.redhat.com/browse/RHEL-74034 * 0cb06dc selftests: net: rebuild YNL if dependencies changed * 60b4d49 selftests: net: move EXTRA_CLEAN of libynl.a into ynl.mk * a6e263f selftests: net: lib: Introduce deferred commands * b4b0549 selftests: forwarding: Add a fallback cleanup() * 0e07d5d selftests: forwarding: lib: Allow passing PID to stop_traffic() * 7f46615 selftests: RED: Use defer for test cleanup * a1b3741 selftests: TBF: Use defer for test cleanup * cc3e7ee selftests: ETS: Use defer for test cleanup * 81bc949 selftests: tls: add a selftest for wrapping rec_seq * f72aa1b selftests: net: include lib/sh/*.sh with lib.sh * 041bd1e selftests: netfilter: Fix missing return values in conntrack_dump_flush * 663a917 selftests: rds: move test.py to TEST_FILES * a179759 selftests: openvswitch: fix tcpdump execution * 246068b selftests: net: local_termination: require mausezahn Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com> --- <small>Created 2025-01-15 09:52 UTC by backporter - [KWF FAQ](https://red.ht/kernel_workflow_doc) - [Slack #team-kernel-workflow](https://redhat-internal.slack.com/archives/C04LRUPMJQ5) - [Source](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/webhook/utils/backporter.py) - [Documentation](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/docs/README.backporter.md) - [Report an issue](https://gitlab.com/cki-project/kernel-workflow/-/issues/new?issue%5Btitle%5D=backporter%20webhook%20issue)</small> Approved-by: Hangbin Liu <haliu@redhat.com> Approved-by: Florian Westphal <fwestpha@redhat.com> Approved-by: Marcelo Ricardo Leitner <mleitner@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Jan Stancek <jstancek@redhat.com>
2 parents 11b78f9 + 27e046b commit 70e2c86

File tree

25 files changed

+415
-339
lines changed

25 files changed

+415
-339
lines changed

tools/testing/selftests/drivers/net/mlxsw/sch_ets.sh

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ switch_create()
2121
# Create a bottleneck so that the DWRR process can kick in.
2222
tc qdisc replace dev $swp2 root handle 3: tbf rate 1gbit \
2323
burst 128K limit 1G
24+
defer tc qdisc del dev $swp2 root handle 3:
2425

2526
ets_switch_create
2627

@@ -30,37 +31,34 @@ switch_create()
3031
# for the DWRR process.
3132
devlink_port_pool_th_save $swp1 0
3233
devlink_port_pool_th_set $swp1 0 12
34+
defer devlink_port_pool_th_restore $swp1 0
35+
3336
devlink_tc_bind_pool_th_save $swp1 0 ingress
3437
devlink_tc_bind_pool_th_set $swp1 0 ingress 0 12
38+
defer devlink_tc_bind_pool_th_restore $swp1 0 ingress
39+
3540
devlink_port_pool_th_save $swp2 4
3641
devlink_port_pool_th_set $swp2 4 12
42+
defer devlink_port_pool_th_restore $swp2 4
43+
3744
devlink_tc_bind_pool_th_save $swp2 7 egress
3845
devlink_tc_bind_pool_th_set $swp2 7 egress 4 5
46+
defer devlink_tc_bind_pool_th_restore $swp2 7 egress
47+
3948
devlink_tc_bind_pool_th_save $swp2 6 egress
4049
devlink_tc_bind_pool_th_set $swp2 6 egress 4 5
50+
defer devlink_tc_bind_pool_th_restore $swp2 6 egress
51+
4152
devlink_tc_bind_pool_th_save $swp2 5 egress
4253
devlink_tc_bind_pool_th_set $swp2 5 egress 4 5
54+
defer devlink_tc_bind_pool_th_restore $swp2 5 egress
4355

4456
# Note: sch_ets_core.sh uses VLAN ingress-qos-map to assign packet
4557
# priorities at $swp1 based on their 802.1p headers. ingress-qos-map is
4658
# not offloaded by mlxsw as of this writing, but the mapping used is
4759
# 1:1, which is the mapping currently hard-coded by the driver.
4860
}
4961

50-
switch_destroy()
51-
{
52-
devlink_tc_bind_pool_th_restore $swp2 5 egress
53-
devlink_tc_bind_pool_th_restore $swp2 6 egress
54-
devlink_tc_bind_pool_th_restore $swp2 7 egress
55-
devlink_port_pool_th_restore $swp2 4
56-
devlink_tc_bind_pool_th_restore $swp1 0 ingress
57-
devlink_port_pool_th_restore $swp1 0
58-
59-
ets_switch_destroy
60-
61-
tc qdisc del dev $swp2 root handle 3:
62-
}
63-
6462
# Callback from sch_ets_tests.sh
6563
collect_stats()
6664
{

0 commit comments

Comments
 (0)