FC daughter card online upgrade method and system for FC fiber channel network device group
By designing the FC daughter card online upgrade system for the FC Fibre Channel network equipment group, the upgrade control equipment and switch work together to achieve batch online upgrades of multiple FC daughter cards, solving the problems of low upgrade efficiency and incorrect data in the existing technology, and ensuring the stability and efficiency of the upgrade process.
Patent Information
- Application Number
- CN202410780248.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-06-18
AI Technical Summary
The existing FC daughter card online upgrade solution is inefficient, and it is impossible to achieve batch online upgrades of multiple FC daughter cards, and it is difficult to ensure the correctness and stability of data during the upgrade process.
Design an online upgrade system for FC daughter card for FC Fibre Channel network equipment group, and realize the individual or batch online upgrade of FC daughter card through the coordinated work of the upgrade control equipment and the switch. The system will slice the online data packet and encapsulate it into FC data frames, and transmit it to the terminal device through unicast or multicast of the FC data frames. The terminal device parses and writes it to the flash, and ensures the correctness of the written data through readback data comparison and verification.
The batch online upgrade of multiple FC daughter cards has been achieved, which significantly improves the upgrade efficiency, and ensures the correctness of the written data and the stability of the upgrade process through read back data comparison verification.
Smart Images

Figure CN118646651B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of FC fiber channel network communication technology, and in particular to an online upgrade technology of an FC daughter card, and more specifically to an FC daughter card online upgrade method and system for an FC fiber channel network device group, which can realize batch online upgrade of multiple FC daughter cards, improve upgrade efficiency and ensure stability. Background Art
[0002] FC (Fibre Channel) network is a high-speed network communication technology that can provide high-speed data transmission over long distances, with high bandwidth and low latency, and can achieve high-performance and high-reliability data exchange between storage, servers and nodes.
[0003] In the FC switching network, the FC daughter card (also known as FC network card, fiber network card, Fibre Channel HBA) is the key interface connecting the device to the Fibre Channel network. The FC daughter card is responsible for managing and processing data transmission. The transmission protocol is the Fibre Channel protocol. It is generally connected to the Fibre Channel switch through a fiber optic cable to achieve data interaction and communication. The performance and stability of the interface directly affect the operating efficiency of the entire network.
[0004] For FC daughter cards, online upgrade is a key technology that allows the system to update software during operation to improve functionality, security or compatibility. During the online upgrade process, the system needs to maintain normal communication with the storage device to avoid data loss or service interruption. At the same time, it is necessary to take into account the stability and security of the upgrade, establish redundancy and rollback mechanisms, prevent the impact of unexpected power failure or interruption, and ensure that it can be re-powered and loaded when the upgrade fails.
[0005] At present, the FPGA-based daughter card online upgrade solution is widely used, such as Figure 1 As shown in the upgrade principle example, the driver software obtains the online upgrade data package through the API interface, and pushes the online upgrade data package to the FPGA through the software and logic interface. The FPGA converts the content of the upgrade data package into the SPI interface format to update the configuration file content stored in the flash. Figure 1 As shown, based on the design of the upgrade solution, each FC daughter card needs to be upgraded online through the corresponding driver, that is, each card needs to be upgraded online separately. When daughter cards need to be upgraded in batches, the method of upgrading each daughter card online separately is very inefficient. Summary of the invention
[0006] In view of the technical problems existing in the prior art, the purpose of the present invention is to propose an FC daughter card online upgrade system and method for an FC fiber channel network device group, which can realize the individual or batch upgrade of FC daughter cards, greatly improving the upgrade efficiency, and ensuring the correctness of the written data by reading back data for comparison and verification, thereby improving the efficiency while also ensuring the stability and effectiveness of the upgrade.
[0007] According to a first aspect of the present invention, a FC daughter card online upgrade system for a FC fiber channel network device group is provided, comprising:
[0008] An upgrade control device, used to receive online upgrade data packets sent by the host computer, and to slice and encapsulate the data packets to form FC data frames;
[0009] A switch, configured to receive the FC data frame sent by the upgrade control device, wherein: if it is a unicast frame, the FC data frame is routed to the corresponding terminal device; if it is a multicast frame, the FC data frame is routed to the corresponding terminal device group; the switch is configured to receive the read-back data frame returned by the terminal device and route it to the upgrade control device according to the destination FC address;
[0010] Multiple terminal devices are the objects of online upgrade. Each terminal device is configured to parse the received FC data frame for online upgrade, convert it into flash control instructions, write the online upgrade data content into flash, and complete the online upgrade; and read back the data content in the flash, encapsulate it into FC data frame, configure the destination FC address as the upgrade control device, the source FC address as the terminal device for online upgrade, and send the encapsulated FC data frame to the switch.
[0011] As an optional embodiment, the upgrade control device slices the online upgrade data packet according to the upgrade instruction for the terminal device and the online upgrade data packet, and cuts the online upgrade data packet into N data slices, and the data content size of each data slice is the same;
[0012] According to the upgrade object being a single terminal device or a multicast group composed of terminal devices, a data slice group FC data frame is encapsulated for online upgrade.
[0013] As an optional embodiment, the FC data frame is composed of a FC frame header, data content, CRC checksum and a FC frame tail:
[0014] The FC frame header includes a source FC address and a destination FC address;
[0015] The data content includes multiple instruction structures, and the instruction structures are arranged in the order of full chip erase, data write and data read; full chip erase is used to perform a full chip erase operation on the flash; data write is to perform a write operation on the size and number of data slices according to the upgrade control device, each data write instruction writes one data slice, and the number of data write instructions is consistent with the number of data slices N; data read is used to read the flash data;
[0016] The CRC check is used to calculate the data check value from the FC frame header to the data content;
[0017] The FC frame tail serves as a tail mark of the FC data frame.
[0018] According to a second aspect of the present invention, a method for implementing an online upgrade of an FC daughter card of a single terminal device using the system of the above embodiment is provided, comprising the following steps:
[0019] Step 1: The upgrade control device receives the instruction to upgrade the FC subcard of a terminal device, receives the online upgrade data packet sent by the host computer, and slices the data according to the size of each data slice M. The complete online upgrade data packet is cut into N data slices;
[0020] Step 2: The upgrade control device adds a synchronization header to each data slice, calculates the length, writes a mark of 1, and adds a write flash control instruction and a write address. The content of the data slice is used as the write data, the CRC checksum is calculated, and the terminator is added. The above parts are encapsulated into a write instruction structure; according to the number of data slices, the online upgrade data packet is encapsulated into N write instruction structures;
[0021] Step 3: Upgrade the control device to construct the erase command structure, add the synchronization header, calculate the length, set the erase mark to 1, add the erase flash control command and erase address, calculate the CRC check, and add the end mark, and encapsulate the above parts into an erase command structure;
[0022] Step 4: Upgrade the control device to construct a read instruction structure, add a synchronization header, calculate the length, set the read mark to 1, add the read flash control instruction and read address, calculate the CRC check, and add the end mark, and encapsulate the above parts into a read instruction structure;
[0023] Step 5: The upgrade control device encapsulates the erase instruction structure, N write instruction structures, and read instruction structure constructed above in sequence to form a data structure:
[0024] Step 6: The upgrade control device uses the above data structure as the data content of the FC data frame, assembles the FC frame according to the FC data frame structure, the destination address of the FC data frame is the unicast address of the terminal device to be upgraded, the source address is the upgrade control device, and sends the FC frame in sequence;
[0025] Step 7: The switch receives the FC data frame sent by the upgrade control device, and routes the FC data frame to the terminal device that needs to be upgraded according to the destination address in the frame header;
[0026] Step 8: After receiving the FC data frame for online upgrade, the terminal device parses the frame content, strips out the command structure, and converts the erase command, N write commands, and read command into SPI interface format and outputs them to the flash of the FC daughter card, completing the writing and updating of the upgrade package data in the flash;
[0027] Step 9: The terminal device receives the read-back data content from the flash, adds a synchronization header, calculates the length, sets the read-write and erase marks to 0, adds the read-back data as the data content, calculates the CRC check, and adds the terminator to form a data structure;
[0028] Step 10: The terminal device uses the above data structure as the data content of the FC data frame, cuts and groups the FC data frames according to the FC frame structure, the destination FC address is the upgrade control device, the source address is the terminal device, and sends the FC data frames in sequence;
[0029] Step 11: The switch receives the FC data frame returned by the terminal device, and routes the FC data frame to the upgrade control device according to the destination address in the frame header;
[0030] Step 12: The upgrade control device receives the FC frame data containing the read-back data, parses the frame content to obtain the data content read back from the flash, and compares this content with the online upgrade data packet received from the host computer in the step 1. If the comparison is successful, the online upgrade is successful, the online upgrade process is completed, and the host computer is reported to be online The upgrade is successful; if the comparison fails, repeat steps 6 to 12 and execute the upgrade process again. If the number of comparison failures reaches the set threshold, the host computer is reported to be online. The upgrade has failed.
[0031] According to a third aspect of the present invention, a method for implementing batch online upgrade of FC daughter cards of multiple terminal devices using the system of the above embodiment is proposed, comprising the following steps:
[0032] Step 1: The upgrade control device receives the instruction to upgrade the FC subcard of a terminal device, receives the online upgrade data packet sent by the host computer, and slices the data according to the size of each data slice M. The complete online upgrade data packet is cut into N data slices;
[0033] Step 2: The upgrade control device adds a synchronization header to each data slice, calculates the length, writes a mark of 1, and adds a write flash control instruction and a write address. The content of the data slice is used as the write data, the CRC checksum is calculated, and the terminator is added. The above parts are encapsulated into a write instruction structure; according to the number of data slices, the online upgrade data packet is encapsulated into N write instruction structures;
[0034] Step 3: Upgrade the control device to construct the erase command structure, add the synchronization header, calculate the length, set the erase mark to 1, add the erase flash control command and erase address, calculate the CRC check, and add the end mark, and encapsulate the above parts into an erase command structure;
[0035] Step 4: Upgrade the control device to construct a read instruction structure, add a synchronization header, calculate the length, set the read mark to 1, add the read flash control instruction and read address, calculate the CRC check, and add the end mark, and encapsulate the above parts into a read instruction structure;
[0036] Step 5: The upgrade control device encapsulates the erase instruction structure, N write instruction structures, and read instruction structure constructed above in sequence to form a data structure:
[0037] Step 6: The upgrade control device uses the above data structure as the data content of the FC data frame, and forms the FC frame according to the FC data frame structure. The destination address of the FC data frame is the multicast address of the multicast group composed of multiple terminal devices that need to be upgraded, and the source address is the upgrade control device. The FC frames are sent out in sequence.
[0038] Step 7: The switch receives the FC data frame sent by the upgrade control device, and routes the FC frame to multiple terminal devices that need to be upgraded according to the destination address in the frame header;
[0039] Step 8: After receiving the FC data frame for online upgrade, each terminal device parses the frame content, strips out the command structure, and converts the erase command, N write commands, and read command into SPI interface format and outputs them to the flash of the FC daughter card, completing the writing and updating of the upgrade package data in the flash;
[0040] Step 9: Each terminal device receives the read-back data content from its flash, adds a synchronization header, calculates the length, sets the read-write and erase marks to 0, adds the read-back data as the data content, calculates the CRC check, and adds the terminator to form a data structure;
[0041] Step 10: Each terminal device uses the above data structure as the data content of the FC data frame, cuts and groups the FC data frames according to the FC frame structure, the destination FC address is the upgrade control device, the source address is the terminal device, and sends the FC data frames in sequence;
[0042] Step 11: The switch receives the FC data frames returned by each terminal device, and routes the FC data frames to the upgrade control device in sequence according to the destination address in the frame header;
[0043] Step 12: The upgrade control device receives FC frame data containing read-back data from each terminal device, and determines which terminal device the read-back data comes from according to the source FC address in the FC frame header; when all the read-back data sent by a terminal device are received, the upgrade control device performs frame content analysis on the FC data frame sent by the terminal device to obtain the data content read back from the flash, and compares the data content with the online upgrade data packet received from the host computer in the step 1. If the comparison is successful, it is determined that the online upgrade of the corresponding terminal device is successful, the online upgrade process is completed, and the host computer is reported that the online upgrade of this terminal device is successful; if the comparison fails, the host computer is reported that the online upgrade of this terminal device fails, and then the upgrade control device starts to process the read-back data sent by the next terminal device until the read-back data processing of all terminal devices is completed;
[0044] Step 13: The host computer decides whether to upgrade the terminal device that failed to upgrade separately based on the information reported on whether the online upgrade is successful or not.
[0045] By implementing the above technical solutions, the FC fiber channel network device group FC daughter card batch online upgrade method proposed by the present invention greatly improves the upgrade efficiency by connecting the FC daughter cards that need to be upgraded to the switching device, and the upgrade control device upgrades each FC daughter card individually or in batches through the FC data frame. At the same time, the upgrade content parsing is delegated to the FPGA and completed by the FPGA, and the correctness of the written data is ensured by reading and checking after writing the data, which improves the efficiency while ensuring the stability and effectiveness of the upgrade process.
[0046] It should be understood that all combinations of the aforementioned concepts and the additional concepts described in more detail below can be considered as part of the inventive subject matter of the present disclosure as long as such concepts are not mutually inconsistent. In addition, all combinations of the claimed subject matter are considered as part of the inventive subject matter of the present disclosure.
[0047] The foregoing and other aspects, embodiments and features of the present invention can be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the present invention, such as the features and / or beneficial effects of the exemplary embodiments, will be apparent from the following description or learned from the practice of the specific embodiments according to the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings are not intended to be drawn to scale. In the accompanying drawings, each identical or nearly identical component shown in each figure may be represented by the same reference numeral. For clarity, not every component is labeled in each figure. Embodiments of various aspects of the present invention will now be described by way of example and with reference to the accompanying drawings.
[0049] Figure 1 The present invention is a schematic diagram of the principle of online upgrading of FC daughter cards in the prior art.
[0050] Figure 2 The topology diagram is a diagram of implementing an FC daughter card upgrade of an FC fiber channel network device group according to an embodiment of the present invention.
[0051] Figure 3 It is a schematic diagram of the structure of an FC data frame used for online upgrade according to an embodiment of the present invention.
[0052] Figure 4 4 is a schematic diagram of a write instruction structure according to an embodiment of the present invention.
[0053] Figure 5 2 is a schematic diagram of an erase instruction structure according to an embodiment of the present invention.
[0054] Figure 6 4 is a schematic diagram of a read instruction structure according to an embodiment of the present invention.
[0055] Figure 7 It is a schematic diagram of a data structure encapsulated by an erase instruction structure, N write instruction structures, and a read instruction structure according to an embodiment of the present invention.
[0056] Figure 8 4 is a schematic diagram of a read-back data structure according to an embodiment of the present invention. DETAILED DESCRIPTION
[0057] In order to better understand the technical content of the present invention, specific embodiments are given and described as follows in conjunction with the accompanying drawings.
[0058] Various aspects of the present invention are described in this disclosure with reference to the accompanying drawings, in which many illustrative embodiments are shown. The embodiments of the present disclosure are not necessarily intended to include all aspects of the present invention. It should be understood that the various concepts and embodiments introduced above, as well as those described in more detail below, can be implemented in any of many ways, because the concepts and embodiments disclosed by the present invention are not limited to any implementation. In addition, some aspects disclosed by the present invention can be used alone or in any appropriate combination with other aspects disclosed by the present invention.
[0059] FC daughter card online upgrade system for FC fiber channel network equipment group
[0060] Combination Figure 2, 3 As shown, the FC daughter card online upgrade system for the FC fiber channel network device group according to the embodiment of the present invention includes:
[0061] An upgrade control device 100, used to receive an online upgrade data packet sent by a host computer, and to slice and encapsulate the data packet to form an FC data frame;
[0062] A switch 200, which is a FC switch, is used to receive the FC data frame sent by the upgrade control device, wherein: if it is a unicast frame, the FC data frame is routed to the corresponding terminal device; if it is a multicast frame, the FC data frame is routed to the corresponding terminal device group; the switch is configured to receive the read-back data frame returned by the terminal device, and route it to the upgrade control device according to the destination FC address;
[0063] Multiple terminal devices 300, as the object of online upgrade, each terminal device is configured to parse the received FC data frame for online upgrade, convert it into flash control instructions, write the online upgrade data content into flash, and complete the online upgrade; and read back the data content in the flash of the FC daughter card of the terminal device, encapsulate it into an FC data frame, configure the destination FC address as the upgrade control device, the source FC address as the terminal device for online upgrade, and send the encapsulated FC data frame to the switch 200. The switch 200 routes the FC data frame containing the read-back data to the upgrade control device according to the destination FC address, and the upgrade control device 100 compares and verifies the data content with the online upgrade data packet.
[0064] In an embodiment of the present invention, the upgrade control device 100 receives FC frame data containing read-back data, parses the frame content to obtain the data content read back from the flash, and compares the content with the online upgrade data packet received from the host computer. If the comparison is successful, the online upgrade is successful, the online upgrade process is completed, and the host computer is reported to be online The upgrade is successful; if the comparison fails, the upgrade process is repeated again until the upgrade is successful and the upgrade process ends, or the number of comparison failures reaches a set threshold, then the host computer is reported to be online. The upgrade has failed.
[0065] As an optional implementation, the upgrade control device 100 is configured to group FC data frames according to the number of upgrade objects:
[0066] (1) If only one terminal device is to be upgraded, the upgrade control device configures the destination address of the FC data frame to be a unicast address, corresponding to the upgraded terminal device;
[0067] (2) If multiple terminal devices need to be upgraded to the same version at the same time, the upgrade control device will combine the sliced data packets into FC multicast frames, and the destination address of the FC data frame is the multicast address of the multicast group composed of the multiple terminal devices that need to be upgraded.
[0068] As an optional implementation, the aforementioned upgrade control device 100 is configured to parse the frame content according to the read-back FC data frame returned by the terminal device to obtain the data content read back from the flash, and compare the parsed data content with the online upgrade data packet received from the host computer. If the comparison is successful, the online upgrade is successful; if the comparison fails, the current upgrade fails, and the upgrade process is repeated until the upgrade is successful or the number of upgrade failures reaches a set threshold, and the online upgrade process is terminated.
[0069] The upgrade control device slices the online upgrade data packet according to the upgrade instruction to the terminal device and the online upgrade data packet, and cuts the online upgrade data packet into N data slices, and the data content size of each data slice is the same;
[0070] According to the upgrade object being a single terminal device or a multicast group composed of terminal devices, a data slice group FC data frame is encapsulated for online upgrade.
[0071] As an optional implementation, combining Figure 3 As shown, the aforementioned FC data frame consists of an FC frame header, data content, CRC checksum and an FC frame tail.
[0072] The aforementioned FC frame header includes the source FC address and the destination FC address;
[0073] The aforementioned data content includes multiple instruction structures, and the instruction structures are arranged in the order of full chip erase, data write and data read; full chip erase is used to perform full chip erase operation on the flash; data write is to perform write operation on the size and number of data slices according to the upgrade control device, each data write instruction writes one data slice, and the number of data write instructions is consistent with the number of data slices N; data read is used to read flash data;
[0074] The aforementioned CRC check is used to calculate the data check value from the FC frame header to the data content;
[0075] The aforementioned FC frame tail serves as a tail mark of the FC data frame.
[0076] In an embodiment of the present invention, the configuration of the FC frame header is as follows: in the frame header of the FC data frame, if this FC frame is online upgrade instruction data sent from the upgrade control device 100 to the terminal device 300, the destination FC address is the unicast address of a certain terminal device or the multicast address of a certain group of terminal devices, and the source FC address is the upgrade control device; if this FC frame is flash read back data sent from the terminal device 300 to the upgrade control device 100, the destination FC address is the upgrade control device 100, and the source FC address is the terminal device that sends the FC data frame.
[0077] As a preferred embodiment, Figure 3 As shown in the above data content, each instruction structure includes synchronization header, payload length, device number, read mark, write mark, erase mark, control instruction / address / data content, CRC check, and terminator, which are defined as follows:
[0078] Synchronous header: marks the beginning of the instruction structure;
[0079] Payload length: 16 bits, unit B, marking the length of the control instruction / address / data content part;
[0080] RSV: reserved bit;
[0081] Read flag: 1 bit. If the data flow direction is from the upgrade control device to the terminal device and the purpose is to read flash data, this bit is marked as 1, otherwise it is 0. If the data flow direction is from the terminal device to the upgrade control device, this bit is invalid.
[0082] Write flag: 1 bit. If the data flow direction is from the upgrade control device to the terminal device and the purpose is to write data to the flash, this bit is marked as 1, otherwise it is 0. If the data flow direction is from the terminal device to the upgrade control device, this bit is invalid.
[0083] Erase flag: 1 bit. If the data flow direction is from the upgrade control device to the terminal device and the purpose is to erase the flash, this bit is marked as 1, otherwise it is 0. If the data flow direction is from the terminal device to the upgrade control device, this bit is invalid.
[0084] Instruction / address / data content: operation flash instruction, operation address and data content;
[0085] CRC check: checksum, the check content includes the synchronization header to the instruction / address / data content;
[0086] End character: marks the end of the instruction structure.
[0087] In an embodiment of the present invention, if the length of the data content of the FC data frame exceeds the maximum length of one FC frame, the data content is cut into multiple FC frames for transmission.
[0088] As an optional embodiment, the upgrade control device 100 constructs and encapsulates a write instruction, an erase instruction, and a read instruction to form FC frame data, which includes:
[0089] Add a synchronization header, calculate the length, write mark, and add a write flash control instruction and write address to each data slice. Use the slice content as the write data to encapsulate and construct a write instruction structure. According to the number of slices, encapsulate the online upgrade data packet into N write instruction structures, such as Figure 2 As shown;
[0090] Encapsulate the synchronization header, calculation length, erase mark, erase flash control instruction and erase address to construct an erase instruction structure;
[0091] Encapsulate the synchronization header, calculation length, read mark, read flash control instruction and read address to construct a read instruction structure;
[0092] Encapsulate an erase instruction structure, N write instruction structures, and a read instruction structure in sequence into a data structure;
[0093] The aforementioned upgrade control device uses the aforementioned data structure as the data content of the FC data frame, cuts and groups the FC data frames according to the FC data frame structure, the destination FC address is the unicast address of the terminal device that needs to be upgraded or the multicast address of the multicast group composed of multiple terminal devices that need to be upgraded, the source FC address is the upgrade control device, and the FC data frames are sent out in sequence.
[0094] Online upgrade method for FC daughter card of a single terminal device
[0095] Combination Figure 2 , 3 As shown, according to the FC daughter card online upgrade system for FC fiber channel network device group disclosed in the present invention, the online upgrade of the FC daughter card of a single terminal device is realized by using the system, and the implementation process includes:
[0096] Step 1: The upgrade control device receives the instruction to upgrade the FC subcard of a terminal device, receives the online upgrade data packet sent by the host computer, and slices the data according to the size of each data slice M. The complete online upgrade data packet is cut into N data slices;
[0097] Step 2: The upgrade control device adds a synchronization header to each data slice, calculates the length, writes the mark as 1, and adds a write flash control instruction and a write address. The content of the data slice is used as the write data, the CRC check is calculated, and the terminator is added. The above parts are encapsulated into a write instruction structure; according to the number of data slices, the online upgrade data packet is encapsulated into N write instruction structures, such as Figure 4 As shown;
[0098] Step 3: Upgrade the control device to construct the erase instruction structure, add the synchronization header, calculate the length, set the erase mark to 1, add the erase flash control instruction and erase address, calculate the CRC check, and add the end mark, and encapsulate the above parts into an erase instruction structure, such as Figure 5 As shown;
[0099] Step 4: Upgrade the control device to construct a read instruction structure, add a synchronization header, calculate the length, set the read mark to 1, add the read flash control instruction and read address, calculate the CRC check, and add the end mark, and encapsulate the above parts into a read instruction structure, such as Figure 6 As shown;
[0100] Step 5: The upgrade control device encapsulates the erase instruction structure, N write instruction structures, and read instruction structure constructed above in sequence to form a data structure, such as Figure 7 As shown;
[0101] Step 6: The upgrade control device uses the above data structure as the data content of the FC data frame, assembles the FC frame according to the FC data frame structure, the destination address of the FC data frame is the unicast address of the terminal device to be upgraded, the source address is the upgrade control device, and sends the FC frame in sequence;
[0102] Step 7: The switch receives the FC data frame sent by the upgrade control device, and routes the FC data frame to the terminal device that needs to be upgraded according to the destination address in the frame header;
[0103] Step 8: After receiving the FC data frame for online upgrade, the terminal device parses the frame content, strips out the command structure, and converts the erase command, N write commands, and read command into SPI interface format and outputs them to the flash of the FC daughter card, completing the writing and updating of the upgrade package data in the flash;
[0104] Step 9: The terminal device receives the read-back data content from the flash, adds a synchronization header, calculates the length, sets the read-write and erase marks to 0, adds the read-back data as the data content, calculates the CRC check, and adds the terminator to form a data structure;
[0105] Step 10: The terminal device uses the above data structure as the data content of the FC data frame, cuts and groups the FC data frames according to the FC frame structure, the destination FC address is the upgrade control device, the source address is the terminal device, and sends the FC data frames in sequence;
[0106] Step 11: The switch receives the FC data frame returned by the terminal device, and routes the FC data frame to the upgrade control device according to the destination address in the frame header;
[0107] Step 12: The upgrade control device receives the FC frame data containing the read-back data, parses the frame content to obtain the data content read back from the flash, and compares this content with the online upgrade data packet received from the host computer in the aforementioned step 1. If the comparison is successful, the online upgrade is successful, the online upgrade process is completed, and the host computer is reported to be online. Successful upgrade; if the comparison fails, repeat steps 6 to 12 and execute the upgrade process again. If the number of comparison failures reaches the set threshold, the host computer is reported to be online. The upgrade failed.
[0108] How to upgrade FC daughter cards of multiple terminal devices online
[0109] Combination Figure 2 , 3 As shown, according to the FC daughter card online upgrade system for FC fiber channel network device group disclosed in the present invention, a method for online upgrading FC daughter cards of multiple terminal devices implemented by using the system includes:
[0110] Step 1: The upgrade control device receives the instruction to upgrade the FC subcard of a terminal device, receives the online upgrade data packet sent by the host computer, and slices the data according to the size of each data slice M. The complete online upgrade data packet is cut into N data slices;
[0111] Step 2: The upgrade control device adds a synchronization header to each data slice, calculates the length, writes the mark as 1, and adds a write flash control instruction and a write address. The content of the data slice is used as the write data, the CRC check is calculated, and the terminator is added. The above parts are encapsulated into a write instruction structure; according to the number of data slices, the online upgrade data packet is encapsulated into N write instruction structures, such as Figure 3 As shown;
[0112] Step 3: Upgrade the control device to construct the erase instruction structure, add the synchronization header, calculate the length, set the erase mark to 1, add the erase flash control instruction and erase address, calculate the CRC check, and add the end mark, and encapsulate the above parts into an erase instruction structure, such as Figure 3 As shown;
[0113] Step 4: Upgrade the control device to construct a read instruction structure, add a synchronization header, calculate the length, set the read mark to 1, add the read flash control instruction and read address, calculate the CRC check, and add the end mark, and encapsulate the above parts into a read instruction structure, such as Figure 4 As shown;
[0114] Step 5: The upgrade control device encapsulates the erase instruction structure, N write instruction structures, and read instruction structure constructed above in sequence to form a data structure, such as Figure 2 , 5 As shown;
[0115] Step 6: The upgrade control device uses the above data structure as the data content of the FC data frame, and groups the FC frame according to the FC data frame structure. The destination address of the FC data frame is the multicast address of the multicast group composed of multiple terminal devices that need to be upgraded, and the source address is the upgrade control device. The FC frame is sent out in sequence, such as Figure 2 , 3 As shown;
[0116] Step 7: The switch receives the FC data frame sent by the upgrade control device, and routes the FC frame to multiple terminal devices that need to be upgraded according to the destination address in the frame header;
[0117] Step 8: After receiving the FC data frame for online upgrade, each terminal device parses the frame content, strips out the command structure, and converts the erase command, N write commands, and read command into SPI interface format and outputs them to the flash of the FC daughter card, completing the writing and updating of the upgrade package data in the flash;
[0118] Step 9: Each terminal device receives the read-back data content from its flash, adds a synchronization header, calculates the length, sets the read-write and erase marks to 0, adds the read-back data as the data content, calculates the CRC check, and adds the terminator to form a data structure, such as Figure 8 As shown;
[0119] Step 10: Each terminal device uses the above data structure as the data content of the FC data frame, cuts and groups the FC data frames according to the FC frame structure, the destination FC address is the upgrade control device, the source address is the terminal device, and sends the FC data frames in sequence;
[0120] Step 11: The switch receives the FC data frames returned by each terminal device, and routes the FC data frames to the upgrade control device in sequence according to the destination address in the frame header;
[0121] Step 12: The upgrade control device receives the FC frame data containing read-back data from each terminal device, and determines which terminal device the read-back data comes from according to the source FC address in the FC frame header; when all the read-back data sent by a terminal device are received, the upgrade control device parses the frame content of the FC data frame sent by the terminal device to obtain the data content read back from the flash, and compares the data content with the online upgrade data packet received from the host computer in the aforementioned step 1. If the comparison is successful, it is determined that the online upgrade of the corresponding terminal device is successful, the online upgrade process is completed, and the host computer is reported that the online upgrade of this terminal device is successful; if the comparison fails, the host computer is reported that the online upgrade of this terminal device fails, and then the upgrade control device starts to process the read-back data sent by the next terminal device until the read-back data processing of all terminal devices is completed;
[0122] Step 13: The host computer decides whether to upgrade the terminal device that failed to upgrade separately based on the information reported on whether the online upgrade is successful or not.
[0123] Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. A person with ordinary knowledge in the technical field to which the present invention belongs may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the definition of the claims.
Claims
1. An FC daughter card online upgrade system for an FC fiber channel network device group, characterized in that: include: An upgrade control device, used to receive online upgrade data packets sent by the host computer, and to slice and encapsulate the data packets to form FC data frames; A switch, configured to receive the FC data frame sent by the upgrade control device, wherein: if it is a unicast frame, the FC data frame is routed to the corresponding terminal device; if it is a multicast frame, the FC data frame is routed to the corresponding terminal device group; the switch is configured to receive the read-back data frame returned by the terminal device and route it to the upgrade control device according to the destination FC address; Multiple terminal devices are the objects of online upgrade. Each terminal device is configured to parse the received FC data frame for online upgrade, convert it into flash control instructions, write the online upgrade data content into flash, and complete the online upgrade; and read back the data content in flash, encapsulate it into FC data frame, configure the destination FC address as the upgrade control device, the source FC address as the terminal device for online upgrade, and send the encapsulated FC data frame to the switch; The process of online upgrading the FC daughter card of a single terminal device includes: Step 1: The upgrade control device receives the instruction to upgrade the FC subcard of a terminal device, receives the online upgrade data packet sent by the host computer, and slices the data according to the size of each data slice M. The complete online upgrade data packet is cut into N data slices; Step 2: The upgrade control device adds a synchronization header to each data slice, calculates the length, writes a mark of 1, and adds a write flash control instruction and a write address. The content of the data slice is used as the write data, the CRC checksum is calculated, and the terminator is added. The above parts are encapsulated into a write instruction structure; according to the number of data slices, the online upgrade data packet is encapsulated into N write instruction structures; Step 3: Upgrade the control device to construct the erase command structure, add the synchronization header, calculate the length, set the erase mark to 1, add the erase flash control command and erase address, calculate the CRC check, and add the end mark, and encapsulate the above parts into an erase command structure; Step 4: Upgrade the control device to construct a read instruction structure, add a synchronization header, calculate the length, set the read mark to 1, add the read flash control instruction and read address, calculate the CRC check, and add the end mark, and encapsulate the above parts into a read instruction structure; Step 5: The upgrade control device encapsulates the erase instruction structure, N write instruction structures, and read instruction structure constructed above in sequence to form a data structure: Step 6: The upgrade control device uses the above data structure as the data content of the FC data frame, assembles the FC frame according to the FC data frame structure, the destination address of the FC data frame is the unicast address of the terminal device to be upgraded, the source address is the upgrade control device, and sends the FC frame in sequence; Step 7: The switch receives the FC data frame sent by the upgrade control device, and routes the FC data frame to the terminal device that needs to be upgraded according to the destination address in the frame header; Step 8: After receiving the FC data frame for online upgrade, the terminal device parses the frame content, strips out the command structure, and converts the erase command, N write commands, and read command into SPI interface format and outputs them to the flash of the FC daughter card, completing the writing and updating of the upgrade package data in the flash; Step 9: The terminal device receives the read-back data content from the flash, adds a synchronization header, calculates the length, sets the read-write and erase marks to 0, adds the read-back data as the data content, calculates the CRC check, and adds the terminator to form a data structure; Step 10: The terminal device uses the above data structure as the data content of the FC data frame, cuts and groups the FC data frames according to the FC frame structure, the destination FC address is the upgrade control device, the source address is the terminal device, and sends the FC data frames in sequence; Step 11: The switch receives the FC data frame returned by the terminal device, and routes the FC data frame to the upgrade control device according to the destination address in the frame header; Step 12: The upgrade control device receives the FC frame data containing the read-back data, parses the frame content to obtain the data content read back from the flash, and compares the data content with the online upgrade data packet received from the host computer in the step 1. If the comparison is successful, the online upgrade is successful, the online upgrade process is completed, and the host computer is reported to be online The upgrade is successful; if the comparison fails, repeat steps 6 to 12 and execute the upgrade process again. If the number of comparison failures reaches the set threshold, the host computer is reported to be online. The upgrade has failed.
2. The FC daughter card online upgrade system for FC fiber channel network equipment group according to claim 1, characterized in that: The upgrade control device is configured to respectively group FC data frames according to the number of upgrade objects: 1) If only one terminal device is to be upgraded, the upgrade control device configures the destination address of the FC data frame to be a unicast address, corresponding to the upgraded terminal device; 2) If multiple terminal devices need to be upgraded to the same version at the same time, the upgrade control device will form the sliced data packets into FC multicast frames, and the destination address of the FC data frame is the multicast address of the multicast group composed of the multiple terminal devices that need to be upgraded.
3. The FC daughter card online upgrade system for FC fiber channel network equipment group according to claim 2, characterized in that: The upgrade control device is configured to parse the frame content according to the read-back FC data frame returned by the terminal device to obtain the data content read back from the flash, and compare the parsed data content with the online upgrade data packet received from the host computer. If the comparison is successful, the online upgrade is successful; if the comparison fails, the current upgrade fails, and the upgrade process is repeated until the upgrade is successful or the number of upgrade failures reaches a set threshold, and the online upgrade process is terminated.
4. The FC daughter card online upgrade system for FC fiber channel network device group according to any one of claims 1 to 3, characterized in that: The upgrade control device slices the online upgrade data packet according to the upgrade instruction for the terminal device and the online upgrade data packet, and cuts the online upgrade data packet into N data slices, and the data content size of each data slice is the same; According to the upgrade object being a single terminal device or a multicast group composed of terminal devices, a data slice group FC data frame is encapsulated for online upgrade.
5. The FC daughter card online upgrade system for FC fiber channel network equipment group according to claim 4, characterized in that: The FC data frame consists of an FC frame header, data content, CRC checksum and an FC frame tail: The FC frame header includes a source FC address and a destination FC address; The data content includes multiple instruction structures, and the instruction structures are arranged in the order of full chip erase, data write and data read; full chip erase is used to perform a full chip erase operation on the flash; data write is to perform a write operation on the size and number of data slices according to the upgrade control device, each data write instruction writes one data slice, and the number of data write instructions is consistent with the number of data slices N; Data readout is used to read flash data; The CRC check is used to calculate the data check value from the FC frame header to the data content; The FC frame tail serves as a tail mark of the FC data frame.
6. The FC daughter card online upgrade system for FC fiber channel network equipment group according to claim 5, characterized in that: The upgrade control device adds a synchronization header, calculates the length, and writes a mark to each data slice, and adds a write flash control instruction and a write address, uses the slice content as write data, and encapsulates and constructs a write instruction structure; Encapsulate the synchronization header, calculation length, erase mark, erase flash control instruction and erase address to construct an erase instruction structure; Encapsulate the synchronization header, calculation length, read mark, read flash control instruction and read address to construct a read instruction structure; Encapsulate an erase instruction structure, N write instruction structures, and a read instruction structure in sequence into a data structure; The upgrade control device uses the data structure as the data content of the FC data frame, cuts and groups the FC data frames according to the FC data frame structure, the destination FC address is the unicast address of the terminal device that needs to be upgraded or the multicast address of the multicast group composed of multiple terminal devices that need to be upgraded, the source FC address is the upgrade control device, and the FC data frames are sent out in sequence.
7. An FC daughter card online upgrade system for an FC fiber channel network device group, characterized in that: include: An upgrade control device, used to receive online upgrade data packets sent by the host computer, and to slice and encapsulate the data packets to form FC data frames; A switch, configured to receive the FC data frame sent by the upgrade control device, wherein: if it is a unicast frame, the FC data frame is routed to the corresponding terminal device; if it is a multicast frame, the FC data frame is routed to the corresponding terminal device group; the switch is configured to receive the read-back data frame returned by the terminal device and route it to the upgrade control device according to the destination FC address; Multiple terminal devices are the objects of online upgrade. Each terminal device is configured to parse the received FC data frame for online upgrade, convert it into flash control instructions, write the online upgrade data content into flash, and complete the online upgrade; and read back the data content in flash, encapsulate it into FC data frame, configure the destination FC address as the upgrade control device, the source FC address as the terminal device for online upgrade, and send the encapsulated FC data frame to the switch; The process of online upgrading of FC daughter cards for multiple terminal devices includes: Step 1: The upgrade control device receives the instruction to upgrade the FC subcard of a terminal device, receives the online upgrade data packet sent by the host computer, and slices the data according to the size of each data slice M. The complete online upgrade data packet is cut into N data slices; Step 2: The upgrade control device adds a synchronization header to each data slice, calculates the length, writes a mark of 1, and adds a write flash control instruction and a write address. The content of the data slice is used as the write data, the CRC checksum is calculated, and the terminator is added. The above parts are encapsulated into a write instruction structure; according to the number of data slices, the online upgrade data packet is encapsulated into N write instruction structures; Step 3: Upgrade the control device to construct the erase command structure, add the synchronization header, calculate the length, set the erase mark to 1, add the erase flash control command and erase address, calculate the CRC check, and add the end mark, and encapsulate the above parts into an erase command structure; Step 4: Upgrade the control device to construct a read instruction structure, add a synchronization header, calculate the length, set the read mark to 1, add the read flash control instruction and read address, calculate the CRC check, and add the end mark, and encapsulate the above parts into a read instruction structure; Step 5: The upgrade control device encapsulates the erase instruction structure, N write instruction structures, and read instruction structure constructed above in sequence to form a data structure: Step 6: The upgrade control device uses the above data structure as the data content of the FC data frame, and forms the FC frame according to the FC data frame structure. The destination address of the FC data frame is the multicast address of the multicast group composed of multiple terminal devices that need to be upgraded, and the source address is the upgrade control device. The FC frames are sent out in sequence. Step 7: The switch receives the FC data frame sent by the upgrade control device, and routes the FC frame to multiple terminal devices that need to be upgraded according to the destination address in the frame header; Step 8: After receiving the FC data frame for online upgrade, each terminal device parses the frame content, strips out the command structure, and converts the erase command, N write commands, and read command into SPI interface format and outputs them to the flash of the FC daughter card, completing the writing and updating of the upgrade package data in the flash; Step 9: Each terminal device receives the read-back data content from its flash, adds a synchronization header, calculates the length, sets the read-write and erase marks to 0, adds the read-back data as the data content, calculates the CRC check, and adds the terminator to form a data structure; Step 10: Each terminal device uses the above data structure as the data content of the FC data frame, cuts and groups the FC data frames according to the FC frame structure, the destination FC address is the upgrade control device, the source address is the terminal device, and sends the FC data frames in sequence; Step 11: The switch receives the FC data frames returned by each terminal device, and routes the FC data frames to the upgrade control device in sequence according to the destination address in the frame header; Step 12: The upgrade control device receives FC frame data containing read-back data from each terminal device, and determines which terminal device the read-back data comes from according to the source FC address in the FC frame header; when all the read-back data sent by a terminal device are received, the upgrade control device performs frame content analysis on the FC data frame sent by the terminal device to obtain the data content read back from the flash, and compares the data content with the online upgrade data packet received from the host computer in the step 1. If the comparison is successful, it is determined that the online upgrade of the corresponding terminal device is successful, the online upgrade process is completed, and the host computer is reported that the online upgrade of this terminal device is successful; if the comparison fails, the host computer is reported that the online upgrade of this terminal device fails, and then the upgrade control device starts to process the read-back data sent by the next terminal device until the read-back data processing of all terminal devices is completed; Step 13: The host computer decides whether to upgrade the terminal device that failed to upgrade separately based on the information reported on whether the online upgrade is successful or not.
8. The FC daughter card online upgrade system for FC fiber channel network equipment group according to claim 7, characterized in that: If multiple terminal devices need to be upgraded to the same version at the same time, the upgrade control device will compose the sliced data packets into FC multicast frames, and the destination address of the FC data frame is the multicast address of the multicast group composed of the multiple terminal devices that need to be upgraded.
9. The FC daughter card online upgrade system for FC fiber channel network equipment group according to claim 8, characterized in that: The upgrade control device is configured to parse the frame content according to the read-back FC data frame returned by the terminal device to obtain the data content read back from the flash, and compare the parsed data content with the online upgrade data packet received from the host computer. If the comparison is successful, the online upgrade is successful; if the comparison fails, the current upgrade fails, and the upgrade process is repeated until the upgrade is successful or the number of upgrade failures reaches a set threshold, and the online upgrade process is terminated.
10. The FC daughter card online upgrade system for FC fiber channel network equipment group according to any one of claims 7 to 9, characterized in that: The upgrade control device slices the online upgrade data packet according to the upgrade instruction for the terminal device and the online upgrade data packet, and cuts the online upgrade data packet into N data slices, and the data content size of each data slice is the same; According to the multicast group consisting of terminal devices as the upgrade object, the data slice group FC data frame is encapsulated for online upgrade.
11. The FC daughter card online upgrade system for FC fiber channel network equipment group according to claim 10, characterized in that: The FC data frame consists of an FC frame header, data content, CRC checksum and an FC frame tail: The FC frame header includes a source FC address and a destination FC address; The data content includes multiple instruction structures, and the instruction structures are arranged in the order of full chip erase, data write and data read; full chip erase is used to perform a full chip erase operation on the flash; data write is to perform a write operation on the size and number of data slices according to the upgrade control device, each data write instruction writes one data slice, and the number of data write instructions is consistent with the number of data slices N; Data readout is used to read flash data; The CRC check is used to calculate the data check value from the FC frame header to the data content; The FC frame tail serves as a tail mark of the FC data frame.
12. The FC daughter card online upgrade system for FC fiber channel network equipment group according to claim 11, characterized in that: The upgrade control device adds a synchronization header, calculates the length, and writes a mark to each data slice, and adds a write flash control instruction and a write address, uses the slice content as write data, and encapsulates and constructs a write instruction structure; Encapsulate the synchronization header, calculation length, erase mark, erase flash control instruction and erase address to construct an erase instruction structure; Encapsulate the synchronization header, calculation length, read mark, read flash control instruction and read address to construct a read instruction structure; Encapsulate an erase instruction structure, N write instruction structures, and a read instruction structure in sequence into a data structure; The upgrade control device uses the data structure as the data content of the FC data frame, cuts and groups the FC data frames according to the FC data frame structure, the destination FC address is the unicast address of the terminal device that needs to be upgraded or the multicast address of the multicast group composed of multiple terminal devices that need to be upgraded, the source FC address is the upgrade control device, and the FC data frames are sent out in sequence.
Citation Information
Patent Citations
online upgrading method and system for double-DSP program
CN111506333A
Whole-network remote upgrading method based on FC switching network
CN112738662A