| CPC H04L 45/7453 (2013.01) [G06F 9/30036 (2013.01); G06F 9/30038 (2023.08); G06F 13/20 (2013.01); G06F 13/4282 (2013.01); H04L 49/90 (2013.01); G06F 2213/0026 (2013.01)] | 28 Claims |

|
1. A Network Interface Controller (NIC) configured to execute instructions that cause the NIC to perform operations to establish a forwarding state for a data flow in a provided datapath, the operations comprising:
receiving a packet from the data flow that is not installed in a flow table of the datapath;
allocating a flow queue for the data flow;
processing the packet, by a processor of the NIC, to determine a flow entry for the data flow;
installing, by the processor of the NIC, the flow entry for the data flow in the flow table, wherein the flow entry is set to a queueing state;
queueing, while processing the packet by the processor of the NIC, any subsequently received packets from the data flow to the flow queue until the flow entry is set to the forwarding state;
for each packet queued from the data flow to the flow queue:
incrementing a counter in the flow entry, and
saving a current value of the counter as a packet identifier in each packet;
reinjecting the packet into the datapath, comprising providing an indication to a flow-miss program, wherein the flow-miss program determines miss events for received packets and routes the received packets based on the respective miss event, and wherein the indication comprises a truncated copy of the packet;
dequeuing the flow queue to reinject each of the subsequently received packets into the datapath, wherein the flow queue comprises a ring buffer;
forwarding the packet and each of the subsequently received packets to a port associated with the data flow, wherein the subsequently received packets that are reinjected into the datapath comprise a packet descriptor to indicate at least one of (i) a first packet in the ring buffer; or (ii) a last packet in the ring buffer; and
upon determining a counter match where the counter in the flow entry matches with a packet identifier within the packet or one of the subsequently received packets, updating the flow entry to the forwarding state.
|