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

Add PortRange type and support PDR port ranges in BESS-upf #438

Merged
merged 19 commits into from Feb 7, 2022

Conversation

pudelkoM
Copy link
Member

@pudelkoM pudelkoM commented Jan 31, 2022

This PR adds the notion of PortRanges to PDRs in PFCP agent. Those replace the existing <port, mask> combo with a range type that can represent exact matches, some ternary matches and, new, range matches.
At the same time this adds range match emulation to the BESS-upf, by translating ranges into a equivalent set of ternary rules.

Limitations:

  • Only one (1) true port range is allowed per PDR, either src or dest. True range means not wildcard or exact match.

@pudelkoM pudelkoM force-pushed the bess-pdr-port-ranges branch 2 times, most recently from 05ff836 to fec3cd6 Compare February 1, 2022 03:11
@pudelkoM pudelkoM changed the title Support arbitrary port ranges in PDRs in BESS-upf Add PortFilter and support PDR port ranges in BESS-upf Feb 1, 2022
@pudelkoM pudelkoM force-pushed the bess-pdr-port-ranges branch 2 times, most recently from f30eb2b to ca596bb Compare February 1, 2022 21:20
pfcpiface/parse-pdr.go Outdated Show resolved Hide resolved
@pudelkoM pudelkoM force-pushed the bess-pdr-port-ranges branch 2 times, most recently from 4f283dd to 17ce26f Compare February 1, 2022 22:22
@pudelkoM pudelkoM marked this pull request as ready for review February 1, 2022 23:23
Copy link
Contributor

@osinstom osinstom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the heuristic approach and the algorithm to generate ternary masks from a port range.

It seems that PR still needs some polishing - I found undefined or unused methods.

pfcpiface/parse-pdr.go Outdated Show resolved Hide resolved
pfcpiface/bess.go Outdated Show resolved Hide resolved
pfcpiface/bess.go Outdated Show resolved Hide resolved
pfcpiface/p4rt_translator.go Outdated Show resolved Hide resolved
pfcpiface/parse-pdr.go Outdated Show resolved Hide resolved
pfcpiface/parse-sdf.go Outdated Show resolved Hide resolved
pfcpiface/up4.go Outdated Show resolved Hide resolved
pfcpiface/parse-pdr.go Outdated Show resolved Hide resolved
@pudelkoM pudelkoM changed the title Add PortFilter and support PDR port ranges in BESS-upf Add PortRange type and support PDR port ranges in BESS-upf Feb 4, 2022
osinstom
osinstom previously approved these changes Feb 5, 2022
Copy link
Contributor

@osinstom osinstom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please fix the REUSE job and we can merge

pfcpiface/parse-pdr_test.go Show resolved Hide resolved
@pudelkoM pudelkoM merged commit 364259d into master Feb 7, 2022
@pudelkoM pudelkoM deleted the bess-pdr-port-ranges branch February 7, 2022 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants