Remote non-host device access control method of fiber channel protocol
The remote non-host device access control method using the Fibre Channel protocol enables remote, high-speed, concurrent access and configuration of network nodes without CPUs and operating systems. This solves the problems of long configuration time and low efficiency in existing technologies, optimizes hardware cost and power consumption, and supports large-capacity configuration addressing and flexible permission management.
Patent Information
- Application Number
- CN202511719463.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-03-03
AI Technical Summary
Existing Fibre Channel network nodes, without CPUs and operating systems, cannot achieve remote, high-speed, concurrent access and configuration, resulting in long configuration times, low efficiency, and difficulty in meeting the requirements of dynamic switching and real-time response.
The remote non-host device access control method using the Fibre Channel protocol initializes the remote non-host device through the Fibre Channel proprietary control protocol, uses the TYPE and R-Code fields in the remote frame payload to transmit control commands, realizes remote shared register read and write access control for network nodes without CPU and operating system, and resolves concurrent access conflicts through a hardware lock mechanism.
It enables high-speed configuration and access of remote nodes, shortening configuration time from seconds to milliseconds, reducing hardware costs and power consumption, and supporting 4GB of configuration addressing space, thus solving the problems of limited configuration space and insufficient concurrency control in traditional protocols.
Smart Images

Figure CN121603103A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fiber optic network transmission technology, and in particular to a method for remote non-host device access control using the Fibre Channel protocol. Background Technology
[0002] Fibre Channel (FC) network technology is an open international standard. Based on the international and open FC Fibre Channel standard system, different industries have developed and expanded different engineering application standards according to the application characteristics of their own equipment. For example, FC-AE (Fibre Channel Avionics Environment) and FC-VE (Fibre Channel-Vehicles Environment) are Fibre Channel for avionics environments.
[0003] In Fibre Channel-based computer networks, network nodes possess information processing hardware and software such as a Central Processing Unit (CPU) and an operating system. In automotive applications, most information processing nodes need to be installed in enclosed spaces with limited heat dissipation and power consumption (e.g., engine compartments, battery compartments). To reduce costs and power consumption, some network nodes have their CPU and operating system removed from their design. Typically, access and configuration are performed locally on the network node via a serial communication interface. However, due to limitations in serial communication interface speed and connection methods, this configuration and access method is time-consuming and cannot achieve the dynamic switching, real-time status acquisition, and high-speed configuration required in practical applications.
[0004] Current network nodes with CPUs are costly and consume a lot of power; network nodes without CPUs rely on local serial port configuration, which is inefficient and difficult to configure remotely. Summary of the Invention
[0005] Based on the above analysis, the embodiments of the present invention aim to provide a remote non-host device access control method for the Fibre Channel protocol, in order to solve the technical problem of how to achieve remote, high-speed, concurrent access and configuration on Fibre Channel network nodes that do not have CPUs and operating systems in existing methods.
[0006] This invention provides a method for remote non-host device access control using the Fibre Channel protocol, comprising the following steps:
[0007] The initiator initializes the remote non-host device through a Fibre Channel network; wherein, the remote non-host device, as the accessed party, does not have a central processing unit and operating system;
[0008] The initiator of the access controls the read or write access to the shared registers of the accessed party based on the Fibre Channel private control protocol. The TYPE field in the frame header of the Fibre Channel private control protocol has a preset type value. The control instructions between the initiator and the accessed party are stored in the remote frame payload. The high 8 bits of the R-Code field in the remote frame payload are used to fill the opcode of the control instructions.
[0009] Furthermore, the read or write access control of the shared registers of the accessed party includes:
[0010] The access initiation direction constructs a register lock control instruction and sends it to the accessed party;
[0011] The accessed party constructs a register lock control response instruction based on the received register lock control instruction and sends it to the access initiator.
[0012] If the lock is successful, the initiator of the access will send a read or write access control command to the accessed party.
[0013] The accessed party parses the received read or write access control instruction, and performs a read or write operation on the local shared register based on the parsing result;
[0014] After the read or write operation is completed, the accessed party constructs a read or write request control response instruction and sends it to the access initiator.
[0015] The initiator of the access constructs a register unlock control command and sends it to the accessed party;
[0016] The accessed party constructs a register unlock response control command and sends it to the access initiator.
[0017] If unlocking is successful, read or write access control ends;
[0018] In this context, the TYPE field value in the frame header of the register lock control instruction, register lock control response instruction, read access control instruction, write access control instruction, read access control response instruction, write access control response instruction, register unlock control instruction, and register unlock control response instruction is the preset type value; and the R-Code field value in the remote frame payload is the opcode corresponding to the instruction.
[0019] Further, constructing the frame content of the read access control command using the remote frame payload includes:
[0020] The offset address is 0 for 4 bytes. The first byte is used to store the opcode of the read access control instruction, and the last 3 bytes are padded with 0.
[0021] An offset address of 4 bytes is used to store the shared register identifier;
[0022] The 4-byte offset address 2 is used to store the memory address of the accessed object;
[0023] The 4-byte offset address 3 is used to store the length of the data to be read.
[0024] Further, constructing the frame content of the write access control instruction using the remote frame payload includes:
[0025] The offset address is 0 for 4 bytes. The first byte is used to store the opcode of the write access control instruction, and the last 3 bytes are padded with 0.
[0026] An offset address of 4 bytes is used to store the shared register identifier;
[0027] The 4-byte offset address 2 is used to store the memory address of the accessed object;
[0028] The offset address 3, which is 4 bytes, is used to store the length N of the data to be written;
[0029] Offset addresses 4 to N+3 are used to store the data to be written.
[0030] Further, constructing the frame content of the register lock control instruction or register unlock control instruction using the remote frame payload includes:
[0031] The 4-byte offset address 0 is used to store the opcode of the register lock control instruction or register unlock control instruction;
[0032] The 4-byte offset address 1 is used to store the identifier of the shared register to be locked or unlocked.
[0033] Furthermore, the frame content for constructing the register lock control response instruction, read access control response instruction, write access control response instruction, or register unlock control response instruction using the remote frame payload includes:
[0034] The 4-byte offset address 0, the first byte is used to store the opcode of the register lock control response instruction, read access control response instruction, write access control response instruction or register unlock control response instruction; the second and third bytes are padded with zeros; the fourth byte is used to store the success or failure identifier code;
[0035] When the first byte of offset address 0 is the opcode of a read access control response instruction, offset address 1 is filled with the data read by the access initiator; otherwise, offset address 1 is empty.
[0036] Furthermore, the preset type value is 0x33.
[0037] Furthermore, the opcode of the read access control instruction is 0x01;
[0038] The opcode for the write access control instruction is 0x02;
[0039] The opcode of the register lock control instruction is 0x03;
[0040] The opcode for the register unlock control instruction is 0x04;
[0041] The instruction code for the read access control response instruction is 0x06;
[0042] The instruction code for the write access control response instruction is 0x07;
[0043] The opcode of the register lock control response instruction is 0x08;
[0044] The opcode for the register unlock control response instruction is 0x09.
[0045] Furthermore, the accessed party handles concurrent access conflicts where multiple access initiators have overlapping shared register identifiers and memory addresses by employing the following steps:
[0046] If the shared registers or memory address of the accessed party are successfully locked by an access initiator, the accessed party records the port ID of the current access initiator and only processes read or write access control when the source port ID of the access initiator matches the recorded port ID.
[0047] When read or write access control ends, the accessed party only processes the register unlock control instruction of the source port ID of the access initiator whose current read or write access control has ended.
[0048] Furthermore, the initiator of the access initializes the remote non-host device through the Fibre Channel network, including:
[0049] After the accessed party is powered on, the access initiator and the accessed party perform Fibre Channel N-port login; wherein, there is at least one access initiator and one accessed party.
[0050] The access initiator sends a shared storage area creation command to the accessed party;
[0051] The accessed party responds to the shared storage area creation instruction and creates at least one shared storage area for remote access;
[0052] The accessed party responds to shared storage area creation commands sent by multiple access initiators;
[0053] The memory address ranges of multiple shared registers can overlap or cover each other;
[0054] In this case, a shared register is logically divided into at least one shared register area.
[0055] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0056] 1. This invention utilizes the high-speed bandwidth of the FC network and a custom high-efficiency fiber channel private control protocol to upgrade the configuration channel from a low-speed serial port to a network line speed, enabling remote, online configuration and status reading / writing. It reduces the configuration time from seconds to milliseconds, meeting the requirements for dynamic switching and real-time response in practical applications. It also solves the shortcomings of existing nodes without CPUs and operating systems that rely on low-speed interfaces such as local serial ports for configuration, resulting in low speed, inability to perform remote dynamic operation, and long configuration time.
[0057] 2. This invention eliminates the expensive and energy-intensive components of the CPU and OS on remote network nodes, significantly reducing the number of electronic components and achieving a substantial decrease in hardware costs and an order-of-magnitude optimization of power consumption. This allows the CPU-less and OS-less remote nodes to be integrated into harsh environments with limited heat dissipation and space. It overcomes the shortcomings of traditional FC network nodes, which must be configured with a CPU, operating system, and protocol stack, resulting in complex hardware, high costs, and high power consumption. It can be better integrated into power-constrained devices.
[0058] 3. This invention utilizes a shared register in remote nodes without a CPU or operating system, supporting a maximum configurable addressing space of 4GB, far exceeding traditional protocols. Through an innovative hardware locking mechanism based on the source port ID filtering of the access initiator, it effectively solves the conflict problem of multiple access initiators concurrently accessing the same shared register and memory address of the accessed party, ensuring data consistency. The shared register supports address overlap, providing differentiated permission views for different access parties, making management more flexible. It also addresses the problems of limited configuration space and lack of effective hardware-level concurrency control mechanisms in traditional fiber optic protocols.
[0059] 4. Remotely accessed network device nodes do not require the installation of operating systems and corresponding application software, thereby reducing the startup time of network node devices from tens of seconds to less than 1 second.
[0060] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description
[0061] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.
[0062] Figure 1 This is a flowchart of a remote non-host device access control method using the Fibre Channel protocol in an embodiment of the present invention.
[0063] Figure 2 This is a flowchart illustrating the process by which the initiator initializes a remote non-host device via a Fibre Channel network in an embodiment of the present invention.
[0064] Figure 3 A schematic diagram of the Fibre Channel proprietary control protocol frame format;
[0065] Figure 4 This is a schematic diagram of the interaction between the remote access request processing module inside the accessed party in an embodiment of the present invention;
[0066] Figure 5 This is a flowchart illustrating the remote read access control process in an embodiment of the present invention.
[0067] Figure 6 This is a flowchart illustrating the remote write access control process in an embodiment of the present invention.
[0068] Figure 7 This is a schematic diagram of the remote locking and unlocking state machine transition in an embodiment of the present invention. Detailed Implementation
[0069] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0070] To address the aforementioned technical problems and enable dynamic, real-time, and high-speed remote configuration and access to Fibre Channel remote network nodes that lack a central processing unit and operating system, this invention designs a remote access control protocol for Fibre Channel networks where remote nodes do not rely on a CPU or operating system.
[0071] This invention provides a real-time configuration method for remote nodes via an FC (Fibre Channel) network, demonstrating how to report and configure data status even when the accessed node lacks a CPU and operating system. The accessed node maps its local configurable shared registers to its local memory according to a protocol. The accessing node (the initiator) actively initiates remote memory creation, completes read or write access control through a remote access protocol, and leverages the high-speed characteristics of the FC network to rapidly send and upload the remote node's status and configuration information.
[0072] In a specific embodiment of the present invention, in order to solve the above-mentioned technical problems, the present invention provides a method for remote non-host device access control using the Fibre Channel protocol, such as... Figure 1 As shown, it includes the following steps:
[0073] Step S1: The initiator initializes the remote non-host device through the Fibre Channel network; wherein, the remote non-host device, as the accessed party, does not have a central processing unit and operating system.
[0074] Step S2: The access initiator performs read or write access control on the shared registers of the accessed party based on the Fibre Channel private control protocol; wherein, the TYPE field value in the frame header of the Fibre Channel private control protocol is a preset type value, the control instructions between the access initiator and the accessed party are stored in the remote frame payload, and the high 8 bits of the R-Code field in the remote frame payload are used to fill the opcode of the control instructions.
[0075] The initiator of the access is a computer host with a central processing unit and an operating system; the accessed party is a remote network node without a central processing unit and an operating system.
[0076] Step S1, specifically.
[0077] An initialization step is also included before sending the remote access request instruction frame.
[0078] The initiator of the access initializes the remote non-host device through the Fibre Channel network, including:
[0079] After the accessed party is powered on, the access initiator and the accessed party perform Fibre Channel N-port login; wherein, there is at least one access initiator and one accessed party.
[0080] The access initiator sends a shared storage area creation command to the accessed party;
[0081] The accessed party responds to the shared storage area creation instruction and creates at least one shared storage area for remote access.
[0082] The accessed party responds to shared storage area creation commands sent by multiple access initiators;
[0083] The memory address ranges of multiple shared registers can overlap or cover each other;
[0084] In this case, a shared register is logically divided into at least one shared register area.
[0085] like Figure 2 As shown,
[0086] Step 1: After the Fibre Channel network is started, the two nodes of the FC network communication log in to the network N port. The two nodes include the protocol initiator (i.e., the access initiator) and the accessed party.
[0087] Obtain port information from both nodes, including port ID, port name, credit value, and other parameters. Login information can be completed according to a pre-set program, or it can be initiated by the remote access initiator according to specific needs.
[0088] Step 2: The initiating party completes the allocation of local memory resources on the accessed party, and sends a shared storage area creation command to the accessed party using the default shared storage area ID.
[0089] Step 3: After receiving the shared storage area creation instruction initiated by the access initiator, the accessed party enables access to the shared storage area on its local machine and sets it to be accessible (read and write).
[0090] A shared register identifier is used to uniquely identify a remotely accessible shared memory region within an accessed node. An accessed node must contain at least one shared register.
[0091] Shared register identifiers are a form of "number management" for the shared memory area of the accessed node. Through unique numbers, the initiator of access can accurately specify the target memory area, thereby achieving the differentiation of multiple areas and efficient access.
[0092] The shared register identifier is a predefined shared memory area during the initialization of the accessed node.
[0093] For example, a certain vehicle-mounted sensor node (the accessed node) has registers that logically share two register areas:
[0094] Shared register 1 (identifier 0x0A): Stores the sensor's "real-time temperature data", starting at address 0x1000, with a length of 32 bytes;
[0095] Shared register 2 (identifier 0x0B): Stores the sensor's "fault status code", memory address starts from 0x2000, length is 8 bytes.
[0096] When the initiator needs to read the "fault status code", it fills in 0x0B in "offset address 1". The accessed node then reads 8 bytes of data starting from address 0x2000 based on this identifier and returns it.
[0097] Each shared register is defined by four parameters: memory region identifier, memory region address, memory region length (in bytes), and register read / write flags. The address ranges of each memory region can overlap or cover each other. The register length must be a multiple of 4, with a minimum of 4 bytes (32 bits), and a maximum addressable space of 2^32 bytes.32 bit, which is 4GB.
[0098] Step S1 establishes a Fibre Channel communication link between the initiator and the accessed party, and creates and configures a logical shared storage mapping space for the accessed party's remote shared registers.
[0099] Step S2 includes steps S21-S22.
[0100] Step S21: Construct the Fibre Channel private control protocol.
[0101] like Figure 3 As shown, the Fibre Channel proprietary control protocol in this invention is built upon the existing FC-2 protocol frame. Among other things,
[0102] (1) SOF, indicating the start of frame;
[0103] (2) Remote frame payload, which carries the core parameters and data for implementing remote memory access operations, including instruction type, target address, data length and specific data content;
[0104] (3) CRC stands for Cyclic Redundancy Check, which is used to check the frame header and remote frame payload.
[0105] (4) EOF indicates the end of the frame;
[0106] (5) Frame header, totaling 24 bytes, including Word0-Word5 in sequence;
[0107] ①Word0: 4 bytes, the first byte R_CTL is used for routing control; the second to fourth bytes D_ID are used to represent the destination identifier;
[0108] ②Word1: 4 bytes. The first byte, CS_CTL, is used to specify the class control; the second to fourth bytes, S_ID, are used to represent the source point identifier.
[0109] ③Word2: 4 bytes. The first byte, TYPE, indicates the frame type. This field has been redefined in this invention. The second to fourth bytes, F_CTL, indicate frame control.
[0110] ④Word3: 4 bytes. The first byte SEQ_ID represents the sequence ID; the second byte DF_CTL represents the data field control; the third and fourth bytes SEQ_CNT represent the sequence count.
[0111] ⑤ Word4: 4 bytes. The first two bytes, OX_ID, represent the frame exchange identifier of the sending end; the third and fourth bytes, RX_ID, represent the frame exchange identifier of the receiving end.
[0112] ⑥Word5: 4 bytes, Parameter, the field can be empty or filled with a predetermined value (such as 0).
[0113] The Fibre Channel proprietary control protocol in this invention redefines the TYPE field in the frame header and the content in the remote frame payload.
[0114] (1) The TYPE field value in the frame header of the Fibre Channel proprietary control protocol is a preset type value;
[0115] The preset type value is 0x33.
[0116] The TYPE field value in the FC frame header of the remote read / write access protocol is fixed at 0x33, indicating that a new protocol is being declared.
[0117] (2) The control instructions between the access initiator and the accessed party are stored in the remote frame payload, and the high 8 bits of the R-Code field in the remote frame payload are used to fill the opcode of the control instructions.
[0118] In the remote frame payload, the instructions for read access control, write access control, remote register locking control, remote register unlocking control, and read access control response, write access control response, remote register locking control response, and remote register unlocking control response are defined between the access initiator and the accessed party.
[0119] The Fibre Channel-based remote read / write access control protocol defines the TYPE field in the protocol frame header, as well as read request instructions, write request instructions, and instructions to add / unlock shared registers of the accessed party, and corresponding response instructions.
[0120] The Fibre Channel Remote Read / Write Access Protocol (RDARP) frame uniquely defines the command frame type through the TYPE field in the protocol frame header and the R-Code field in the remote frame payload. This Fibre Channel proprietary control protocol uses three service classes.
[0121] The Fibre Channel protocol has three service categories managed by the FC-2 layer: Category 1, Category 2, and Category 3. Details are as follows:
[0122] Type 1 Service: Dedicated Connection Service, connection-oriented, with an acknowledgment and delivery mechanism. During communication, the initiator requests assurance of all links and related resources on the path to the receiver until either the initiator or the receiver requests to tear down the connection.
[0123] Type 2 service: Multiplexing service, connectionless, with acknowledgment and delivery mechanism. It allows multiple users to share network resources. Data frames do not require a dedicated connection during transmission, but the receiver sends an acknowledgment message to the sender to ensure that the data is received correctly.
[0124] Type 3 service: Datagram service, connectionless, no acknowledgment delivery mechanism. The device driver needs to determine whether data has been received and whether retransmission is necessary. This service is often used in scenarios with high real-time requirements but relatively low requirements for data accuracy.
[0125] Constructing the frame content of the read access control command using the remote frame payload includes:
[0126] The offset address is 0 for 4 bytes. The first byte is used to store the opcode of the read access control instruction, and the last 3 bytes are padded with 0.
[0127] An offset address of 4 bytes is used to store the shared register identifier;
[0128] The 4-byte offset address 2 is used to store the memory address of the accessed object;
[0129] The 4-byte offset address 3 is used to store the length of the data to be read.
[0130] Reading the access control instruction, the TYPE in the frame header is 0x33. The construction format in the remote frame payload is shown in Table 1. The first byte R-Code in offset address 0 is 0x01.
[0131] Table 1: Construction format of remote read access control instructions in remote frame payload
[0132]
[0133] An example is given below:
[0134] (1) The access initiator (with a central processing unit (CPU) and an operating system (OS)) constructs a read access control instruction:
[0135] The initiator reads data from the accessed party (which has no CPU or OS), creating an FC frame to read access control instructions:
[0136] FC frame header: TYPE = 0x33
[0137] Offset address 0: 0x01000000
[0138] Offset address 1: Shared register ID (e.g., 1)
[0139] Offset address 2: The memory address of the accessed node (e.g., 0x00001234)
[0140] Offset address 3: Read length 4 bytes
[0141] In the remote frame payload, R-Code = 0x01;
[0142] (2) Parsing and execution of the accessed party
[0143] After the accessed node receives the read access control:
[0144] By recognizing TYPE=0x33, we know that it is a remote access protocol;
[0145] Recognizing R-Code = 0x01, we know it's a read request;
[0146] The analysis indicates that the memory address "0x00001234" of the "shared register ID 1" needs to be accessed, and "4 bytes" need to be read.
[0147] The hardware directly manipulates the registers to retrieve 4 bytes of data.
[0148] (3) The accessed node returns data
[0149] The accessed node will put the read data into a read request control response instruction frame (R-Code=0x06) and send it to the access initiator.
[0150] Constructing the frame content of the write access control instruction using the remote frame payload includes:
[0151] The offset address is 0 for 4 bytes. The first byte is used to store the opcode of the write access control instruction, and the last 3 bytes are padded with 0.
[0152] An offset address of 4 bytes is used to store the shared register identifier;
[0153] The 4-byte offset address 2 is used to store the memory address of the accessed object;
[0154] The offset address 3, which is 4 bytes, is used to store the length N of the data to be written;
[0155] Offset addresses 4 to N+3 are used to store the data to be written.
[0156] Write access control instructions. In the frame header, TYPE = 0x33. The construction format in the remote frame payload is shown in Table 2. The first byte R-Code in offset address 0 is 0x02.
[0157] Table 2: Construction format of remote write access control instructions in remote frame payload
[0158]
[0159] The write request command of the remote read / write access protocol has a variable length, which is based on the length of the data to be written.
[0160] Constructing the frame content of the register lock control instruction or register unlock control instruction using the remote frame payload includes:
[0161] The 4-byte offset address 0 is used to store the opcode of the register lock control instruction or register unlock control instruction;
[0162] The 4-byte offset address 1 is used to store the identifier of the shared register to be locked or unlocked.
[0163] Register control instructions and register unlock control instructions are shown in Table 3.
[0164] Before the initiator reads or writes to the accessed party, the register is locked;
[0165] After reading or writing is complete, a register unlock operation is performed. The TYPE in the frame header is 0x33. The register lock control instruction or register unlock control instruction is constructed in the remote frame payload as shown in Table 3.
[0166] Table 3: Construction format of register lock / unlock control instructions in remote frame payload
[0167]
[0168] The initiator sends a lock instruction frame for a shared register of the accessed node;
[0169] After receiving the lock command, the accessed node checks the current state of the shared register with the corresponding identifier;
[0170] The parsing result will be either "unlocked" or "locked".
[0171] If it is "unlocked", the accessed party replies to the access initiator (assuming it is host A, FC port ID is 111) with a lock request response data frame (R-Code=0x08), and the lock status is "successful";
[0172] Currently, only requests from "host A, FC port 111" will be executed; requests from other initiators (e.g., host B) will be dropped or fail to respond; thus achieving mutual exclusion.
[0173] If it is "locked", the accessed party replies with a register lock control response instruction frame, and the status is "failed".
[0174] After host A completes a read or write operation, or a configuration operation, it sends a register unlock control instruction frame.
[0175] The accessed node checks whether the access initiator is host A and whether the FC port ID is 111. If they match, the shared register is restored to the unlocked state.
[0176] If a register unlock control response frame (R-Code = 0x09) is sent back to host A with a status of "success", then the shared register will be reopened to all initiating parties for access.
[0177] The frame content for constructing the register lock control response instruction, read access control response instruction, write access control response instruction, or register unlock control response instruction using the remote frame payload includes:
[0178] The 4-byte offset address 0, the first byte is used to store the opcode of the register lock control response instruction, read access control response instruction, write access control response instruction or register unlock control response instruction; the second and third bytes are padded with zeros; the fourth byte is used to store the success or failure identifier code;
[0179] When the first byte of offset address 0 is the opcode of a read access control response instruction, offset address 1 is filled with the data read by the access initiator; otherwise, offset address 1 is empty.
[0180] The register lock control response instruction, read access control response instruction, write access control response instruction, or register unlock control response instruction are used to respond to the corresponding request instruction. The TYPE in the frame header is 0x33. The construction format in the remote frame payload is shown in Table 4.
[0181] Table 4: Format of Response Commands in Remote Frame Payloads
[0182]
[0183] For the first byte R-Code in the remote frame payload, the opcode of the 8 types of instructions is defined as follows:
[0184] The opcode of the read access control instruction is 0x01;
[0185] The opcode for the write access control instruction is 0x02;
[0186] The opcode of the register lock control instruction is 0x03;
[0187] The opcode for the register unlock control instruction is 0x04;
[0188] The instruction code for the read access control response instruction is 0x06;
[0189] The instruction code for the write access control response instruction is 0x07;
[0190] The opcode of the register lock control response instruction is 0x08;
[0191] The opcode for the register unlock control response instruction is 0x09.
[0192] Step S22: The initiating party performs read or write access control on the shared registers of the accessed party based on the Fibre Channel private control protocol.
[0193] The read or write access control of the shared registers of the accessed party includes:
[0194] The access initiation direction constructs a register lock control instruction and sends it to the accessed party;
[0195] The accessed party constructs a register lock control response instruction based on the received register lock control instruction and sends it to the access initiator.
[0196] If the lock is successful, the initiator of the access will send a read or write access control command to the accessed party.
[0197] The accessed party parses the received read or write access control instruction, and performs a read or write operation on the local shared register based on the parsing result;
[0198] After the read or write operation is completed, the accessed party constructs a read or write request control response instruction and sends it to the access initiator.
[0199] The initiator of the access constructs a register unlock control command and sends it to the accessed party;
[0200] The accessed party constructs a register unlock response control command and sends it to the access initiator.
[0201] If unlocking is successful, read or write access control ends;
[0202] In this context, the TYPE field value in the frame header of the register lock control instruction, register lock control response instruction, read access control instruction, write access control instruction, read access control response instruction, write access control response instruction, register unlock control instruction, and register unlock control response instruction is the preset type value; and the R-Code field value in the remote frame payload is the opcode corresponding to the instruction.
[0203] Before reading and writing access control, the registers of the remote accessed device are locked, and after reading and writing access control is completed, the registers of the remote accessed device are unlocked.
[0204] A schematic diagram illustrating the interaction between the internal remote access request processing module of the accessed party, which lacks a central processing unit and operating system, as follows: Figure 4 As shown.
[0205] A remote access node without a central processing unit (CPU) and operating system refers to a node that does not have a CPU, operating system, drivers, and protocol stack configured like traditional network nodes, and performs remote read and write operations through the node's own functions.
[0206] The accessed components include the FC transceiver module, the FC remote access protocol module, and the shared register management module;
[0207] The FC transceiver module is used to receive read or write commands from at least one access initiator, as well as lock or unlock access control commands, and send control response commands based on the access control commands.
[0208] The FC remote access protocol module is used to parse the R-Code field in the remote frame payload to determine whether the request type is a read, write, lock, or unlock control instruction when the FC transceiver module receives a data frame with the protocol type TYPE field of 0x33 in the frame header of the access control instruction, and generate the corresponding read, write, lock, or unlock control response command.
[0209] The shared register management module is used to respond to the read, write, lock, or unlock control commands of the FC remote access protocol module and execute the corresponding read, write, lock, or unlock operations of the local physical registers corresponding to the shared registers.
[0210] The shared register management module is a locally accessible register management module that performs register writing and reading. By default, the accessed device enables one shared memory area ID with a length of not less than 128 bytes, which is used to store the starting address and length of the accessed shared memory area.
[0211] When the FC transceiver module receives a frame with an FTYPE value of 0x33, it identifies it as a remote access frame and sends the data frame to the FC remote access protocol module for parsing. The module then examines the R-Code field in the remote frame payload to determine if the action of the remote data frame is read, write, lock, or unlock, and performs local register configuration accordingly. After configuration, the module fills in the corresponding response command based on the action content and sends the filled response command to the FC network module for feedback to the initiator of the access.
[0212] The accessed party handles concurrent access conflicts where multiple access initiators have overlapping shared register identifiers and memory addresses using the following steps:
[0213] If the shared registers or memory address of the accessed party are successfully locked by an access initiator, the accessed party records the port ID of the current access initiator and only processes read or write access control when the source port ID of the access initiator matches the recorded port ID.
[0214] When read or write access control ends, the accessed party only processes the register unlock control instruction of the source port ID of the access initiator whose current read or write access control has ended.
[0215] The accessed node has a conflict handling strategy for concurrent access from multiple nodes, with two states: locked and unlocked. This is used to handle conflicts arising from concurrent access by multiple nodes within the network. When in the locked state, the port ID of the remote access initiator node is recorded. The access frame is then evaluated; if the initiator's port ID does not match, the access frame is directly filtered. The state machine transitions are as follows: Figure 7 As shown.
[0216] For example, the workflow of the Fibre Channel proprietary control protocol is as follows:
[0217] (1) Initialization;
[0218] (2) Access the initiator's read access process, such as Figure 5 As shown.
[0219] Step 1: Access the initiator to initiate a register lock control instruction. If the register is successfully locked, proceed to step 2. If the lock fails, stop the subsequent actions.
[0220] Step 2: The initiator of the access, in accordance with the requirements of Table 1, constructs a read access control command frame with the port ID of the node to be accessed, the identifier of shared access, the address of the remote memory, and the read length, and sends the read access control command frame to the accessed party.
[0221] Step 3: After receiving the remote read access control instruction frame request, the accessed party performs a local register read, fills the read data into the read access control instruction response frame, and sends it back to the access initiator.
[0222] Step 4: After the initiator receives the data returned by the accessed party, if the reading is complete, it initiates a register unlock control instruction; if the reading is not complete, it repeats steps ②-③ until the end.
[0223] (3) The initiator initiates a write access process, such as Figure 6 As shown.
[0224] Step 1: Access the initiator to initiate a register lock control instruction. If the register is successfully locked, proceed to step 2. If the lock fails, stop the subsequent actions.
[0225] Step 2: The initiator fills the write access control command frame with the port ID of the node to be accessed, the identifier of shared access, the starting address of the remote memory, the write length, and the write data content, according to the requirements of Table 2, and sends the write access control command frame to the accessed party.
[0226] Step 3: After receiving the remote write access control instruction frame, the accessed party extracts the register address and register value to be written from the write access control instruction frame, completes the writing of the local register, and sends the writing result back to the access initiator according to the instruction format of the write access control response instruction frame.
[0227] If the write operation is complete in step ④, the initiator will initiate a register unlock control instruction. If the write operation is not complete, steps ②-③ will be repeated until the operation is completed.
[0228] Step S2 enables remote, high-speed, and reliable direct read / write operations and concurrent control of the shared registers of remotely accessed nodes that lack CPUs and operating systems by customizing a Fibre Channel proprietary protocol based on the TYPE field of the frame header being 0x33 and the operation type code defined by the R-Code in the remote frame payload.
[0229] In summary, the remote non-host device access control method of the Fibre Channel protocol according to the embodiments of the present invention has the following beneficial effects:
[0230] 1. This invention utilizes the high-speed bandwidth of the FC network and a custom high-efficiency fiber channel private control protocol to upgrade the configuration channel from a low-speed serial port to a network line speed, enabling remote, online configuration and status reading / writing. It reduces the configuration time from seconds to milliseconds, meeting the requirements for dynamic switching and real-time response in practical applications. It also solves the shortcomings of existing nodes without CPUs and operating systems that rely on low-speed interfaces such as local serial ports for configuration, resulting in low speed, inability to perform remote dynamic operation, and long configuration time.
[0231] 2. This invention eliminates the expensive and energy-intensive components of the CPU and OS on remote network nodes, significantly reducing the number of electronic components and achieving a substantial decrease in hardware costs and an order-of-magnitude optimization of power consumption. This allows the CPU-less and OS-less remote nodes to be integrated into harsh environments with limited heat dissipation and space. It overcomes the shortcomings of traditional FC network nodes, which must be configured with a CPU, operating system, and protocol stack, resulting in complex hardware, high costs, and high power consumption. It can be better integrated into power-constrained devices.
[0232] 3. This invention utilizes a shared register in remote nodes without a CPU or operating system, supporting a maximum configurable addressing space of 4GB, far exceeding traditional protocols. Through an innovative hardware locking mechanism based on the source port ID filtering of the access initiator, it effectively solves the conflict problem of multiple access initiators concurrently accessing the same shared register and memory address of the accessed party, ensuring data consistency. The shared register supports address overlap, providing differentiated permission views for different access parties, making management more flexible. It also addresses the limitations of traditional fiber optic protocols in terms of limited configuration space and lack of effective hardware-level concurrency control mechanisms.
[0233] 4. Remotely accessed network device nodes do not require the installation of operating systems and corresponding application software, thereby reducing the startup time of network node devices from tens of seconds to less than 1 second.
[0234] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0235] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for remote non-host device access control using the Fibre Channel protocol, characterized in that, include: The initiator initializes the remote non-host device through a Fibre Channel network; wherein, the remote non-host device, as the accessed party, does not have a central processing unit and operating system; The initiator of the access controls the read or write access to the shared registers of the accessed party based on the Fibre Channel private control protocol. The TYPE field in the frame header of the Fibre Channel private control protocol has a preset type value. The control instructions between the initiator and the accessed party are stored in the remote frame payload. The high 8 bits of the R-Code field in the remote frame payload are used to fill the opcode of the control instructions.
2. The remote non-host device access control method of Fibre Channel protocol according to claim 1, characterized in that, The read or write access control of the shared registers of the accessed party includes: The access initiation direction constructs a register lock control instruction and sends it to the accessed party; The accessed party constructs a register lock control response instruction based on the received register lock control instruction and sends it to the access initiator. If the lock is successful, the initiator of the access will send a read or write access control command to the accessed party. The accessed party parses the received read or write access control instruction, and performs a read or write operation on the local shared register based on the parsing result; After the read or write operation is completed, the accessed party constructs a read or write request control response instruction and sends it to the access initiator. The initiator of the access constructs a register unlock control command and sends it to the accessed party; The accessed party constructs a register unlock response control command and sends it to the access initiator. If unlocking is successful, read or write access control ends; In this context, the TYPE field value in the frame header of the register lock control instruction, register lock control response instruction, read access control instruction, write access control instruction, read access control response instruction, write access control response instruction, register unlock control instruction, and register unlock control response instruction is the preset type value; and the R-Code field value in the remote frame payload is the opcode corresponding to the instruction.
3. The remote non-host device access control method of Fibre Channel protocol according to claim 2, characterized in that, Constructing the frame content of the read access control command using the remote frame payload includes: The offset address is 0 for 4 bytes. The first byte is used to store the opcode of the read access control instruction, and the last 3 bytes are padded with 0. An offset address of 4 bytes is used to store the shared register identifier; The 4-byte offset address 2 is used to store the memory address of the accessed object; The 4-byte offset address 3 is used to store the length of the data to be read.
4. The remote non-host device access control method of the Fibre Channel protocol according to claim 3, characterized in that, Constructing the frame content of the write access control instruction using the remote frame payload includes: The offset address is 0 for 4 bytes. The first byte is used to store the opcode of the write access control instruction, and the last 3 bytes are padded with 0. An offset address of 4 bytes is used to store the shared register identifier; The 4-byte offset address 2 is used to store the memory address of the accessed object; The offset address 3, which is 4 bytes, is used to store the length N of the data to be written; Offset addresses 4 to N+3 are used to store the data to be written.
5. The remote non-host device access control method of Fibre Channel protocol according to claim 2, characterized in that, Constructing the frame content of the register lock control instruction or register unlock control instruction using the remote frame payload includes: The 4-byte offset address 0 is used to store the opcode of the register lock control instruction or register unlock control instruction; The 4-byte offset address 1 is used to store the identifier of the shared register to be locked or unlocked.
6. The remote non-host device access control method of Fibre Channel protocol according to claim 2, characterized in that, The frame content for constructing the register lock control response instruction, read access control response instruction, write access control response instruction, or register unlock control response instruction using the remote frame payload includes: The 4-byte offset address 0, the first byte is used to store the opcode of the register lock control response instruction, read access control response instruction, write access control response instruction or register unlock control response instruction; the second and third bytes are padded with zeros; the fourth byte is used to store the success or failure identifier code; When the first byte of offset address 0 is the opcode of a read access control response instruction, offset address 1 is filled with the data read by the access initiator; otherwise, offset address 1 is empty.
7. The remote non-host device access control method of Fibre Channel protocol according to claim 6, characterized in that, The preset type value is 0x33.
8. The remote non-host device access control method of Fibre Channel protocol according to claim 7, characterized in that, The opcode of the read access control instruction is 0x01; The opcode for the write access control instruction is 0x02; The opcode of the register lock control instruction is 0x03; The opcode for the register unlock control instruction is 0x04; The instruction code for the read access control response instruction is 0x06; The instruction code for the write access control response instruction is 0x07; The opcode of the register lock control response instruction is 0x08; The opcode for the register unlock control response instruction is 0x09.
9. The method for remote non-host device access control according to any one of claims 1-8 of the Fibre Channel protocol, characterized in that, The accessed party handles concurrent access conflicts where multiple access initiators have overlapping shared register identifiers and memory addresses using the following steps: If the shared registers or memory address of the accessed party are successfully locked by an access initiator, the accessed party records the port ID of the current access initiator and only processes read or write access control when the source port ID of the access initiator matches the recorded port ID. When read or write access control ends, the accessed party only processes the register unlock control instruction of the source port ID of the access initiator whose current read or write access control has ended.
10. The method for remote non-host device access control according to any one of claims 1-8 of the Fibre Channel protocol, characterized in that, The initiator of the access initializes the remote non-host device through the Fibre Channel network, including: After the accessed party is powered on, the access initiator and the accessed party perform Fibre Channel N-port login; wherein, there is at least one access initiator and one accessed party. The access initiator sends a shared storage area creation command to the accessed party; The accessed party responds to the shared storage area creation instruction and creates at least one shared storage area for remote access; The accessed party responds to shared storage area creation commands sent by multiple access initiators; The memory address ranges of multiple shared registers can overlap or cover each other; In this case, a shared register is logically divided into at least one shared register area.