WO2010096980A1 - Method and device for transmitting data - Google Patents

Method and device for transmitting data Download PDF

Info

Publication number
WO2010096980A1
WO2010096980A1 PCT/CN2009/073878 CN2009073878W WO2010096980A1 WO 2010096980 A1 WO2010096980 A1 WO 2010096980A1 CN 2009073878 W CN2009073878 W CN 2009073878W WO 2010096980 A1 WO2010096980 A1 WO 2010096980A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
initiator
target
controller port
information
Prior art date
Application number
PCT/CN2009/073878
Other languages
French (fr)
Chinese (zh)
Inventor
张粤
李旭慧
Original Assignee
成都市华为赛门铁克科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 成都市华为赛门铁克科技有限公司 filed Critical 成都市华为赛门铁克科技有限公司
Publication of WO2010096980A1 publication Critical patent/WO2010096980A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for transmitting data.
  • the Small Computer System Interface is an interface technology developed for small computers. With the development of computer technology, it has been completely transplanted to ordinary personal computers (PCs).
  • the SCSI-based Fibre Channel Protocol for SCSI (FCP-SCSI) is designed to transmit SCSI protocols between Fibre Channel-based (FC, Fibre Channel) ports via FCP. This protocol allows Fibre Channel to be used without any modifications to previous SCSI-based applications.
  • FC-SCSI is the primary means of communication between storage systems and servers. According to the SCSI protocol definition, inter-device communication occurs between the initiator and the target, and the command is always sent by the initiator, and the target accepts the command.
  • the FCP protocol is designed to inherit the SCSI protocol
  • devices designed according to the FCP protocol also inherit the characteristics of the SCSI protocol.
  • the FC initiator needs to send commands to be received by the FC target. Command, and then complete inter-device input/output (I/O) communication.
  • the SCSI fabric model is divided into a SCSI Initiator I/O System and a SCSI Target I/O System, where the Initiator is The system can initiate SCSI requests actively, the Target subsystem can passively process requests and bring back data and responses, both active/passive cannot be reversed; the ports that can handle the FC protocol are collectively referred to as FC controller ports, which include initiators and targets.
  • FC controller port is commonly used for I/O interaction between two subsystems.
  • FIG. 1 it is a schematic diagram of establishing a connection between a prior art FC initiator and a target.
  • the FC port is not the initiator port, but the target port.
  • the initiator can only establish an active connection on the FC-4 layer, and the target can only establish a passive connection on the FC-4 layer. That is, in Figure 1, the data transmission direction of the FC-4 layer must be transmitted by the initiator to the target.
  • the embodiment of the invention provides a method and a device for transmitting data, so that the FC controller port can send and receive requests in both directions, thereby reducing hardware costs.
  • the Fibre Channel FC controller port receives the information packet, and determines whether the information packet is a starter information packet or a target information packet;
  • the FC controller port processes the initiator packet as an initiator
  • the FC controller port processes the target packet as a target.
  • the embodiment of the invention further provides a Fibre Channel FC controller port, including:
  • the packet determining module is configured to receive the information packet, and when determining that the received information packet is an initiator information packet, transmit the initiator information packet to the initiator module, and determine that the received information packet is a target information packet. Transmitting the target information packet to a target module;
  • the initiator module is configured to process the received initiator packet according to the manner of the initiator; and the target module is configured to process the received target packet according to the manner of the target.
  • the embodiment of the present invention further provides an FC layer unit, located on an FC controller port, including: a physical PHY layer, configured to establish a physical connection of a Fibre Channel, receive a packet through a Fibre Channel; and an FC-2 layer, configured to determine When the received information packet is a starter information packet, the initiator information packet is transmitted to the initiator module, and when the received information packet is a target information packet, the target information packet is transmitted to the target.
  • the FC-4 layer including the initiator module and the target module, is used to process the received packets.
  • the embodiment of the present invention enables the FC controller port based on the FCP design to send and receive requests in both directions, that is, the same FC controller port can send requests and receive requests, thereby saving hardware without changing the hardware structure. Resources, reducing the production cost of the product. Moreover, since the hardware resources are saved, the saved resources can be further utilized to redundantly protect the existing resources, thereby enhancing the reliability of the system.
  • FIG. 1 is a schematic diagram of establishing a connection between a prior art FC initiator and a target
  • FIG. 2 is a schematic diagram of establishing a connection between an FC initiator and a target according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for transmitting data according to an embodiment of the present invention
  • FC controller port 4 is a schematic structural diagram of a FC controller port according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of an FC layer unit according to an embodiment of the present invention. detailed description
  • the embodiment of the present invention multiplexes the functions of the FC initiator and the FC target to an FC controller port to solve the problem that the FC controller port based on the FCP design is strictly limited to the active or passive mode in the application.
  • Two connections are established at the FC-4 layer of the FC controller port, see FIG. 2, which is a schematic diagram of establishing a connection between the FC initiator and the target according to an embodiment of the present invention.
  • One of the two connections established by the FC-4 layer acts as an active connection, and the other acts as a passive connection.
  • the active connection acts as an active initiator request operation of the Initiator.
  • the passive connection is used as a Target to receive requests and return request responses, data, etc. operating.
  • Two connections in the application correspond to a connection to FC-2, The FC packets are judged and filtered by the direction of the connection.
  • each FC controller port handles two modes of connectivity: both active initiation of FC-4 connections and passive reception of FC-4 connections; on the FC-4 layer, each The port has both active and passive connections: the active connection is used to send request data, and the passive connection is used to receive response request data;
  • a method for transmitting data according to an embodiment of the present invention, as shown in FIG. 3, includes:
  • Step 301 The Fibre Channel FC controller port receives the information packet through the Fibre Channel;
  • Step 302 determining, according to the packet information, whether the received packet is an initiator packet or a target packet, if it is an initiator packet, performing step 303, if it is a target packet, executing step 304;
  • the step of determining whether the received packet is an initiator packet or a target packet may include:
  • Determining whether the initiator packet or the target packet is received according to the packet header of the packet includes:
  • FC-2 a frame header structure diagram of FC-2 according to an embodiment of the present invention, that is, a packet header.
  • the receiver ID (Destination ID)
  • the initiator ID (Source ID) in the packet header in Table 1
  • the frame control direction (Frame Control) relative to the initiator
  • the information package can be divided into: command packet, data packet, response packet, etc., and the judgment is
  • the initiator packet or the target packet is usually for the command packet.
  • the command packet is usually the first packet.
  • the receiver information of other subsequent packets is the same as the command packet, and the subsequent stages do not need to be repeated.
  • the FC controller port controls the direction of the frame relative to the initiator in the packet header in Table 1.
  • the receiver it first determines whether the received packet is a command packet. If yes, it is determined whether the recipient ID (the Destination ID) in the packet header is the same as its own ID. If the same, it determines that it is currently the target. The currently received packet is the target packet.
  • the FC controller port is used as the initiator to process the initiator packet; the method is the same as that in the prior art, and the manner in which the FC controller port is used as the initiator to process the initiator packet is not described herein. Implementation process.
  • Step 304 The FC controller port processes the target information packet as a target.
  • FC controller port is used as the target to process the target information packet.
  • the specific implementation process is not described here.
  • the process shown in FIG. 3 may further include:
  • the FC controller port performs application layer processing on the processed initiator packet or the target packet.
  • the processing of the application layer is the same as that of the prior art, and the specific implementation process will not be described herein.
  • the method for transmitting data provided by the embodiment of the present invention enables the same FC controller port to send a request and receive a request, thereby saving hardware resources and reducing production cost of the product without changing the hardware structure. . Moreover, since the hardware resources are saved, the resources saved can be further utilized to redundantly protect the existing resources, thereby enhancing the reliability of the system.
  • FIG. 4 it is a schematic diagram of a structure of a port of a FC controller according to an embodiment of the present invention, including: a packet judgment module 401, configured to receive a packet, and determine that the received packet is an initiator packet, The initiator information packet is transmitted to the initiator module 402, and when the received information packet is the target information packet, the target information packet is transmitted to the target module 403; the specific determination method is the same as the content in the foregoing method flow. , No longer.
  • the initiator module 402 is configured to process the received initiator packet according to the manner of the initiator.
  • the manner of processing the received initiator packet according to the manner of the initiator is the same as the prior art. The specific implementation process will not be described again.
  • the target module 403 is configured to process the received target packet according to the manner of the target.
  • the manner in which the received target information packet is processed in the manner of the target is the same as the prior art, and the specific implementation process will not be described herein.
  • the foregoing FC controller port may further include: an application module 404, configured to perform application layer processing on the received initiator information packet or the target device information packet.
  • the processing of the application layer is the same as that of the prior art, and the specific implementation process will not be described herein.
  • the foregoing packet determining module may include: a connecting submodule 4011 and a determining submodule 4012, wherein the connecting submodule 4011 is configured to establish a physical connection of the Fibre Channel, and receive the information packet through the Fibre Channel; and the determining submodule 4012 is configured to determine the receiving When the obtained information packet is an initiator information packet, the initiator information packet is transmitted to the initiator module, and when the received information packet is a target information packet, the target information packet is transmitted to the target device. Module.
  • the process of determining whether the received packet is an initiator packet or a target packet is the same as the foregoing method, and details are not described herein again.
  • the above connection submodule is located at the physical (PHY) layer of the FC controller port; the judgment submodule is located at the FC-2 layer of the FC controller port; the initiator module and the target module are located at the FC-4 layer of the FC controller port.
  • the PHY layer, the FC-2 layer, and the FC-4 layer may be collectively referred to as an FC layer.
  • the application module 404 is located at the application APP layer of the FC controller port.
  • the FC controller port provided by the embodiment of the present invention enables the same FC controller port to send a request and receive a request, thereby saving hardware resources and reducing the production cost of the product without changing the hardware structure. . Moreover, since the hardware resources are saved, the resources saved can be further utilized to redundantly protect the existing resources, thereby enhancing the reliability of the system.
  • the embodiment of the present invention further provides an FC layer unit, as shown in FIG. 5, located on the FC controller port, including:
  • a physical (PHY) layer 503, configured to establish a physical connection of the fiber channel, and receive the information packet through the fiber channel;
  • the FC-2 layer 502 is configured to: when it is determined that the received information packet is an initiator information packet, The transmitter information packet is transmitted to the initiator module of the FC-4 layer, and when the received information packet is the target information packet, the target information packet is transmitted to the target module of the FC-4 layer;
  • the FC-4 layer 501 includes an initiator module and a target module for processing the received packet.
  • the manner in which the initiator module and the target module process the received packet is the same as the existing one, and is not described here.
  • the same FC controller port can send a request and receive a request, thereby saving hardware resources and reducing product production cost without changing the hardware structure. Moreover, due to the saving of hardware resources, the resources saved can be further utilized to provide redundancy protection for existing resources, thereby enhancing system reliability.

Abstract

A method for transmitting a data based on a FC controller port is disclosed, including: receiving an information packet, and judging whether the information packet is an initiator information packet or a target information packet; if the information packet is the initiator information packet, acting as the initiator to process the initiator information packet; if the information packet is the target information packet, acting as the target to process the target information packet. The FC controller port and a FC layer unit are also disclosed.

Description

一种传输数据的方法及装置 本申请要求于 2009 年 2 月 25 日提交中国专利局、 申请号为 200910118306.6、 发明名称为"一种传输数据的方法及装置 "的中国专利申请的 优先权, 其全部内容通过引用结合在本申请中。  The present invention claims the priority of the Chinese patent application filed on February 25, 2009, the Chinese Patent Application No. 200910118306.6, entitled "A Method and Apparatus for Transmitting Data". The entire contents are incorporated herein by reference.
技术领域 Technical field
本发明涉及通信技术领域, 特别涉及一种传输数据的方法及装置。  The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for transmitting data.
背景技术 Background technique
小型计算机系统接口 (SCSI, Small Computer System Interface )是为小型 机研制的一种接口技术, 随着电脑技术的发展,现在它被完全移植到了普通的 个人计算机( PC )上。 基于 SCSI的光纤信道协议( FCP-SCSI, Fibre Channel Protocol for SCSI ), 其目的是将 SCSI协议根据 FCP封装后, 通过光纤在基于 光纤信道(FC, Fibre Channel )端口间发送。 这个协议使得以前基于 SCSI 的 应用不做任何修改即可使用光纤通道。 FC-SCSI是存储系统和服务器之间最 主要的通信手段。 根据 SCSI协议定义, 设备间通讯发生于启动器与目标器之 间, 且总是由启动器发送命令, 目标器接受命令。 由于 FCP协议是继承 SCSI 协议而设计, 所以根据 FCP协议设计的设备也继承了 SCSI协议的这种特性 ——当设备间经由光纤通道通讯时, 需要由 FC启动器发送命令, 由 FC目标 器接收命令, 然后再完成设备间输入输出 (I/O )通讯。  The Small Computer System Interface (SCSI) is an interface technology developed for small computers. With the development of computer technology, it has been completely transplanted to ordinary personal computers (PCs). The SCSI-based Fibre Channel Protocol for SCSI (FCP-SCSI) is designed to transmit SCSI protocols between Fibre Channel-based (FC, Fibre Channel) ports via FCP. This protocol allows Fibre Channel to be used without any modifications to previous SCSI-based applications. FC-SCSI is the primary means of communication between storage systems and servers. According to the SCSI protocol definition, inter-device communication occurs between the initiator and the target, and the command is always sent by the initiator, and the target accepts the command. Since the FCP protocol is designed to inherit the SCSI protocol, devices designed according to the FCP protocol also inherit the characteristics of the SCSI protocol. When the devices communicate via Fibre Channel, the FC initiator needs to send commands to be received by the FC target. Command, and then complete inter-device input/output (I/O) communication.
根据 SCSI结构模型 ( SAM, SCSI Architecture Model ), SCSI结构模型分 为 SCSI启动器输入输出系统( SCSI Initiator I/O System )和 SCSI目标器输入 输出系统( SCSI Target I/O System ), 其中 Initiator子系统能够主动发起 SCSI 请求, Target子系统能够被动处理请求并带回数据和响应, 两者主动 /被动不能 颠倒; 这里能够处理 FC协议的端口统称为 FC控制器端口, 其包括启动器和 目标器, FC控制器端口普遍用于两种子系统间的 I/O交互。  According to the SCSI Architecture Model (SAM, SCSI Architecture Model), the SCSI fabric model is divided into a SCSI Initiator I/O System and a SCSI Target I/O System, where the Initiator is The system can initiate SCSI requests actively, the Target subsystem can passively process requests and bring back data and responses, both active/passive cannot be reversed; the ports that can handle the FC protocol are collectively referred to as FC controller ports, which include initiators and targets. The FC controller port is commonly used for I/O interaction between two subsystems.
参见图 1 , 其是现有技术的 FC启动器和目标器之间建立连接的示意图。 根据 FCP协议, FC端口不是启动器端口, 就是目标器端口。 在建立连接的过 程中,启动器只能建立 FC-4层上的主动连接, 目标器则只能建立 FC-4层上的 被动连接。 即在图 1中 FC-4层的数据传输方向一定是启动器传输到目标器。  Referring to Figure 1, it is a schematic diagram of establishing a connection between a prior art FC initiator and a target. According to the FCP protocol, the FC port is not the initiator port, but the target port. In the process of establishing a connection, the initiator can only establish an active connection on the FC-4 layer, and the target can only establish a passive connection on the FC-4 layer. That is, in Figure 1, the data transmission direction of the FC-4 layer must be transmitted by the initiator to the target.
但是发明人在实施过程中, 发现现有技术中至少存在如下问题: 由于 SAM架构的约束, 只能单向发送请求。 即通常 FC控制器端口在应 用中被严格限定为主动或被动模式。 只能单方向发起建立连接, 且在已建立的 连接上只能单向发起请求(启动器向目标器发起请求;); 要双向主动发送请求 必须增加另一个 FC控制器, 增加了硬件成本。 发明内容 However, during the implementation process, the inventors found that at least the following problems exist in the prior art: Due to the constraints of the SAM architecture, requests can only be sent in one direction. That is, usually the FC controller port is strictly limited to active or passive mode in the application. A connection can only be initiated in one direction, and a request can only be initiated in one direction on the established connection (the initiator initiates a request to the target;); to send the request in both directions, another FC controller must be added, increasing the hardware cost. Summary of the invention
本发明实施例在于提供了一种传输数据的方法及装置, 以使 FC控制器端 口可以双向收发请求, 降低硬件成本。  The embodiment of the invention provides a method and a device for transmitting data, so that the FC controller port can send and receive requests in both directions, thereby reducing hardware costs.
本发明实施例提供的一种基于光纤信道 FC控制器端口的传输数据的方 法, 包括:  A method for transmitting data based on a Fibre Channel FC controller port according to an embodiment of the present invention includes:
光纤信道 FC控制器端口接收信息包, 判断所述信息包是启动器信息包还 是目标器信息包;  The Fibre Channel FC controller port receives the information packet, and determines whether the information packet is a starter information packet or a target information packet;
如果所述信息包是启动器信息包, 则 FC控制器端口作为启动器对所述启 动器信息包进行处理;  If the packet is an initiator packet, the FC controller port processes the initiator packet as an initiator;
如果所述信息包是目标器信息包, 则 FC控制器端口作为目标器对所述目 标器信息包进行处理。  If the packet is a target packet, the FC controller port processes the target packet as a target.
本发明实施例还提供了一种光纤信道 FC控制器端口, 包括:  The embodiment of the invention further provides a Fibre Channel FC controller port, including:
信息包判断模块, 用于接收信息包,确定接收到的所述信息包是启动器信 息包时,将所述启动器信息包传输给启动器模块, 确定接收到的信息包是目标 器信息包时, 将所述目标器信息包传输给目标器模块;  The packet determining module is configured to receive the information packet, and when determining that the received information packet is an initiator information packet, transmit the initiator information packet to the initiator module, and determine that the received information packet is a target information packet. Transmitting the target information packet to a target module;
启动器模块, 用于按照启动器的方式对接收到的启动器信息包进行处理; 目标器模块, 用于按照目标器的方式对接收到的目标器信息包进行处理。 本发明实施例还提供了一种 FC层单元, 位于 FC控制器端口上, 包括: 物理 PHY层, 用于建立光纤信道的物理连接,通过光纤信道接收信息包; FC-2 层, 用于确定接收到的所述信息包是启动器信息包时, 将所述启动 器信息包传输给启动器模块,确定接收到的信息包是目标器信息包时, 将所述 目标器信息包传输给目标器模块;  The initiator module is configured to process the received initiator packet according to the manner of the initiator; and the target module is configured to process the received target packet according to the manner of the target. The embodiment of the present invention further provides an FC layer unit, located on an FC controller port, including: a physical PHY layer, configured to establish a physical connection of a Fibre Channel, receive a packet through a Fibre Channel; and an FC-2 layer, configured to determine When the received information packet is a starter information packet, the initiator information packet is transmitted to the initiator module, and when the received information packet is a target information packet, the target information packet is transmitted to the target. Module
FC-4 层, 包括启动器模块和目标器模块, 用于对接收到的信息包进行处 理。 应用本发明实施例,使得基于 FCP设计的 FC控制器端口可以双向收发请 求, 即同一个 FC控制器端口既可以发送请求, 还可以接收请求, 这样在不改 变硬件结构的情况下, 节省了硬件资源, 降低了产品的生产成本。 再有, 由于 节省了硬件资源,便可进一步利用节省下的资源为现有资源做冗余保护,增强 了系统的可靠性。 附图说明 The FC-4 layer, including the initiator module and the target module, is used to process the received packets. The embodiment of the present invention enables the FC controller port based on the FCP design to send and receive requests in both directions, that is, the same FC controller port can send requests and receive requests, thereby saving hardware without changing the hardware structure. Resources, reducing the production cost of the product. Moreover, since the hardware resources are saved, the saved resources can be further utilized to redundantly protect the existing resources, thereby enhancing the reliability of the system. DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作筒单地介绍,显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲, 在不付 出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description For some embodiments of the present invention, other drawings may be obtained from those skilled in the art without departing from the drawings.
图 1是现有技术的 FC启动器和目标器之间建立连接的示意图;  1 is a schematic diagram of establishing a connection between a prior art FC initiator and a target;
图 2是根据本发明实施例的 FC启动器和目标器之间建立连接的示意图; 图 3是根据本发明实施例的传输数据的方法流程图;  2 is a schematic diagram of establishing a connection between an FC initiator and a target according to an embodiment of the present invention; FIG. 3 is a flowchart of a method for transmitting data according to an embodiment of the present invention;
图 4是根据本发明实施例的 FC控制器端口的结构示意图;  4 is a schematic structural diagram of a FC controller port according to an embodiment of the present invention;
图 5是根据本发明实施例的一种 FC层单元的结构示意图。 具体实施方式  FIG. 5 is a schematic structural diagram of an FC layer unit according to an embodiment of the present invention. detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  BRIEF DESCRIPTION OF THE DRAWINGS The technical solutions in the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative work are within the scope of the present invention.
本发明实施例将 FC启动器与 FC 目标器的功能复用到一个 FC控制器端 口上,以解决基于 FCP设计的 FC控制器端口在应用中被严格限定为主动或被 动模式的问题, 为此, 在 FC控制器端口的 FC-4层建立 2条连接, 参见图 2, 其是根据本发明实施例的 FC 启动器和目标器之间建立连接的示意图。 FC-4 层所建立的两条连接中, 一条作为主动连接, 另一条作为被动连接, 主动连接 起到 Initiator的主动发起请求操作作用, 被动连接用来作为 Target接收请求以 及返回请求响应、数据等操作。 两个连接在应用中对应到 FC-2的一条连接上, 通过连接的方向来判断、 筛选 FC信息包。 The embodiment of the present invention multiplexes the functions of the FC initiator and the FC target to an FC controller port to solve the problem that the FC controller port based on the FCP design is strictly limited to the active or passive mode in the application. Two connections are established at the FC-4 layer of the FC controller port, see FIG. 2, which is a schematic diagram of establishing a connection between the FC initiator and the target according to an embodiment of the present invention. One of the two connections established by the FC-4 layer acts as an active connection, and the other acts as a passive connection. The active connection acts as an active initiator request operation of the Initiator. The passive connection is used as a Target to receive requests and return request responses, data, etc. operating. Two connections in the application correspond to a connection to FC-2, The FC packets are judged and filtered by the direction of the connection.
也就是说, 在连接层次上, 每个 FC控制器端口处理两种模式的连接: 既 处理主动发起 FC-4连接, 也处理被动接收的 FC-4连接; 在 FC-4层上, 每个 端口同时存在主动连接和被动连接: 主动连接用于发送请求数据,被动连接用 于接收响应请求数据;  That is, at the connection level, each FC controller port handles two modes of connectivity: both active initiation of FC-4 connections and passive reception of FC-4 connections; on the FC-4 layer, each The port has both active and passive connections: the active connection is used to send request data, and the passive connection is used to receive response request data;
本发明实施例提供的一种传输数据的方法, 参见图 3 , 包括:  A method for transmitting data according to an embodiment of the present invention, as shown in FIG. 3, includes:
步骤 301 , 光纤信道 FC控制器端口通过光纤信道接收信息包;  Step 301: The Fibre Channel FC controller port receives the information packet through the Fibre Channel;
步骤 302, 根据信息包信息判断接收到的信息包是启动器信息包还是目标 器信息包, 如果是启动器信息包, 则执行步骤 303 , 如果是目标器信息包, 则 执行步骤 304;  Step 302, determining, according to the packet information, whether the received packet is an initiator packet or a target packet, if it is an initiator packet, performing step 303, if it is a target packet, executing step 304;
其中,判断接收到的信息包是启动器信息包还是目标器信息包的步骤可以 包括:  The step of determining whether the received packet is an initiator packet or a target packet may include:
根据所述信息包的包头判断接收到的是启动器信息包还是目标器信息包, 具体包括:  Determining whether the initiator packet or the target packet is received according to the packet header of the packet includes:
参见表 1 , 其是根据本发明实施例的 FC-2的帧头结构图, 即信息包包头 的结  Referring to Table 1, it is a frame header structure diagram of FC-2 according to an embodiment of the present invention, that is, a packet header.
Figure imgf000006_0001
Figure imgf000006_0001
表 1  Table 1
根据表 1 中信息包包头中的接收者标识 (Destination ID )、 发起者标识 ( Source ID )、 以及相对于发起者的帧控制方向( Frame Control ) , 判断接收到 的是启动器信息包还是目标器信息包。  According to the receiver ID (Destination ID), the initiator ID (Source ID) in the packet header in Table 1, and the frame control direction (Frame Control) relative to the initiator, it is judged whether the initiator packet or the target is received. Packet.
首先需要说明, 信息包可以分为: 命令包、 数据包、 响应包等, 而判断是 启动器信息包还是目标器信息包通常是对命令包而言, 命令包通常是第一个 包,后续其他信息包的接收者信息跟命令包一样,后续阶段不需要再重复判别 了。 First of all, the information package can be divided into: command packet, data packet, response packet, etc., and the judgment is The initiator packet or the target packet is usually for the command packet. The command packet is usually the first packet. The receiver information of other subsequent packets is the same as the command packet, and the subsequent stages do not need to be repeated.
上述判断方法具体如下:  The above judgment method is as follows:
FC 控制器端口根据表 1 内信息包包头中相对于发起者的帧控制方向 The FC controller port controls the direction of the frame relative to the initiator in the packet header in Table 1.
( Frame Control )确定自身是发送方还是接收方, 如果是发送方且发起者标识 ( Source lD )与自身相同, 则确定自身当前作为启动器, 当前接收到的信息包 是启动器信息包; (Frame Control) determines whether it is the sender or the receiver. If it is the sender and the originator ID (Source lD) is the same as itself, it determines that it is currently the initiator, and the currently received packet is the initiator packet;
如果是接收方, 则首先判断接收的信息包是否为命令包, 如果是, 再判断 信息包包头中的接收者标识( Destination ID )与自身的 ID是否相同, 如相同, 则确定自身当前作为目标器, 当前接收到的信息包为目标器信息包。  If it is the receiver, it first determines whether the received packet is a command packet. If yes, it is determined whether the recipient ID (the Destination ID) in the packet header is the same as its own ID. If the same, it determines that it is currently the target. The currently received packet is the target packet.
步骤 303 , FC控制器端口作为启动器对启动器信息包进行处理; 结束; 其中, FC控制器端口作为启动器对启动器信息包进行处理的方式与现有 技术相同, 此处不再赘述具体实现过程。  In the step 303, the FC controller port is used as the initiator to process the initiator packet; the method is the same as that in the prior art, and the manner in which the FC controller port is used as the initiator to process the initiator packet is not described herein. Implementation process.
步骤 304, FC控制器端口作为目标器对目标器信息包进行处理。  Step 304: The FC controller port processes the target information packet as a target.
其中, FC控制器端口作为目标器对目标器信息包进行处理的方式与现有 技术相同, 此处不再赘述具体实现过程。  The manner in which the FC controller port is used as the target to process the target information packet is the same as the prior art. The specific implementation process is not described here.
对于图 3所示流程还可以包括: FC控制器端口对处理后的启动器信息包 或目标器信息包进行应用层处理。应用层的处理的方式与现有技术相同, 此处 不再赘述具体实现过程。  The process shown in FIG. 3 may further include: The FC controller port performs application layer processing on the processed initiator packet or the target packet. The processing of the application layer is the same as that of the prior art, and the specific implementation process will not be described herein.
应用本发明实施例提供的传输数据的方法, 使同一个 FC控制器端口既可 以发送请求, 还可以接收请求, 这样在不改变硬件结构的情况下, 节省了硬件 资源, 降低了产品的生产成本。 再有, 由于节省了硬件资源, 便可进一步利用 节省下的资源为现有资源做冗余保护, 增强了系统的可靠性。  The method for transmitting data provided by the embodiment of the present invention enables the same FC controller port to send a request and receive a request, thereby saving hardware resources and reducing production cost of the product without changing the hardware structure. . Moreover, since the hardware resources are saved, the resources saved can be further utilized to redundantly protect the existing resources, thereby enhancing the reliability of the system.
参见图 4, 其是根据本发明实施例的 FC控制器端口结构示意图, 包括: 信息包判断模块 401 , 用于接收信息包, 确定接收到的所述信息包是启动 器信息包时, 将所述启动器信息包传输给启动器模块 402, 确定接收到的信息 包是目标器信息包时, 将所述目标器信息包传输给目标器模块 403; 具体确定 方法与前述方法流程中的内容相同, 不再赘述。 启动器模块 402 , 用于按照启动器的方式对接收到的启动器信息包进行处 理; 其中,按照启动器的方式对接收到的启动器信息包进行处理的方式与现有 技术相同, 此处不再赘述具体实现过程。 Referring to FIG. 4, it is a schematic diagram of a structure of a port of a FC controller according to an embodiment of the present invention, including: a packet judgment module 401, configured to receive a packet, and determine that the received packet is an initiator packet, The initiator information packet is transmitted to the initiator module 402, and when the received information packet is the target information packet, the target information packet is transmitted to the target module 403; the specific determination method is the same as the content in the foregoing method flow. , No longer. The initiator module 402 is configured to process the received initiator packet according to the manner of the initiator. The manner of processing the received initiator packet according to the manner of the initiator is the same as the prior art. The specific implementation process will not be described again.
目标器模块 403 , 用于按照目标器的方式对接收到的目标器信息包进行处 理。其中,按照目标器的方式对接收到的目标器信息包进行处理的方式与现有 技术相同, 此处不再赘述具体实现过程。  The target module 403 is configured to process the received target packet according to the manner of the target. The manner in which the received target information packet is processed in the manner of the target is the same as the prior art, and the specific implementation process will not be described herein.
上述 FC控制器端口还可以包括: 应用模块 404, 用于对接收到的启动器 信息包或目标器信息包进行应用层处理。 应用层的处理的方式与现有技术相 同, 此处不再赘述具体实现过程。  The foregoing FC controller port may further include: an application module 404, configured to perform application layer processing on the received initiator information packet or the target device information packet. The processing of the application layer is the same as that of the prior art, and the specific implementation process will not be described herein.
上述信息包判断模块可以包括: 连接子模块 4011和判断子模块 4012, 其 中, 连接子模块 4011 , 用于建立光纤信道的物理连接, 通过光纤信道接收信 息包; 判断子模块 4012, 用于确定接收到的所述信息包是启动器信息包时, 将所述启动器信息包传输给启动器模块,确定接收到的信息包是目标器信息包 时, 将所述目标器信息包传输给目标器模块。  The foregoing packet determining module may include: a connecting submodule 4011 and a determining submodule 4012, wherein the connecting submodule 4011 is configured to establish a physical connection of the Fibre Channel, and receive the information packet through the Fibre Channel; and the determining submodule 4012 is configured to determine the receiving When the obtained information packet is an initiator information packet, the initiator information packet is transmitted to the initiator module, and when the received information packet is a target information packet, the target information packet is transmitted to the target device. Module.
具体的确定接收到的所述信息包是启动器信息包还是目标器信息包的过 程与前述方法相同, 此处不再赘述。  Specifically, the process of determining whether the received packet is an initiator packet or a target packet is the same as the foregoing method, and details are not described herein again.
上述连接子模块位于 FC控制器端口的物理( PHY )层; 判断子模块位于 FC控制器端口的 FC-2层; 启动器模块和目标器模块位于 FC控制器端口的 FC-4层。 其中, PHY层、 FC-2层和 FC-4层可被统称为 FC层。  The above connection submodule is located at the physical (PHY) layer of the FC controller port; the judgment submodule is located at the FC-2 layer of the FC controller port; the initiator module and the target module are located at the FC-4 layer of the FC controller port. The PHY layer, the FC-2 layer, and the FC-4 layer may be collectively referred to as an FC layer.
上述应用模块 404位于 FC控制器端口的应用 APP层。  The application module 404 is located at the application APP layer of the FC controller port.
应用本发明实施例提供的 FC控制器端口, 使同一个 FC控制器端口既可 以发送请求, 还可以接收请求, 这样在不改变硬件结构的情况下, 节省了硬件 资源, 降低了产品的生产成本。 再有, 由于节省了硬件资源, 便可进一步利用 节省下的资源为现有资源做冗余保护, 增强了系统的可靠性。  The FC controller port provided by the embodiment of the present invention enables the same FC controller port to send a request and receive a request, thereby saving hardware resources and reducing the production cost of the product without changing the hardware structure. . Moreover, since the hardware resources are saved, the resources saved can be further utilized to redundantly protect the existing resources, thereby enhancing the reliability of the system.
本发明实施例还提供了一种 FC层单元, 参见图 5 , 位于 FC控制器端口 上, 包括:  The embodiment of the present invention further provides an FC layer unit, as shown in FIG. 5, located on the FC controller port, including:
物理(PHY )层 503 , 用于建立光纤信道的物理连接, 通过光纤信道接收 信息包;  a physical (PHY) layer 503, configured to establish a physical connection of the fiber channel, and receive the information packet through the fiber channel;
FC-2层 502,用于确定接收到的所述信息包是启动器信息包时,将所述启 动器信息包传输给 FC-4层的启动器模块, 确定接收到的信息包是目标器信息 包时, 将所述目标器信息包传输给 FC-4层的目标器模块; The FC-2 layer 502 is configured to: when it is determined that the received information packet is an initiator information packet, The transmitter information packet is transmitted to the initiator module of the FC-4 layer, and when the received information packet is the target information packet, the target information packet is transmitted to the target module of the FC-4 layer;
FC-4层 501 , 包括启动器模块和目标器模块,用于对接收到的信息包进行 处理。其中, 启动器模块和目标器模块对接收到的信息包进行处理的方式与现 有方式相同, 在此不再赘述。  The FC-4 layer 501 includes an initiator module and a target module for processing the received packet. The manner in which the initiator module and the target module process the received packet is the same as the existing one, and is not described here.
应用本发明实施例, 使同一个 FC控制器端口既可以发送请求, 还可以接 收请求, 这样在不改变硬件结构的情况下, 节省了硬件资源, 降低了产品的生 产成本。 再有, 由于节省了硬件资源, 便可进一步利用节省下的资源为现有资 源做冗余保护, 增强了系统的可靠性。  By applying the embodiment of the present invention, the same FC controller port can send a request and receive a request, thereby saving hardware resources and reducing product production cost without changing the hardware structure. Moreover, due to the saving of hardware resources, the resources saved can be further utilized to provide redundancy protection for existing resources, thereby enhancing system reliability.
本领域普通技术人员可以理解实现上述方法实施方式中的全部或部分步 骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于计算机可 读取存储介质中, 这里所称得的存储介质, 如: ROM/RAM、 磁碟、 光盘等。  A person skilled in the art can understand that all or part of the steps in implementing the above method embodiments can be completed by a program instructing related hardware, and the program can be stored in a computer readable storage medium, which is referred to herein. Storage media, such as: ROM/RAM, disk, CD, etc.
以上所述仅为本发明的较佳实施例而已, 并非用于限定本发明的保护范 围。 凡在本发明的精神和原则之内所作的任何修改、 等同替换、 改进等, 均包 含在本发明的保护范围内。  The above description is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention. Any modifications, equivalents, improvements, etc. made within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims

权 利 要 求 Rights request
1、 一种基于光纤信道 FC控制器端口的传输数据的方法, 其特征在于, 包括:  A method for transmitting data based on a Fibre Channel FC controller port, comprising:
光纤信道 FC控制器端口接收信息包, 根据信息包信息判断所述信息包是 启动器信息包还是目标器信息包;  The Fibre Channel FC controller port receives the information packet, and determines, according to the information of the information packet, whether the information packet is an initiator information packet or a target information packet;
如果所述信息包是启动器信息包, 则所述 FC控制器端口作为启动器对所 述启动器信息包进行处理;  If the information packet is an initiator packet, the FC controller port processes the initiator packet as an initiator;
如果所述信息包是目标器信息包, 则所述 FC控制器端口作为目标器对所 述目标器信息包进行处理。  If the packet is a target packet, the FC controller port processes the target packet as a target.
2、 根据权利要求 1所述的方法, 其特征在于, 根据信息包信息判断所述 信息包是启动器信息包还是目标器信息包的步骤包括:  2. The method according to claim 1, wherein the step of determining, according to the packet information, whether the information packet is an initiator packet or a target packet comprises:
根据所述信息包的包头判断接收到的是启动器信息包还是目标器信息包。 Whether the initiator packet or the target packet is received is determined according to the packet header of the packet.
3、 根据权利要求 2所述的方法, 其特征在于, 根据所述信息包的包头判 断接收到的是启动器信息包还是目标器信息包的步骤包括: The method according to claim 2, wherein the step of determining whether the initiator packet or the target packet is received according to the header of the packet comprises:
根据信息包包头中相对于发起者的帧控制方向 Frame Control确定 FC控制 器端口是发送方还是接收方;  Determining, according to the frame control direction of the packet header relative to the initiator, Frame Control determines whether the FC controller port is a sender or a receiver;
如果是发送方且发起者标识 Source ID与 FC控制器端口相同, 则当前接 收到的信息包是启动器信息包;  If it is the sender and the initiator ID is the same as the FC controller port, the currently received packet is the initiator packet;
如果是接收方, 则确定接收到的信息包是否为命令包后, 判断信息包包头 中的接收者标识 Destination ID与 FC控制端口的 ID是否相同, 如相同, 则当 前接收到的信息包为目标器信息包。  If it is the receiver, it is determined whether the received packet is a command packet, and it is determined whether the receiver ID in the packet header is the same as the ID of the FC control port. If the same, the currently received packet is the target. Packet.
4、 根据权利要求 1所述的方法, 其特征在于, 在 FC控制器端口接收信 息包之前, 还包括: 在 FC控制器的 FC-4层建立对外的双向连接。  The method according to claim 1, wherein before the FC controller port receives the information packet, the method further includes: establishing an external bidirectional connection at the FC-4 layer of the FC controller.
5、 根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: FC控制 器端口对处理后的启动器信息包或目标器信息包进行应用层处理。  The method according to claim 1, wherein the method further comprises: performing, by the FC controller port, application layer processing on the processed initiator packet or the target packet.
6、 一种光纤信道 FC控制器端口, 其特征在于, 包括:  6. A Fibre Channel FC controller port, comprising:
信息包判断模块, 用于接收信息包,根据信息包信息确定接收到的所述信 息包是启动器信息包时, 将所述启动器信息包传输给启动器模块,确定接收到 的信息包是目标器信息包时, 将所述目标器信息包传输给目标器模块; 启动器模块, 用于按照启动器的方式对接收到的启动器信息包进行处理; 目标器模块, 用于按照目标器的方式对接收到的目标器信息包进行处理。a packet judging module, configured to receive a packet, and when determining, according to the packet information, that the received packet is an initiator packet, transmitting the initiator packet to a launcher module, and determining that the received packet is Transmitting the target information packet to the target module when the target packet is used; The initiator module is configured to process the received initiator packet according to the manner of the initiator; and the target module is configured to process the received target packet according to the manner of the target.
7、 根据权利要求 6所述的 FC控制器端口, 其特征在于, 所述 FC控制器 端口还包括: The FC controller port according to claim 6, wherein the FC controller port further includes:
应用模块, 用于对接收到的启动器信息包或目标器信息包进行应用层处 理。  An application module, configured to perform application layer processing on the received initiator packet or target packet.
8、 根据权利要求 6所述的 FC控制器端口, 其特征在于, 所述信息包判 断模块包括:  The FC controller port according to claim 6, wherein the packet determining module comprises:
连接子模块, 用于建立光纤信道的物理连接, 通过光纤信道接收信息包; 判断子模块, 用于确定接收到的所述信息包是启动器信息包时, 将所述启 动器信息包传输给启动器模块, 确定接收到的信息包是目标器信息包时,将所 述目标器信息包传输给目标器模块。  a connection submodule, configured to establish a physical connection of the Fibre Channel, and receive the information packet by using the Fibre Channel; and a determining submodule, configured to: when determining that the received information packet is an initiator information packet, transmitting the initiator information packet to The initiator module, when determining that the received packet is a target packet, transmits the target packet to the target module.
9、 根据权利要求 8所述的 FC控制器端口, 其特征在于,  9. The FC controller port of claim 8 wherein:
所述连接子模块位于 FC控制器端口的物理 PHY层;  The connection submodule is located at a physical PHY layer of the FC controller port;
所述判断子模块位于 FC控制器端口的 FC-2层;  The determining submodule is located at the FC-2 layer of the FC controller port;
所述启动器模块和目标器模块位于 FC控制器端口的 FC-4层。  The initiator module and the target module are located at the FC-4 layer of the FC controller port.
10、 根据权利要求 7所述的 FC控制器端口, 其特征在于,  10. The FC controller port of claim 7, wherein:
所述应用模块位于 FC控制器端口的应用 APP层。  The application module is located at the application APP layer of the FC controller port.
11、 一种 FC层单元, 位于 FC控制器端口上, 其特征在于, 包括: 物理 PHY层, 用于建立光纤信道的物理连接,通过光纤信道接收信息包; 11. A FC layer unit, located on a FC controller port, comprising: a physical PHY layer, configured to establish a physical connection of a fiber channel, and receive a packet through a fiber channel;
FC-2 层, 用于根据信息包信息确定接收到的所述信息包是启动器信息包 还是目标器信息包; An FC-2 layer, configured to determine, according to the information of the information packet, whether the received information packet is an initiator information packet or a target information packet;
FC-4 层, 用于对确定的启动器信息包按照启动器的方式进行处理, 对确 定的目标器信息包按照目标器的方式进行处理。  The FC-4 layer is used to process the determined initiator packet in the manner of the initiator, and the determined target packet is processed in the manner of the target.
PCT/CN2009/073878 2009-02-25 2009-09-11 Method and device for transmitting data WO2010096980A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2009101183066A CN101504627B (en) 2009-02-25 2009-02-25 Data transmission method and apparatus
CN200910118306.6 2009-02-25

Publications (1)

Publication Number Publication Date
WO2010096980A1 true WO2010096980A1 (en) 2010-09-02

Family

ID=40976881

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/073878 WO2010096980A1 (en) 2009-02-25 2009-09-11 Method and device for transmitting data

Country Status (2)

Country Link
CN (1) CN101504627B (en)
WO (1) WO2010096980A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040170432A1 (en) * 1999-05-24 2004-09-02 Reynolds Robert A. Method and system for multi-initiator support to streaming devices in a fibre channel network
US6826646B1 (en) * 2000-12-20 2004-11-30 Adaptec, Inc. Method and structure for supporting data streaming by a SCSI initiator during the data in phase of the packetized SCSI protocol
CN1949203A (en) * 2006-10-27 2007-04-18 华为技术有限公司 Architecture of interface target machine for miniature computer system and data transmitting method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040170432A1 (en) * 1999-05-24 2004-09-02 Reynolds Robert A. Method and system for multi-initiator support to streaming devices in a fibre channel network
US6826646B1 (en) * 2000-12-20 2004-11-30 Adaptec, Inc. Method and structure for supporting data streaming by a SCSI initiator during the data in phase of the packetized SCSI protocol
CN1949203A (en) * 2006-10-27 2007-04-18 华为技术有限公司 Architecture of interface target machine for miniature computer system and data transmitting method

Also Published As

Publication number Publication date
CN101504627A (en) 2009-08-12
CN101504627B (en) 2012-04-25

Similar Documents

Publication Publication Date Title
US7587528B2 (en) Control of information units in fibre channel communications
US7461195B1 (en) Method and system for dynamically adjusting data transfer rates in PCI-express devices
JP5301533B2 (en) How to optimize near-field links
US7761588B2 (en) System and article of manufacture for enabling communication between nodes
US7921240B2 (en) Method and system for supporting hardware acceleration for iSCSI read and write operations and iSCSI chimney
US8400942B2 (en) Large frame path MTU discovery and communication for FCoE devices
TW200405172A (en) Bus connection system
RU2608241C2 (en) Communication between client device and wireless peripheral device
WO2012100724A1 (en) Method, device, and system for transmitting packet on pcie bus
WO2011091747A1 (en) Memory system and data transmission method
EP1864441B1 (en) Iscsi and fibre channel authentication
WO2006002579A1 (en) A method for data transmission between network apparatus
US7908404B1 (en) Method and system for managing network and storage data
US7639715B1 (en) Dedicated application interface for network systems
US20050283545A1 (en) Method and system for supporting write operations with CRC for iSCSI and iSCSI chimney
WO2019153109A1 (en) Method, apparatus and device for realizing re-mapping of quality of service flow, and storage medium
WO2010096980A1 (en) Method and device for transmitting data
US9942134B2 (en) Holding of a link in an optical interface by a lower level processor until authorization is received from an upper level processor
JP2009182458A (en) Communication apparatus, communication system, communication method, and program
US7562109B2 (en) Connectivity confirmation method for network storage device and host computer
WO2022068302A1 (en) Chip, communication system and communication method
WO2012126352A1 (en) Method, device and system for transmitting messages on pcie bus
WO2009084506A1 (en) Communication device, communication system, communication method, and program
US8793399B1 (en) Method and system for accelerating network packet processing
US8225004B1 (en) Method and system for processing network and storage data

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09840648

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09840648

Country of ref document: EP

Kind code of ref document: A1