Method and apparatus for classifying a network protocol and aligning a network protocol header relative to cache line boundary
First Claim
1. An apparatus for routing information in a payload of a first network protocol, which payload includes a second network protocol, comprising:
- a network interface that is coupled to a network for communicating therewith a packet;
a memory for storing information;
a circuit block that is not a general purpose processor, wherein the circuit block is configured to perform the steps of;
determining a first type for the first network protocol and a second type for the second network protocol that is nested within the payload of the first network protocol based on information in the packet; and
storing into the memory classification data that indicates a unique combination of the first type and the second type;
one or more processors; and
one or more sequences of instructions which, when executed by the one or more processors, cause the one or more processors to carry out routing the packet based at least in part on the second network protocol without performing determining the first type and the second type based on information in the packet and cause the one or more processors to carry out storing into memory, in association with the classification data, an offset value for the second network protocol, wherein the offset value indicates a number of bits for aligning the header for the second network protocol relative to a boundary of a cache line for moving data between the memory and the one or more processors.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques for routing a payload of a first network protocol, which includes header information for a second network protocol, include communicating a packet. In a circuit block, a first type for the first network protocol and a second type for the second network protocol are determined. The circuit block stores a classification that indicates a unique combination of the first type and the second type. A general purpose processor routes the packet based on the classification. Processor clock cycles are saved that would be consumed in determining the types. Furthermore, based on the classification, the processor can store an offset value for aligning the header relative to a cache line. The circuit block can store the packet shifted by the offset value. The processor can then retrieve from memory a single cache line to receive the header, thereby saving excess loading and ejecting of cache.
-
Citations
53 Claims
-
1. An apparatus for routing information in a payload of a first network protocol, which payload includes a second network protocol, comprising:
-
a network interface that is coupled to a network for communicating therewith a packet; a memory for storing information; a circuit block that is not a general purpose processor, wherein the circuit block is configured to perform the steps of; determining a first type for the first network protocol and a second type for the second network protocol that is nested within the payload of the first network protocol based on information in the packet; and storing into the memory classification data that indicates a unique combination of the first type and the second type; one or more processors; and one or more sequences of instructions which, when executed by the one or more processors, cause the one or more processors to carry out routing the packet based at least in part on the second network protocol without performing determining the first type and the second type based on information in the packet and cause the one or more processors to carry out storing into memory, in association with the classification data, an offset value for the second network protocol, wherein the offset value indicates a number of bits for aligning the header for the second network protocol relative to a boundary of a cache line for moving data between the memory and the one or more processors. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. An apparatus for routing information in a payload of a first network protocol, which payload includes header information for a second network protocol, comprising:
-
a network interface that is coupled to a network for communicating therewith a packet; a memory for storing information; a circuit block configured to perform the steps of; determining a first type for the first network protocol and a second type for the second network protocol based on information in the packet, storing into the memory classification data that indicates a unique combination of the first type and the second type, receiving, based on the classification data, an offset value indicating a number of bits for aligning the header for the second network protocol relative to a boundary of a cache line for moving data between the memory and the one or more processors, and storing the packet into memory shifted by the number of bits indicated by the offset value; one or more processors; and one or more sequences of instructions which, when executed by the one or more processors causes the one or more processors to carry out the step of; routing the packet based at least in part on the second network protocol without performing the step of determining the first type and the second type based on information in the packet, thereby omitting processor clock cycles that would otherwise be consumed in determining the first type and the second type, and retrieving from the memory no more than one cache line to receive the header for the second networking protocol.
-
-
15. An apparatus for routing information in a payload of a first network protocol, which payload includes header information for a second network protocol, comprising:
-
a network interface that is coupled to a network for communicating therewith a packet; a memory for storing information; a circuit block configured to perform the steps of; determining a first type for the first network protocol and a second type for the second network protocol based on information in the packet, including comparing a value in a type field in the packet to a special value in a programmable register, thereby allowing the circuit block to identify a protocol type not known when the circuit block was designed; storing classification data that indicates a unique combination of the first type and the second type in the memory in a descriptor record that points to a packet data buffer where the packet is stored in the memory; and storing the packet into memory shifted by a number of bits indicated by an offset value retrieved for memory by padding a start of the packet with an arbitrary value until the packet is shifted by the number of bits indicated by the offset value; one or more processors; and one or more sequences of instructions which, when executed by the one or more processors, causes the one or more processors to carry out the steps of; storing into memory, based on the classification data, the offset value indicating the number of bits for aligning a beginning of the header for the second network protocol on a boundary of a cache line for moving data between the memory and the one or more processors as an integer value indicating an integral number of bytes, including determining the offset value based on a programmable mapping between a plurality of values for the classification data and a corresponding plurality of offset values; retrieving from the memory no more than one cache line to receive the header for the second networking protocol, which cache is aligned with the beginning of the header for the second network protocol, thereby omitting at least one of a cache line load and a cache line ejection that would otherwise be executed for finding a cache line that includes the header for the second networking protocol; and routing the packet based at least in part on the header for the second network protocol without performing the step of determining the first type and the second type based on information in the packet, thereby omitting processor clock cycles that would otherwise be consumed in determining the first type and the second type.
-
-
16. An apparatus for routing information in a payload of a first network protocol, which payload includes a second network protocol, comprising:
-
a means for communicating a packet; a means for determining a first type for the first network protocol and a second type for the second network protocol that is nested within the payload of the first network protocol based on information in the packet without using a general purpose processor, thereby omitting processor clock cycles that would otherwise be consumed in determining the first type and the second type; a means for storing classification data that indicates a unique combination of the first type and the second type without using a general purpose processor; a means for receiving, based on the classification data, an offset value indicating a number of bits for aligning a header for the second network protocol relative to a boundary of a cache line, a means for storing the packet into memory shifted by the number of bits indicated by the offset value; and a means for routing the packet based at least in part on the classification data.
-
-
17. A method for a network device, which includes a general purpose processor configured to execute a router operating system, for processing information in a payload of a first network protocol which payload includes a second network protocol, the method comprising the steps of:
-
receiving a packet at a network device; determining a first type for the first network protocol and a second type for the second network protocol that is nested within a payload of the first network protocol based on information in the packet without using the general purpose processor in the network device; storing into memory without using the general purpose processor, classification data that indicates a unique combination of the first type and the second type; storing into memory an offset value for the second network protocol wherein the offset value indicates a number of bits for aligning a header for the second network protocol relative to a boundary of a cache line; and routing the packet based at least in part on the classification data, wherein determining the first type and the second type further comprises comparing a value in a type field in the packet to a special value in a programmable register of a circuit block, thereby allowing classification of a protocol type not known when the circuit block was designed. - View Dependent Claims (18, 19, 20, 21)
-
-
22. A method for a network device, which includes a general purpose processor configured to execute a router operating system, for processing information in a payload of a first network protocol which payload includes header information for a second network protocol, the method comprising the steps of:
-
receiving a packet at a network device; determining a first type for the first network protocol and a second type for the second network protocol based on information in the packet without using a general purpose processor in the network device; storing into memory without using the general purpose processor, classification data that indicates a unique combination of the first type and the second type; routing the packet based at least in part on the classification data; receiving an offset value indicating a number of bits for aligning the header for the second network protocol relative to a boundary of a cache line for moving data between the memory and the general purpose processor; and storing the packet into memory shifted by the number of bits indicated by the offset value without using the general purpose processor. - View Dependent Claims (23, 24, 25)
-
-
26. A method for a network device, which includes a general purpose processor configured to execute a router operating system, for processing information in a payload of a first network protocol which payload includes a second network protocol, the method comprising the steps of:
-
receiving classification data that indicates a unique combination of a first type for the first network protocol and a second type for the second network protocol that is nested within the payload of the first protocol based on information in a packet received at the network device without performing the step of determining the first type and the second type based on information in the packet in a general purpose processor, thereby omitting processor clock cycles that would otherwise be consumed in determining the first type and the second type; receiving, based on the classification data, an offset value indicating a number of bits for aligning a header for the second network protocol relative to a boundary of a cache line; storing the packet into memory shifted by the number of bits indicated by the offset value; and routing the packet based at least in part on the classification data. - View Dependent Claims (27, 28, 29, 30, 31, 32, 33, 34)
-
-
35. A method for a network device, which includes a general purpose processor configured to execute a router operating system, for processing information in a payload of a first network protocol which payload includes header information for a second network protocol, the method comprising the steps of:
-
receiving classification data that indicates a unique combination of a first type for the first network protocol and a second type for the second network protocol based on information in a packet received at the network device without performing the step of determining the first type and the second type based on information in the packet, thereby omitting processor clock cycles that would otherwise be consumed in determining the first type and the second type; routing the packet based at least in part on the classification data; and storing into memory, based on the classification data, an offset value indicating a number of bits for aligning the header for the second network protocol relative to a boundary of a cache line for moving data between memory and the general purpose processor without performing the step of shifting the packet in memory by the number of bits indicated by the offset value thereby omitting processor cycles that would otherwise be consumed in shifting. - View Dependent Claims (36, 37, 38, 39)
-
-
40. A non-transitory computer-readable medium, excluding carrier waves, carrying one or more sequences of instructions for processing information in a payload of a first network protocol which payload includes a second network protocol, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
-
receiving classification data that indicates a unique combination of a first type for the first network protocol and a second type for the second network protocol that is nested within the payload of the first protocol based on information in a packet received at a network device without performing the step of determining the first type and the second type based on information in the packet, thereby omitting processor clock cycles that would otherwise be consumed in determining the first type and the second type; receiving, based on the classification data, an offset value indicating a number of bits for aligning a header for the second network protocol relative to a boundary of a cache line; storing the packet into memory shifted by the number of bits indicated by the offset value; and routing the packet based at least in part on the classification data. - View Dependent Claims (41, 42, 43, 44, 45, 46, 47, 48)
-
-
49. A non-transitory computer-readable medium, excluding carrier waves, carrying one or more sequences of instructions for processing information in a payload of a first network protocol which payload includes header information for a second network protocol, wherein execution of the one or more sequences of instructions by one or more processors causes the one or more processors to perform the steps of:
-
receiving classification data that indicates a unique combination of a first type for the first network protocol and a second type for the second network protocol based on information in a packet received at a network device without performing the step of determining the first type and the second type based on information in the packet, thereby omitting processor clock cycles that would otherwise be consumed in determining the first type and the second type; and routing the packet based at least in part on the classification data; and storing into memory, based on the classification data, an offset value indicating a number of bits for aligning the header for the second network protocol relative to a boundary of a cache line for moving data between memory and the one or more processors without performing the step of shifting the packet in memory by the number of bits indicated by the offset value, thereby omitting processor cycles that would otherwise be consumed in shifting. - View Dependent Claims (50, 51, 52, 53)
-
Specification