Processing packets by a network device
AssigneeJuniper Networks, Inc.
InventorsDennis C. Ferguson, Rajiv Patel, Gerald Cheung, Pradeep S. Sindhu
Life of this patent
Estimating the term…
Abstract
A method and apparatus for performing a lookup in a switching device of a packet switched network where the lookup includes a plurality of distinct operations each of which returns a result that includes a pointer to a next operation in a sequence of operations for the lookup. The method includes determining a first lookup operation to be executed, executing the first lookup operation including returning a result and determining if the result includes a pointer to another lookup operation in the sequence of operations. If the result includes a pointer to another lookup operation, the lookup operation indicated by the result is executed. Else, the lookup is terminated.
Claims19
A method comprising:
- receiving, by a network device, a packet;
- processing, by the network device, the packet to identify a next hop associated with processing the packet,
- the packet being processed based on information included in the packet,
- the next hop including:
- an address pointer, to a memory of the network device, that identifies a lookup operation,
- information identifying a destination of the packet, or
- an address pointer, to the memory, that identifies one or more functions;
- performing, by the network device, the lookup operation when the next hop includes the address pointer, to the memory of the network device, that identifies the lookup operation;
- forwarding, by the network device, the packet toward the destination of the packet when the next hop includes the information identifying the destination;
- and
- when the next hop includes the address pointer, to the memory, that identifies the one or more functions:
- executing the one or more functions to obtain a result, and
- forwarding the packet toward the destination of the packet based on the result, executing the one or more functions including:
- executing a function to modify a data rate of a flow associated with the packet.
A network device comprising:
- a memory to store instructions;
- and
- a processor to execute the instructions to:
- process a packet,
- identify a next hop associated with processing the packet,
- the next hop being identified based on a header of the packet,
- when the next hop includes an address pointer, to the memory, that identifies a lookup operation:
- perform the lookup operation, and
- forward, based on performing the lookup operation, the packet toward a destination of the packet,
- when the next hop includes an address pointer, to the memory, that identifies one or more functions:
- execute the one or more functions to obtain a result, and
- forward the packet toward the destination of the packet based on the result,
- when executing the one or more functions, the processor is to:
- execute a first function to count a quantity of bits of a flow associated with the packet, and at least one of:
- execute a second function to forward a copy of the packet to a network destination, or execute a third function to determine a data rate of the flow associated with the packet,
- the processor forwarding the packet toward the destination of the packet when the next hop includes information identifying the destination of the packet.
A non-transitory computer readable medium storing instructions, the instructions comprising:
- a plurality of instructions which, when executed by a processor, cause the processor to:
- process a packet;
- identify a next hop associated with processing the packet,
- the next hop being identified based on a header of the packet;
- determine a type of the next hop;
- forward the packet toward a destination of the packet when the next hop corresponds to a first type of next hop that includes information identifying the destination;
- perform a lookup operation to identify another next hop when the next hop corresponds to a second type of next hop that includes an address pointer, to the memory, that identifies the lookup operation,
- the second type of next hop being different than the first type of next hop;
- forward the packet toward the destination of the packet based on performing the lookup operation;
- execute one or more functions to obtain a result when the next hop corresponds to a third type of next hop that includes an address pointer, to the memory, that identifies the one or more functions,
- the third type of next hop being different than the first type of next hop and the second type of next hop;
- and
- forward the packet toward the destination of the packet based the result when the result is obtained.
Dependencies are inferred from the claim text.