CN116455746A - Method for upgrading with flow of virtual switch in DPU - Google Patents

Method for upgrading with flow of virtual switch in DPU Download PDF

Info

Publication number
CN116455746A
CN116455746A CN202310358780.6A CN202310358780A CN116455746A CN 116455746 A CN116455746 A CN 116455746A CN 202310358780 A CN202310358780 A CN 202310358780A CN 116455746 A CN116455746 A CN 116455746A
Authority
CN
China
Prior art keywords
path
virtual switch
forwarding
virtual
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310358780.6A
Other languages
Chinese (zh)
Inventor
冮晔维
田芸
黄明亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yusur Technology Co ltd
Original Assignee
Yusur Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yusur Technology Co ltd filed Critical Yusur Technology Co ltd
Priority to CN202310358780.6A priority Critical patent/CN116455746A/en
Publication of CN116455746A publication Critical patent/CN116455746A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • H04L41/0836Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability to enhance reliability, e.g. reduce downtime
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the disclosure relates to a method for upgrading a virtual switch with flow in a DPU. The embodiment of the disclosure utilizes the technology of updating the hardware forwarding path unchanged and the software forwarding path module by module in the process of updating the virtual switch in the DPU, solves the problems of virtual machine disconnection, packet loss and retransmission in the host machine of the DPU in the process of updating the virtual switch in the DPU, and realizes that the virtual machine network is not interrupted, and the original network flow is not lost and retransmitted.

Description

Method for upgrading with flow of virtual switch in DPU
Technical Field
The present disclosure relates to the technical field of DPUs (Data Processing Unit, data processing units or special data processors), and in particular to a method for upgrading a virtual switch with traffic in a DPU.
Background
Along with the rapid development of informatization, the DPU is brand-new network card equipment, and is characterized in that data is taken as a center, I/O is intensive, a software defined technology route is adopted to support the virtualization of an infrastructure resource layer, the DPU has new generation computing chips which improve the efficiency of a computing system, reduce the total cost of ownership of the whole system, improve the data processing efficiency and reduce the performance loss of other computing chips, the DPU gradually replaces the traditional network card, the DPU becomes network equipment carried on a host in a cloud computing environment, compared with the traditional switch, a virtual switch in the DPU has a simpler network function on a data link layer, and a virtual switch in the DPU in the future becomes a core for constructing a virtual network platform.
In general, the method for upgrading the virtual switch on the host machine using the common network card is as follows: and stopping the old-version virtual switch and restarting the new-version virtual switch. When the old virtual switch stops, the software forwarding path disappears, the data packets received by the virtual network card and the common network card are not processed, and the network of the virtual machine in the host is interrupted. After the new virtual switch is started, reconstructing a software forwarding path, wherein the network rule in the software forwarding path is null, and the virtual machine network is still interrupted or cannot process the data packet; then the network controller resumes the issuing network rule, and the software forwarding path rule in the virtual switch resumes; and finally, sending out network traffic in the virtual machine, and normally processing the data packet by the software forwarding path.
However, for a host machine using a common network card, in the process of upgrading a virtual switch, the virtual machine on the host machine has a long time discontinuous network, that is, the original network connection is interrupted, for example, a transmission control protocol (Transmission Control Protocol, TCP) session is interrupted, and the usability of the network service of the virtual machine is affected.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a method for upgrading virtual switch band traffic in a DPU.
In a first aspect, an embodiment of the present disclosure provides a method for upgrading a virtual switch with traffic in a DPU, where the method is applicable to a data network, where the data network includes a DPU and a virtual machine, the DPU includes a hardware forwarding path and a virtual switch, the hardware forwarding path includes at least part of path forwarding rules in the virtual switch, and the hardware forwarding path is used to forward traffic data between the virtual machine and the network, and the method includes:
responsive to receiving an upgrade instruction, releasing resources occupied by a first virtual switch and maintaining forwarding of network service data of the virtual machine;
starting a second virtual switch, and synchronizing the path forwarding rule in the first virtual switch to the second virtual switch;
destroying the first virtual switch, establishing connection between the hardware forwarding path and the second virtual switch, continuing to process a software forwarding flow through the second virtual switch, and issuing a path forwarding rule to the hardware forwarding path.
In a second aspect, an embodiment of the present disclosure provides a device for upgrading a virtual switch with traffic in a DPU, where the device is adapted to a data network, where the data network includes a DPU and a virtual machine, where the DPU includes a hardware forwarding path and a virtual switch, where the hardware forwarding path includes at least part of path forwarding rules in the virtual switch, and where the hardware forwarding path is used to forward traffic data between the virtual machine and the network, and where the device includes:
the release module is used for responding to the received upgrade instruction, releasing the resources occupied by the first virtual switch and keeping the forwarding of the network service data of the virtual machine;
the starting module is used for starting the second virtual switch and synchronizing the path forwarding rule in the first virtual switch into the second virtual switch;
the connection module is used for destroying the first virtual switch, establishing the connection between the hardware forwarding path and the second virtual switch, continuing to process the software forwarding flow through the second virtual switch, and issuing path forwarding rules to the hardware forwarding path.
In a third aspect, embodiments of the present disclosure provide a data network, including a DPU and a virtual machine;
the DPU is connected with the virtual machine;
the DPU comprises a hardware forwarding path and a virtual switch;
the hardware forwarding path is connected with the virtual switch;
the hardware forwarding path includes at least part of path forwarding rules in the virtual switch, the hardware forwarding path is used for forwarding service data between the virtual machine and a network, and the DPU is used for:
responsive to receiving an upgrade instruction, releasing resources occupied by a first virtual switch and maintaining forwarding of network service data of the virtual machine;
starting a second virtual switch, and synchronizing the path forwarding rule in the first virtual switch to the second virtual switch;
destroying the first virtual switch, establishing connection between the hardware forwarding path and the second virtual switch, continuing to process a software forwarding flow through the second virtual switch, and issuing a path forwarding rule to the hardware forwarding path.
In a fourth aspect, an embodiment of the present disclosure provides an electronic device, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method according to the first aspect.
In a fifth aspect, embodiments of the present disclosure provide a computer-readable storage medium having stored thereon a computer program for execution by a processor to implement the method of the first aspect.
The embodiment of the disclosure relates to a method for upgrading a virtual switch with flow in a DPU, wherein the virtual switch in the DPU releases resources occupied by a first virtual switch by responding to a received upgrading instruction, keeps forwarding of virtual machine network service data, starts a second virtual switch, synchronizes a path forwarding rule in the first virtual switch into the second virtual switch, further destroys the first virtual switch, establishes connection between a hardware forwarding path and the second virtual switch, continues to process a software forwarding flow through the second virtual switch, and issues the path forwarding rule to the hardware forwarding path. The embodiment of the disclosure solves the problems of network disconnection, packet loss and retransmission of a virtual machine in a host machine of a DPU in the process of upgrading the virtual switch in the DPU by using a technology that a hardware forwarding path is unchanged and a software forwarding path is upgraded module by module, and realizes that the virtual machine network is not interrupted and the original network flow is not lost and retransmitted.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a prior art upgrade of a virtual switch;
fig. 2 is a schematic diagram of a scenario for upgrading a virtual switch with traffic in a DPU according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a method for upgrading a virtual switch with traffic in a DPU according to an embodiment of the present disclosure;
fig. 4 is an upgrade technical schematic diagram of a method for upgrading a virtual switch with flow in a DPU according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a device with flow upgrading of a virtual switch in a DPU according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a data network according to an embodiment of the disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
Fig. 1 is a schematic diagram of a prior art upgrade of a virtual switch. In a cloud computing cluster, a host machine typically uses a virtual switch as a network component, carrying network traffic for the virtual machine. Fig. 1 illustrates a network forwarding path of a host machine and a virtual machine thereof, which are used as a computing node in cloud computing and are provided with a general network card. Referring to fig. 1, fig. 1 includes: the system comprises a network controller, a host, a virtual machine 1 and a virtual machine 2 (hereinafter, the virtual machine 1 and the virtual machine 2 are simply referred to as virtual machines), a virtual network card, a common network card and a virtual switch, wherein the virtual switch comprises a software forwarding path. The network controller is responsible for managing path forwarding rules in cloud computing and issuing the path forwarding rules to the virtual switch; the host is a physical server running the virtual machine; the virtual machine is a virtual server started by a user during cloud computing; the virtual network card is a software-simulated network card, network flow in the virtual machine enters the virtual switch through the virtual network card, and the network flow in the virtual switch is output to the virtual machine through the virtual network card; the common network card is a hardware network card inserted on the host, external network flow enters the virtual switch through the common network card, and external network flow in the virtual switch is output to an external network through the common network card; the software forwarding path in the virtual switch is a software network forwarding engine, which stores the path forwarding rule issued by the network controller and forwards the network traffic flowing through according to the rule. As shown in fig. 1, the packet route of the virtual machine is: the method comprises the steps that (1) a virtual machine sends out network traffic through a virtual network card; (2) The network flow passes through a software forwarding path in the virtual switch and reaches the hardware of the common network card; (3) The network traffic is forwarded to the network via the hardware of the normal network card.
When a virtual switch in a host machine in a cloud computing platform is upgraded, the specific process is as follows: (1) The upgrade tool informs the network controller to suspend issuing the path forwarding rule; (2) The upgrade tool stops the old version virtual switch, the software forwarding path disappears, the data packets received and transmitted in the virtual network card and the common network card are not processed any more, at the moment, the network is interrupted, and the service data cannot be continued; (3) The upgrade tool starts a new virtual switch and rebuilds a software forwarding path; (4) The upgrade tool informs the network controller to resume the transmission rule of the transmission path, and after the rule transmission is completed, the software transmission path can resume the function of normally processing the network traffic. In the existing virtual switch upgrading process, because the old virtual switch is stopped and the new virtual switch is restarted for a long time, the time required for reconstructing the path forwarding rule in the software forwarding path is also longer, and the virtual switch and the virtual machine have a longer network disconnection in the upgrading process, namely the original network connection is interrupted, so that the processing of service data is affected.
In order to solve the problem in the process of upgrading the similar virtual switch with traffic in a host carrying the DPU, the application provides an upgrading method of the virtual switch in the DPU.
Fig. 2 is a schematic diagram of a scenario for upgrading a virtual switch with traffic in a DPU according to an embodiment of the present disclosure. The scenario may include a central processor decentralized unit (Data Processing Unit, DPU), a host, and a network controller. The host may include a plurality of virtual machines, where each virtual machine is connected to a virtual network card, for example, in fig. 2, the host includes a virtual machine 1 and a virtual machine 2, where the virtual machine 1 is connected to the virtual network card 1, and the virtual machine 2 is connected to the virtual network card 2. The DPU comprises: the system comprises a hardware forwarding path and a virtual switch, wherein the virtual switch comprises a software forwarding path and an unloading path. The hardware forwarding path is a network forwarding engine realized by hardware in the DPU, the forwarding engine is connected with an external network, a virtual network card and an unloading path of a virtual switch running in the DPU, the hardware forwarding path provides the virtual network card serving as a network card of the virtual machine, and network traffic sent by the virtual machine enters the external network of the host machine through the virtual network card and the virtual switch on the DPU; the DPU is mounted on the host machine to replace a common network card, and external network traffic enters and exits the virtual machine through the DPU; the virtual switch runs in an operating system (SoC) deployed on the DPU; the software forwarding path in the virtual switch is used for receiving a path forwarding rule issued by the network controller; the unloading path is used for unloading the rule in the software forwarding path onto the hardware forwarding path, namely the software forwarding path contains the path forwarding rule in the hardware forwarding path, and when the DPU is started initially, the hardware forwarding path and the path forwarding rule in the unloading path are empty; the software forwarding path contains a complete path forwarding rule issued by the network controller, the path forwarding rule in the hardware forwarding path is a subset of the path forwarding rule in the software forwarding path, and the offloading path issues the path forwarding rule required by the hardware forwarding path from the software forwarding path to the hardware forwarding path.
According to the embodiment of the disclosure, the path forwarding rule is issued to the hardware forwarding path through the software forwarding path and the unloading path in the virtual switch, so that the hardware forwarding path can process each piece of service data according to the corresponding rule.
The following describes a method for upgrading a virtual switch with traffic in a DPU according to an exemplary embodiment of the present disclosure.
Fig. 3 is a flowchart of a method for upgrading a virtual switch with traffic in a DPU according to an embodiment of the present disclosure, where the method is applicable to a data network, where the data network includes a DPU and a virtual machine, the DPU includes a hardware forwarding path and a virtual switch, where the hardware forwarding path includes at least part of path forwarding rules in the virtual switch, and the hardware forwarding path is used to forward traffic data between the virtual machine and the network, and the method specifically includes the following steps:
and S301, the virtual switch in the DPU responds to the received upgrade instruction, releases the resources occupied by the first virtual switch, and keeps the forwarding of the network service data of the virtual machine.
The upgrade instruction mentioned in the embodiments of the present disclosure is initiated by a network operator through an upgrade tool, and the upgrade tool may be understood as a software or hardware module integrated in the DPU, where the upgrade instruction is received by the first virtual switch. The resources occupied by the first virtual switch may be, for example, database resources and OpenFlow (a network communication protocol) rule resources, such as database locks, bridges, process descriptor files (Process Identification, PID) files, socks (a transmission mode between network communications) files, etc.
And maintaining the forwarding of the virtual machine to the network service data, namely maintaining normal working states of the hardware forwarding path, the first software forwarding path and the first unloading path of the first virtual switch in the stage of releasing the occupied resources of the first virtual switch.
Optionally, in some embodiments, before releasing the resources occupied by the first virtual switch, the method may further include the steps of: s3011 and S3012:
s3011, after receiving the upgrade instruction, sending a first control instruction to the network controller, so that the network controller stops sending the path forwarding rule to the first virtual switch.
In the embodiment of the present disclosure, after the first virtual switch receives the upgrade instruction, the upgrade tool notifies the network controller to stop issuing the path forwarding rule to the first virtual switch, that is, the first virtual switch starts the upgrade, until the upgrade is completed, the network controller does not issue a new path forwarding rule to the first software forwarding path in the first virtual switch.
For example, in one embodiment, the network controller has issued 10000 path forwarding rules to the first software forwarding path, and in the first virtual switch from the start of the upgrade to the end of the upgrade, 10000 path forwarding rules are always maintained in the first software forwarding path, and the network controller does not issue new path forwarding rules to the first software forwarding path.
S3012, after sending the first control instruction to the network controller, storing the path forwarding rule in the software forwarding path into a preset file, and stopping receiving the path forwarding rule by the software forwarding path.
In the embodiment of the present disclosure, after stopping issuing a new path forwarding rule to a software forwarding path of a first virtual switch, a network controller saves the path forwarding rule in the first software forwarding path in the first virtual switch to a preset file, where the file may be a file set by a factory in a DPU or a file set by a user.
S302, starting the second virtual switch, and synchronizing the path forwarding rule in the first virtual switch to the second virtual switch.
In the embodiment of the disclosure, the upgrade tool starts the second virtual switch, and the path rule in the first virtual switch starts to be synchronized into the second virtual switch, so that the second virtual switch has a complete path forwarding rule before upgrade, and the efficiency of subsequent processing of service data by the second virtual switch is higher.
Optionally, in an embodiment of the present disclosure, starting the second virtual switch, synchronizing the path forwarding rule in the first virtual switch to the second virtual switch includes:
s11, synchronizing the path forwarding rule in the preset file to a second software forwarding path in a second virtual switch;
s12, synchronizing the path forwarding rule contained in the first offload path into a second offload path in the second virtual switch, wherein the path forwarding rule contained in the first offload path is identical to the path forwarding rule contained in the hardware forwarding path.
In the embodiment of the present disclosure, after the second virtual switch is started, the second software forwarding path in the second virtual switch is started first, and specific starting may include: initializing a data packet capturing mode (Data Plane Development Kit, DPDK), loading configuration from the database resource, adding a network bridge and a port, and loading a path forwarding rule of a first software forwarding path of a first virtual machine into a second software forwarding path from the preset file;
the path forwarding rules in the first offload path are synchronized into the second offload path as with the software forwarding paths.
Optionally, in an embodiment of the present disclosure, before synchronizing the path forwarding rule included in the first offload path to the second offload path in the second virtual switch, the method includes:
s21, sending a second control instruction to the hardware forwarding path so that the hardware forwarding path stops forwarding the data of the new service according to the second control instruction.
After receiving the second control instruction, only the service data which is not processed before is processed in the hardware forwarding path, and the new incoming service data is not processed. After the path forwarding rule in the offload path is completed, the second virtual switch starts to process new service data.
S303, destroying the first virtual switch, establishing connection between the hardware forwarding path and the second virtual switch, so as to continue processing the software forwarding flow through the second virtual switch, and issuing path forwarding rules to the hardware forwarding path.
In the embodiment of the disclosure, after a first software forwarding path in a first virtual switch and a path forwarding rule in a first offload path are synchronized to a second software forwarding path in a second virtual switch and a second offload path, an upgrade tool notifies the first virtual switch to complete all processes, namely, destroy the first virtual switch and establish connection between a hardware forwarding path and the second virtual switch, after that, the second virtual switch processes a software forwarding flow and issues a path forwarding rule to the hardware forwarding path. The upgrade tool informs the network controller to start to issue path forwarding rules to the second virtual switch, and the virtual switch upgrade is completed.
According to the embodiment of the disclosure, a virtual switch in a DPU releases resources occupied by a first virtual switch by responding to a received upgrading instruction, keeps forwarding of network service data by a virtual machine, starts a second virtual switch, synchronizes a path forwarding rule in the first virtual switch into the second virtual switch, further destroys the first virtual switch, establishes connection between a hardware forwarding path and the second virtual switch, and further continues to process a software forwarding flow through the second virtual switch to issue the path forwarding rule to the hardware forwarding path. The embodiment of the disclosure solves the problems of network disconnection, packet loss and retransmission of a virtual machine in a host machine of a DPU in the process of upgrading the virtual switch in the DPU by using a technology that a hardware forwarding path is unchanged and a software forwarding path is upgraded module by module, and realizes that the virtual machine network is not interrupted and the original network flow is not lost and retransmitted.
Fig. 4 is an upgrade technical schematic diagram of a method for upgrading a virtual switch with traffic in a DPU according to an embodiment of the present disclosure, as shown in fig. 4, in an embodiment, a process of upgrading the virtual switch is as follows:
step 1, an upgrade tool informs a network controller to suspend issuing network rules, namely path forwarding rules;
in one embodiment, the network operator activates an upgrade tool that notifies the network controller to suspend issuing path forwarding rules, i.e., no new path forwarding rules are generated in the virtual switch.
Step 2, the upgrade tool informs the old virtual switch, namely the first virtual switch starts the upgrade work of the first stage:
(1) The old virtual switch releases the exclusive resources;
in one implementation, the exclusive resources released by the old-version virtual switch include database resources and OpenFlow rule resources, wherein the exclusive resources specifically may include database locks, bridges, ports, and software forwarding path rules;
(2) Storing the software forwarding path rule into a preset file;
in one embodiment, the preset file may be factory-set or a file set by a user, and the software forwarding path rule in the old virtual switch is stored in the preset file;
(3) Stopping the software forwarding path;
in one embodiment, software forwarding paths in old virtual switches are stopped, i.e. new addition and deletion of software forwarding path rules are stopped, for example, the software forwarding paths have 10000 path forwarding rules, and after the software forwarding paths are stopped, the software forwarding paths do not make any modification to the 10000 path forwarding rules.
(4) Entering the next process if successful, and backing if failed;
in one embodiment, if the above process is successfully executed, the next process is entered to continue execution, if the execution fails, an error message reporting person is generated, and the whole process is ended.
Step 3, the upgrade tool informs the new virtual switch, namely the second virtual switch starts the upgrade work of the first stage:
(1) Starting a software forwarding path, loading configuration from a database, and loading software forwarding path rules from a preset file;
in one embodiment, a new-version virtual switch starts a software forwarding path, the new-version software forwarding path loads configuration from database resources released by an old-version virtual switch, and software forwarding path rules are loaded from a preset file and are the same as software forwarding path rules in the old-version virtual switch;
(2) Starting an unloading path and synchronizing an unloading path rule;
in one embodiment, after the new-version virtual switch starts the software forwarding path and loads the software forwarding path rule, the new-version virtual switch starts the unloading path and synchronously unloads the path rule from the old-version virtual switch, so as to ensure that the software forwarding path before and after upgrading is consistent with the path forwarding rule in the unloading path.
(3) Entering the next process if successful, and backing if failed;
in one embodiment, if the above process is successfully executed, the next process is entered to continue execution, if the execution fails, an error message reporting person is generated, and the whole process is ended.
In the above steps 1-3, the original traffic in the network, i.e. the existing traffic data to be processed, is directly forwarded via the hardware forwarding path, and the software forwarding path in the old version virtual switch on the DPU issues the path forwarding rule for the traffic of the new session, i.e. the newly incoming traffic data to be processed, so that the data packet of the traffic data is not lost and the data packet is not required to be retransmitted in the process. In the step 1-3, the original network connection and the newly-built network connection in the network are not interrupted, and the processing of service data is not affected.
Step 4, the upgrade tool informs the new virtual switch to start the upgrade work of the second stage:
(1) The new virtual switch informs the old virtual switch to stop receiving and transmitting packets;
in one embodiment, the old virtual switch stops receiving and transmitting packets, that is, when new service data needs to be processed at the moment, the software forwarding path does not continue to issue the forwarding rule of the unloading path, at the moment, the hardware forwarding path only processes the original and unprocessed service data, and does not process the new service data needing to be processed;
(2) The new virtual switch informs the old virtual switch of synchronizing the newly added offload path forwarding rule;
in one embodiment, after stopping the forwarding path of the old version software, for new service data, a path forwarding rule which is not used in a hardware forwarding path used in a processing process and needs to be issued from the software forwarding path through an unloading path is a path forwarding rule which needs to be synchronized from the old version virtual switch to the unloading path of the new version virtual switch;
(3) Starting a receiving and transmitting packet by the new virtual switch;
in one embodiment, after all path forwarding rules of the old virtual switch are synchronized to the new virtual switch, the new virtual switch starts a packet to be sent and received, and at this time, the system is restored to the original processing state.
In step 4, the connection of the original network in the network is not affected, that is, the existing service data is continuously processed, the data packet is not lost, retransmission is not needed, the connection of the new network is interrupted, but the process is fast, so that the affected time is very short, that is, the affected time of the communication of the new network in the virtual machine is very short.
Step 5, the upgrade tool informs the old virtual switch to start the upgrade work of the second stage: the process is completely exited;
in one embodiment, after the release of resources in the old-version virtual machine is completed, the path forwarding rule is completed synchronously, and the new-version virtual switch starts to process the service data normally, the processes of the old-version virtual switch are all retired, i.e. the old-version virtual switch is destroyed.
And step 6, the upgrade tool informs the network controller to continue issuing the path forwarding rule.
In one embodiment, after the old virtual switch is destroyed, the upgrade tool notifies the network controller to continue issuing the path forwarding rule, and the new software forwarding path starts to receive the new path forwarding rule, at this time, the upgrade of the virtual switch is completed.
In step 5 and step 6, the original traffic in the network, i.e. the existing traffic data to be processed, is forwarded directly via the hardware forwarding path, and the traffic for the newly-built session, i.e. the newly-incoming traffic data to be processed, is completed by the new virtual switch on the DPU.
In the embodiment of the disclosure, the hardware forwarding path on the DPU is utilized to process the service data, in the process of upgrading the virtual switch, the network connection is not interrupted, the forwarding of the existing rules in the hardware forwarding path is not influenced in the whole process, the data packet of the original service data is not lost, retransmission is not needed, and the original network communication is not influenced by the upgrading process; and the whole upgrading process of the virtual switch is completed in the DUP, so that the host machine is completely unaware, the CPU resource of the host machine is avoided being wasted, and the problem of misoperation of network operation staff on the CPU is avoided.
Fig. 5 is a schematic structural diagram of a device with flow upgrading of a virtual switch in a DPU according to an embodiment of the present disclosure. As shown in fig. 5, the upgrade apparatus 50 provided in the embodiment of the present disclosure may be understood as a DPU or a part of functional modules of the DPU in the foregoing embodiment, and the upgrade apparatus 50 includes: a release module 501, a start module 502, and a connection module 503; the release module 501 is configured to release resources occupied by the first virtual switch in response to the received upgrade instruction, and maintain forwarding of network service data of the virtual machine; a starting module 502, configured to start the second virtual switch, and synchronize the path forwarding rule in the first virtual switch to the second virtual switch; the connection module 503 is configured to destroy the first virtual switch, establish a connection between the hardware forwarding path and the second virtual switch, and continue to process the software forwarding flow through the second virtual switch, and issue a path forwarding rule to the hardware forwarding path.
Optionally, the upgrading device 50 further includes: a first sending module 504. And the first sending module 504 is configured to send a first control instruction to the network controller after receiving the upgrade instruction, so that the network controller stops sending the path forwarding rule to the first virtual switch.
Optionally, the upgrading device 50 further includes: a save module 505. The storing module 505 is configured to store the path forwarding rule in the software forwarding path in a preset file, and stop receiving the path forwarding rule by the software forwarding rule.
Optionally, the upgrading device 50 further includes: a first synchronization module 506, a second synchronization module 507. The first synchronization module 506 is configured to synchronize the path forwarding rule in the preset file to a second software forwarding path in the second virtual switch; and a second synchronization module 507, configured to synchronize the path forwarding rule included in the first offload path to a second offload path in the second virtual switch, where the path forwarding rule included in the first offload path is the same as the path forwarding rule included in the hardware forwarding path.
Optionally, the upgrading device 50 further includes: a second transmitting module 508. And the second sending module 508 is configured to send a second control instruction to the hardware forwarding path, so that the hardware forwarding path stops forwarding the data of the new service according to the second control instruction.
The upgrade apparatus of the virtual switch in the embodiment shown in fig. 5 may be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effects are similar, and will not be described herein again.
Fig. 6 is a schematic structural diagram of a data network according to an embodiment of the disclosure. As shown in fig. 6, a data network 60 provided by an embodiment of the present disclosure includes: DPU601, virtual machine 602; the DPU601 is configured to release resources occupied by the first virtual switch and maintain forwarding of virtual machine network service data in response to a received upgrade instruction; starting a second virtual switch, and synchronizing the path forwarding rule in the first virtual switch to the second virtual switch; destroying the first virtual switch, establishing connection between the hardware forwarding path and the second virtual switch, continuing to process the software forwarding flow through the second virtual switch, and issuing path forwarding rules to the hardware forwarding path.
Optionally, the DPU601 is further configured to: after receiving the upgrade instruction, sending a first control instruction to the network controller so that the network controller stops issuing the path forwarding rule to the first virtual switch.
Optionally, the DPU601 is further configured to: and storing the path forwarding rule in the software forwarding path into a preset file, and stopping receiving the path forwarding rule by the software forwarding rule.
Optionally, the DPU601 is further configured to: synchronizing the path forwarding rule in the preset file to a second software forwarding path in a second virtual switch; and synchronizing the path forwarding rule contained in the first offload path to a second offload path in the second virtual switch, wherein the path forwarding rule contained in the first offload path is the same as the path forwarding rule contained in the hardware forwarding path.
Optionally, the DPU601 is further configured to: and sending a second control instruction to the hardware forwarding path so that the hardware forwarding path stops forwarding the data of the new service according to the second control instruction.
The structure of a data network in the embodiment shown in fig. 6 may be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effects are similar, and will not be described herein again.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. The electronic device may be a virtual switch as described in the above embodiments. As shown in fig. 7, the electronic device 70 comprises a memory 71, a processor 72, a computer program and a communication interface 73; wherein the computer program is stored in the memory 71 and configured to be executed by the processor 72 as in any of the method embodiments described above.
In addition, the embodiment of the present disclosure also provides a computer-readable storage medium having stored thereon a computer program that is executed by a processor to implement the method provided by the above embodiment.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for upgrading a virtual switch in a DPU with traffic, the method being applicable to a data network, the data network including the DPU and a virtual machine, the DPU including a hardware forwarding path and a virtual switch, the hardware forwarding path including at least a portion of path forwarding rules in the virtual switch, the hardware forwarding path being configured to forward traffic data between the virtual machine and the network, the method comprising:
responsive to receiving an upgrade instruction, releasing resources occupied by a first virtual switch and maintaining forwarding of network service data of the virtual machine;
starting a second virtual switch, and synchronizing the path forwarding rule in the first virtual switch to the second virtual switch;
destroying the first virtual switch, establishing connection between the hardware forwarding path and the second virtual switch, continuing to process a software forwarding flow through the second virtual switch, and issuing a path forwarding rule to the hardware forwarding path.
2. The method of claim 1, wherein the data network further comprises a network controller;
before the releasing the resources occupied by the first virtual switch, the method further includes:
and after receiving the upgrading instruction, sending a first control instruction to the network controller so that the network controller stops issuing path forwarding rules to the first virtual switch.
3. The method according to claim 2, wherein the first virtual switch includes a first software forwarding path and a first offload path, wherein a path forwarding rule in the first virtual switch is stored in the software forwarding path, and wherein the first offload path is configured to forward one or more path forwarding rules in the software forwarding path to the hardware forwarding path;
after the first control instruction is sent to the network controller, the method further includes:
and storing the path forwarding rule in the software forwarding path into a preset file, and stopping receiving the path forwarding rule by the software forwarding path.
4. The method of claim 3, wherein the enabling of the second virtual switch to synchronize path forwarding rules in the first virtual switch into the second virtual switch comprises:
synchronizing the path forwarding rule in the preset file to a second software forwarding path in the second virtual switch;
and synchronizing the path forwarding rule contained in the first offload path to a second offload path in the second virtual switch, wherein the path forwarding rule contained in the first offload path is the same as the path forwarding rule contained in the hardware forwarding path.
5. The method of claim 4, wherein the synchronizing the path forwarding rules contained in the first offload path to a second offload path in the second virtual switch is preceded by the method further comprising:
and sending a second control instruction to the hardware forwarding path so that the hardware forwarding path stops forwarding the data of the new service according to the second control instruction.
6. A device for upgrading traffic with a virtual switch in a DPU, the device being adapted for use in a data network comprising the DPU and a virtual machine, the DPU comprising a hardware forwarding path and a virtual switch, the hardware forwarding path comprising at least part of path forwarding rules in the virtual switch, the hardware forwarding path being adapted to forward traffic data between the virtual machine and the network, the device comprising:
the release module is used for responding to the received upgrade instruction, releasing the resources occupied by the first virtual switch and keeping the forwarding of the network service data of the virtual machine;
the starting module is used for starting the second virtual switch and synchronizing the path forwarding rule in the first virtual switch into the second virtual switch;
the connection module is used for destroying the first virtual switch, establishing the connection between the hardware forwarding path and the second virtual switch, continuing to process the software forwarding flow through the second virtual switch, and issuing path forwarding rules to the hardware forwarding path.
7. The apparatus of claim 6, wherein the data network further comprises a network controller;
before the releasing the resources occupied by the first virtual switch, the apparatus further includes:
and the sending module is used for sending a first control instruction to the network controller after receiving the upgrading instruction so as to enable the network controller to stop sending the path forwarding rule to the first virtual switch.
8. A data network comprising a DPU and a virtual machine;
the DPU is connected with the virtual machine;
the DPU comprises a hardware forwarding path and a virtual switch;
the hardware forwarding path is connected with the virtual switch;
the hardware forwarding path includes at least part of path forwarding rules in the virtual switch, the hardware forwarding path is used for forwarding service data between the virtual machine and a network, and the DPU is used for:
responsive to receiving an upgrade instruction, releasing resources occupied by a first virtual switch and maintaining forwarding of network service data of the virtual machine;
starting a second virtual switch, and synchronizing the path forwarding rule in the first virtual switch to the second virtual switch;
destroying the first virtual switch, establishing connection between the hardware forwarding path and the second virtual switch, continuing to process a software forwarding flow through the second virtual switch, and issuing a path forwarding rule to the hardware forwarding path.
9. An electronic device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-5.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when processed and executed, implements the method according to any of claims 1-5.
CN202310358780.6A 2023-04-06 2023-04-06 Method for upgrading with flow of virtual switch in DPU Pending CN116455746A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310358780.6A CN116455746A (en) 2023-04-06 2023-04-06 Method for upgrading with flow of virtual switch in DPU

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310358780.6A CN116455746A (en) 2023-04-06 2023-04-06 Method for upgrading with flow of virtual switch in DPU

Publications (1)

Publication Number Publication Date
CN116455746A true CN116455746A (en) 2023-07-18

Family

ID=87121335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310358780.6A Pending CN116455746A (en) 2023-04-06 2023-04-06 Method for upgrading with flow of virtual switch in DPU

Country Status (1)

Country Link
CN (1) CN116455746A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109450701A (en) * 2018-12-07 2019-03-08 北京金山云网络技术有限公司 A kind of virtual switch switching method, device, host and storage medium
CN109861839A (en) * 2017-11-30 2019-06-07 华为技术有限公司 The unbroken virtual switch upgrade method of business and relevant device
CN114710408A (en) * 2022-03-18 2022-07-05 阿里云计算有限公司 Method and device for realizing hot upgrade of virtual switch

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109861839A (en) * 2017-11-30 2019-06-07 华为技术有限公司 The unbroken virtual switch upgrade method of business and relevant device
CN114826913A (en) * 2017-11-30 2022-07-29 华为技术有限公司 Method for upgrading virtual switch without service interruption and related equipment
CN109450701A (en) * 2018-12-07 2019-03-08 北京金山云网络技术有限公司 A kind of virtual switch switching method, device, host and storage medium
CN114710408A (en) * 2022-03-18 2022-07-05 阿里云计算有限公司 Method and device for realizing hot upgrade of virtual switch

Similar Documents

Publication Publication Date Title
US9378005B2 (en) Hitless software upgrades
US10983880B2 (en) Role designation in a high availability node
US8196142B2 (en) Use of external services with clusters
US7107329B1 (en) In networks of interconnected router nodes for routing data traffic, a method of and system for imperceptibly upgrading router node software and the like without traffic interruption
US6061807A (en) Methods systems and computer products for error recovery of endpoint nodes
CN105677380B (en) Method and device for board-by-board upgrading of double master control isolations
JP2005535241A (en) Method of moving application software in multicomputer architecture, multicomputer method and apparatus for realizing continuity of operation using the moving method
JP2002202953A (en) Recovery following process failure or system failure
WO2009097776A1 (en) System, device and method for achieving service upgrade
US11403319B2 (en) High-availability network device database synchronization
CN112291298A (en) Data transmission method and device for heterogeneous system, computer equipment and storage medium
CN111680015A (en) File resource processing method, device, equipment and medium
US20040136246A1 (en) Server apparatus having function of changing over from old to new module
CN110109772B (en) CPU restarting method, communication equipment and readable storage medium
JP4517923B2 (en) Object relief system and method
US20020073409A1 (en) Telecommunications platform with processor cluster and method of operation thereof
WO2020252724A1 (en) Log processing method and device, and computer-readable storage medium
CN116455746A (en) Method for upgrading with flow of virtual switch in DPU
CN111327639A (en) Socket communication method and device
JP2007141129A (en) System switching method, computer system and program
CN111865834B (en) Message processing method and device
CN113722147A (en) Method for keeping service connection and related equipment
JP2776442B2 (en) Compound computer system
WO2024148934A1 (en) Disaster recovery control method and system
WO2023103741A1 (en) Virtual switch upgrading method and device, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination