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

Ordered ACL output actions #3476

Merged
merged 8 commits into from
Mar 16, 2020
Merged

Ordered ACL output actions #3476

merged 8 commits into from
Mar 16, 2020

Conversation

mab68
Copy link
Contributor

@mab68 mab68 commented Feb 26, 2020

Allow ordered ACL output actions as mentioned in #3468 (Closes #3468).

acls:
    ordered_acl:
        - rule:
            dl_vlan: 100
            actions:
                output:
                    - port: 2
                    - pop_vlans: 1
                    - port: 3

Fix #3389

Allow defining a tunnel without requiring a VLAN, Faucet will pick an unused VID that is larger than the configured VIDs (Closes #3314).
e.g.: The following config will create a tunnel that will be encapsulated with VID 101

vlans:
  vlans:
    vlan100:
      vid: 100
acls:
  tunnel-to-host1:
    - rule:
      actions:
      output:
        tunnel:
          dp: sw1
          port: 1

Tunnel ACLs will pop off the encapsulation after the output action so rules can now be applied after a tunnel action. e.g.: The output to port 6 will not have the tunnel VID applied

acls:
  tunnel_acl:
    - rule:
      ip_proto: 1
      dl_type: 0x0800
      actions:
        output:
          - port: 5
          - tunnel: {dp: sw2, port: 1}
          - port: 6

@codecov
Copy link

codecov bot commented Feb 26, 2020

Codecov Report

Merging #3476 into master will decrease coverage by 0.13%.
The diff coverage is 92.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3476      +/-   ##
==========================================
- Coverage   92.49%   92.36%   -0.13%     
==========================================
  Files          42       42              
  Lines        7878     8061     +183     
==========================================
+ Hits         7286     7445     +159     
- Misses        592      616      +24     
Impacted Files Coverage Δ
faucet/port.py 94.46% <11.11%> (-2.37%) ⬇️
faucet/dp.py 95.70% <84.48%> (-0.80%) ⬇️
faucet/valve_acl.py 95.05% <95.92%> (-0.64%) ⬇️
faucet/acl.py 97.57% <97.73%> (-0.19%) ⬇️
faucet/valve.py 94.00% <100.00%> (+0.12%) ⬆️
faucet/valve_of.py 95.71% <0.00%> (-0.31%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b73ec09...6781b29. Read the comment docs.

@mab68 mab68 force-pushed the orderedacl1 branch 5 times, most recently from 396bcb4 to 9324425 Compare March 6, 2020 06:54
@mab68 mab68 changed the title WIP: Ordered ACL output actions Ordered ACL output actions Mar 7, 2020
@anarkiwi
Copy link
Member

anarkiwi commented Mar 9, 2020

Looking into the test failures now - looks like config change detection problems revealed by my refactoring.

@anarkiwi
Copy link
Member

anarkiwi commented Mar 9, 2020

Will fix - sorry for the inconvenience.

@anarkiwi
Copy link
Member

Should be all sorted now. The FaucetUntaggedPortSwapIPv4InterVLANRouteTest flake is fixed by #3487

@mab68
Copy link
Contributor Author

mab68 commented Mar 16, 2020

This is all sorted on my part too.

@gizmoguy
Copy link
Member

LGTM now 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants