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 controller PseudoPort should be used is in an Output 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 the max_length is part of the ofp_action_output struct, not the port representation.
PseudoPort should not include the Controller variant. That should be removed, and a new data type OutputPort should be introduced which is either a PseudoPort or a controller with an int parameter. That should only be used in the Output action.
The comment in fa51a3f is relevant to this issue.
Currently the
PseudoPortdata 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 controllerPseudoPortshould be used is in anOutputaction, 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_lengthis part of theofp_action_outputstruct, not the port representation.PseudoPortshould not include theControllervariant. That should be removed, and a new data typeOutputPortshould be introduced which is either aPseudoPortor a controller with an int parameter. That should only be used in theOutputaction.The comment in fa51a3f is relevant to this issue.