-
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
Create an OutputPort data type for use in Output actions #5
Comments
So the tradeoff is that we diverge a bit from the structure implied by the We've not been pedantic about adhering to the spec, but on the whole it's and quickly grok what we're doing. -N On Mon, Oct 14, 2013 at 10:53 AM, Spiros Eliopoulos <
|
Certain functions on in the OpenFlow0x01 API expect a pseudoPort but do not handle the Controller variant properly. At some point the code should discriminate on the different input domains at the type level, but until then use this function to test. With this commit the Enqueue case of the Action roundtrip test now works, which was introduced but commented out in fa51a3f. Related to #5.
The informal spec is actually confusing on this matter. I think creating a type distinction is valuable. If you understand the spec, it should be obvious why we have it. If you don't understand the spec, you'll look closely and realize the types make more sense. |
Okay, I'm convinced. -N On Tue, Oct 15, 2013 at 11:00 AM, Arjun Guha [email protected]:
|
Ok sounds good. I gave the refactor a crack and it'd touch some high-level APIs that I'd rather discuss before going ahead and committing. Gonna put this on ice for now. |
Currently the
PseudoPort
data type contains a variant for the special controller port. That constructor takes an integer which is the maximum number of bytes of the packet that should be sent to the controller. The only place where the controllerPseudoPort
should be used is in anOutput
action, and that's also the only place that handles the length parameter properly. That's mentioned in the code here, and is also clear from the OpenFlow standard, § A.2.5 Action Structures, as themax_length
is part of theofp_action_output
struct, not the port representation.PseudoPort
should not include theController
variant. That should be removed, and a new data typeOutputPort
should be introduced which is either aPseudoPort
or a controller with an int parameter. That should only be used in theOutput
action.The comment in fa51a3f is relevant to this issue.
The text was updated successfully, but these errors were encountered: