# Patent

## Title
Method and system for using an in-line credit extender with a host bus adapter

## Abstract

A storage area network (“SAN”) and a system is provided. The SAN includes, a host bus adapter operationally coupled with a credit extender, wherein the credit extender receives frames from a Fibre Channel network and sends the received frames to the HBA based on buffer space available in the HBA. The HBA notifies other Fibre Channel ports of buffer space available in the credit extender. The HBA sends a signal to the credit extender notifying the credit extender of available buffer space in the HBA. The HBA includes a management port for interfacing the HBA with the credit extender.

## Background
BACKGROUND
1. Field of the Invention
The present invention relates to networking systems, and more particularly, to coupling a host bus adapter with an in-line credit extender.
2. Background of the Invention
Storage area networks (“SANs”) are commonly used where plural memory storage devices are made available to various host computing systems. Data in a SAN is typically moved from plural host systems to storage systems through various controllers/adapters.
Host systems typically include several functional components. These components may include a central processing unit (CPU), main memory, input/output (“I/O”) devices, and streaming storage devices (for example, tape drives). 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.
Host systems often communicate with storage systems via a host bus adapter (“HBA”, may also be referred to as a “controller” and/or “adapter”) using the “PCI” bus interface. PCI stands for Peripheral Component Interconnect, a local bus standard that was developed by INTEL Corporation®. The PCI standard is incorporated herein by reference in its entirety.
PCI-X is another standard bus that is compatible with existing PCI cards using the PCI bus. PCI-X improves the data transfer rate of PCI.
Various other standard interfaces are also used to move data from host systems to storage devices. Fibre Channel is one such standard. Fibre Channel (incorporated herein by reference in its entirety) is a set of AMERICAN NATIONAL STANDARD INSTITUTE (ANSI) standards, which provide a serial transmission protocol for storage and network protocols such as HIPPI, SCSI, IP, ATM and others. Fibre Channel provides an input/output interface to meet the requirements of both channel and network users.
Fibre Channel supports three different topologies: point-to-point, arbitrated loop and Fibre Channel fabric. The point-to-point topology attaches two devices directly. The arbitrated loop topology attaches devices in a loop. The Fibre Channel fabric topology attaches host systems directly to a fabric, which are then connected to multiple devices. The Fibre Channel fabric topology allows several media types to be interconnected.
Fibre Channel is a closed system that relies on multiple ports to exchange information on attributes and characteristics to determine if the ports can operate together. If the ports can work together, they define the criteria under which they communicate. In Fibre Channel, a path is established between two nodes where the path's primary task is to transport data from one point to another.
Fibre Channel fabric devices include a node port or “N_Port” that manages fabric connections. The N_port establishes a connection to a fabric element (e.g., a switch) having a fabric port or F_port.
In Fibre Channel, a buffer-to-buffer credit mechanism is used to control frame flow on a Fibre Channel link. This mechanism requires a transmitter to receive credit in the form of an R_RDY primitive, before sending a frame. The destination sends an R_RDY only when it has adequate buffer space to accept an entire frame.
Once a transmitter has sent a frame for every R_RDY it has received, it stops transmission until another R_RDY arrives from the destination. Unless the transmitter receives enough R_RDYs to cover the time needed for a frame to travel across the link to the destination and an R_RDY to return across the link from the destination, the transmitter stalls and waits for an R_RDY.
Data throughput is hindered as the length of the Fibre Channel link increases in distance. In conventional systems, additional data buffering is used to allow more R_RDYs to be sent and minimize idle periods. This solution has drawbacks. For example, devices with large buffers waste memory resources when used in an environment that only uses short links. Also, using external memory buffers is expensive and requires additional pins and data ports.
Therefore, there is a need for a system that allows efficient data transfer without using additional memory buffers permanently.
SUMMARY OF THE INVENTION
In one aspect of the present invention, a storage area network (“SAN”) is provided. The SAN includes, a host bus adapter operationally coupled with a credit extender, wherein the credit extender receives frames from a Fibre Channel network and sends the received frames to the HBA based on buffer space available in the HBA. The HBA notifies other Fibre Channel ports of buffer space available in the credit extender. The HBA sends a signal to the credit extender notifying the credit extender of available buffer space in the HBA.
In another aspect of the present invention, a system for transferring data in a Fibre Channel network is provided. The system includes, a HBA operationally coupled with a credit extender, wherein the credit extender receives frames from a Fibre Channel network and sends the received frames to the HBA based on buffer space available in the HBA.
In yet another aspect of the present invention, a HBA is provided. The HBA includes a management port for interfacing the HBA with a credit extender, wherein the credit extender receives frames from a Fibre Channel network and sends the received frames to the HBA based on buffer space available in the HBA.
This brief summary has been provided so that the nature of the invention may be understood quickly. A more complete understanding of the invention can be obtained by reference to the following detailed description of the preferred embodiments thereof concerning the attached drawings.



BRIEF DESCRIPTION OF THE DRAWINGS
The foregoing features and other features of the present invention will now be described with reference to the drawings of a preferred embodiment. In the drawings, the same components have the same reference numerals. The illustrated embodiment is intended to illustrate, but not to limit the invention. The drawings include the following Figures:
FIG. 1A shows a top-level block diagram of a network using a SAN;
FIG. 1B shows a top-level diagram of a HBA interfacing with a credit extender, according to one aspect of the present invention;
FIG. 2 shows a block diagram with the interfacing signals between the credit extender and the HBA, according to one aspect of the present invention; and
FIG. 3 shows a process flow diagram for interfacing the credit extender and the HBA, according to one aspect of the present invention.



DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
Definitions
The following definitions are provided as they are typically (but not exclusively) used in the Fibre Channel environment, implementing the various adaptive aspects of the present invention.
“Fibre Channel ANSI Standard”: The standard (incorporated herein by reference in its entirety) describes the physical interface, transmission and signaling protocol of a high performance serial link for support of other high level protocols associated with IPI, SCSI, IP, ATM and others.
“N-Port”: A direct fabric attached port, for example, a disk drive or a HBA.
“SAN”: Storage Area Network
To facilitate an understanding of the preferred embodiment, the general architecture and operation of a SAN, and a HBA will be described. The specific architecture and operation of the preferred embodiment will then be described with reference to the general architecture of the host system and HBA.
FIG. 1A shows a SAN system 100 that uses a HBA 106 (referred to as “adapter 106”) for communication between a host system (for example, 200, FIG. 2) with host memory 101 to various devices/systems (for example, storage subsystem 116 and 121, tape library 118 and 120 and servers 117 and 119) using Fibre Channel storage area networks 114 and 115. Host system 200 uses a driver 102 that co-ordinates data transfers via adapter 106 using input/output control blocks (“IOCBs”).
A request queue 103 and response queue 104 is maintained in host memory 101 for transferring information using adapter 106. Host system 200 communicates with adapter 106 via a PCI bus 105 through a PCI core module (interface) 137, as shown in FIG. 1B.
In conventional systems, additional buffers 108A are used to increase link throughput for long distances and that results in wastage.
HBA 106:
FIG. 1B shows a block diagram of adapter 106, used according to one aspect of the present invention. Adapter 106 includes processors (may also be referred to as “sequencers”) 112 and 109 for transmit and receive side, respectively for processing data in the transmit and receive paths. Transmit path in this context means data path from host memory 101 to the storage systems via adapter 106. Receive path means data path from storage subsystem via adapter 106. It is noteworthy, that only one processor is used for receive and transmit paths, and the present invention is not limited to any particular number/type of processors. Buffers 111A and 111B are used to store information in receive and transmit paths, respectively.
HBA 106 is operationally coupled to a Fibre Channel credit extender 146 in the receive path. Frame traffic 146A from a Fibre Channel network enters the credit extender 146 and is then sent to the receive path of HBA 106 (shown as 146B).
Credit extender 146 with its various components is described in U.S. patent application Ser. No. 10/166,570, filed on Jun. 10, 2002 and Ser. No. 10/664,548, filed on Sep. 9, 2003; the disclosure of both the applications is incorporated herein by reference in its entirety. FIG. 2 below describes in detail the interaction between HBA 106 and credit extender 146.
Beside dedicated processors on the receive and transmit path, adapter 106 also includes processor 106A, which may be a reduced instruction set computer (“RISC”) for performing various functions in adapter 106.
Adapter 106 also includes Fibre Channel interface (also referred to as Fibre Channel protocol manager “FPM”) 113A that includes an FPM 113B and 113 in receive and transmit paths, respectively (shown as FC RCV and FC XMT in FIG. 1B). FPM 113B and FPM 113 allow data to move to/from other devices (not shown).
Adapter 106 is also coupled to external memory 108 and 110 (referred interchangeably hereinafter) through local memory interface 122 (via connection 116A and 116B, respectively, (FIG. 1A)). Local memory interface 122 is provided for managing local memory 108 and 110. Local DMA module 137A is used for gaining access to move data from local memory (108/110).
Adapter 106 also includes a serial/de-serializer (“SERDES”) 136 for converting data from 10-bit serial to 8-bit parallel format and vice-versa.
Adapter 106 further includes request queue DMA channel (0) 130, response queue DMA channel 131, request queue (1) DMA channel 132 that interface with request queue 103 and response queue 104; and a command DMA channel 133 for managing command information.
Both receive and transmit paths have DMA modules 129 and 135, respectively. Transmit path also has a scheduler 134 that is coupled to processor 112 and schedules transmit operations. Arbiter 107 arbitrates between plural DMA channel requests.
FIG. 2 shows a block diagram with various interface signals between HBA 106 and credit extender 146 where the transmit path from HBA 106 is shown as 146C. HBA 106 can access static random access memory (“SRAM) 108B, Flash memory 108C and electrically erasable programmable read only memory (“EEPROM”) 108D to execute various programmable instructions/code.
HBA 106 connects to credit extender 146 using a minimum number of ports for management. In one aspect of the present invention, Management Data Input Output (“MDIO”) protocol, which is a standard protocol, is used. The MDIO protocol/standard is incorporated herein by reference in its entirety. Management port 201 is used to interface with credit extender 146 using signals 202 and 203.
Credit extender 146 receives incoming frames 146A. Credit_Adjust signal 204 is sent from HBA 106 to credit extender 146 to communicate that HBA 106 has a buffer available for a frame (i.e. granting permission to credit extender 146 to transmit a frame in the receive path). Credit extender 146 receives signal 204, synchronizes signal 204 with it's own reference clock and then validates signal 204. Signal 204 is time-sensitive and it toggles between a low to high and high to low transition each time a frame buffer in HBA 106 is freed. The rate at which signal 204 toggles determines how fast frames can be moved from credit extender 146 to HBA 106.
Credit extender 146 sends an ATTN signal 205 to HBA 106. Signal 205 indicates that an exception condition has occurred, which requires managerial intervention from HBA 106. In one aspect of the present invention, signal 205 is held high until cleared by a response from HBA 106 (that is received via signal 203). Since signal 205 is held high, it allows HBA 106 to synchronize, recognize and respond to signal 205. Since signal 205 is only asserted for exception conditions, this mechanism does not affect overall HBA 106 performance in facilitating data transfer.
During initialization, HBA 106 is set-up by firmware (software used by RISC 106A and other modules). The set-up indicates the amount of buffer space that is available in credit extender 146. When HBA 106 connects with another Fibre Channel port, HBA 106 transmits the number of available credits by using the R_RDY primitive based on credit extender 146's buffering capacity.
FIG. 3 shows a process flow diagram for using credit extender 146 with HBA 106. In step S300, HBA 106 is set-up by firmware. During set-up, HBA 106 determines (or knows) the amount of buffer space that is available in credit extender 146.
In step S302, HBA 106 notifies other Fibre Channel ports of available buffer space (using R_RDY primitives). This allows other ports to send data to HBA 106 based on the buffer capacity of credit extender 146.
In step S304, HBA 106 notifies credit extender 146 of available buffer space to receive/process a frame.
In step S306, credit extender 146 sends frames to HBA 106. In step S308, RSEQ 109 processes the frame.
In one aspect of the present invention, using the credit extender 146 eliminates the need for additional data ports/buffers and overall latency in Fibre Channel transmission is reduced.
Although the present invention has been described with reference to specific embodiments, these embodiments are illustrative only and not limiting. Many other applications and embodiments of the present invention will be apparent in light of this disclosure and the following claims. For example, automatic DMA selection may be used beyond SANs and Fibre Channel standards. The foregoing adaptive aspects are useful for any networking environment where there is disparity between link transfer rates.

## Claims

1. A storage area network (“SAN”), comprising:
a host bus adapter (HBA) of a host computing system operationally coupled with a credit extender, wherein upon HBA initialization, the HBA determines a buffer storage capacity of the credit extender and the HBA transmits a number of R_RDYs, a primitive to indicate credit availability, to at least one network device, where the number of R_RDYs are based on the buffer storage capacity of the credit extender instead of a buffer storage capacity of the HBA; and the credit extender receives frames directly from the network device via a Fibre Channel network instead of the HBA directly receiving the frames; and the credit extender sends the received frames to the HBA after the HBA sends a signal to the credit extender indicating that buffer space is available in a receive buffer of the HBA.

2. The SAN of claim 1, wherein the signal from the HBA to the credit extender indicating available buffer space in the HBA transitions from a first value to a second value and a rate at which the signal transitions from the first value to the second value determines a rate at which the received frames are moved from the credit extender to the HBA.

3. The SAN of claim 1, wherein the HBA communicates with the credit extender through a management port using a management data input/output protocol.

4. The SAN of claim 1, wherein the credit extender notifies the HBA of an exception condition by sending a signal to the HBA and the signal is cleared after the HBA responds to the exception condition.

5. A system for transferring data in a Fibre Channel network, comprising:
a host bus adapter (HBA) of a host computing system operationally coupled with a credit extender, wherein upon HBA initialization the HBA determines a buffer storage capacity of the credit extender and the HBA transmits a number of R_RDYs, a primitive to indicate credit availability, to at least one network device, where the number of R_RDYs are based on the buffer storage capacity of the credit extender instead of a buffer storage capacity of the HBA; and the credit extender receives frames directly from the network device via a Fibre Channel network instead of the HBA directly receiving the frames; and the credit extender sends the received frames to the HBA after the HBA sends a signal to the credit extender indicating that buffer space is available in a receive buffer of the HBA.

6. The system of claim 5, wherein the signal from the HBA to the credit extender indicating available buffer space in the HBA transitions from a first value to a second value and a rate at which the signal transitions from the first value to the second value determines a rate at which the received frames are moved from the credit extender to the HBA.

7. The system of claim 5, wherein the HBA communicates with the credit extender through a management port using a management data input/output protocol.

8. The system of claim 5, wherein the credit extender notifies the HBA of an exception condition by sending a signal to the HBA and the signal is cleared after the HBA responds to the exception condition.

9. A host bus adapter (“HBA”) of a host computing system, comprising:
a management port for interfacing the HBA with a credit extender, wherein upon HBA initialization, the HBA determines a buffer storage capacity of the credit extender and the HBA transmits a number of R_RDYs, a primitive to indicate credit availability, to at least one network device, where the number of R_RDYs are based on the buffer storage capacity of the credit extender instead of a buffer storage capacity of the HBA; and the credit extender receives frames directly from the network device via a Fibre Channel network instead of the HBA directly receiving the frames; and the credit extender sends the received frames to the HBA after the HBA sends a signal to the credit extender indicating that buffer space is available in a receive buffer of the HBA.

10. The HBA of claim 9, wherein the signal from the HBA to the credit extender indicating available buffer space in the HBA transitions from a first value to a second value and a rate at which the signal transitions from the first value to the second value determines a rate at which the received frames are moved from the credit extender to the HBA.

11. The HBA of claim 9, wherein the HBA communicates with the credit extender through a management port using a management data input/output protocol.

12. The HBA of claim 9, wherein the credit extender notifies the HBA of an exception condition by sending a signal to the HBA and the signal is cleared after the HBA responds to the exception condition.

13. The HBA of claim 9, wherein the credit extender notifies the HBA of an exception condition by sending a signal to the HBA and the signal is cleared after the HBA responds to the exception condition.

14. A method for receiving network information in a storage area network, comprising:
determining, by a host bus adapter (HBA) a buffer capacity of a credit extender coupled to the HBA;
sending the HBA a number of primitives at least one network device that communicates with the HBA indicating available buffer space of the credit extender to the network device and the number of primitives that are sent are based on the buffer storage capacity of the credit extender instead of a buffer storage capacity of the HBA;
notifying the credit extender of available buffer space in a receive buffer of the HBA;
receiving a network frame from a network device and the network frame is received directly by the credit extender, instead of the HBA; and
sending the network frame to the HBA and the network frame is processed by a receive buffer processor, instead of a main processor for the HBA.

15. The method of claim 14, wherein the HBA sends a signal to the credit extender indicating available buffer space in the HBA and the signal transitions from a first value to a second value and a rate at which the signal transitions from the first value to the second value determines a rate at which network frames are moved from the credit extender to the HBA.

16. The method of claim 14, wherein the HBA communicates with the credit extender through a management port using a management data input/output protocol.

17. The method of claim 14, wherein the primitive sent to the network device is an R_RDY primitive used in a Fibre Channel network.

18. The method of claim 14, wherein the network frame is a Fibre Channel frame.