A method for intelligent network card hot upgrade based on OVS-DPDK

CN117857342BActive Publication Date: 2026-10-23CHINA TELECOM CLOUD TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311703150.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2026-10-23
Estimated Expiration
2043-12-12

AI Technical Summary

Benefits of technology

[0032](1)本发明采用双进程方式进行智能网卡热升级,规避了DPDK初始化和流表恢复的时间开销,提高了智能网卡热的升级效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117857342B_ABST
    Figure CN117857342B_ABST
Patent Text Reader

Abstract

The application relates to the field of emerging information technology, in particular to a method for hot upgrading of an intelligent network card based on OVS-DPDK, which comprises the following steps: starting a first process and requesting a synchronization data version number from a second process, if the data version number meets the hot upgrading requirement, hot upgrading is carried out; a communication channel of the first process and the second process is created through an unenabled port, the communication channel comprises a control channel and a data channel; a shutdown uninstalling command is sent to the second process through the control channel, the second process after being uninstalled synchronizes port information to the first process through the control channel; after the first process acquires the port information, a bridge and a port are created, a synchronization request is sent to the second process, the second process sends a flow table to the first process through the data channel; after the first process receives the flow table, flow table adaptation installation is carried out, and after the installation is completed, a synchronization message is sent to the second process for resource release. The application carries out hot upgrading through a double-process mode, and the upgrading efficiency of the intelligent network card is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of emerging information technology, and in particular to a method for hot-upgrading of smart network interface cards based on OVS-DPDK. Background Technology

[0002] Hot upgrades, or non-disruptive upgrades of system-level services, are crucial for rapid service iteration and development. Virtual switches (vSwitch) based on DPUs serve as the entry point for virtual networks, with flexible scenarios and ever-changing requirements necessitating frequent version updates. However, frequent upgrades and network outages can disrupt services running on virtual machines or bare metal surfaces. Furthermore, typically only one virtual switch is hosted on each host machine, making master-slave architecture difficult to implement. Therefore, hot upgrade technology is essential for the rapid iteration of vSwitch.

[0003] Existing smart NIC hardware offloading systems are divided into two main categories based on the software side: implementations based on the OVS kernel and implementations based on OVS-DPDK. Among them, the implementation based on OVS-DPDK has lower latency and higher performance. However, virtual switches based on OVS-DPDK do not support hot upgrades. The only upgrade method is a restart, which results in long downtime and seriously affects customer services.

[0004] For example, Chinese Patent CN114710408A discloses a method and apparatus for hot-upgrading a virtual switch, relating to the field of Internet technology. This method deploys a corresponding new version of the virtual switch to an older version, and the new version of the virtual switch loads the configuration information to be upgraded. The older version of the virtual switch is connected to a physical network interface card (NIC) and at least one virtual machine, respectively, for traffic forwarding between the NIC and the virtual machine. A traffic channel is established between the older version of the virtual switch and the new version of the virtual switch, allowing the new version of the virtual switch to interact with the NIC through the older version of the virtual switch. The connection between the at least one virtual machine and the older version of the virtual switch is disconnected, and a connection is established between the at least one virtual machine and the upgraded new version of the virtual switch.

[0005] Chinese patent CN109450676B discloses a switch upgrade method and apparatus, electronic device, and computer-readable medium. The method includes: receiving a switch upgrade file; designating the virtual machine currently forwarding control messages as the first virtual machine, starting a virtual machine with a hot standby relationship with the first virtual machine as the second virtual machine, loading the upgrade file into the second virtual machine to upgrade the switch, and after successful upgrade, synchronizing the current status information of the first virtual machine to the second virtual machine, the status information including at least the first forwarding table entry most recently sent by the first virtual machine to the switching chip for message forwarding, switching the second virtual machine to the virtual machine for control message forwarding, sending the second table entry sent by the second virtual machine to the switching chip, and instructing the switching chip to replace the stored first forwarding table entry with the second forwarding table entry.

[0006] All of the above patents suffer from the problems mentioned in this background technology: existing OVS-DPDK-based smart network cards do not support hot upgrades, and the interruption time for restarting and upgrading is long, making it impossible to avoid the time overhead of DPDK initialization and flow table recovery. Summary of the Invention

[0007] To overcome the defects and shortcomings of existing technologies, this invention provides a method for hot-upgrading smart network cards based on OVS-DPDK. By performing hot-upgrading of smart network cards through a dual-process approach, the upgrade efficiency of smart network cards is improved.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] This invention provides a method for hot-upgrading a smart network interface card (NIC) based on OVS-DPDK, comprising the following steps:

[0010] Start the first process and request the second process to synchronize the data version number. If the data version number meets the hot upgrade requirements, then perform the hot upgrade.

[0011] A communication channel between the first process and the second process is created through an unenabled port. The communication channel includes a control channel and a data channel.

[0012] The control channel sends a shutdown / uninstallation command to the second process. After the second process is shut down and uninstalled, it synchronizes the port information to the first process through the control channel.

[0013] After obtaining the port information, the first process creates a bridge and port and sends a synchronization request to the second process. The second process then sends the flow table to the first process through the data channel.

[0014] After receiving the flow table, the first process adapts and installs the flow table, and then sends a synchronization message to the second process to release resources after the installation is complete.

[0015] As a preferred technical solution, the first process is the new ovs-vswitchd process, and the second process is the old ovs-vswitchd process.

[0016] As a preferred technical solution, the specific steps to meet the thermal upgrade requirements include:

[0017] After obtaining the data version number of the second process, the first process checks whether the data version number of the second process exists. If the data version number does not exist, the hot upgrade ends.

[0018] If the data version number exists, check if the data version number supports hot upgrade. If the data version number supports hot upgrade, start the hot upgrade; otherwise, end the hot upgrade.

[0019] As a preferred technical solution, the control channel is built based on the JSON-RPC transmission protocol, and the data channel is built based on shared memory.

[0020] As a preferred technical solution, the JSON-RPC transmission protocol is a stateless and lightweight remote procedure call transmission protocol. The content transmitted by the JSON-RPC transmission protocol is mainly JSON. Compared with the general REST calling the remote server via the URL, the JSON-RPC transmission protocol directly defines the name of the function to be called in the content.

[0021] As a preferred technical solution, subsequent packets of the second process after the unloading is closed are only forwarded by software, and flow table unloading is no longer performed, and the revalidators thread of the second process is paused.

[0022] As a preferred technical solution, the specific steps of sending the flow table include:

[0023] First, the number of flow tables is sent to the first process, and then the contents of the flow tables are sent to the first process. The flow tables include the ct flow table and the flow flow table.

[0024] As a preferred technical solution, the specific steps for the flow table adaptation and installation include:

[0025] Based on the data version number of the second process, match the adaptation function and iterate through the data version number of the second process to upgrade it to the data version number of the first process.

[0026] The first process executes the FPGA to switch the port register to the spare port and performs forwarding and flow table unloading operations.

[0027] As a preferred technical solution, the FPGA is a field-programmable gate array. FPGA is a semi-custom circuit in the field of application-specific integrated circuits. It solves the shortcomings of custom circuits and overcomes the limitation of the limited number of gate circuits in the original programmable devices.

[0028] As a preferred technical solution, the traversal upgrade means starting from the data version number of the second process, upgrading sequentially according to the data version number from low to high, until the data version number is upgraded to the data version number of the first process.

[0029] The present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for hot-upgrading a smart network interface card based on OVS-DPDK.

[0030] The present invention provides a controller comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to implement a method for hot-upgrading a smart network interface card based on OVS-DPDK.

[0031] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0032] (1) The present invention adopts a dual-process approach for hot upgrade of smart network cards, which avoids the time overhead of DPDK initialization and flow table recovery, and improves the efficiency of hot upgrade of smart network cards.

[0033] (2) This invention creates a data channel based on shared memory to achieve fast data synchronization between two processes of the flow table, and realizes iterative upgrade of data based on data version number. Attached Figure Description

[0034] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0035] Figure 1 This is a schematic diagram of the overall process of a method for hot-upgrading a smart network interface card based on OVS-DPDK according to the present invention;

[0036] Figure 2 This is a schematic diagram of the structure of a system for hot-upgrading a smart network interface card based on OVS-DPDK according to the present invention. Detailed Implementation

[0037] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations thereof. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0038] Example 1

[0039] like Figure 1 As shown, this embodiment provides a method for hot-upgrading a smart network interface card (NIC) based on OVS-DPDK, specifically including the following steps:

[0040] S1: Start the first process and request the second process to synchronize the data version number. If the data version number meets the hot upgrade requirements, then perform a hot upgrade. The first process is the new ovs-vswitchd process, and the second process is the old ovs-vswitchd process.

[0041] The specific steps to meet the requirements for thermal upgrade include:

[0042] After obtaining the data version number of the second process, the first process checks whether the data version number of the second process exists. If the data version number does not exist, the hot upgrade ends.

[0043] If the data version number exists, check if the data version number supports hot upgrade. If the data version number supports hot upgrade, start the hot upgrade; otherwise, end the hot upgrade.

[0044] S2: Create a communication channel between the first process and the second process through an unenabled port. The communication channel includes a control channel and a data channel. The control channel is built based on the JSON-RPC transmission protocol, and the data channel is built based on shared memory.

[0045] S3: Send a shutdown / uninstallation command to the second process through the control channel. After the second process is shut down and uninstalled, it will synchronize the port information to the first process through the control channel.

[0046] After the second process is shut down and unloaded, subsequent packets will only be forwarded via software, and flow table unloading will no longer be performed. The revalidators thread of the second process will also be paused to prepare for the subsequent migration of flow tables.

[0047] S4: After obtaining the port information, the first process creates a bridge and port and sends a synchronization request to the second process. The second process sends the flow table to the first process through the data channel.

[0048] The specific steps for sending the flow table include:

[0049] First, the number of flow tables is sent to the first process, and then the contents of the flow tables are sent to the first process. The flow tables include the ct flow table and the flow flow table.

[0050] The ct flow table is used to track network connection status and manage network connections. It records the transmission status of data packets on the network, including information such as source IP address, destination IP address, port number, and connection status.

[0051] Flow tables are used to manage and accelerate network traffic. They record specific flow information of network packets and improve network performance and efficiency by identifying traffic characteristics and taking measures such as routing, quality of service adjustments, or optimization of network communication for specific applications.

[0052] S5: After receiving the flow table, the first process performs flow table adaptation and installation, and after the installation is completed, sends a synchronization message to the second process to release resources;

[0053] The specific steps for installing the flow table adapter include:

[0054] Based on the data version number of the second process, match the adaptation function and iterate through the data version number of the second process to upgrade it to the data version number of the first process.

[0055] The first process executes the FPGA switching port register to the spare port and performs forwarding and flow table unloading operations;

[0056] The iterative upgrade means starting from the data version number of the second process, upgrading sequentially in ascending order of data version numbers, until the data version number is upgraded to the data version number of the first process. For example, if the data version number of the second process is 1 and the data version number of the first process is 3, the data version number needs to be upgraded to 2 first, and then the data version number needs to be upgraded to 3.

[0057] Example 2

[0058] like Figure 2 As shown, this embodiment provides a system 20 for hot upgrade of smart network interface cards based on OVS-DPDK, including:

[0059] The hot upgrade determination module 21 is used to start the first process and request the second process to synchronize the data version number. If the data version number meets the hot upgrade requirements, then a hot upgrade is performed.

[0060] The communication channel creation module 22 is used to create a communication channel between the first process and the second process through an unenabled port. The communication channel includes a control channel and a data channel.

[0061] The port information synchronization module 23 is used to send a shutdown and uninstallation command to the second process through the control channel. After the second process is shut down and uninstalled, it will synchronize the port information to the first process through the control channel.

[0062] The flow table sending module 24 is used to create a bridge and port after the first process obtains port information and send a synchronization request to the second process. The second process sends the flow table to the first process through the data channel.

[0063] The flow table adaptation and installation module 25 is used to perform flow table adaptation and installation after the first process receives the flow table, and to send a synchronization message to the second process to release resources after the installation is completed.

[0064] In this embodiment, the hot upgrade determination module 21 is used to start the first process and request the second process to synchronize the data version number. If the data version number meets the hot upgrade requirements, then a hot upgrade is performed. The first process is the new ovs-vswitchd process, and the second process is the old ovs-vswitchd process.

[0065] The specific steps to meet the requirements for thermal upgrade include:

[0066] After obtaining the data version number of the second process, the first process checks whether the data version number of the second process exists. If the data version number does not exist, the hot upgrade ends.

[0067] If the data version number exists, check if the data version number supports hot upgrade. If the data version number supports hot upgrade, start the hot upgrade; otherwise, end the hot upgrade.

[0068] In this embodiment, the communication channel creation module 22 is used to create a communication channel between the first process and the second process through an unenabled port. The communication channel includes a control channel and a data channel. The control channel is built based on the JSON-RPC transmission protocol, and the data channel is built based on shared memory.

[0069] In this embodiment, the port information synchronization module 23 is used to send a shutdown and unload command to the second process through the control channel. After shutdown and unloading, the second process synchronizes the port information to the first process through the control channel. In this case, subsequent packets of the second process after shutdown and unloading are only forwarded by software and no longer unloaded by flow table. The revalidators thread of the second process is also paused.

[0070] In this embodiment, the flow table sending module 24 is used to create a bridge and port after the first process obtains port information and send a synchronization request to the second process. The second process sends the flow table to the first process through the data channel.

[0071] The specific steps for sending the flow table include:

[0072] First, the number of flow tables is sent to the first process, and then the contents of the flow tables are sent to the first process. The flow tables include the ct flow table and the flow flow table.

[0073] In this embodiment, the flow table adaptation and installation module 25 is used to perform flow table adaptation and installation after the first process receives the flow table, and to send a synchronization message to the second process to release resources after the installation is completed;

[0074] The specific steps for installing the flow table adapter include:

[0075] Based on the data version number of the second process, match the adaptation function and iterate through the data version number of the second process to upgrade it to the data version number of the first process.

[0076] The first process executes the FPGA switching port register to the spare port and performs forwarding and flow table unloading operations;

[0077] The traversal upgrade means starting from the data version number of the second process, upgrading sequentially according to the data version number from low to high, until the data version number is upgraded to the data version number of the first process.

[0078] The parameters and steps for implementing the corresponding functions of each unit module in the above-described system for hot-upgrading of smart network cards based on OVS-DPDK of the present invention can be referred to the parameters and steps in the embodiments of the method for hot-upgrading smart network cards based on OVS-DPDK described above, and will not be repeated here.

[0079] Example 3

[0080] This invention provides a computer-readable storage medium storing a computer program. When executed by a processor, this computer program implements the aforementioned method for hot-upgrading a smart network interface card (NIC) based on OVS-DPDK. It should be noted that all computer programs for this OVS-DPDK-based hot-upgrading method are implemented using Python. The hot-upgrade determination module, communication channel creation module, port information synchronization module, flow table sending module, and flow table adaptation installation module are all controlled by a remote server. The remote server's CPU is an Intel Xeon Gold 5118. The Intel Xeon Gold 5118 includes a memory and a processor. The memory stores the computer program, and the processor executes the computer program, causing the Intel Xeon Gold 5118 to implement the OVS-DPDK-based hot-upgrading method for a smart NIC.

[0081] Those skilled in the art will know that this invention can be implemented as a system, method, or computer program product.

[0082] Therefore, this disclosure can be implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, the invention can also be implemented as a computer program product in one or more computer-readable media, the computer-readable medium containing computer-readable program code.

[0083] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0084] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for hot-upgrading a smart network interface card (NIC) based on OVS-DPDK, characterized in that, Includes the following steps: Start the first process and request the second process to synchronize the data version number. If the data version number meets the hot upgrade requirements, then perform the hot upgrade. A communication channel between the first process and the second process is created through an unenabled port. The communication channel includes a control channel and a data channel. The control channel sends a shutdown / uninstallation command to the second process. After the second process is shut down and uninstalled, it synchronizes the port information to the first process through the control channel. After obtaining the port information, the first process creates a bridge and port and sends a synchronization request to the second process. The second process then sends the flow table to the first process through the data channel. After receiving the flow table, the first process adapts and installs the flow table, and after the installation is complete, it sends a synchronization message to the second process to release resources. The first process is the new ovs-vswitchd process, and the second process is the old ovs-vswitchd process; The specific steps to meet the hot upgrade requirements include: after the first process obtains the data version number of the second process, it checks whether the data version number of the second process exists. If the data version number does not exist, the hot upgrade ends; if the data version number exists, it checks whether the data version number supports hot upgrade. If the data version number supports hot upgrade, the hot upgrade begins; otherwise, the hot upgrade ends. The control channel is built based on the JSON-RPC transmission protocol, and the data channel is built based on shared memory. After the second process is shut down and unloaded, subsequent packets will only be forwarded via software, and flow table unloading will no longer be performed. The revalidators thread of the second process will also be paused.

2. The method for hot-upgrading a smart network interface card based on OVS-DPDK according to claim 1, characterized in that, The specific steps for sending the flow table include: First, the number of flow tables is sent to the first process, and then the contents of the flow tables are sent to the first process. The flow tables include the ct flow table and the flow flow table.

3. The method for hot-upgrading a smart network interface card based on OVS-DPDK according to claim 1, characterized in that, The specific steps for installing the flow table adapter include: Based on the data version number of the second process, match the adaptation function and iterate through the data version number of the second process to upgrade it to the data version number of the first process. The first process executes the FPGA to switch the port register to the spare port and performs forwarding and flow table unloading operations.

4. The method for hot-upgrading a smart network interface card based on OVS-DPDK according to claim 3, characterized in that, The traversal upgrade means starting from the data version number of the second process, upgrading sequentially in ascending order of data version number, until the data version number is upgraded to the data version number of the first process.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for hot-upgrading of a smart network card based on OVS-DPDK as described in any one of claims 1-4.

6. A controller comprising a memory and a processor, the memory for storing a computer program, characterized in that, When the processor executes the computer program, it implements the method for hot-upgrading a smart network card based on OVS-DPDK as described in any one of claims 1-4.

Citation Information

Patent Citations

  • A method and apparatus for upgrading a switch, an electronic device, and a computer-readable medium.

    CN109450676B

  • Method and device for realizing hot upgrade of virtual switch

    CN114710408A

  • Hot upgrading method and device for user mode file system, server and medium

    CN111552489A

  • Method and device for hot upgrade of virtual switch

    CN116233038A