summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-22 08:16:42 +0200
committerGitHub <noreply@github.com>2024-05-22 08:16:42 +0200
commit202c1d15999175e745f762b6c349f458c82857b5 (patch)
tree096463bae7b1d90913a049cca3bcc476c75e7e44 /smoketest
parent412789b6ffff9172bf22d09ab9453849b63cfb40 (diff)
parentbc1c850285a874de7d3a907e012a30fa3fdc24dc (diff)
downloadvyos-1x-202c1d15999175e745f762b6c349f458c82857b5.tar.gz
vyos-1x-202c1d15999175e745f762b6c349f458c82857b5.zip
Merge pull request #3496 from vyos/mergify/bp/sagitta/pr-3494
T6373: QoS Policy Limiter - classes for marked traffic do not work (backport #3494)
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_qos.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_qos.py b/smoketest/scripts/cli/test_qos.py
index bcf5139c7..5977b2f41 100755
--- a/smoketest/scripts/cli/test_qos.py
+++ b/smoketest/scripts/cli/test_qos.py
@@ -738,6 +738,27 @@ class TestQoS(VyOSUnitTestSHIM.TestCase):
self.cli_commit()
self.assertEqual('', cmd(f'tc filter show dev {interface}'))
+ def test_14_policy_limiter_marked_traffic(self):
+ policy_name = 'smoke_test'
+ base_policy_path = ['qos', 'policy', 'limiter', policy_name]
+
+ self.cli_set(['qos', 'interface', self._interfaces[0], 'ingress', policy_name])
+ self.cli_set(base_policy_path + ['class', '100', 'bandwidth', '20gbit'])
+ self.cli_set(base_policy_path + ['class', '100', 'burst', '3760k'])
+ self.cli_set(base_policy_path + ['class', '100', 'match', 'INTERNAL', 'mark', '100'])
+ self.cli_set(base_policy_path + ['class', '100', 'priority', '20'])
+ self.cli_set(base_policy_path + ['default', 'bandwidth', '1gbit'])
+ self.cli_set(base_policy_path + ['default', 'burst', '125000000b'])
+ self.cli_commit()
+
+ tc_filters = cmd(f'tc filter show dev {self._interfaces[0]} ingress')
+ # class 100
+ self.assertIn('filter parent ffff: protocol all pref 20 fw chain 0', tc_filters)
+ self.assertIn('action order 1: police 0x1 rate 20Gbit burst 3847500b mtu 2Kb action drop overhead 0b', tc_filters)
+ # default
+ self.assertIn('filter parent ffff: protocol all pref 255 basic chain 0', tc_filters)
+ self.assertIn('action order 1: police 0x2 rate 1Gbit burst 125000000b mtu 2Kb action drop overhead 0b', tc_filters)
+
if __name__ == '__main__':
unittest.main(verbosity=2)