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 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; 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 in a computer-readable medium, 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.
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
59 Claims
-
1. 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; 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 in a computer-readable medium, 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. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. 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 in a computer-readable medium 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.
-
-
18. 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 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 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; and
a means for routing the packet based at least in part on the classification data.
-
-
19. 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; and
routing the packet based at least in part on the classification data. - View Dependent Claims (20, 21, 22, 23, 24, 25, 26, 27, 28, 29)
-
-
30. 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; and
routing the packet based at least in part on the classification data. - View Dependent Claims (31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44)
-
-
45. A computer-readable medium 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. - View Dependent Claims (46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59)
-
Specification