This patent application is related to the following US Patent Applications:
Ser. No. 10/894,627 filed on Jul. 20, 2004, entitled “Method and System for Programmable Data Dependent Network Routing”; and
Ser. No. 10/894,547, filed on Jul. 20, 2004, entitled “Method and System for Using Extended Fabric Features with Fibre Channel Switch Elements”; the disclosure of the foregoing applications is incorporated herein by reference in their entirety.
1. Field of the Invention
The present invention relates to Fibre Channel network systems, and more particularly, to checking frame-length in Fibre Channel frames.
2. Background of the Invention
Fibre Channel 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 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”.
A Fibre Channel switch is a multi-port device where each port manages a point-to-point connection between itself and its attached system. Each port can be attached to a server, peripheral, I/O subsystem, bridge, hub, router, or even another switch. A switch receives messages from one port and routes it to another port.
Fibre Channel frames carry information between Fibre Channel Devices which include Host Bus Adapters, Switches and Disk Drives. The components of a Fibre Channel Frame include SOF, Frame Header, Payload, CRC and EOF. Typically, the minimum frame-length of a Fibre frame is 36 bytes and the maximum frame-length of a Fibre Channel frame is 2148 bytes.
Typically, a Fibre Channel device receives an incoming Fibre Channel frame when it detects a Start-Of-Frame (SOF) delimiter. The receive port detects an end of the Fibre Channel frame when it detects an End-Of-Frame (EOF) delimiter or if the maximum frame-length is reached. The receive port of the Fibre Channel device keeps a count of the frame-length of the Fibre Channel frame. The frame-length includes the summation of the length of SOF (4 bytes), Frame Header (24 bytes), Payload (0-2112 bytes), CRC (4 bytes) and EOF (4 bytes). The receive port then determines if the frame-length of the received Fibre Channel frame is within the minimum and maximum frame-length as specified in the Fibre Channel specification. If a violation of the frame-length occurs, then the frame is discarded and an error is reported to a processor.
With the addition of new routing features for example, Virtual Fabric and Inter-Fabric routing, the length of the Frame Header has changed. This addition caused the total frame-length of the Fibre Channel frame to be different than the current maximum and minimum frame-length. When a switch that was designed before these features were introduced receives a Fibre Channel frame, data is corrupted if the EOF is not detected due to the varying lengths of the frame. Furthermore, the current frame-length checking mechanism causes erroneous errors. Therefore, there is a need for a method and system for efficiently checking the frame-length of a Fibre Channel frame with varying frame lengths.
In one aspect of the present invention, a method for checking frame-length in a Fibre Channel frames is provided. The method includes extracting a R_CTL value from a Fibre Channel frame; comparing the extracted R_CTL value of the Fibre Channel frame with R_CTL values stored in a Content Addressable Memory Table; determining a maximum frame-length and minimum frame-length of the Fibre Channel frame for the extracted R_CTL value from the Content Addressable Memory Table; and marking the Fibre Channel frame so that it can be discarded, if the frame-length is less than the minimum frame-length of the Fibre Channel frame or greater than the maximum frame-length of the Fibre Channel frame.
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.
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. 1E-1/1E-2 shows a top-level block diagram of a switch element used according to one aspect of the present invention;
Definitions:
The following definitions are provided for convenience as they are typically (but not exclusively) used in the Fibre Channel environment, implementing the various adaptive aspects of the present invention.
“CRC” (cyclic redundancy code): A 4 byte value used for checking the data integrity of a Fibre Channel frame.
“D_ID”: A 24-bit Fibre Channel header field that contains the destination address for a frame.
“Dword: A 4 byte Fibre Channel Data Word.
“EOF”: End-Of-Frame (EOF) delimiter that is the last Data Word of a Fibre Channel frame.
“EOFa”: A frame whose EOF is marked so that the frame is discarded by a destination port, N_Port or NL_Port.
“E_Port”: An expansion port that is used to connect Fibre Channel Switch elements in a Fabric.
“Fabric”: The structure or organization of a group of switches, target and host devices (NL_Port, N_ports etc.).
“F_Port”: A port to which non-loop N_Ports are attached to a fabric and does not include FL_ports.
“Fibre Channel ANSI Standard” (“FC-FS-2”): 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.
“Inter Fabric Header”: The Inter Fabric Routing Extended Header (IFR_Header) is used for routing Fibre Channel frames from one fabric to another. It provides the fabric identifier of the destination fabric, the fabric identifier of the source fabric and information to determine hop count.
“N_Port”: A direct fabric attached port, for example, a disk drive or a HBA.
“NL_Port”: A L_Port that can perform the function of a N_Port.
“R_CTL”: A 8 bit value containing routing information used to route Fibre Channel Frames.
“Switch”: A fabric element conforming to the Fibre Channel Switch standards.
“SOF”: Start_of_Frame (SOF) delimiter that is the first Data Word of a Fibre Channel frame.
“Virtual Fabric” (“VSAN”): As defined by FC-FS-2, Fibre Channel standard, incorporated herein by reference in its entirety, is a Fabric composed of partitions and N_ports having the properties of a single Fabric management domain and Generic Services; and independent from other Virtual Fabrics (e.g. an independent address space).
“Virtual Fabric Header” (VFT_Header): This is a header used for tagging Fibre Channel frames with a Virtual Fabric Identifier (VF_ID) of Virtual Fabric to which the frame belongs.
“Virtual Fabric Identifier” (“VF_ID”): A value that uniquely identifies a Virtual Fabric among plural Virtual Fabrics that shares a set of Switches and N_ports.
To facilitate an understanding of the preferred embodiment, the general architecture and operation of a Fibre channel System and a Fibre Channel switch element will be described. The specific architecture and operation of the preferred embodiment will then be described with reference to the general architecture.
Fibre Channel System
The devices of
Fibre Channel Switch Element
FIB. 1B is a block diagram of a 20-port ASIC fabric element according to one aspect of the present invention.
The fabric element of the present invention is presently implemented as a single CMOS ASIC, and for this reason the term “fabric element” and ASIC are used interchangeably to refer to the preferred embodiments in this specification. Although
ASIC 20 has 20 ports numbered in
For illustration purposes only, all GL ports are drawn on the same side of ASIC 20 in
Each port GL0-GL19 is comprised of transmit and receive connections to switch crossbar 50. Within each port, one connection is through receive buffer 52, which functions to receive and temporarily hold a frame during a routing operation. The other connection is through a transmit buffer 54.
Switch crossbar 50 includes a number of switch crossbars for handling specific types of data and data flow control information. For illustration purposes only, switch crossbar 50 is shown as a single crossbar. Switch crossbar 50 is a connectionless crossbar (packet switch) of known conventional design, sized to connect 21×21 paths. This is to accommodate 20 GL ports plus a port for connection to a fabric controller, which may be external to ASIC 20.
In the preferred embodiments of switch chassis described herein, the fabric controller is a firmware-programmed microprocessor, also referred to as the input/output processor (“IOP”). As seen in
Control register 62 receives and holds control information from IOP 66, so that IOP 66 can change characteristics or operating configuration of ASIC 20 by placing certain control words in register 62. IOP 66 can read status of ASIC 20 by monitoring various codes that are placed in status register 64 by monitoring circuits (not shown).
Each GL_Port may have an optical-electric converter, designated as OE0-OE19 connected with its SERDES through serial lines, for providing fibre optic input/output connections, as is well known in the high performance switch design. The converters connect to switch channels C0-C19. It is noteworthy that the ports can connect through copper paths or other means instead of optical-electric converters.
CAM table 80 is stored in memory 80A that is accessible to IOP 66 and other logic. CAM table 80 is a master copy for the switch element. As described below, each port can have its own CAM table with values that pertain to that particular port. Furthermore, plural ports can share a CAM Table that is located at one of the ports.
FIGS. 1E-1/1E-2 (jointly referred to as
Control port module 62A includes control buffers 62B and 62D for transmit and receive sides, respectively. Module 62A also includes a PCI interface module 62C that allows interface with IOP 66 via a PCI bus 66A.
XG_Port (for example 74B) includes RPORT 72 with RBUF 71 similar to RPORT 69 and RBUF 69A and a TBUF 74B and TPORT 74A similar to TBUF 70A and TPORT 70. Protocol module 73 interfaces with SERDES to handle protocol based functionality.
Incoming frames are received by RPORT 69 via SERDES 68 and then transmitted using TPORT 70. Buffers 69A and 70A are used to stage frames in the receive and the transmit path.
CAM Table 80C can be loaded with different values for each port. It is noteworthy that each port may have its own table 80C or table 80C can be shared between plural ports. In contrast, CAM table 80 is the master copy and includes information regarding all the ports.
It is also noteworthy that receive port 69 includes various other components that are described in co-pending patent application Ser. No. 10/894,627, filed on Jul. 20, 200, the disclosure of which is incorporated herein by reference.
VSAN #1 is the first Virtual Fabric that includes ports 0-3 for Switch #1. VSAN #2 includes Switch #1, ports 4-7; Switch #2, ports 0-3; and Switch #3, ports 0-3. VSAN #3 includes Switch #1, ports 4-7 and Switch #3, ports 0-3. VSAN #4 includes Switch #2, ports 4-7.
Fabric 2 includes Switch 4, 5 and 6. Fabric 3 includes Switch 5 and Switch 7, while Fabric 4 includes Switch 6 and Switch 8. The extended headers are used to route frames between the plural Fabrics, for example, between Fabric 1 and Fabric 4. It is noteworthy that the present invention is not limited to any particular number of Fabrics or switches.
Fibre Channel Frame
Receive port 69 detects a frame when a SOF 220 is received. SOF 220 is 4 bytes long and indicates the start of a frame. Receive port 69 starts counting frame-length when it detects a SOF 220.
Frame header 221, which contains routing and control information follow SOF 220. Frame header 221 comprises 6 header Dwords or 24 bytes. In a standard frame, these include R_CTL field 222, D_ID (3 bytes), CS_CTL (3 bytes), S_ID (3 bytes) and reserved bytes. R_CTL field 222 identifies the type of frame.
New routing features have added additional header words 226 to the frame header 221. The additional frame header (32 bytes) is shown in
Frame header 228 uses two R_CTL values. R_CTL value of 50h or 51h (shown as 227,
Payload or data field 223 follows the frame header 221 (or 228,
CRC 224, which is 4 bytes long, follows the payload 223. This field is used to check the data integrity of the frame.
EOF 225, which is 4 bytes long, follows the CRC 224. EOF indicates the end of a frame. When an EOF 225 is detected, receive port 69 stops counting frame-length and stores the value for future comparison and/or frame processing.
Process Flow for Checking Frame-Length
Turning in detail to
In step S202, receive port 69 parses the frame and R_CTL value 222 (or 227) is extracted from the frame header 221.
In step S203, R_CTL value 222 (or 227) is compared with the R_CTL values stored in a CAM Table 80 (or 80C). CAM Table 80, which maintains information regarding R_CTL and frame-length values, is described below with respect to
In step S204, a maximum frame-length and a minimum frame-length is determined from the fields corresponding to the matched R_CTL value. If none of the values match the R_CTL value then the default (or programmed) maximum frame-length (for example, 2148 bytes) and minimum frame-length (for example, 36 bytes) are used. The maximum frame-length and minimum frame-length values from the Frame length CAM are stored for future comparison.
In step S205, receive port 69 stops incrementing the received frame-length value when it detects an EOF or error condition.
In step S206, the received frame-length is compared with the stored maximum and minimum frame-length values to determine if the received Fibre Channel frame is a long or short frame. A Fibre Channel frame is a long frame if the received frame-length is greater than the maximum frame-length and a Fibre Channel frame is a short frame if the frame-length is less than the minimum frame-length.
It is noteworthy that the present invention is not limited to any particular format for the maximum and/or minimum frame length comparison. For example, frame length value when compared could be the actual frame length value or as an offset value.
If the Fibre Channel frame is determined to be a long or short frame in step S206, then in step S207, the Fibre Channel frame is marked for discarding. For example, the EOF value may be set to EOFa, which denotes that the frame should be discarded. When the frame is marked then it is discarded by a destination, for example, a host bus adapter or a storage device.
In another aspect of the present invention, the frame that is too long or short is discarded in step S207. In the alternative, a long frame is truncated to a maximum length and a short frame is padded to the minimum length and the EOF value is replaced by an EOFa (as stated above, this denotes EOF abort). Thereafter, the receive port 69 optionally notifies IOP 66 of the error and records the error statistics for the port.
In step S208, receive port 69 processes the received Fibre Channel frame if the frame is not a long or short frame in step S206.
Content Addressable Memory (CAM) Table
Each entry in CAM Table has a R_CTL value and the associated maximum frame-length and minimum frame-length. CAM Table 80 is comprised of a column 300 that includes the R_CTL value, a column 301 that has the corresponding maximum frame-length information and a column 302 that has the minimum frame-length information.
Firmware adds the entries in the CAM table 80 (and also for CAM 80C,
It is noteworthy that R_CTL values can be stored in any format in Random Access Memory and the term “table” is not to be construed as a limitation.
In one aspect of the present invention, R_CTL values are used to determine the maximum and minimum frame-length values of the received Fibre Channel frame. These values allows a receive port to check for frame length without causing data corruption.
It is noteworthy that different values for the minimum frame-length and/or maximum frame-length are used for different R_CTL values. Also CAM Table 80C provides default values for minimum frame-length and/or maximum frame-length if the extracted R_CTL values do not match stored R_CTL values.
It is also noteworthy that the present invention is not limited to any particular R_CTL, maximum/minimum frame length values. Switch element firmware operating under IOP 66 can program these values.
Frame Length Control Module
It is noteworthy that although various bit values are shown in
Incoming frames information (or fields) (R_CTL 222/227) is compared by logic 30E with entry 30B. A valid/control bit 30A is set for a valid control word entry. Logic 30E generates a command/signal (output 30E1) based on the comparison. Output 30E1 is sent to logic 30F that generates a hit signal 30F1.
Output 30F1 is sent to an encoder module 30G, whose output 30H is sent to MUX 30K. Maximum frame-length 30C and minimum frame-length 30D are also sent to MUX 30K. MUX 30K selects maximum frame-length 30J and a minimum frame-length 30I depending on the input signal 30H. The selected maximum frame-length 30J and a minimum frame-length 30I values are shown as the entries in column 301 and 302 respectively in
The present invention is not limited to CAM table 80C as described above. A hashing table could also be used to implement the adaptive aspects of the present invention.
In one aspect of the present invention, frame length is checked efficiently and in real time. The foregoing process/system can accommodate the new standard Virtual Fabric and Inter-Fabric headers in previous Fibre Channel switch elements, without expensive upgrades.
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.
Number | Name | Date | Kind |
---|---|---|---|
4162375 | Schilichte | Jul 1979 | A |
4200929 | Davidjuk et al. | Apr 1980 | A |
4258418 | Heath | Mar 1981 | A |
4344132 | Dixon et al. | Aug 1982 | A |
4425640 | Philip et al. | Jan 1984 | A |
4546468 | Christmas et al. | Oct 1985 | A |
4569043 | Simmons et al. | Feb 1986 | A |
4691296 | Struger | Sep 1987 | A |
4716561 | Angell et al. | Dec 1987 | A |
4725835 | Schreiner et al. | Feb 1988 | A |
4821034 | Anderson et al. | Apr 1989 | A |
4860193 | Bentley et al. | Aug 1989 | A |
5025370 | Koegel et al. | Jun 1991 | A |
5051742 | Hullett et al. | Sep 1991 | A |
5115430 | Hahne et al. | May 1992 | A |
5144622 | Takiyasu et al. | Sep 1992 | A |
5367520 | Cordell | Nov 1994 | A |
5579443 | Tatematsu et al. | Nov 1996 | A |
5590125 | Acampora et al. | Dec 1996 | A |
5594672 | Hicks | Jan 1997 | A |
5598541 | Malladi et al. | Jan 1997 | A |
5610745 | Bennett | Mar 1997 | A |
5677909 | Heide | Oct 1997 | A |
5687172 | Cloonan et al. | Nov 1997 | A |
5748612 | Stoevhase et al. | May 1998 | A |
5764927 | Murphy et al. | Jun 1998 | A |
5768271 | Seid et al. | Jun 1998 | A |
5768533 | Ran | Jun 1998 | A |
5790545 | Holt et al. | Aug 1998 | A |
5818842 | Burwell et al. | Oct 1998 | A |
5821875 | Lee et al. | Oct 1998 | A |
5822300 | Johnson et al. | Oct 1998 | A |
5894560 | Carmichael et al. | Apr 1999 | A |
5936442 | Liu et al. | Aug 1999 | A |
5954796 | McCarty et al. | Sep 1999 | A |
5974547 | Klimenko | Oct 1999 | A |
5987028 | Yang et al. | Nov 1999 | A |
5999528 | Chow et al. | Dec 1999 | A |
6011779 | Wills | Jan 2000 | A |
6014383 | McCarty | Jan 2000 | A |
6021128 | Hosoya et al. | Feb 2000 | A |
6046979 | Bauman | Apr 2000 | A |
6047323 | Krause | Apr 2000 | A |
6081512 | Muller et al. | Jun 2000 | A |
6128292 | Kim et al. | Oct 2000 | A |
6147976 | Shand et al. | Nov 2000 | A |
6151644 | Wu | Nov 2000 | A |
6160813 | Banks et al. | Dec 2000 | A |
6209089 | Selitrennikoff et al. | Mar 2001 | B1 |
6229822 | Chow et al. | May 2001 | B1 |
6230276 | Hayden | May 2001 | B1 |
6301612 | Selitrennikoff et al. | Oct 2001 | B1 |
6308220 | Mathur | Oct 2001 | B1 |
6324181 | Wong et al. | Nov 2001 | B1 |
6330236 | Ofek et al. | Dec 2001 | B1 |
6370605 | Chong | Apr 2002 | B1 |
6397360 | Bruns | May 2002 | B1 |
6411599 | Blanc et al. | Jun 2002 | B1 |
6411627 | Hullett et al. | Jun 2002 | B1 |
6418477 | Verma | Jul 2002 | B1 |
6421342 | Schwartz et al. | Jul 2002 | B1 |
6424658 | Mathur | Jul 2002 | B1 |
6438628 | Messerly et al. | Aug 2002 | B1 |
6449274 | Holden et al. | Sep 2002 | B1 |
6457090 | Young | Sep 2002 | B1 |
6467008 | Gentry et al. | Oct 2002 | B1 |
6522656 | Gridley | Feb 2003 | B1 |
6570850 | Gutierrez et al. | May 2003 | B1 |
6597691 | Anderson et al. | Jul 2003 | B1 |
6597777 | Ho | Jul 2003 | B1 |
6606690 | Padovano | Aug 2003 | B2 |
6684209 | Ito et al. | Jan 2004 | B1 |
6697359 | George | Feb 2004 | B1 |
6718497 | Whitby-Strevens | Apr 2004 | B1 |
6760302 | Ellinas et al. | Jul 2004 | B1 |
6779083 | Ito et al. | Aug 2004 | B2 |
6785241 | Lu et al. | Aug 2004 | B1 |
6859435 | Lee et al. | Feb 2005 | B1 |
6865157 | Scott et al. | Mar 2005 | B1 |
6901072 | Wong | May 2005 | B1 |
6934799 | Acharya et al. | Aug 2005 | B2 |
6987768 | Kojima et al. | Jan 2006 | B1 |
6988130 | Blumenau et al. | Jan 2006 | B2 |
6988149 | Odenwald | Jan 2006 | B2 |
7010607 | Bunton | Mar 2006 | B1 |
7024410 | Ito et al. | Apr 2006 | B2 |
7051182 | Blumenau et al. | May 2006 | B2 |
7061871 | Sheldon et al. | Jun 2006 | B2 |
7120728 | Krakirian et al. | Oct 2006 | B2 |
7215680 | Mullendore et al. | May 2007 | B2 |
7233985 | Hahn et al. | Jun 2007 | B2 |
7263593 | Honda et al. | Aug 2007 | B2 |
7269168 | Roy et al. | Sep 2007 | B2 |
7277431 | Walter et al. | Oct 2007 | B2 |
7287063 | Baldwin et al. | Oct 2007 | B2 |
7315511 | Morita et al. | Jan 2008 | B2 |
7352740 | Hammons et al. | Apr 2008 | B2 |
7397788 | Mies et al. | Jul 2008 | B2 |
7406034 | Cometto et al. | Jul 2008 | B1 |
20010033552 | Barrack et al. | Oct 2001 | A1 |
20020034178 | Schmidt et al. | Mar 2002 | A1 |
20020118692 | Oberman et al. | Aug 2002 | A1 |
20020124124 | Matsumoto et al. | Sep 2002 | A1 |
20020194294 | Blumenau et al. | Dec 2002 | A1 |
20020196773 | Berman | Dec 2002 | A1 |
20030016683 | George et al. | Jan 2003 | A1 |
20030026267 | Oberman et al. | Feb 2003 | A1 |
20030035433 | Craddock et al. | Feb 2003 | A1 |
20030046396 | Richter et al. | Mar 2003 | A1 |
20030072316 | Niu et al. | Apr 2003 | A1 |
20030093607 | Main et al. | May 2003 | A1 |
20030118053 | Edsall et al. | Jun 2003 | A1 |
20030120743 | Coatney et al. | Jun 2003 | A1 |
20030120983 | Vieregge et al. | Jun 2003 | A1 |
20030126242 | Chang | Jul 2003 | A1 |
20030131105 | Czeiger et al. | Jul 2003 | A1 |
20030172149 | Edsall et al. | Sep 2003 | A1 |
20030172239 | Swank | Sep 2003 | A1 |
20030174721 | Black et al. | Sep 2003 | A1 |
20030179748 | George et al. | Sep 2003 | A1 |
20030189930 | Terrell et al. | Oct 2003 | A1 |
20030189935 | Warden et al. | Oct 2003 | A1 |
20030191857 | Terell et al. | Oct 2003 | A1 |
20030195983 | Krause | Oct 2003 | A1 |
20040013088 | Gregg | Jan 2004 | A1 |
20040013092 | Betker et al. | Jan 2004 | A1 |
20040013125 | Betker et al. | Jan 2004 | A1 |
20040028038 | Anderson et al. | Feb 2004 | A1 |
20040054866 | Blumenau et al. | Mar 2004 | A1 |
20040081196 | Elliott | Apr 2004 | A1 |
20040092278 | Diepstraten et al. | May 2004 | A1 |
20040120340 | Furey et al. | Jun 2004 | A1 |
20040141521 | George et al. | Jul 2004 | A1 |
20040153526 | Haun et al. | Aug 2004 | A1 |
20050047334 | Paul et al. | Mar 2005 | A1 |
20050188245 | Seto et al. | Aug 2005 | A1 |
20060143300 | See et al. | Jun 2006 | A1 |
20060274744 | Nagai et al. | Dec 2006 | A1 |
Number | Date | Country |
---|---|---|
0649098 | Apr 1995 | EP |
0856969 | Aug 1998 | EP |
WO-9836537 | Aug 1998 | WO |