摘要:
The present invention relates to handling interrupts in a multiprocessor system. An interrupt controller can receive input from a variety of interrupt sources, such as peripheral components and peripheral interfaces. Interrupts and their associated characteristics are identified. In one example, interrupt characteristics can be compared with characteristics of other interrupts handled by processors in the multiprocessor system. Interrupt characteristics are used to select a processor to run a routine for handling the associated interrupt. Intelligent selection provides efficient and effective distribution of interrupts.
摘要:
A system and method are provided for identifying related packets in a communication flow for the purpose of collectively processing them through a protocol stack comprising one or more protocols under which the packets were transmitted. A packet received at a network interface is parsed to retrieve information from one or more protocol headers. A flow key is generated to identify a communication flow that includes the packet, and is stored in a database of flow keys. When the packet is placed in a queue to be transferred to a host computer, the flow key and/or its flow number (e.g., its index into the database) is stored in a separate queue. Near to the time at which the packet is transferred to the host computer, a dynamic packet batching module searches for a packet that is related to the packet being transferred (i.e., is in the same flow) but which will be transferred later in time. If a related packet is located, the host computer is alerted and, as a result, delays processing the transferred packet until the related packet is also received. By collectively processing the related packets, processor time is more efficiently utilized.
摘要:
A high performance network interface is provided for receiving a packet from a network and transferring it to a host computer system. A header portion of a received packet is parsed by a parser module to determine the packet's compatibility with, or conformance to, one or more pre-selected protocols. If compatible, a number of processing functions may be performed to increase the efficiency with which the packet is handled. In one function, a re-assembly engine re-assembles, in a re-assembly buffer, data portions of multiple packets in a single communication flow or connection. Header portions of such packets are stored in a header buffer. An incompatible packet may be stored in another buffer. In another function, a packet batching module determines when multiple packets in one flow are transferred to the host computer system, so that their header portions are processed collectively rather than being interspersed with headers of other flows' packets. In yet another function, the processing of packets through their protocol stacks is distributed among multiple processors by a load distributor, based on their communication flows. A flow database is maintained by a flow database manager to reflect the creation, termination and activity of flows. A packet queue stores packets to await transfer to the host computer system, and a control queue stores information concerning the waiting packets. If the packet queue becomes saturated with packets, a random packet may be discarded. An interrupt modulator may modulate the rate at which interrupts associated with packet arrival events are issued to the host computer system.
摘要:
A high performance network interface receives network traffic in the form of packets. Prior to being transferred to a host computer, a packet is stored in a packet queue. A system and method are provided for randomly discarding a packet if the rate of packet transfers cannot keep pace with the rate of packet arrivals at the queue. When a packet must be dropped a selected packet may be discarded as it arrives at the queue, or a packet already in the queue may be dropped. A packet queue is apportioned into multiple regions, any of which may overlap or share a common boundary. A probability indicator is associated with a region to specify the probability of a packet being discarded when the level of traffic stored in the queue is within the region. A counter may be employed in conjunction with a probability indicator to identify individual packets. Probability indicators may differ from region to region so that the probability of discarding a packet fluctuates as the level of traffic stored in the queue changes. In addition to selecting packets to be dropped on a random basis, information gleaned from a packet may be applied to prevent certain types of packets from being dropped. The information derived from a packet may be obtained during a procedure in which one or more of the packet's headers are parsed. By parsing a packet, it may be determined whether the packet conforms to a pre-selected protocol.
摘要:
A network interface is polled by a process operating on a host computer system. Each time the network interface is polled, the process determines whether any packets have been received. If so, they are processed. Interrupts that would normally be issued by the network interface in response to the transfer of packets to the host system are suppressed or postponed during the polling mode of operation. If, however, a predetermined period of time has elapsed or a predetermined number of packets have been received since a previous poll or a previous interrupt, then an interrupt may be generated. The rate at which interrupts may be issued is modulated to decrease the interrupt-processing burden placed on the processor. A time counter may be used to track the passage of time and a packet counter may be used to track the number of packets transferred by the network interface. After each polling operation or processing of an interrupt by the host processor, the time and packet counters are reset to threshold values and thereafter begin decrementing toward a final time count and a final packet count, respectively. Thus, a packet transferred after one polling operation or interrupt does not cause the issuance of an interrupt to the host processor unless a time or packet counter reaches its final value (e.g. zero). The threshold time count and packet count may be adjusted to ensure that interrupts are generated often enough to avoid a negative impact on the processing of packets if, for example, the polling process is blocked.
摘要:
A circuit and method for generating a checksum for a TCP packet on the fly. A stream of 32-bit data words from a TCP packet is split into two 16-bit data word streams and separately summed using 16-bit adders. The carry-out from the adders is tied to the carry-in thereof so as to incorporate any carry bits generated into the sum. At the end of the data stream, three further summing cycles are used in order to generate the final 16-bit one's complement checksum. First, the two 16-bit data stream partial sums are added together, including any carry bit from one of the adders while the carry-out from the other adder is stored. In the second cycle the stored carry-out and the carry-out from the first cycle are added into the sum. In the third cycle, any carry bit generated in the second cycle is added to the sum so as to produce the final checksum.
摘要:
A system and method are provided for managing information concerning a network flow comprising packets sent from a source entity to a destination entity served by a network interface. A network flow is established for each datagram sent from the source entity to the destination entity. A flow key, identifying the source and destination entities, is stored in a data structure along with information concerning validity of the flow, sequence of data in the flow datagram and how recently the flow was active. Once a flow is established, it is updated each time a packet containing data from the flow's datagram is received. When such a packet is received, an operation code is generated for identifying whether the packet is suitable for a particular network interface function. An operation code may, for example, indicate that a packet contains data to be re-assembled with other data from the same flow. Another operation code may indicate that a packet is not suitable for data re-assembly. Another operation code may specify that the packet is simply a control packet, has no data, or that the packet was received out of order.
摘要:
A system and method are provided for transferring a packet received from a network to a host computer according to an operation code associated with the packet. A packet received at a network interface is parsed to retrieve information from a header portion of the packet. A flow key is generated for a received packet that was formatted with one of a set of predetermined protocols. A packet's flow key identifies a communication flow that comprises the packet. Based on some of the retrieved information, a code is associated with the packet to inform a transfer engine how the packet should be transferred to host memory. Based on a packet's code, the transfer engine stores the packet in one or more host memory buffers. If the packet was formatted with one of the set of predetermined protocols, its data is re-assembled in a re-assembly buffer with data from other packets in the same communication flow. Re-assembled data may be provided to a destination application or user through page flipping. If the packet is being re-assembled, a header portion of the packet is stored in a separate header buffer. If the packet is not being re-assembled, it is stored in its entirety in the header buffer if it is smaller than a predetermined threshold. If a non-re-assembled packet is larger than the threshold for the header buffer, it is stored in another type of buffer for larger non-re-assembled packets. After a packet is stored in a buffer, the transfer engine informs the host computer of the packet by configuring a descriptor with information on the packet and releasing the descriptor to the host computer.
摘要:
A network interface is polled by a process operating on a host computer system. Each time the network interface is polled the process determines whether any packets have been transferred to the host. If so, they are processed. Interrupts that would normally be issued from the network interface in response to the transfer of packets are suppressed or postponed during the polling mode of operation. If, however, a predetermined period of time has elapsed or a predetermined number of packets have been transferred since a previous poll or a previous interrupt, then an interrupt may be generated.
摘要:
A high performance network interface receives network traffic in the form of packets. The network interface parses one or more headers of a received packet in order to determine whether the packet has been formatted with a pre-selected protocol. If so, one or more efficient enhancements in the processing of a packet may be enabled for the packet. During parsing, header data that may be useful in the processing enhancements may be saved. A packet conforming to one or more of a set of pre-selected protocols may be more completely parsed than a packet not conforming to any of the pre-selected protocols. Instructions for parsing a packet to determine a protocol and to extract useful data are stored in a writeable random-access memory. The instructions may be replaced, modified or supplemented depending upon the composition of network traffic and the protocols selected for enhanced processing. In a parsing instruction executed by a micro-sequencer, a value is extracted from a header and compared to a test value that may be derived from a protocol specification. If the comparison succeeds parsing continues along a first branch; if the comparison succeeds it continues along a second branch. The value extracted from the header may be saved. An offset to a parsing position within the packet is maintained and updated as the packet is parsed. Values other than those extracted for comparison may also be identified and saved.