1. Field of the Invention
The present invention relates to computer networks, and more particularly, to processing network data packets.
2. Background of the Invention
Conventional computer systems typically include several functional components. These components may include a central processing unit (CPU), main memory, input/output (“I/O”) devices, and storage devices (for example, disk driver, tape drives) (referred to herein as “storage device”).
In conventional systems, the main memory is coupled to the CPU via a system bus or a local memory bus. The main memory is used to provide the CPU access to data and/or program information that is stored in main memory at execution time. Typically, the main memory is composed of random access memory (RAM) circuits. A computer system with the CPU and main memory is often referred to as a host system.
Computer networking is common today. Network computing allows users to share information regardless of where they are located. Network computing has also increased the use of mass storage devices that can store data. Such storage devices often have to interface with networks to exchange commands and/or read and write data. Storage controllers are used to facilitate interaction between storage systems and computing systems.
Traditionally, storage controllers (e.g., disk array controllers, tape library controllers) have supported the SCSI-3 protocol and have been attached to computers by a Small Computer System Interface (SCSI) parallel bus or Fibre Channel. Internet SCSI (iSCSI) standard as defined by the Internet Engineering Task Force (IETF) maps the standard SCSI protocol on top of the TCP/IP protocol to overcome the physical limitations of SCSI.
Networks are generally defined as having layers of protocol. The iSCSI and TCP/IP protocol suite consist of four protocol layers; the application layer (of which iSCSI is one application), the transport layer (TCP), the network layer (IP) and the link layer (i.e. Ethernet).
TCP Overview
TCP is a network protocol that provides connection-oriented, reliable, byte stream service. Two network nodes establish a logical connection before sending data and TCP maintains state information regarding the data transfer. A byte stream service means that the TCP protocol views data to be sent as a continuous data stream. FIG. 1A shows a block diagram of TCP data encapsulated in an IP datagram. FIG. 1B shows a block diagram of a standard TCP header.
Each byte of data sent using a TCP connection is tagged with a sequence number. Each TCP segment header contains the sequence number of the first byte of data in the segment. This sequence number is incremented for each byte of data sent so that when the next segment is to be sent, the sequence number is again for the first byte of data for that segment. The sequence numbering is used to determine when data is lost during delivery and needs to be retransmitted.
A data packet receiver keeps track of the sequence numbers and knows the next sequence number when a new segment arrives. If the sequence number in the segment is not the expected one, the receiver knows that the segment has arrived out of order. This could be because the network reordered the segments or a segment was lost. Typically, TCP handles both of these cases.
Typically, when a TCP segment is received on a node, an acknowledgement (“ACK”) packet is returned to acknowledge reception of the packet. To help reduce the number of segments on a network, TCP may delay the delivery of an ACK packet.
A TCP header can include various flag bits, for example, ACK flag denotes that the acknowledgement number is valid; SYN flag denotes synchronize sequence number to initiate a connection; FIN flag indicates that the packet sender has finished sending data; and RST flag resets a connection.
The standard TCP protocol provides a time stamp option where a sender of a packet places a time stamp. The time stamp is established during the initial phase of a TCP connection. The time stamp allows a receiver to avoid receiving old TCP segments and then considering them to be a part of an existing data segment.
Most conventional solutions for controlling communications between storage controllers and networks are via the software based Open Systems Interconnection (OSI) model. The iSCSI protocol with the TCP/IP protocol stack running in software requires a large amount of computing power, especially at current 1 giga bits per second (1 Gbps) and future 10 Gbps network link processing rates.
Hardware solutions, as disclosed in the co-pending patent application, Ser. No. 10/620,076 offload the TCP stack processing to a hardware/state machine based system (or TCP Offload Engine (“TOE”) Adapter). However, the hardware solution has time stamp migration problems from a host's TCP/IP time stamp to the TOE adapter's time stamp during connection offload and upload, especially when the initial TCP connection is established by the host TCP/IP stack and then offloaded to the TOE adapter. The offloading in this context means that the TOE adapter processes the TCP/IP stack in hardware using state machines, instead of the software stack implementation in the host system. The host and the adapter time stamps vary and if the time stamp is not properly handled, a TCP packet is not processed.
Therefore, what is needed is a process and system that can handle the time stamp migration issues between a host system and a TOE adapter.