Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T6796: QoS: match filter by interface(iif) #4188

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

HollyGurza
Copy link
Contributor

@HollyGurza HollyGurza commented Nov 12, 2024

Change Summary

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

Proposed changes

How to test

create simple config e.g.:

conf
set qos interface eth1 ingress 'test'
set qos policy limiter test class 10 bandwidth '100mbit'
set qos policy limiter test class 10 match test_match interface 'eth2'
set qos policy limiter test default bandwidth '100gbit'
commit

check tc filters:

vyos@vyos# tc -d filter show dev eth1 ingress
filter parent ffff: protocol all pref 20 basic chain 0 
filter parent ffff: protocol all pref 20 basic chain 0 handle 0x1 flowid ffff:a 
  meta(rt_iif eq 4)

        action order 1:  police 0x1 rate 100Mbit burst 15337b mtu 2Kb action drop overhead 0b linklayer ethernet 
        ref 1 bind 1 

filter parent ffff: protocol all pref 255 basic chain 0 
filter parent ffff: protocol all pref 255 basic chain 0 handle 0x1 flowid ffff:b 
        action order 1:  police 0x2 rate 100Gbit burst 0b mtu 2Kb action drop overhead 0b linklayer ethernet 
        ref 1 bind 1 

Smoketest result

vyos@vyos:~$ python3 /usr/libexec/vyos/tests/smoke/cli/test_qos.py 
test_01_cake (__main__.TestQoS.test_01_cake) ... ok
test_02_drop_tail (__main__.TestQoS.test_02_drop_tail) ... ok
test_03_fair_queue (__main__.TestQoS.test_03_fair_queue) ... ok
test_04_fq_codel (__main__.TestQoS.test_04_fq_codel) ... ok
test_05_limiter (__main__.TestQoS.test_05_limiter) ... ok
test_06_network_emulator (__main__.TestQoS.test_06_network_emulator) ... ok
test_07_priority_queue (__main__.TestQoS.test_07_priority_queue) ... ok
test_08_random_detect (__main__.TestQoS.test_08_random_detect) ... ok
test_09_rate_control (__main__.TestQoS.test_09_rate_control) ... ok
test_10_round_robin (__main__.TestQoS.test_10_round_robin) ... ok
test_11_shaper (__main__.TestQoS.test_11_shaper) ... ok
test_12_shaper_with_red_queue (__main__.TestQoS.test_12_shaper_with_red_queue) ... ok
test_13_shaper_delete_only_rule (__main__.TestQoS.test_13_shaper_delete_only_rule) ... ok
test_14_policy_limiter_marked_traffic (__main__.TestQoS.test_14_policy_limiter_marked_traffic) ... ok
test_15_traffic_match_group (__main__.TestQoS.test_15_traffic_match_group) ... ok
test_16_wrong_traffic_match_group (__main__.TestQoS.test_16_wrong_traffic_match_group) ... ok
test_20_round_robin_policy_default (__main__.TestQoS.test_20_round_robin_policy_default) ... ok
test_22_policy_limiter_iif_filter (__main__.TestQoS.test_22_policy_limiter_iif_filter) ... ok

----------------------------------------------------------------------
Ran 18 tests in 82.469s

OK

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Copy link

github-actions bot commented Nov 12, 2024

👍
No issues in PR Title / Commit Title

@c-po
Copy link
Member

c-po commented Nov 15, 2024

How to ensure iifindex does not change for dynamic interfaces (e.g. PPPoE)?

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@HollyGurza
Copy link
Contributor Author

HollyGurza commented Nov 18, 2024

How to ensure iifindex does not change for dynamic interfaces (e.g. PPPoE)?

hm, I think we can't guarantee it. 
In some cases, iproue2 remembers the interface index based on the RTM_NEWLINK and RTM_DELLINK events, but probably this may not be enough.

Also, it seems that the interface filter worked only in Vyatta or my test is not correct, see details in the task comment.

Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

@sever-sever
Copy link
Member

This branch has conflicts that must be resolved

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests (no interfaces) ❌ failed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

@sever-sever sever-sever merged commit b51cf40 into vyos:current Nov 21, 2024
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants