A synchronization system and method for front-end and back-end based on virtio protocol
By adding synchronization state characteristics and waiting state to the virtio protocol, the asynchronous problem between the smart network card SOC and the host HOST is solved, the success of PXE installation and the simplification of design is achieved, and a high compatibility solution is provided.
Patent Information
- Application Number
- CN202311709621.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-13
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2043-12-13
AI Technical Summary
There are asynchronous problems between the smart network card SOC and the host HOST, resulting in problems such as failure of PXE installation. The existing solution relies on bmc software and non-standard communication, and is complex in design and incompatible with standard power supply.
Add synchronization status characteristics and synchronous wait state on the virtio protocol. Through the intelligent network card FPGA virtio module, virtio option rom driver module and intelligent network card SOC module, synchronous between the host and the intelligent network card SOC, read and release the synchronous wait state to solve the asynchronous solution question.
The synchronization between the host and the smart network card SOC is achieved, the installation failure and design complexity caused by asynchronousness is solved, and a general standard method is provided, which improves compatibility and simplifies design.
Smart Images

Figure CN117850903B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of emerging information technology, and in particular relates to a front-end and back-end synchronization system and method based on the virtio protocol. Background Art
[0002] The Smart NIC comes with a SOC small system, and the Smart NIC hardware integrates OVS virtio_net virtio_blk and other modules. When the Smart NIC SOC small system is not fully started, the service request message sent by the HOST through virtio cannot be forwarded by the Smart NIC. Therefore, there is an asynchronous problem between the host HOST and the Smart NIC SOC.
[0003] The asynchronous problem brings about practical problems. For example, the host HOST uses PXE to install the computer. After the host HOST is powered on, it enters the bios to start up. The bios will identify the virtio-net device and then use the virtio-net device to perform PXE installation. Since the host bios starts faster and the smart network card SOC starts slower, the software service on the SOC has not yet configured the flow table and flow forwarding rules for the hardware. Therefore, the PXE protocol message sent by the host of the host cannot be forwarded to the remote end, resulting in the failure of PXE installation. In the existing solution, after the motherboard is powered on, the bmc software on the host HOST does not power on the host HOST first, the smart network card is powered separately, and the SOC on it runs the bmc software. The bmc software communicates with the bmc on the host through the smbus on the PCIE slot. After the smart network card SOC is started, the bmc on the host is notified through the smbus to power on the host HOST.
[0004] Disadvantages of existing methods:
[0005] 1) Both the host HOST and the smart network card SOC need to run BMC services. They are highly dependent on BMCs, and the communication between BMCs is non-standard.
[0006] 2) The smart network card needs to be powered independently and cannot be powered by a standard gold finger, so the design is relatively complicated. Summary of the invention
[0007] The technical problem to be solved by the present invention is to provide a synchronization system and method for the front-end and back-end based on the virtio protocol in view of the deficiencies of the background technology, add a feature to the existing virtio protocol, that is, support the synchronization state feature, and add a synchronization waiting state in the protocol state machine; implement a universal standard method to solve the asynchronous problem between the host HOST and the smart network card SOC; thereby solving many problems caused by asynchrony in the actual environment.
[0008] The present invention adopts the following technical solutions to solve the above technical problems:
[0009] A synchronization system for front-end and back-end based on virtio protocol, specifically comprising a smart network card FPGA virtio module, a virtio option rom driver module, and a smart network card SOC module;
[0010] Among them, the smart network card FPGA virtio module is used for the Virtio module to support the synchronous waiting feature by default and enter the synchronous waiting state;
[0011] The virtio option rom driver module is used to read and wait for the virtio synchronization wait state to be released during the initialization process;
[0012] The smart network card SOC module is used to set the virtio module to enter the synchronous waiting state release state after the smart network card SOC module completes the service logic initialization.
[0013] As a further preferred solution of the present invention for the front-end and back-end synchronization system based on the virtio protocol, the virtiooption rom driver module is as follows:
[0014] Step 2.1: After the virtio option rom driver module is loaded into the host, it enters the initialization process;
[0015] Step 2.2, before initialization, determine whether the synchronous waiting feature is supported;
[0016] Step 2.3, if the synchronous wait feature is supported, read the status register, otherwise go to step 2.6;
[0017] Step 2.4, read the status register and determine whether to enter the synchronous waiting state;
[0018] Step 2.5, if the judgment is yes, go to step 2.4, otherwise go to step 2.6;
[0019] Step 2.6, continue to complete the initialization logic.
[0020] As a further preferred solution of the present invention for the synchronization system of the front-end and back-end based on the virtio protocol, the smart network card SOC module is as follows:
[0021] Step 3.1: After the Smart NIC SOC module is started and forwards messages normally;
[0022] Step 3.2, determine whether the virtio module supports the synchronous wait feature;
[0023] Step 3.3, if the synchronous wait feature is supported, read the status register, otherwise go to step 3.6;
[0024] Step 3.4, read the status register and determine whether to enter the synchronous waiting state;
[0025] Step 3.5, if the judgment is yes, set the virtio module to enter the synchronous waiting release state, otherwise go to step 3.6;
[0026] Step 3.6, continue running normally.
[0027] As a further preferred solution of the synchronization system for the front-end and back-end based on the virtio protocol of the present invention, the smart network card FPGA virtio module virtio module supports the synchronization waiting feature by default and supports the synchronization waiting state.
[0028] As a further preferred solution of the virtio protocol-based synchronization system for the front-end and back-end of the present invention, the smart network card FPGA virtio module enters a default state after being powered on.
[0029] As a further preferred solution of the present invention for the front-end and back-end synchronization system based on the virtio protocol, in step 3.1, the smart network card SOC startup completion includes configuring flow rules.
[0030] As a further preferred solution of the present invention based on the virtio protocol for the front-end and back-end synchronization system, in step 3.1, in step 3.1, the smart network card SOC startup completion includes the ovs flow table; wherein ovs is a high-quality, multi-layer virtual switching component.
[0031] As a further preferred solution of the virtio protocol-based front-end and back-end synchronization system of the present invention, in step 2.1, the virtio option rom driver module drives the self-driving smart network card.
[0032] A synchronization method for a front-end and back-end synchronization system based on the virtio protocol specifically comprises the following steps;
[0033] Step 1: Add a feature to the virtio protocol to support the synchronization state feature, and add a synchronization wait state to the protocol state machine;
[0034] Step 2: After the smart network card SOC module is powered on, the virtio module hard logic supports the synchronization state feature and enters the synchronization waiting state;
[0035] Step 3, after the HOST host loads the driver of the virtio module, the driver reads the synchronization state according to the synchronization state characteristics until the synchronization state waiting state is released;
[0036] Step 4: After the SOC service startup is completed and works normally, the smart network card SOC module controls the virtio module logic to release the synchronization state waiting state.
[0037] As a further preferred solution of the front-end and back-end synchronization method based on the virtio protocol of the present invention, in step 3, the virtio module is set to enter the synchronization waiting state release state.
[0038] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:
[0039] The present invention adds a feature to the existing virtio protocol, that is, supports the synchronous state feature, and adds a synchronous waiting state in the protocol state machine; implements a universal standard method to solve the asynchronous problem between the host HOST and the smart network card SOC; thereby solving many problems caused by asynchrony in the actual environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 It is a control flow chart of a synchronization method for a front-end and back-end synchronization system based on the virtio protocol of the present invention. DETAILED DESCRIPTION
[0042] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings:
[0043] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. The present invention is described in detail below according to the drawings and preferred embodiments, and the purpose and effect of the present invention will become clearer. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0044] The Smart NIC comes with a SOC mini-system, and the Smart NIC hardware integrates OVS virtio_net virtio_blk and other modules. When the Smart NIC SOC mini-system is not fully started, the service request message sent by the HOST through virtio cannot be forwarded by the Smart NIC. Therefore, there is an asynchronous problem between the host HOST and the Smart NIC SOC. Virtio is a general virtualization device simulation standard.
[0045] The present invention adds a feature to the existing virtio protocol, that is, supports the synchronous state feature, and adds a synchronous waiting state in the protocol state machine, thereby realizing a universal standard method to solve the asynchronous problem between the host HOST and the smart network card SOC.
[0046] The present invention adds a feature to the existing virtio protocol, that is, supports the synchronous state feature, and adds a synchronous waiting state in the protocol state machine, thereby realizing a universal standard method to solve the asynchronous problem between the host HOST and the smart network card SOC.
[0047] The present invention can solve the asynchronous problem between the HOST and the smart network card SOC by only modifying the virtiooption rom provided by the smart network card without modifying the standard virtio driver, and has high compatibility.
[0048] The present invention adds a feature to the existing virtio protocol, namely, supports a synchronous state feature, and adds a synchronous waiting state in the protocol state machine.
[0049] After the smart network card is powered on, the virtio hard logic supports the synchronization state feature and enters the synchronization waiting state.
[0050] After the HOST host loads the virtio driver, the driver reads the synchronization status according to the synchronization status characteristics until the synchronization status waiting state is released.
[0051] After the SOC service is started and works normally, the smart NIC controls the virtio hardware logic to release the synchronization state waiting state.
[0052] 1. Smart NIC FPGA virtio module:
[0053] 1.1. The virtio module supports the synchronous wait feature by default and supports the synchronous wait state.
[0054] 1.2. The smart network card FPGA virtio module enters the default state after power-on.
[0055] 2.virtio option rom driver module:
[0056] 2.1.After the virtio option rom driver module is loaded into the host, it enters the initialization process;
[0057] 2.2. Before initialization, determine whether the synchronous waiting feature is supported;
[0058] 2.3. If the synchronous wait feature is supported, read the status register, otherwise go to step 2.6;
[0059] 2.4. Read the status register and determine whether to enter the synchronous waiting state;
[0060] 2.5. If the judgment is yes, go to step 2.4, otherwise go to step 2.6;
[0061] 2.6. Continue to complete the initialization logic.
[0062] 3. Smart NIC SOC module:
[0063] 3.1. After the smart network card SOC module is started, the message is forwarded normally. The smart network card SOC starts up and includes the ovs flow table. OVS is a high-quality, multi-layer virtual switching component. OpenvSwitch is referred to as OVS.
[0064] 3.2. Determine whether the virtio module supports the synchronous wait feature;
[0065] 3.3. If the synchronous wait feature is supported, read the status register, otherwise go to step 3.6;
[0066] 3.4. Read the status register and determine whether to enter the synchronous waiting state;
[0067] 3.5. If the judgment is yes, set the virtio module to enter the synchronous waiting release state, otherwise go to step 3.6;
[0068] 3.6. Continue to operate normally.
[0069] The present invention only adds a feature to the existing virtio protocol, that is, supports the synchronization state feature, and adds a synchronization waiting state to the protocol state machine. Therefore, it can be applied to both smart network card and non-smart network card scenarios, and has high compatibility. The present invention only needs to simply modify the option rom driver of the smart network card (the driver is built into the smart network card). There is no need to modify the virtio driver in other environments, and has high compatibility.
[0070] Those skilled in the art can understand that the above are only preferred examples of the invention and are not intended to limit the invention. Although the invention is described in detail with reference to the above examples, those skilled in the art can still modify the technical solutions recorded in the above examples or replace some of the technical features with equivalents. Any modification, equivalent replacement, etc. made within the spirit and principle of the invention should be included in the protection scope of the invention. All technical features in this embodiment can be freely combined according to actual needs.
[0071] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A synchronization system based on the virtio protocol for front-end and back-end, Features: Specifically includes the smart network card FPGAvirtio module, virtio option rom driver module, and smart network card SOC module; Among them, the smart network card FPGA virtio module is used for the Virtio module to support the synchronous waiting feature by default and enter the synchronous waiting state; The virtio option rom driver module is used to read and wait for the virtio synchronization wait state to be released during the initialization process; The smart network card SOC module is used to set the virtio module to enter a synchronous waiting state release state after the smart network card SOC module completes the service logic initialization; Virtio option rom driver module, including: Step 2.1: After the virtio option rom driver module is loaded into the host, it enters the initialization process; Step 2.2, before initialization, determine whether the synchronous waiting feature is supported; Step 2.3, if the synchronous wait feature is supported, read the status register, otherwise go to step 2.6; Step 2.4, read the status register and determine whether to enter the synchronous waiting state; Step 2.5, if the judgment is yes, go to step 2.4, otherwise go to step 2.6; Step 2.6, continue to complete the initialization logic; Smart NIC SOC module, including: Step 3.1: After the Smart NIC SOC module is started and forwards messages normally; Step 3.2, determine whether the virtio module supports the synchronous wait feature; Step 3.3, if the synchronous wait feature is supported, read the status register, otherwise go to step 3.6; Step 3.4, read the status register and determine whether to enter the synchronous waiting state; Step 3.5, if the judgment is yes, set the virtio module to enter the synchronous waiting release state, otherwise go to step 3.6; Step 3.6, continue running normally; Smart NIC FPGA virtio module The virtio module supports the synchronous wait feature by default and supports the synchronous wait state.
2. A front-end and back-end synchronization system based on the virtio protocol according to claim 1, Features: The SmartNIC FPGA virtio module enters the default state after power-on.
3. The synchronization system for front-end and back-end based on the virtio protocol according to claim 1, Features: In step 3.1, the smart network card SOC startup is completed including configuring flow rules.
4. The synchronization system for front-end and back-end based on the virtio protocol according to claim 1, Features: In step 3.1, the smart network card SOC startup is completed including the ovs flow table; among them, ovs is a high-quality, multi-layer virtual switching component.
5. The synchronization system for front-end and back-end based on virtio protocol according to claim 1, Features: In step 2.1, the virtio option rom driver module drives the built-in driver smart NIC.
6. A synchronization method for a front-end and back-end synchronization system based on the virtio protocol according to any one of claims 1 to 5, Features: The specific steps include: Step 1, add a feature to the virtio protocol to support the synchronization state feature, and add a synchronization wait state to the protocol state machine; Step 2: After the smart network card SOC module is powered on, the virtio module hard logic supports the synchronization state feature and enters the synchronization waiting state; Step 3, after the HOST host loads the driver of the virtio module, the driver reads the synchronization state according to the synchronization state characteristics until the synchronization state waiting state is released; Step 4: After the SOC service startup is completed and works normally, the smart network card SOC module controls the virtio module logic to release the synchronization state waiting state.
7. The synchronization method for the front-end and back-end synchronization system based on the virtio protocol according to claim 6, Features: In step 3, the virtio module is set to enter the synchronous wait state release state.
