CN115604372A - Method and device for keeping protocol message uninterrupted in warm start process - Google Patents

Method and device for keeping protocol message uninterrupted in warm start process Download PDF

Info

Publication number
CN115604372A
CN115604372A CN202211223594.3A CN202211223594A CN115604372A CN 115604372 A CN115604372 A CN 115604372A CN 202211223594 A CN202211223594 A CN 202211223594A CN 115604372 A CN115604372 A CN 115604372A
Authority
CN
China
Prior art keywords
protocol
message
protocol message
dma controller
channel
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
CN202211223594.3A
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.)
Suzhou Centec Communications Co Ltd
Original Assignee
Suzhou Centec Communications 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 Suzhou Centec Communications Co Ltd filed Critical Suzhou Centec Communications Co Ltd
Priority to CN202211223594.3A priority Critical patent/CN115604372A/en
Publication of CN115604372A publication Critical patent/CN115604372A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/656Updates while running
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method for keeping protocol message uninterrupted in warm start process and application thereof, wherein the method comprises the following steps: when receiving the message, carrying out protocol message identification and judging whether the CPU is in hot start; if not, the protocol message which does not need to be kept uninterrupted is placed into a single channel of the DMA controller, and is sent to a user mode protocol stack for processing through the DMA controller, and the protocol message is sent and issued in the user mode; if so, putting the protocol message needing to be kept uninterrupted into another independent channel of the DMA controller, sending the protocol message to a Knet module for processing through the DMA controller, and carrying out protocol message uploading and issuing flow work in a kernel state; wherein the separate channel and the further separate channel are physically isolated channels from each other. According to the method for keeping the protocol message uninterrupted in the hot start process, the normal operation of the protocol is completely kept before and after the hot start for some heartbeat detection and the protocol message with high real-time requirement.

Description

Method and device for keeping protocol message uninterrupted in warm start process
Technical Field
The present invention relates to the field of message transceiving, and in particular, to a method and an apparatus for keeping a protocol message uninterrupted during a warm start process.
Background
A warm boot is a restart of the device driver software while the hardware is running without interrupting data forwarding. With the rapid development of the internet and the continuous rise of data centers, the requirements on the safety and the reliability of network equipment are high at present. Then, under the conditions that the device is subject to driver upgrading, software hang-up and the like, the data forwarding layer needs to be guaranteed not to be interrupted, and the hot start technology is developed accordingly.
In the software warm start process, the CPU needs to be reinitialized, the memory resources need to be reallocated, most of the current protocol message transmission and reception are realized by means of the DMA, on the premise that the memory is reinitialized, the DMA controller needs to be reinitialized, and in the reinitialization process of the DMA controller, the network device cannot transmit and receive the message, so that the protocol message is interrupted, and further the protocol exception of the whole system is caused.
In the prior art, a DMA controller is not used to receive and send messages during a warm boot process, a conventional network port is used to receive and send protocol messages through CPUMAC, and at this time, messages can be sent to a protocol stack for processing through CPUMAC only if the normal operation of hardware is guaranteed. The method needs to reserve a network port for CPUMAC, and needs an additional physical port.
The information disclosed in this background section is only for enhancement of understanding of the general background of the invention and should not be taken as an acknowledgement or any form of suggestion that this information forms the prior art already known to a person skilled in the art.
Disclosure of Invention
The invention aims to provide a method and a device for keeping a protocol message uninterrupted in a hot start process, which solve the problem that in the prior art, a DMA (direct memory access) controller needs to be reinitialized to cause interruption of the protocol message and further cause protocol exception of the whole system in the software hot start process.
In order to achieve the foregoing object, embodiments of the present invention provide a method and an apparatus for maintaining a protocol packet uninterrupted in a warm boot process.
In one or more embodiments of the present invention, a method for keeping a protocol packet uninterrupted during a warm boot process is characterized in that the method includes: when receiving the message, carrying out protocol message identification and judging whether the CPU is hot started or not; if not, the protocol message which does not need to be kept uninterrupted is placed into a single channel of the DMA controller, and is sent to a user mode protocol stack for processing through the DMA controller, and the protocol message is sent and issued in the user mode; if yes, the protocol message needing to be kept uninterrupted is placed in another independent channel of the DMA controller, the protocol message is sent to a Knet module for processing through the DMA controller, and the protocol message is sent up and sent down in a kernel state; wherein the separate channel and the further separate channel are physically isolated channels from each other.
In one or more embodiments of the present invention, the performing protocol packet identification when receiving a packet includes: when receiving the message, the protocol message is identified, and a protocol message mapping table is configured for the protocol message.
In one or more embodiments of the present invention, the sending, by the DMA controller, to a user mode protocol stack process, and performing a protocol message sending and issuing process in a user mode includes: and configuring a protocol message mapping table, mapping the protocol message to a channel 0 or a channel 1 in the RX direction of the DMA controller, and sending the protocol message to a CPU protocol stack for processing through the DMA controller.
In one or more embodiments of the present invention, the sending, by the DMA controller, to a user mode protocol stack for processing, and performing a protocol message sending and issuing process in a user mode includes: the CPU protocol stack sends the message to the network port through the channel 0 or the channel 1 in the TX direction of the DMA controller, and the message is sent.
In one or more embodiments of the present invention, the sending to the Knet module via the DMA controller for processing, and performing protocol message sending and sending flow work in a kernel state includes: and configuring a protocol message mapping table, mapping the protocol message to a channel 2 or a channel 3 in the RX direction of the DMA controller, and uploading the protocol message to a Knet module for processing.
In one or more embodiments of the present invention, the sending to the Knet module via the DMA controller for processing, and performing protocol message sending and sending flow work in a kernel state includes: and the CPU protocol stack issues the message to be switched to a channel 2 or a channel 3 in the TX direction of the DMA controller, and the protocol message is issued to a network port through a Knet module to be sent.
In one or more embodiments of the invention, the method further comprises: and if the identification result of the message is a data message, normally forwarding the data message.
In another aspect of the present invention, an apparatus for keeping protocol packets uninterrupted during warm boot is provided, which includes a packet identification module and a determination module.
And the message identification module is used for configuring a protocol message mapping table when the message is read and received.
And the judging module is used for judging whether the CPU is in hot start or not.
And the user mode message receiving and sending module is used for placing the protocol message which does not need to be kept uninterrupted into a single channel of the DMA controller, sending the protocol message to a user mode protocol stack for processing through the DMA controller, and carrying out the protocol message sending and sending process work in the user mode.
And the kernel state message receiving and sending module is used for putting the protocol message which needs to be kept uninterrupted into another independent channel of the DMA controller, sending the protocol message to the Knet module for processing through the DMA controller, and carrying out the protocol message uploading and issuing process work in the kernel state.
In one or more embodiments of the present invention, the packet identification module is further configured to: when receiving the message, the protocol message is identified, and a protocol message mapping table is configured for the protocol message.
In one or more embodiments of the present invention, the determining module is further configured to: and if the identification result of the message is a data message, normally forwarding the data message.
In one or more embodiments of the present invention, the user mode messaging module is further configured to: and configuring a protocol message mapping table, mapping the protocol message to a channel 0 or a channel 1 of the DMA controller RX, and sending the protocol message to a CPU protocol stack for processing through the DMA controller.
In one or more embodiments of the present invention, the user mode messaging module is further configured to: the CPU protocol stack sends the message to the network port through the channel 0 or the channel 1 in the TX direction of the DMA controller to send the message.
In one or more embodiments of the present invention, the kernel-state messaging module is further configured to: and configuring a protocol message mapping table, mapping the protocol message to a channel 2 or a channel 3 in the RX direction of the DMA controller, and uploading the protocol message to a Knet module for processing.
In one or more embodiments of the present invention, the kernel-state messaging module is further configured to: and the CPU protocol stack issues the message to be switched to a channel 2 or a channel 3 in the TX direction of the DMA controller, and the protocol message is issued to a network port through the Knet module to be sent.
In another aspect of the present invention, there is provided an electronic device including: at least one processor; and a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the method of maintaining protocol messages uninterrupted during a warm boot process as described above.
In another aspect of the invention, a computer-readable storage medium is provided, having stored thereon a computer program, which when executed by a processor, carries out the steps of the method of keeping protocol messages uninterrupted during a warm boot as described.
Compared with the prior art, the method and the device for keeping the protocol message uninterrupted in the hot start process can realize two-stage software and physical isolation by physically isolating the channels in the RX direction and the TX direction of the DMA controller and separating different channels to work in a user state process and a kernel state Knet process respectively on the basis of the existing network equipment. On the basis of not needing to increase the physical network port again, the effect of keeping the protocol message uninterrupted in the hot start process is realized. For some protocol messages with high heartbeat detection and real-time requirements, the normal operation of the protocol is completely maintained before and after the hot start.
Drawings
FIG. 1 is a flow diagram of a method for keeping protocol messages uninterrupted during a warm boot process according to an embodiment of the invention;
fig. 2 is an overall flowchart of a method for keeping a protocol packet uninterrupted in a warm boot process according to an embodiment of the present invention;
FIG. 3 is a user-mode flowchart of a method for maintaining protocol messages uninterrupted during a warm boot process according to an embodiment of the invention;
FIG. 4 is a user-mode flowchart of a method for maintaining protocol messages uninterrupted during a warm boot process according to an embodiment of the present invention;
FIG. 5 is a core state flow diagram of a method for keeping protocol messages uninterrupted during a warm boot process according to an embodiment of the invention;
FIG. 6 is a core state flow structure diagram of a method for keeping protocol messages uninterrupted during a warm boot process according to an embodiment of the present invention;
FIG. 7 is a block diagram of an apparatus for maintaining protocol messages uninterrupted during a warm boot process in accordance with one embodiment of the present invention;
FIG. 8 is a hardware block diagram of a computing device that maintains protocol messages uninterrupted during a warm boot process, according to one embodiment of the invention.
Detailed Description
The following detailed description of the present invention is provided in conjunction with the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the specific embodiments.
Throughout the specification and claims, unless explicitly stated otherwise, the word "comprise", or variations such as "comprises" or "comprising", will be understood to imply the inclusion of a stated element or component but not the exclusion of any other element or component.
Example 1
Referring to fig. 1 to 2, a method for keeping a protocol packet uninterrupted during a warm boot process according to an embodiment of the present invention is described, which includes the following steps.
In step S101, when receiving a message, the protocol message is identified, and it is determined whether the CPU is hot-started.
A warm boot is a restart of the device driver software while the hardware is running without interrupting data forwarding. With the rapid development of the internet, data centers are continuously grown, and the requirements on the safety and the reliability of network equipment are high at present. Under the conditions that the device is subjected to driver upgrading, software hang-up and the like, the data forwarding layer is required to be ensured not to be interrupted, and therefore a hot start technology is generated.
In the software warm start process, the CPU needs to be reinitialized, the memory resources need to be reallocated, most of the current protocol message transmission and reception are realized by means of the DMA, on the premise that the memory is reinitialized, the DMA controller needs to be reinitialized, and in the reinitialization process of the DMA controller, the network device cannot transmit and receive the message, so that the protocol message is interrupted, and further the protocol exception of the whole system is caused.
In the existing technical solution, the DMA controller is not used to receive and send messages in the warm boot process, and the CPUMAC is used as the traditional network port to receive and send protocol messages, and at this time, the messages can be sent to the protocol stack for processing through the CPUMAC as long as the normal operation of the hardware is ensured. However, this scheme requires a reserved network port for CPUMAC, and requires an additional physical port.
Protocol messages, i.e. various network protocol messages, are distinguished from user data messages. In this embodiment, when receiving a packet, the protocol packet is identified, and a data packet is forwarded normally, so as to configure a protocol packet mapping table for the protocol packet.
In step S102, if the CPU does not perform warm boot, the protocol packet that does not need to be kept uninterrupted is placed in a separate channel of the DMA controller, and is sent to the user mode protocol stack via the DMA controller for processing, and the protocol packet is sent up and down in the user mode.
Specifically, a protocol packet mapping table is configured, and the protocol packet is mapped to a channel 0 or a channel 1 in the RX direction of the DMA controller and sent to the CPU protocol stack for processing through the DMA controller. The CPU protocol stack sends the message to the network port through the channel 0 or the channel 1 in the TX direction of the DMA controller to send the message.
In step S103, if the CPU performs warm start, the protocol packet that needs to be kept uninterrupted is placed in another single channel of the DMA controller, and is sent to the Knet module via the DMA controller for processing, and the protocol packet is sent and issued in the kernel state.
In this embodiment, the protocol packet that needs to be kept uninterrupted, that is, the protocol packet with high real-time requirement, needs to completely keep normal operation of the protocol before and after the warm start. For example, the heartbeat message is used for monitoring the running state of the machine network memory, and the once-sent character string information represents the running state of the network memory and is sent in a UDP broadcast or unicast mode. There is a high demand for fully maintaining normal operation before and after warm start.
Specifically, a protocol message mapping table is configured, the protocol message is mapped to a channel 2 or a channel 3 in the RX direction of the DMA controller, and the protocol message is sent to the Knet module for processing. And the CPU protocol stack issues the message to be switched to a channel 2 or a channel 3 in the TX direction of the DMA controller, and the protocol message is issued to a network port through the Knet module to be sent.
Example 2
Referring to fig. 3 to 4, a method for keeping a protocol packet uninterrupted during a warm boot process according to an embodiment of the present invention is described.
In step S301, when receiving the message, the protocol message is identified, and whether the CPU is hot-started is determined.
In step S302, the CPU does not perform warm start, and puts the protocol packet into a transmission queue.
When the network card receives the message, hardware interruption is generated, and the DMA controller is informed to receive the message. The DMA controller copies the message from the network card receive queue to the address location pointed to by the hardware receive space, i.e., the descriptor space.
In step S303, the protocol packet is mapped to channel 0 or channel 1 in the RX direction of the DMA controller, and sent to the user mode protocol stack for processing via the DMA controller.
The DMA controller is a direct memory access controller, the exchanger can efficiently complete the receiving and sending of the message through the DMA controller, and the DMA controller directly completes the writing of the message into the CPU memory or the taking of the message from the CPU memory and the sending. The DMA controller must have the following functions: 1) Can send out the system HOLD (HOLD) signal to CPU, take over the request for bus; 2) After the CPU sends out a takeover permission signal, the CPU is responsible for controlling the bus and enters a DMA mode; 3) The memory can be addressed and the address pointer can be modified, so that the memory can be read and written; 4) The byte number of the DMA transmission can be determined, and whether the DMA transmission is borrowed or not is judged; 5) And sending a DMA ending signal to enable the CPU to recover the normal working state.
The user mode network protocol stack is a set of protocol specifications, such as HTTP- > TCP- > IP, and is converted into a TCP data packet firstly through an HTTP request, then converted into an IP data packet, and transmitted out through a network card; the receiving party receives the IP data packet through the network card, removes the IP data head, transmits the TCP data packet to the TCP protocol processing layer when detecting that the TCP data packet is a TCP data packet, removes the TCP data head, and transmits the HTTP data packet to the HTTP protocol processing layer when detecting that the HTTP data packet is an HTTP data packet. Since all network data is transmitted via such a layer-by-layer protocol stack, this process is called the user mode network protocol stack.
In step S304, the CPU protocol stack issues a message to the network port through the channel 0 or the channel 1 in the TX direction of the DMA controller.
Each of the DMA transfer channels may perform DMA transfers between fixed-address peripheral registers and memory addresses. The amount of data transferred by the DMA is programmable, and a register containing the number of data items to be transferred is decremented after each transfer.
In this embodiment, the DMA controller receives the protocol packets in the channel 0 and the channel 1 in the RX direction, and sends the protocol packets in the channel 0 and the channel 1 in the TX direction, so that multi-channel physical isolation is achieved, and the user mode process is independent of the kernel mode process.
In step S305, a message is transmitted.
In this embodiment, a protocol packet mapping table is configured, and the protocol packet is mapped to channel 0 or channel 1 of the DMA controller RX and sent to the CPU protocol stack for processing through the DMA controller. The CPU protocol stack sends the message to the network port through the channel 0 or the channel 1 in the TX direction of the DMA controller to send the message.
Example 3
As shown in fig. 5 to 6, a method for keeping a protocol packet uninterrupted during a warm boot process according to an embodiment of the present invention is described.
In step S501, when receiving a message, the protocol message is identified, and whether the CPU is hot-started is determined.
In step S502, the CPU performs warm start and puts the protocol packet into a transmission queue.
In step S503, the protocol packet is mapped to channel 2 or channel 3 in the RX direction of the DMA controller, and sent to the Knet module for processing through the DMA controller.
The Kernel (Kernel) mode and the user mode are two running levels of the operating system, and when a program runs on a privilege level of 3, the program can be called to run on the user mode. The program is the lowest privilege level, which is the privilege level of the operation of the ordinary user process, and most programs directly faced by users are operated in a user mode; when a program runs at level 0 privilege level, it can be said to run in kernel mode. Programs running in user mode cannot directly access operating system kernel data structures and programs. When a program is executed in the system, the program runs in a user mode most of the time, and the program is switched to a kernel mode when the program needs the help of an operating system to complete some work which is not completed by the program. The main difference between the two states is that the memory space and the objects which can be accessed by the process are limited when the process is executed in the user mode, the occupied processor can access all the memory space and the objects when the process is executed in the kernel mode and can be preempted, and the occupied processor is not allowed to be preempted.
The Knet module is a kernel-state message receiving and sending module, a DMA controller is used for receiving and sending messages, the messages can be directly received and sent in a user state, and switch SDK driving software also runs in the user state in application of most manufacturers. The Knet can realize that the message is separately transmitted and received in a kernel state under the condition that the SDK driving software operates in a user state.
In step S504, the CPU protocol stack issues a packet to switch to channel 2 or channel 3 in the TX direction of the DMA controller, and issues a protocol packet to the network port through the Knet module.
Specifically, when the CPU is hot started, the user mode process is reinitialized, and the channel 0 and the channel 1 in the RX direction of the DMA controller and the channel 0 and the channel 1 in the TX direction of the DMA controller are reinitialized; the channel 2 and the channel 3 in the RX direction of the DMA controller and the channel 2 and the channel 3 in the TX direction of the DMA controller are not influenced by the reinitialization of the user mode channel, the running state is continuously kept, and the Knet process keeps normal running of the receiving and sending messages.
In this embodiment, the DMA controller receives the protocol packets in the channel 2 and the channel 3 in the RX direction, and sends the protocol packets in the channel 2 and the channel 3 in the TX direction, so that multi-channel physical isolation is achieved, and the kernel-state process is independent of the user-state process.
In step S505, a message is transmitted.
In this embodiment, a protocol packet mapping table is configured, the protocol packet is mapped to a channel 2 or a channel 3 in the RX direction of the DMA controller, and the protocol packet is sent to the Knet module for processing. And the CPU protocol stack issues the message to be switched to a channel 2 or a channel 3 in the TX direction of the DMA controller, and the protocol message is issued to a network port through the Knet module to be sent.
The invention realizes the knet module in the kernel state, and identifies some protocol messages needing to ensure normal operation in the hot start process and then sends the protocol messages to the knet module for processing. Therefore, the processing of the protocol messages is separated from the user state SDK, and when the user state SDK is restarted due to hot start, a soft table is reset and a part of DMA controller is initialized, the receiving and sending of the protocol messages are not influenced.
Specifically, the DMA controller implements multichannel physical isolation in the receiving direction RX and the sending direction TX, and the software implements the functions of receiving and sending messages in two independent processes, namely, the user mode and the kernel mode, and completely operates the kernel mode receiving and sending messages independently of the user mode, thereby implementing software isolation.
According to the method and the application for keeping the protocol message uninterrupted in the hot start process, disclosed by the embodiment of the invention, on the basis of the conventional network equipment, the channels in the RX direction and the TX direction of the DMA controller are physically isolated, and different channels are separated to work in a user state process and a kernel state Knet process respectively, so that two-stage isolation of software and physics is realized. On the basis of not needing to increase the physical network port again, the effect of keeping the protocol message uninterrupted in the hot start process is realized. For some protocol messages with high heartbeat detection and real-time requirements, normal operation of the protocol is completely maintained before and after hot start.
Fig. 7 illustrates an apparatus for keeping protocol messages uninterrupted during a warm boot process according to an embodiment of the present invention.
In the embodiment of the present invention, the apparatus for maintaining protocol packets uninterrupted in the warm boot process includes a packet identification module 701, a determination module 702, a user-mode packet transceiver module 703, and a kernel-mode packet transceiver module 704.
The packet identifying module 701 is configured to configure a protocol packet mapping table when a packet is read and received.
And a judging module 702, configured to judge whether the CPU performs a warm start.
The user mode message transceiver module 703 is configured to put a protocol message that does not need to be kept uninterrupted into a separate channel of the DMA controller, send the protocol message to a user mode protocol stack via the DMA controller for processing, and perform a protocol message uploading and issuing process in a user mode.
And the kernel state message receiving and sending module 704 is configured to put the protocol message that needs to be kept uninterrupted into another single channel of the DMA controller, send the protocol message to the Knet module for processing via the DMA controller, and perform uplink sending and downlink flow work on the protocol message in the kernel state.
The message identification module 701 is further configured to: when receiving the message, the protocol message is identified, the data message is forwarded normally, and a protocol message mapping table is configured for the protocol message.
The determining module 702 is further configured to: and if the recognition result of the message is a data message, normally forwarding the data message.
The user mode messaging module 703 is further configured to: and configuring a protocol message mapping table, mapping the protocol message to a channel 0 or a channel 1 in the RX direction of the DMA controller, and sending the protocol message to a CPU protocol stack for processing through the DMA controller.
The user mode messaging module 703 is further configured to: the CPU protocol stack sends the message to the network port through the channel 0 or the channel 1 in the TX direction of the DMA controller to send the message.
The kernel-state messaging module 704 is further configured to: and configuring a protocol message mapping table, mapping the protocol message to a channel 2 or a channel 3 in the RX direction of the DMA controller, and uploading the protocol message to a Knet module for processing.
The kernel mode messaging module 704 is further configured to: and the CPU protocol stack issues the message to be switched to a channel 2 or a channel 3 in the TX direction of the DMA controller, and the protocol message is issued to a network port through a Knet module to be sent.
FIG. 8 illustrates a hardware block diagram of a computing device 80 for maintaining protocol messages uninterrupted during a warm boot process according to embodiments of the present description. As shown in fig. 8, computing device 80 may include at least one processor 801, storage 802 (e.g., non-volatile storage), memory 803, and a communication interface 804, and the at least one processor 801, storage 802, memory 803, and communication interface 804 are connected together via a bus 805. The at least one processor 801 executes at least one computer readable instruction stored or encoded in the memory 802.
It should be appreciated that the computer-executable instructions stored in the memory 802, when executed, cause the at least one processor 801 to perform the various operations and functions described above in connection with fig. 1-8 in the various embodiments of the present description.
In embodiments of the present description, computing device 80 may include, but is not limited to: personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile computing devices, smart phones, tablet computers, cellular phones, personal Digital Assistants (PDAs), handheld devices, messaging devices, wearable computing devices, consumer electronics, and the like.
According to one embodiment, a program product, such as a machine-readable medium, is provided. A machine-readable medium may have instructions (i.e., elements described above as being implemented in software) that, when executed by a machine, cause the machine to perform various operations and functions described above in connection with fig. 1-8 in the various embodiments of the present specification. Specifically, a system or apparatus may be provided which is provided with a readable storage medium on which software program code implementing the functions of any of the above embodiments is stored, and causes a computer or processor of the system or apparatus to read out and execute instructions stored in the readable storage medium.
According to the method and the device for keeping the protocol message uninterrupted in the hot start process, disclosed by the embodiment of the invention, on the basis of the conventional network equipment, the channels in the RX direction and the TX direction of the DMA controller are physically isolated, and different channels are separated to work in a user state process and a kernel state Knet process respectively, so that two-stage isolation of software and physics is realized. On the basis of not needing to increase the physical network port again, the effect of keeping the protocol message uninterrupted in the hot start process is realized. For some protocol messages with high heartbeat detection and real-time requirements, normal operation of the protocol is completely maintained before and after hot start.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. It is not intended to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain certain principles of the invention and its practical application to enable one skilled in the art to make and use various exemplary embodiments of the invention and various alternatives and modifications. It is intended that the scope of the invention be defined by the claims and their equivalents.

Claims (10)

1. A method for keeping protocol messages uninterrupted in a warm start process is characterized by comprising the following steps:
when receiving the message, carrying out protocol message identification and judging whether the CPU is hot started or not; if not, the user can not select the specific application,
the protocol message which does not need to be kept uninterrupted is placed into a single channel of a DMA controller, and is sent to a user mode protocol stack for processing through the DMA controller, and the protocol message is sent and issued in a user mode; if so,
the protocol message needing to be kept uninterrupted is placed into another independent channel of the DMA controller, is sent to the Knet module for processing through the DMA controller, and the protocol message is sent and issued in a kernel state;
wherein the separate channel and the further separate channel are physically isolated channels from each other.
2. The method for maintaining protocol packets uninterrupted during warm boot according to claim 1, wherein the performing protocol packet identification while receiving a packet comprises:
when receiving the message, the protocol message is identified, and a protocol message mapping table is configured for the protocol message.
3. The method according to claim 1, wherein the sending from the DMA controller to the user mode protocol stack processing, and the sending and sending processes of the protocol message in the user mode comprise:
and configuring a protocol message mapping table, mapping the protocol message to a channel 0 or a channel 1 in the RX direction of the DMA controller, and sending the protocol message to a CPU protocol stack for processing through the DMA controller.
4. The method for maintaining protocol message uninterrupted during warm boot process according to claim 1, wherein the sending from the DMA controller to the user mode protocol stack processing, and the sending and sending processes of the protocol message in the user mode, comprise:
the CPU protocol stack sends the message to the network port through the channel 0 or the channel 1 in the TX direction of the DMA controller, and the message is sent.
5. The method according to claim 1, wherein the sending to the Knet module via the DMA controller for processing and the sending and sending processes of the protocol message in a kernel state comprise:
and configuring a protocol message mapping table, mapping the protocol message to a channel 2 or a channel 3 in the RX direction of the DMA controller, and uploading the protocol message to a Knet module for processing.
6. The method according to claim 1, wherein the sending to the Knet module via the DMA controller for processing and the sending and sending processes of the protocol message in a kernel state comprise:
and the CPU protocol stack issues the message to be switched to a channel 2 or a channel 3 in the TX direction of the DMA controller, and the protocol message is issued to a network port through the Knet module to be sent.
7. The method for maintaining protocol messages uninterrupted during warm boot according to claim 1, wherein the method further comprises:
and if the recognition result of the message is a data message, normally forwarding the data message.
8. An apparatus for keeping protocol packets uninterrupted during warm boot, the apparatus comprising:
the message identification module is used for configuring a protocol message mapping table when a message is read and received;
the judging module is used for judging whether the CPU is in hot start or not;
the user mode message receiving and sending module is used for putting the protocol message which does not need to be kept uninterrupted into a single channel of the DMA controller, sending the protocol message to a user mode protocol stack for processing through the DMA controller, and carrying out protocol message sending and issuing process work in a user mode;
and the kernel state message receiving and sending module is used for putting the protocol message which needs to be kept uninterrupted into another independent channel of the DMA controller, sending the protocol message to the Knet module for processing through the DMA controller, and carrying out the protocol message uploading and issuing process work in the kernel state.
9. An electronic device, comprising:
at least one processor; and
memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the method of maintaining protocol messaging uninterrupted during a warm boot process according to any of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program for implementing, when being executed by a processor, the steps of the method for maintaining protocol messages uninterrupted during a warm boot process according to any one of claims 1 to 7.
CN202211223594.3A 2022-10-08 2022-10-08 Method and device for keeping protocol message uninterrupted in warm start process Pending CN115604372A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211223594.3A CN115604372A (en) 2022-10-08 2022-10-08 Method and device for keeping protocol message uninterrupted in warm start process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211223594.3A CN115604372A (en) 2022-10-08 2022-10-08 Method and device for keeping protocol message uninterrupted in warm start process

Publications (1)

Publication Number Publication Date
CN115604372A true CN115604372A (en) 2023-01-13

Family

ID=84846348

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211223594.3A Pending CN115604372A (en) 2022-10-08 2022-10-08 Method and device for keeping protocol message uninterrupted in warm start process

Country Status (1)

Country Link
CN (1) CN115604372A (en)

Similar Documents

Publication Publication Date Title
US10845868B2 (en) Methods and apparatus for running and booting an inter-processor communication link between independently operable processors
WO2018072713A1 (en) Communication system and electronic device
WO2018072715A1 (en) Communication system and electronic device
WO2023284699A1 (en) Protocol stack data transmission method based on linux system, and computer device and storage medium
US10783086B2 (en) Method and apparatus for increasing a speed of accessing a storage device
WO2017066944A1 (en) Method, apparatus and system for accessing storage device
WO2021244194A1 (en) Register reading/writing method, chip, subsystem, register group, and terminal
CN114553635B (en) Data processing method, data interaction method and product in DPU network equipment
WO2019074906A1 (en) I3c in-band interrupts directed to multiple execution environments
TW200522583A (en) IP-based method and apparatus for booting computers remotely in wide-area-network environment
CN114662136B (en) PCIE (peripheral component interface express) channel-based high-speed encryption and decryption system and method for multi-algorithm IP (Internet protocol) core
US9473273B2 (en) Memory system capable of increasing data transfer efficiency
CN113632065A (en) Multi-core electronic device and packet processing method thereof
US8032675B2 (en) Dynamic memory buffer allocation method and system
WO2022251998A1 (en) Communication method and system supporting multiple protocol stacks
TWI269978B (en) Method allowing single host to access plurality of peripheral devices and electronic system thereof
US20230325262A1 (en) Message notification method and apparatus
CN111026561B (en) Data communication method and system of cloud platform and computer readable medium
CN111427806A (en) Method for sharing serial port by dual-core AMP system, storage medium and intelligent terminal
US10635606B2 (en) Method and apparatus for maintaining continuity of on-going session over wired or wireless interface
US9565049B2 (en) Communication apparatus, communication method, and computer product for sharing data
CN115604372A (en) Method and device for keeping protocol message uninterrupted in warm start process
US20140052879A1 (en) Processor, information processing apparatus, and interrupt control method
WO2018106392A1 (en) Technologies for multi-core wireless network data transmission
CN109165099B (en) Electronic equipment, memory copying method and device

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