-
Notifications
You must be signed in to change notification settings - Fork 4
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 support for IP masks #127
Conversation
* Regenerate Oasis * Detangle conflicts * Add lattice structure for IP masks Conflicts: _oasis lib/META lib/SDN_OpenFlow0x01.ml lib/SDN_OpenFlow0x04.ml lib/SDN_Types.ml lib/SDN_Types.mli setup.ml
Entangled with frenetic-lang/frenetic#307 |
Travis is failing for reasons that seem to not my fault!
|
&& check (=) p1.dlTyp p2.dlTyp | ||
&& check (=) p1.dlVlan p2.dlVlan | ||
&& check (=) p1.dlVlanPcp p2.dlVlanPcp | ||
&& check (fun x y -> ip_subseteq x y || ip_subseteq y x) p1.nwSrc p2.nwSrc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be ip_subseteq x y && ip_subseteq y x
rather than ip_subseteq x y || ip_subseteq y x
, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drat. Yes!
Move ip mask-related operations to a submodule of Pattern to keep the namespaces organized. In addition, reimplement the operations in terms of the shift operations, which was redundant with the compatible operation. There was also an issue with the meet operation not returning the most exact result. Consider these two masks: 11000000.0.0.0/4 11010000.0.0.0/4 Their meet is 11000000.0.0.0/2, but the previous implementation would have returned 0.0.0.0/0.
Some of the tests that were ifs should have actually been iffs.
Join goes up (least upper bound) and meet goes down (greatest lower bound).
Was more or less implemented as less_eq.
This is ready to merge once frenetic-lang/frenetic#307 is ready to merge. |
+100 |
Adds IP masks to OpenFlow patterns. This request should only be merged with an accompanying pull request for Frenetic.