Network driving method, network driving device and computer program product
By initializing a dedicated queue at the network driver layer to process real-time and non-real-time communication protocol data packets, and prioritizing real-time packets, the problem of real-time communication protocol data in the prior art is solved, real-time and response speed are improved, and high real-time requirements for industrial automation scenarios are met.
Patent Information
- Application Number
- CN202510035411.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-04-11
AI Technical Summary
Existing network drivers are difficult to meet the requirements of real-time communication protocols for real-time and reliability. Especially in high-load scenarios, real-time communication protocol data may be blocked by non-real-time communication protocol data, resulting in latency and CPU resource tightness.
A network driving method is provided for processing data packets of real-time communication protocol and non-real-time communication protocol by initializing a first queue and a second queue at a driving layer. The packets in the first queue are processed first and the packets of the second queue are delayed when the first queue packet is present.
It avoids the blockage of real-time communication protocol data by non-real-time communication protocol data, improves the response speed of real-time communication protocol data, meets the requirements of high real-time and low latency in scenarios such as industrial automation, and avoids excessive allocation of CPU resources.
Smart Images

Figure CN119814677A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automation control technology, and in particular to a network driving method and a network driving device, and a computer program product. Background Art
[0002] In industrial automation scenarios, Ethernet-based real-time communication protocols are widely used in scenarios that require high real-time performance and high reliability, such as machine control and motion control. Real-time communication protocol data packets are extremely sensitive to transmission delays and usually require data processing to be completed at the microsecond level.
[0003] However, in the existing network-driven universal design and unified data processing mechanism, the processing order of data packets is unified. Regardless of the type of data packet, it will be processed in the order of arrival, resulting in the possibility that real-time communication protocol data may be blocked by ordinary network data. In high-load scenarios, when mixed data volumes are transmitted, the CPU may be exhausted by ordinary network data processing, further delaying the response of real-time communication protocol data, thereby affecting the real-time and reliability of the system in industrial automation scenarios. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a network driver method, a network driver device, and a computer program product to solve the problem that the existing network driver processing is difficult to meet the requirements of real-time communication protocols for real-time and reliability.
[0005] In order to solve the above technical problems, this specification is implemented as follows: In a first aspect, a network driving method is provided, which is applied to a driving layer, and the method comprises: In response to the operation of opening the real-time communication device node by the application layer, a first queue is initialized, wherein the first queue is used to transmit data packets of the real-time communication protocol between the application layer and the driver layer; In response to an interrupt triggered by the network card after receiving the target data packet, determining the type of the target data packet; If the type of the target data packet is a data packet based on a real-time communication protocol, adding the target data packet to the first queue for processing; If the type of the target data packet is a data packet based on a non-real-time communication protocol, adding the target data packet to a second queue for processing; When there are data packets in the first queue, the data packets in the first queue are processed first and the data packets in the second queue are processed with delay.
[0006] Optionally, the data packet based on the real-time communication protocol is an EtherCAT data packet, and the first queue is an EtherCAT dedicated queue.
[0007] Optionally, initializing the first queue includes: Allocating memory at the driver layer for use as a receiving buffer; The first queue is obtained by initializing the receiving buffer in a queue manner.
[0008] Optionally, the second queue is processed based on a new application program interface NAPI mechanism, The step of determining the type of the target data packet in response to an interrupt triggered by the network card after receiving the target data packet comprises: In response to an interrupt triggered by the network card after receiving the target data packet, before activating the NAPI mechanism, intercepting the target data packet; By checking the protocol identification header or MAC address of the target data packet, it is determined whether the type of the target data packet is a data packet based on a real-time communication protocol.
[0009] Optionally, adding the target data packet to the first queue for processing includes: Adding the target data packet to the first queue and delaying the processing of the data packet in the second queue by the NAPI mechanism; In response to a read instruction sent by the application layer to the first queue, extracting a data packet from the first queue and transmitting the data packet to the application layer; Based on the number of data packets corresponding to the read instruction, the offset of the starting position of the first queue is updated.
[0010] Optionally, the adding the target data packet to the first queue for processing further includes: When the data packets in the first queue are full, if no read instruction sent by the application layer is received, the data packets received from the network card are cyclically added to the end of the first queue and correspondingly cover the first data packet of the first queue.
[0011] Optionally, adding the target data packet to a second queue for processing includes: Suspending the interruption and activating the NAPI mechanism; After adding the target data packet to the second queue, determining whether the second queue has been delayed for a preset time; If so, in the soft interrupt context, the data packets in the second queue are transferred to the kernel network stack of the driver layer through the NAPI mechanism.
[0012] Optionally, it also includes: During the processing of data packets in the first queue or the second queue, suspending the reception of data packets from the network card; After the processing of the data packets in the first queue and the second queue is completed, the receiving of data packets from the network card is resumed.
[0013] In a second aspect, a network driving device is provided, comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.
[0014] In a third aspect, a computer program product is provided, the computer program product comprising a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute the steps of the method described in the first aspect.
[0015] The driver layer initializes a first queue in response to an operation of opening a real-time communication device node by the application layer, and the first queue is used to transmit data packets of a real-time communication protocol between the application layer and the driver layer; in response to an interrupt triggered by the network card after receiving a target data packet, the type of the target data packet is determined; if the type of the target data packet is a data packet based on a real-time communication protocol, the target data packet is added to the first queue for processing; if the type of the target data packet is a data packet based on a non-real-time communication protocol, the target data packet is added to the second queue for processing; wherein, when there are data packets in the first queue, the data packets in the first queue are processed first and the data packets in the second queue are processed later, thereby avoiding the blocking of real-time communication protocol data by non-real-time communication protocol data caused by a unified data processing mechanism, so that real-time communication protocol data with high real-time requirements can be processed first, reducing processing delays, and in high-load scenarios, frequent hard interrupts and data packet processing may cause CPU resource shortages, and delaying the processing of non-real-time communication protocol data can avoid excessive resource allocation, so that the CPU is more focused on the processing of real-time communication protocol data, and the response speed of real-time communication protocol data is improved, meeting the high requirements of high real-time performance and low latency in scenarios such as industrial automation. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 It is a flowchart of the network driving method of an embodiment of the present application.
[0017] Figure 2 It is a schematic diagram of the overall process of the network driving method of an embodiment of the present application.
[0018] Figure 3It is a schematic diagram of the application scenario structure of the network driving method of an embodiment of the present application.
[0019] Figure 4 It is a structural block diagram of a network driving device according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application. The numbering of the drawings in this application is only used to distinguish the various steps in the scheme, and is not used to limit the execution order of the various steps. The specific execution order is subject to the description in the specification.
[0021] In order to solve the problems existing in the prior art, the embodiment of the present application provides a network driving method, which is applied to the driving layer, such as Figure 1 As shown, the following steps 102 to 108 are included.
[0022] Combination Figure 3 From the operating system architecture, it can be seen that the operating system 1000 includes an application layer 1200, a driver layer 1400 and a hardware network device 1600, and the network driving method of the embodiment of the present application can be executed by the driver layer 1400.
[0023] Step 102: In response to the operation of opening the real-time communication device node by the application layer, a first queue is initialized, where the first queue is used to transmit data packets of the real-time communication protocol between the application layer and the driver layer.
[0024] The real-time communication device node is a virtual device used by the driver layer to provide real-time communication services to the application layer, so as to provide a read and write interface for real-time communication between the application layer and the driver layer.
[0025] For example, the application layer triggers the open function to open " / dev / ecat", that is, to open the real-time communication device node, where "ecat" is used to represent the name of the real-time communication device node.
[0026] By opening the real-time communication device node, the application layer can interact with the device driver of the real-time communication device node. The driver initializes the first queue in the kernel space. The first queue is a newly added dedicated queue for transmitting data packets of the real-time communication protocol between the application layer and the driver layer. The user program of the application layer can exchange data with the dedicated queue through standard system calls, such as read and write interfaces.
[0027] In an embodiment of the present application, the data packet based on the real-time communication protocol is an EtherCAT data packet, and the first queue is an EtherCAT dedicated queue.
[0028] EtherCAT (Ethernet Control Automation Technology) is an Ethernet-based fieldbus system. Automation generally requires shorter data update time (or cycle time), low communication jitter during data synchronization, and low hardware cost. EtherCAT has a short cycle time, and all program data is processed by the slave controller hardware. This feature, combined with the functional principle of EtherCAT, makes EtherCAT a high-performance distributed I / O system.
[0029] In other embodiments, the data packet based on the real-time communication protocol may also be a data packet based on the CANopen protocol or the Modbus TCP protocol. The present application is not limited to the above specific embodiments, and any other data packets based on the real-time communication protocol fall within the protection scope of the present application.
[0030] Based on the solution provided in the above embodiment, optionally, in the above step 102, the initialization of the first queue includes: allocating memory at the driver layer to be used as a receiving buffer; and obtaining the first queue by initializing the receiving buffer in a queue manner.
[0031] In an embodiment of the present application, the application layer reads data from the first queue of the driver layer, allocates memory at the driver layer for use as a receive buffer, completes initialization of the receive buffer, clears related counters to allocate memory for a dedicated queue corresponding to the receive buffer, and sets the initialization state.
[0032] Similarly, for the application layer to write data to the driver layer, memory can be allocated in the driver layer for use as a send buffer, the send buffer is initialized, and the relevant counters are cleared to allocate memory for the send buffer and set the initialization state.
[0033] Step 104: In response to an interrupt triggered by the network card after receiving the target data packet, determine the type of the target data packet.
[0034] After the network card in the hardware network device 1600 receives the data packet from the slave station, it triggers a hardware interrupt to notify the driver layer 1400 that a new data packet has arrived, and the driver layer 1400 enters the data processing flow.
[0035] In an embodiment of the present application, after receiving an interrupt triggered by a network card, the type of data packet is first determined to distinguish between data packets based on a real-time communication protocol and data packets based on a non-real-time communication protocol, so as to facilitate subsequent differentiated processing.
[0036] Step 106: If the type of the target data packet is a data packet based on a real-time communication protocol, add the target data packet to the first queue for processing.
[0037] Step 108, if the type of the target data packet is a data packet based on a non-real-time communication protocol, the target data packet is added to the second queue for processing; wherein, when there are data packets in the first queue, the data packets in the first queue are processed first and the processing of the data packets in the second queue is delayed.
[0038] As mentioned above, the first queue is a dedicated queue for transmitting data packets of real-time communication protocol between the application layer and the driver layer, and the second queue is a common queue for processing data packets of non-real-time communication protocol. If there are data packets in the first queue and data packets in the second queue at the same time, the data packets in the first queue are processed first, and the data packets in the second queue are processed later.
[0039] In an embodiment of the present application, the second queue is processed based on a new application programming interface NAPI mechanism, and the type of the target data packet is determined in response to an interrupt triggered after the network card receives the target data packet, including: in response to an interrupt triggered after the network card receives the target data packet, before activating the NAPI mechanism, intercepting the target data packet; and determining whether the type of the target data packet is a data packet based on a real-time communication protocol by checking the protocol identification header or MAC address of the target data packet.
[0040] The New API (NAPI) is a network interface mechanism commonly used in kernel space, which can reduce the interrupt load caused by frequent interruptions in data reception and improve the efficiency of network packet processing. The NAPI mechanism uniformly schedules interrupt loads and data packets when processing them, and cannot classify and prioritize different types of data packets. For data packets based on real-time communication protocols, the NAPI polling mechanism may delay their processing time, especially under high network load and mixed traffic conditions.
[0041] Therefore, in an embodiment of the present application, data packets based on a real-time communication protocol are placed in a first queue for priority processing, and data packets based on a non-real-time communication protocol are placed in a second queue and processed based on a NAPI mechanism.
[0042] After receiving the interrupt triggered by the network card, before activating the NAPI mechanism to process the data packets in the second queue, the data packets received by the network card are first intercepted, and the protocol identifier in the data packet header or the MAC address of the data packet is checked to determine whether the data packet belongs to a data packet based on the real-time communication protocol. If it is a data packet based on the real-time communication protocol, the data packet is added to the first queue for processing, otherwise it is added to the second queue for processing.
[0043] Optionally, adding the target data packet to the first queue for processing includes: adding the target data packet to the first queue and delaying the NAPI mechanism's processing of the data packets in the second queue; in response to a read instruction sent by the application layer to the first queue, extracting data packets from the first queue and transmitting them to the application layer; and updating the offset of the starting position of the first queue based on the number of data packets extracted corresponding to the read instruction.
[0044] When there are packets in the first queue, the packets based on the real-time communication protocol in the first queue are processed first, and the processing of the ordinary network packets of the non-real-time communication protocol in the second queue is delayed. For example, the napi_defer_hard_irqs mechanism can be used to postpone the NAPI interrupt processing of ordinary network packets, giving priority to the processing of packets based on the real-time communication protocol to ensure real-time performance.
[0045] After the application layer calls the read interface to trigger the instruction to read the real-time communication device node, the driver layer extracts the data packet from the first queue according to the read instruction and transmits it to the application layer. After extracting the data packet, the driver layer updates the offset of the starting position of the first queue by updating the rx_read_offset function to prepare to receive more data packets based on the real-time communication protocol. After receiving the data packet based on the real-time communication protocol, the application layer executes the relevant real-time processing logic, such as control command parsing, device status update, etc.
[0046] Furthermore, the step of adding the target data packet to the first queue for processing also includes: when the data packets in the first queue are full, if the read instruction sent by the application layer is not received, the data packets received from the network card are cyclically added to the end of the first queue and correspondingly cover the first data packet of the first queue.
[0047] In this way, a circular queue can be designed specifically for the real-time communication protocol data in the first queue, which supports storing data packets with a fixed frame size. When the first queue is full, if the application layer does not perform a read operation, the latest data packet received by the network card is added to the end of the first queue according to the first-in-first-out principle, and the first data packet in the first queue is correspondingly overwritten, providing a safe enqueuing and dequeuing mechanism to prevent data overflow, etc.
[0048] The embodiment of the present application designs an independent circular cache queue to store real-time communication protocol data, and combines the interface of the device node to provide an efficient reading method for the application layer. The data includes classification, and the queue design avoids data loss and confusion problems, ensuring that the system has higher stability and reliability in high-load or complex network environments, and is easy to expand to other real-time protocols. It provides full-link optimization from the network card interruption of data packet reception to the application layer processing, ensuring real-time and high efficiency.
[0049] Optionally, adding the target data packet to the second queue for processing includes: suspending the interrupt and activating the NAPI mechanism; after adding the target data packet to the second queue, determining whether the second queue has been delayed for a preset time; if so, in the soft interrupt context, transferring the data packets in the second queue to the kernel network stack of the driver layer through the NAPI mechanism.
[0050] When the napi_defer_hard_irqs mechanism is used to postpone the NAPI interrupt processing of ordinary network data packets, the delay time of the second queue can be set, for example, tens of milliseconds. If the data packets of the first queue are not processed within the preset time, they can wait for the next round. Alternatively, the data packets of the first queue have been processed within the preset time.
[0051] For the hardware interrupt triggered after the network card receives the data packet, in the interrupt service routine, the interrupt is suspended and the napi_schedule function is called to activate the NAPI mechanism. In the soft interrupt context, the NAPI mechanism processes the data packets in the order of arrival through NAPI polling scheduling, and transfers each data packet from the buffer of the second queue of the driver layer to the corresponding area of the kernel network stack according to the non-real-time communication protocol of the data packet (such as TCP / IP, User Datagram Protocol UDP or other custom communication protocols), and is processed by the corresponding different objects.
[0052] In one embodiment, the method further includes: during the processing of data packets in the first queue or the second queue, suspending the reception of data packets from the network card; after the processing of data packets in the first queue and the second queue is completed, resuming the reception of data packets from the network card.
[0053] This embodiment emphasizes that the priority of data packet processing is higher than the priority of data packet receiving. During data packet processing, the data packet of the network card may not be received first. Once the data packet processing is completed, the subsequent data packets are continuously received from the network card, and the above operation is repeated.
[0054] Next, combine Figure 2, the overall process of the network driver method of the embodiment of the present application is described, which involves the interaction between the application layer, the driver layer and the network card.
[0055] like Figure 2 As shown, the following steps are included: Step 202, the application layer opens the real-time communication device node; Step 204, the driver layer creates and initializes the first queue in response to the above-mentioned opening operation of the application layer; Step 206, the driver layer receives a hardware interrupt triggered by the network card after receiving the data packet; Step 208, the driver layer determines whether the data packet is a data packet of the real-time communication protocol, if so, proceeds to step 210, otherwise proceeds to step 220; Step 210, the driver layer adds the data packet to the first queue; Step 212, the driver layer delays processing of data packets of non-real-time communication protocols and prioritizes processing of data packets of real-time communication protocols; Step 214, the application layer calls the read interface to send a read instruction; Step 216, the driver layer extracts the data packet from the first queue and transmits it to the application layer; Step 218, the application layer processes the real-time communication protocol data packet; Step 220, the driver layer adds the data packet to the second queue; Step 222: The driver layer polls and processes the data packet, for example based on the NAPI mechanism.
[0056] Figure 3 The application scenario structure of the network driving method of the embodiment of the present application is given, such as Figure 3 The application layer 1200 of the operating system 1000 shown can perform the following operations, including: 1. User program interface calls, such as read, write, open, etc.; 2. Real-time communication device node calls, such as ( / dev / ecat). The driver layer 1400 of the operating system 1000 can perform the following operations, including: 1. Interrupt processing; 2. Data packet classification; 3. First queue processing; 4. Second queue processing; 5. NAPI polling scheduling, etc. The hardware network device 1600 of the operating system 1000 can perform the following operations, including: 1. Data packet reception; 2. Hardware interrupt.
[0057] In an embodiment of the present application, the driver layer initializes a first queue by responding to an operation of opening a real-time communication device node by the application layer, and the first queue is used to transmit data packets of a real-time communication protocol between the application layer and the driver layer; in response to an interrupt triggered by the network card after receiving a target data packet, the type of the target data packet is determined; if the type of the target data packet is a data packet based on a real-time communication protocol, the target data packet is added to the first queue for processing; if the type of the target data packet is a data packet based on a non-real-time communication protocol, the target data packet is added to the second queue for processing; wherein, when there are data packets in the first queue, the data packets in the first queue are processed first and the data packets in the second queue are processed later, thereby avoiding the blocking of real-time communication protocol data by non-real-time communication protocol data caused by the unified data processing mechanism, so that real-time communication protocol data with high real-time requirements can be processed first, reducing processing delays, and in high-load scenarios, frequent hard interrupts and data packet processing may cause CPU resource shortages, and postponing non-real-time communication protocol data processing can avoid excessive resource allocation, so that the CPU is more focused on the processing of real-time communication protocol data, and the response speed of real-time communication protocol data is improved, meeting the high requirements of high real-time performance and low latency in scenarios such as industrial automation.
[0058] Alternatively, if Figure 4 As shown, the embodiment of the present application also provides a network driving device 2000, including a processor 2400 and a memory 2200, and the memory 2200 stores a program or instruction that can be run on the processor 2400. When the program or instruction is executed by the processor 2400, the various steps of the above-mentioned network driving method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0059] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by the processor, each process of any of the above network drive method embodiments is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the readable storage medium includes a computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0060] The embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. The computer program can be operated to enable a computer to implement each process of any of the above-mentioned network driving method embodiments when executed, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0061] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0062] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0063] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A network driving method, characterized in that: Applied to the driver layer, the method comprises: In response to the operation of opening the real-time communication device node by the application layer, a first queue is initialized, wherein the first queue is used to transmit data packets of the real-time communication protocol between the application layer and the driver layer; In response to an interrupt triggered by the network card after receiving the target data packet, determining the type of the target data packet; If the type of the target data packet is a data packet based on a real-time communication protocol, adding the target data packet to the first queue for processing; If the type of the target data packet is a data packet based on a non-real-time communication protocol, adding the target data packet to a second queue for processing; When there are data packets in the first queue, the data packets in the first queue are processed first and the data packets in the second queue are processed with delay.
2. The method according to claim 1, characterized in that The data packet based on the real-time communication protocol is an EtherCAT data packet, and the first queue is an EtherCAT dedicated queue.
3. The method according to claim 1, characterized in that The initializing the first queue comprises: Allocating memory at the driver layer for use as a receiving buffer; The first queue is obtained by initializing the receiving buffer in a queue manner.
4. The method according to claim 1, characterized in that: The second queue is processed based on the new application program interface NAPI mechanism, The step of determining the type of the target data packet in response to an interrupt triggered by the network card after receiving the target data packet comprises: In response to an interrupt triggered by the network card after receiving the target data packet, before activating the NAPI mechanism, intercepting the target data packet; By checking the protocol identification header or MAC address of the target data packet, it is determined whether the type of the target data packet is a data packet based on a real-time communication protocol.
5. The method according to claim 4, characterized in that The step of adding the target data packet to the first queue for processing includes: Adding the target data packet to the first queue and delaying the processing of the data packet in the second queue by the NAPI mechanism; In response to a read instruction sent by the application layer to the first queue, extracting a data packet from the first queue and transmitting the data packet to the application layer; Based on the number of data packets corresponding to the read instruction, the offset of the starting position of the first queue is updated.
6. The method according to claim 5, characterized in that The step of adding the target data packet to the first queue for processing further includes: When the data packets in the first queue are full, if no read instruction sent by the application layer is received, the data packets received from the network card are cyclically added to the end of the first queue and correspondingly cover the first data packet of the first queue.
7. The method according to claim 4, characterized in that The step of adding the target data packet to the second queue for processing includes: Suspending the interruption and activating the NAPI mechanism; After adding the target data packet to the second queue, determining whether the second queue has been delayed for a preset time; If so, in the soft interrupt context, the data packets in the second queue are transferred to the kernel network stack of the driver layer through the NAPI mechanism.
8. The method according to claim 1, characterized in that Also includes: During the processing of data packets in the first queue or the second queue, suspending the reception of data packets from the network card; After the processing of the data packets in the first queue and the second queue is completed, the receiving of data packets from the network card is resumed.
9. A network drive device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer program product, characterized in that The computer program product comprises a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to perform the steps of the method according to any one of claims 1-8.