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 support for IP masks #127

Merged
merged 15 commits into from
Jun 23, 2014
Merged

Add support for IP masks #127

merged 15 commits into from
Jun 23, 2014

Conversation

jnfoster
Copy link
Member

Adds IP masks to OpenFlow patterns. This request should only be merged with an accompanying pull request for Frenetic.

Bryan Cuccioli and others added 7 commits May 2, 2014 11:25
* 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
@jnfoster
Copy link
Member Author

Entangled with frenetic-lang/frenetic#307

@jnfoster
Copy link
Member Author

Travis is failing for reasons that seem to not my fault!

+curl https://s3.amazonaws.com/opam-street/opam-street.tar.gz
+tar xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 26 75.1M   26 20.2M    0     0   863k      0  0:01:29  0:00:23  0:01:06     0
curl: (18) transfer closed with 57635266 bytes remaining to read
gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
The command "bash -ex .travis-ci.sh" exited with 1.

&& 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
Copy link
Collaborator

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Drat. Yes!

jnfoster and others added 8 commits June 18, 2014 17:57
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.
@seliopou
Copy link
Collaborator

This is ready to merge once frenetic-lang/frenetic#307 is ready to merge.

@adferguson
Copy link
Contributor

+100

seliopou added a commit that referenced this pull request Jun 23, 2014
@seliopou seliopou merged commit 1c83d3a into master Jun 23, 2014
@seliopou seliopou deleted the ip-mask branch June 23, 2014 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants