A controller , comprising: an interface circuit that, during operation, communicates with one or more access points; a processor coupled to the interface circuit; and memory , coupled to the processor, which stores program instructions which, when executed by the processor, cause the controller to process packets in a virtual dataplane with one or more virtual machines , and wherein a given virtual machine is configured to perform the operations of: pre-calculating processing parameters for packets in a data flow, wherein the pre-calculated processing parameters specify modifications to packets in the data flow for use in subsequent processing of the packets in the data flow; storing the pre-calculated processing parameters in the memory; receiving a given packet in the data flow on an input port; processing the given packet by accessing the stored pre-calculated processing parameters based on information associated with the data flow, wherein processing the given packet involves modifying information in a header of the given packet based on one or more of the pre-calculated processing parameters; and after the processing, transmitting the given packet on an output port, wherein the given virtual machine maintains a fixed inter-packet time between packets in the data flow, wherein the inter-packet time between the packets at the input port equals the inter-packet time between the packets at the output port. an interface circuit that, during operation, communicates with one or more access points; a processor coupled to the interface circuit; and memory , coupled to the processor, which stores program instructions which, when executed by the processor, cause the controller to process packets in a virtual dataplane with one or more virtual machines , and wherein a given virtual machine is configured to perform the operations of: pre-calculating processing parameters for packets in a data flow, wherein the pre-calculated processing parameters specify modifications to packets in the data flow for use in subsequent processing of the packets in the data flow; storing the pre-calculated processing parameters in the memory; receiving a given packet in the data flow on an input port; processing the given packet by accessing the stored pre-calculated processing parameters based on information associated with the data flow, wherein processing the given packet involves modifying information in a header of the given packet based on one or more of the pre-calculated processing parameters; and after the processing, transmitting the given packet on an output port, wherein the given virtual machine maintains a fixed inter-packet time between packets in the data flow, wherein the inter-packet time between the packets at the input port equals the inter-packet time between the packets at the output port. pre-calculating processing parameters for packets in a data flow, wherein the pre-calculated processing parameters specify modifications to packets in the data flow for use in subsequent processing of the packets in the data flow; storing the pre-calculated processing parameters in the memory; receiving a given packet in the data flow on an input port; processing the given packet by accessing the stored pre-calculated processing parameters based on information associated with the data flow, wherein processing the given packet involves modifying information in a header of the given packet based on one or more of the pre-calculated processing parameters; and after the processing, transmitting the given packet on an output port, wherein the given virtual machine maintains a fixed inter-packet time between packets in the data flow, wherein the inter-packet time between the packets at the input port equals the inter-packet time between the packets at the output port. <EOS>