Serial firewall message forwarding method, device, equipment and storage medium
By using the virtual interface managed by the operating system and the physical interface managed by the application process in the serial firewall for packet forwarding, the problem of packet forwarding delay in the serial firewall is solved and an efficient packet forwarding process is achieved.
Patent Information
- Application Number
- CN202111383186.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-22
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2041-11-22
AI Technical Summary
Due to frequent hardware interruptions and memory copy problems during the packet forwarding process of existing serial firewalls, delays increase and affect the efficiency of network communication.
Multiple interface pairs are used. Each interface pair includes a physical interface and a virtual interface. The virtual interface is controlled by the operating system, and the physical interface is managed by the application process. Messages are forwarded through the virtual interface to avoid hardware interference between user mode and kernel mode. Interrupts and memory copies use DPDK technology to directly send and receive messages from the network card, bypassing the operating system kernel for routing and FDB table forwarding.
It greatly reduces the delay of packet forwarding, improves the efficiency and accuracy of the forwarding process, and avoids the performance overhead of traditional Linux operating system kernel processing.
Smart Images

Figure CN114172695B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to a serial firewall message forwarding method, device, equipment and storage medium. Background Art
[0002] In order to ensure the information security of data communication among various network devices in the network, firewalls are usually used to implement strict access control on each network device.
[0003] At present, most serial firewalls use linked list queues to collect messages received by the operating system kernel from the network card, and after detecting the messages, set the message's judgment flag and return it to the linked list queue for forwarding by the operating system kernel.
[0004] However, when forwarding messages through the operating system kernel, frequent hardware interrupts, memory copies and other problems will occur, which will greatly increase the delay of message forwarding. Summary of the invention
[0005] The object of the present invention is to provide a serial firewall message forwarding method, device, equipment and storage medium to reduce the delay of message forwarding in view of the above-mentioned deficiencies in the prior art.
[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] In a first aspect, an embodiment of the present application provides a serial firewall message forwarding method, which is applied to a serial firewall, wherein the serial firewall includes: a plurality of interface pairs, each of the interface pairs includes a physical interface and a virtual interface; the virtual interface is controlled by an operating system in the serial firewall, and the physical interface is managed by an application process in the serial firewall;
[0008] The method comprises:
[0009] Receiving a message via a physical interface in a first interface pair, and writing a source physical address (Media Access Control, MAC) of the message and a virtual interface in the first interface pair into a bridge forwarding database (FDB);
[0010] If the message is a message to be forwarded, forwarding the message to the virtual interface in the first interface pair via the physical interface in the first interface pair;
[0011] Determine, according to the FDB table or routing information, a virtual interface in the second interface pair to which the message is to be forwarded;
[0012] Sending the message to the virtual interface in the second interface pair via the virtual interface in the first interface pair;
[0013] The message is sent to a physical interface in the second interface pair via a virtual interface in the second interface pair, and the message is sent via the physical interface in the second interface pair.
[0014] Optionally, before receiving the message via the physical interface in the first interface pair, the method further includes:
[0015] Respectively create a first soft switch mapping interface of the physical interface in the first interface pair and a virtual interface in the first interface pair;
[0016] A second soft switch mapping interface of the virtual interface in the first interface pair is created.
[0017] Optionally, forwarding the message to a virtual interface in the first interface pair via a physical interface in the first interface pair includes:
[0018] forwarding the message to the first soft switching mapping interface of the physical interface in the first interface pair via the physical interface in the first interface pair according to the soft switching mapping relationship between the physical interface in the first interface pair and the first soft switching mapping interface of the physical interface in the first interface pair;
[0019] According to the bridge mapping relationship between the first soft switching mapping interface of the physical interface in the first interface pair and the second soft switching mapping interface of the virtual interface in the first interface pair, the message is forwarded to the second soft switching mapping interface of the virtual interface in the first interface pair via the first soft switching mapping interface of the physical interface in the first interface pair;
[0020] According to the second soft switching mapping interface of the virtual interface in the first interface pair and the soft switching mapping relationship with the virtual interface in the first interface pair, the message is forwarded to the virtual interface in the first interface pair via the second soft switching mapping interface of the virtual interface in the first interface pair.
[0021] Optionally, determining the virtual interface in the second interface pair of the message according to the FDB table or the routing information includes:
[0022] Determine the target virtual interface to which the message is to be forwarded according to the FDB table; or determine the target virtual interface to which the message is to be forwarded according to the routing information; and use the target virtual interface as the virtual interface in the second interface pair.
[0023] Optionally, before sending the message to the virtual interface in the second interface pair via the virtual interface in the first interface pair, the method includes:
[0024] Respectively create a first soft switch mapping interface of the physical interface in the second interface pair and a virtual interface in the second interface pair;
[0025] A second soft switch mapping interface of the virtual interface in the second interface pair is created.
[0026] Optionally, sending the received message to a physical interface in the second interface pair via the virtual interface in the second interface pair includes:
[0027] Forwarding the message to the second soft switching mapping interface of the virtual interface in the second interface pair via the virtual interface in the second interface pair according to the soft switching mapping relationship between the virtual interface in the second interface pair and the second soft switching mapping interface of the virtual interface in the second interface pair;
[0028] Forwarding the message to the first soft switching mapping interface of the physical interface in the second interface pair via the second soft switching mapping interface of the virtual interface in the second interface pair according to the bridge mapping relationship between the second soft switching mapping interface of the virtual interface in the second interface pair and the first soft switching mapping interface of the physical interface in the second interface pair;
[0029] According to the first soft switching mapping interface of the physical interface in the second interface pair and the soft switching mapping relationship between the physical interface in the second interface pair, the message is forwarded to the physical interface in the second interface pair via the first soft switching mapping interface of the physical interface in the second interface pair.
[0030] Optionally, sending the message via a physical interface in the second interface pair includes:
[0031] The message is copied to a sending data buffer address circular queue, and the message is sent to a target receiving device via a physical interface in the second interface pair.
[0032] In a second aspect, an embodiment of the present application further provides a serial firewall message forwarding device, which is applied to a serial firewall, wherein the serial firewall includes: a plurality of interface pairs, each of the interface pairs includes a physical interface and a virtual interface; the virtual interface is controlled by an operating system in the serial firewall, and the physical interface is managed by an application process in the serial firewall;
[0033] The device comprises:
[0034] A receiving module, configured to receive a message via a physical interface in a first interface pair, and write a source MAC in the message and a virtual interface in the first interface pair into an FDB table;
[0035] a forwarding module, configured to forward the message to the virtual interface in the first interface pair via the physical interface in the first interface pair if the message is a message to be forwarded;
[0036] A determination module, used to determine the virtual interface in the second interface pair to which the message is to be forwarded according to the FDB table or routing information;
[0037] The forwarding module is also used to send the message to the virtual interface in the second interface pair via the virtual interface in the first interface pair; send the message to the physical interface in the second interface pair via the virtual interface in the second interface pair, and send the message via the physical interface in the second interface pair.
[0038] Optionally, the device further comprises:
[0039] A creation module is used to respectively create a first soft switching mapping interface of the physical interface in the first interface pair and a virtual interface in the first interface pair; and to create a second soft switching mapping interface of the virtual interface in the first interface pair.
[0040] Optionally, the forwarding module is further used to:
[0041] forwarding the message to the first soft switching mapping interface of the physical interface in the first interface pair via the physical interface in the first interface pair according to the soft switching mapping relationship between the physical interface in the first interface pair and the first soft switching mapping interface of the physical interface in the first interface pair;
[0042] According to the bridge mapping relationship between the first soft switching mapping interface of the physical interface in the first interface pair and the second soft switching mapping interface of the virtual interface in the first interface pair, the message is forwarded to the second soft switching mapping interface of the virtual interface in the first interface pair via the first soft switching mapping interface of the physical interface in the first interface pair;
[0043] According to the second soft switching mapping interface of the virtual interface in the first interface pair and the soft switching mapping relationship with the virtual interface in the first interface pair, the message is forwarded to the virtual interface in the first interface pair via the second soft switching mapping interface of the virtual interface in the first interface pair.
[0044] Optionally, the determining module is further used to:
[0045] The target virtual interface to which the message is to be forwarded is determined according to the FDB table, or the target virtual interface to which the message is to be forwarded is determined by selecting a route according to the routing information; and the target virtual interface is used as the virtual interface in the second interface pair.
[0046] Optionally, the creation module is further used to:
[0047] A first soft switching mapping interface of the physical interface in the second interface pair and a virtual interface in the second interface pair are respectively created; and a second soft switching mapping interface of the virtual interface in the second interface pair is created.
[0048] Optionally, the forwarding module is further used to:
[0049] Forwarding the message to the second soft switching mapping interface of the virtual interface in the second interface pair via the virtual interface in the second interface pair according to the soft switching mapping relationship between the virtual interface in the second interface pair and the second soft switching mapping interface of the virtual interface in the second interface pair;
[0050] Forwarding the message to the first soft switching mapping interface of the physical interface in the second interface pair via the second soft switching mapping interface of the virtual interface in the second interface pair according to the bridge mapping relationship between the second soft switching mapping interface of the virtual interface in the second interface pair and the first soft switching mapping interface of the physical interface in the second interface pair;
[0051] According to the first soft switching mapping interface of the physical interface in the second interface pair and the soft switching mapping relationship between the physical interface in the second interface pair, the message is forwarded to the physical interface in the second interface pair via the first soft switching mapping interface of the physical interface in the second interface pair.
[0052] Optionally, the forwarding module is further used to:
[0053] The message is copied to a sending data buffer address circular queue, and the message is sent to a target receiving device via a physical interface in the second interface pair.
[0054] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the method provided in the first aspect.
[0055] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, any of the methods provided in the first aspect is executed.
[0056] The beneficial effects of this application are:
[0057] The embodiment of the present application provides a serial firewall message forwarding method, device, equipment and storage medium, which are applied to a serial firewall, wherein the serial firewall includes: multiple interface pairs, each interface pair includes a physical interface and a virtual interface; the virtual interface is controlled by an operating system in the serial firewall, and the physical interface is managed by an application process in the serial firewall; the method includes: receiving a message via a physical interface in a first interface pair, and writing a source MAC in the message and the virtual interface in the first interface pair into an FDB table; if the message is a message to be forwarded, forwarding the message to the virtual interface in the first interface pair via the physical interface in the first interface pair; determining the virtual interface in the second interface pair to which the message is to be forwarded according to the FDB table or routing information; sending the message to the virtual interface in the second interface pair via the virtual interface in the first interface pair; sending the message to the physical interface in the second interface pair via the virtual interface in the second interface pair, and sending the message via the physical interface in the second interface pair. In this solution, the messages received by the "physical interface in the first interface pair" are forwarded to the "physical interface in the second interface pair" mainly through the two virtual interfaces "virtual interface in the first interface pair" and "virtual interface in the second interface pair" managed by the operating system in the serial firewall, avoiding the problems of hardware interruption and memory copy between user state and kernel state frequently generated when using the traditional Linux operating system kernel for message forwarding, and greatly reducing the delay of the message forwarding process. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0059] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0060] Figure 2 A flowchart of a serial firewall message forwarding method provided in an embodiment of the present application;
[0061] Figure 3 A schematic diagram of serial firewall message forwarding provided in an embodiment of the present application;
[0062] Figure 4 A flowchart of another serial firewall message forwarding method provided in an embodiment of the present application;
[0063] Figure 5 A schematic diagram of an interface pair in a serial firewall provided in an embodiment of the present application;
[0064] Figure 6 A flowchart of another serial firewall message forwarding method provided in an embodiment of the present application;
[0065] Figure 7 A flowchart of another serial firewall message forwarding method provided in an embodiment of the present application;
[0066] Figure 8 A flowchart of another serial firewall message forwarding method provided in an embodiment of the present application;
[0067] Fig. 9 A schematic diagram of a serial firewall message forwarding process provided in an embodiment of the present application;
[0068] Fig.10 A schematic diagram of the structure of a serial firewall message forwarding device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0069] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0070] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0071] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0072] First of all, before explaining the technical solution provided by the present application in detail, a brief explanation of the relevant background involved in the present application is given.
[0073] At present, most serial firewalls use the NFQUEUE queue to collect the messages received by the operating kernel from the network card. After performing message detection, the message's decision flag is set and then returned to the NFQUEUE queue for forwarding by the operating system kernel.
[0074] Among them, the traditional Linux operating system kernel network data flow:
[0075] Hardware interrupt--->get the packet and distribute it to the kernel thread--->software interrupt--->kernel thread processes the packet in the protocol stack--->notify the user layer after processing is completed;
[0076] User layer receives packets-->network layer--->logic layer--->business layer.
[0077] Therefore, using the operating system kernel to process data packets has the following disadvantages:
[0078] 1. Interrupt processing. When a large number of data packets arrive in the network, frequent hardware interrupt requests will be generated. These hardware interrupts can interrupt the execution process of the previous lower priority soft interrupts or system calls. If such interruptions are frequent, high performance overhead will be generated.
[0079] 2. Memory copy. Under normal circumstances, a network data packet needs to go through the following process from the network card to the application: the data is transferred from the network card to the buffer opened by the kernel through DMA and other methods, and then copied from the kernel space to the user space. In the Linux kernel protocol stack, this time-consuming operation even accounts for 57.1% of the entire data packet processing flow.
[0080] 3. Context switching. Frequently arriving hardware interrupts and soft interrupts may preempt the execution of system calls at any time, which will generate a lot of context switching overhead. In addition, in the multi-threaded server design framework, the scheduling between threads will also generate frequent context switching overhead. Similarly, the energy consumption of lock contention is also a very serious problem.
[0081] 4. Local failure. Nowadays, mainstream processors are multi-core, which means that the processing of a data packet may span multiple central processing unit (CPU) cores. For example, a data packet may be interrupted in cpu0, processed in kernel mode in cpu1, and processed in user mode in cpu2. This may easily cause CPU cache failure and local failure across multiple cores. If it is a non-uniform memory access architecture (NUMA), it will cause cross-NUMA memory access, which will greatly affect performance.
[0082] 5. Memory management. The memory page of a traditional server is 4K. In order to improve the access speed of memory and avoid cache miss, the entries in the mapping table in the cache can be increased, but this will affect the retrieval efficiency of the CPU.
[0083] Therefore, when forwarding messages through the operating system kernel, problems such as frequent hardware interrupts and memory copies will occur, which will greatly increase the delay of message forwarding.
[0084] However, the Data Plane Development Kit (DPDK) does not have a protocol stack. If the DPDK bypasses the operating system kernel and directly sends and receives messages from the network card, the messages will not be forwarded through the operating system's routing and FDB tables.
[0085] In order to solve the technical problems existing in the above-mentioned prior art, the present application provides a method for forwarding messages through DPDK technology. Specifically: configure a corresponding "virtual interface" for each "DPDK network interface", and configure a corresponding IP address for the "virtual interface corresponding to the DPDK network interface". An interface pair is formed between the "DPDK network interface" and the "virtual interface", that is, the interface pair is composed of a DPDK physical interface and a virtual interface. The external messages received by the "physical interface" are unconditionally forwarded to the "virtual interface" through the built-in switching module, and the external messages received by the "virtual interface" are also unconditionally forwarded to the "physical interface". Among them, the virtual interface is managed by the operating system, and the physical interface is managed by the "DPDK application process".
[0086] For example, when a physical interface in an interface pair receives a message and the detection is completed, if the detection result is that forwarding is allowed, the message is sent to the "virtual interface in the interface pair" via the physical interface in the interface pair. Since the "virtual interface" is managed by the operating system, the operating system will select a route when forwarding based on technologies such as routing and FDB tables. The operating system will hand the message over to the selected "virtual interface in the target interface pair" based on the routing result, and send the message to the "physical interface in the target interface pair" via the "virtual interface in the target interface pair", and then forward the message out via the "physical interface in the target interface pair".
[0087] This application mainly uses the DPDK network interface managed by the "DPDK application process" and the "virtual interface" managed by the operating system corresponding to the "DPDK network interface" configuration to forward messages, avoiding the frequent hardware interrupts and memory copies between user state and kernel state when using the traditional Linux operating system kernel for message forwarding, greatly reducing the delay of the message forwarding process. At the same time, the operating system kernel is used to ensure the correctness of the routing results, improving the accuracy of message forwarding.
[0088] At the same time, this application does not require modification of the network card driver, does not require the use of a network card with a specific driver, and is therefore universal.
[0089] Figure 1 The schematic diagram of the structure of an electronic device provided in an embodiment of the present application; the electronic device may be a processing device such as a computer or a server, and is used to implement the serial firewall message forwarding method provided in the present application. Figure 1 As shown, the electronic device includes: a processor 101 and a memory 102.
[0090] The processor 101 and the memory 102 are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, the electrical connection can be achieved through one or more communication buses or signal lines.
[0091] The processor 101 may be an integrated circuit chip having the ability to process signals. The processor 101 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. The methods, steps, and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor.
[0092] The memory 102 can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc.
[0093] Understandably, Figure 1 The structure described above is for illustration only. The electronic device 100 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0094] The memory 102 is used to store programs, and the processor 101 calls the programs stored in the memory 102 to execute the serial firewall message forwarding method provided in the following embodiment.
[0095] A serial firewall message forwarding method provided by the present application and the corresponding beneficial effects will be described below through multiple embodiments.
[0096] Figure 2 A flowchart of a serial firewall message forwarding method provided in an embodiment of the present application is provided. Figure 3 A schematic diagram of serial firewall message forwarding provided in an embodiment of the present application; optionally, the execution subject of the method can be a serial firewall in an electronic device such as a server or a computer, which has a data processing function. It should be understood that in other embodiments, the order of some steps in the serial firewall message forwarding method can be interchanged according to actual needs, or some steps can be omitted or deleted. Figure 2 As shown, the method includes:
[0097] S201. Receive a message via a physical interface in a first interface pair, and write a source MAC in the message and a virtual interface in the first interface pair into an FDB table.
[0098] It should be understood that in this embodiment, the serial firewall includes: multiple interface pairs, each interface pair includes a physical interface and a virtual interface; the virtual interface is controlled by the operating system in the serial firewall, and the physical interface is managed by the application process in the serial firewall.
[0099] For example, refer to Figure 3 As shown, the serial firewall includes but is not limited to the first interface pair interface-pair1 and the second interface pair interface-pair2. Taking the first interface pair interface-pair1 as an example, the first interface pair interface-pair1 includes: a physical interface tap2 and a virtual interface tap1. The physical interface in the first interface pair interface-pair1 can also be recorded as interface-pair1.tap2, and the virtual interface in the first interface pair interface-pair1 can be recorded as interface-pair1.tap1. And the virtual interface tap1 is managed by the operating system in the serial firewall, and the physical interface tap2 is managed by the "DPDK application process" in the serial firewall, that is, the physical interface and the virtual interface in each interface pair are managed by different objects. In this way, the DPDK network interface in the user state of the operating system can be used to send and receive messages using zero-copy technology, and large page memory can be used to effectively avoid cache miss, avoid system calls between user state and kernel state, and greatly reduce the message forwarding delay.
[0100] In this embodiment, the message may be received through the physical interface interface-pair1.tap2 in the first interface pair interface-pair1, and the source MAC in the message and the virtual interface in the first interface pair are written into the FDB table.
[0101] S202: If the message is a message to be forwarded, forward the message to the virtual interface in the first interface pair via the physical interface in the first interface pair.
[0102] In this embodiment, if the message received by the physical interface interface-pair1.tap2 in the first interface pair interface-pair1 is detected and the detection result is that forwarding is allowed, the message is sent to the "virtual interface interface-pair1.tap1 in the first interface pair interface-pair1" via the "physical interface interface-pair1.tap2 in the first interface pair interface-pair1".
[0103] S203: Determine, according to the FDB table or routing information, a virtual interface in the second interface pair to which the message is to be forwarded.
[0104] Optionally, the operating system performs routing when forwarding the message according to technologies such as routing and FDB table, and determines the virtual interface in the second interface pair to which the message is to be forwarded according to the routing result.
[0105] In this embodiment, the operating system kernel is used to ensure the correctness of the routing result, thereby improving the accuracy of message forwarding.
[0106] S204: Send the message to the virtual interface in the second interface pair via the virtual interface in the first interface pair.
[0107] In this embodiment, continue to refer to Figure 3 As shown, the message can be sent to the "virtual interface tap1 in the second interface pair interface-pair2" via the "virtual interface interface-pair1.tap1 in the first interface pair interface-pair1".
[0108] S205: Send the message to the physical interface in the second interface pair via the virtual interface in the second interface pair, and send the message via the physical interface in the second interface pair.
[0109] Optionally, after the "virtual interface interface-pair2.tap1 in the second interface pair interface-pair2" receives the message, the "virtual interface interface-pair2.tap1 in the second interface pair interface-pair2" forwards the received second interface's external message to the "physical interface interface-pair2.tap2 in the second interface interface-pair2 pair". At this time, the message is forwarded to other receiving devices via the "physical interface interface-pair2.tap2 in the second interface interface-pair2 pair", effectively reducing the delay in the message forwarding process.
[0110] In this embodiment, mainly through the two virtual interfaces managed by the operating system, namely "virtual interface interface-pair1.tap1 in the first interface pair interface-pair1" and "virtual interface interface-pair2.tap1 in the second interface pair interface-pair2", the message received by the physical interface interface-pair1.tap2 in the first interface pair interface-pair1 is forwarded to the "physical interface interface-pair2.tap2 in the second interface pair interface-pair2", thereby avoiding the problems of hardware interruption and memory copy between the user state and the kernel state frequently generated when the traditional Linux operating system kernel is used for message forwarding, and greatly reducing the delay of the message forwarding process.
[0111] In summary, an embodiment of the present application provides a serial firewall message forwarding method, which is applied to a serial firewall, wherein the serial firewall includes: multiple interface pairs, each interface pair includes a physical interface and a virtual interface; the virtual interface is controlled by an operating system in the serial firewall, and the physical interface is managed by an application process in the serial firewall; the method includes: receiving a message via a physical interface in a first interface pair, and writing a source MAC in the message and a virtual interface in the first interface pair into an FDB table; if the message is a message to be forwarded, forwarding the message to the virtual interface in the first interface pair via the physical interface in the first interface pair; determining the virtual interface in the second interface pair to which the message is to be forwarded according to the FDB table or routing information; sending the message to the virtual interface in the second interface pair via the virtual interface in the first interface pair; sending the message to the physical interface in the second interface pair via the virtual interface in the second interface pair, and sending the message via the physical interface in the second interface pair. In this solution, the messages received by the "physical interface in the first interface pair" are forwarded to the "physical interface in the second interface pair" mainly through the two virtual interfaces "virtual interface in the first interface pair" and "virtual interface in the second interface pair" managed by the operating system in the serial firewall, avoiding the problems of hardware interruption and memory copy between user state and kernel state frequently generated when using the traditional Linux operating system kernel for message forwarding, and greatly reducing the delay of the message forwarding process.
[0112] The following embodiments will explain in detail how to create a virtual interface in each interface pair.
[0113] refer to Figure 4 As shown, before the above step S201: receiving a message via the physical interface in the first interface pair, the method further includes:
[0114] S401: Create a first soft switch mapping interface of a physical interface in a first interface pair and a virtual interface in the first interface pair respectively.
[0115] S402: Create a second soft switch mapping interface of the virtual interface in the first interface pair.
[0116] In this embodiment, for example, reference may be made to Figure 5 As shown, a first soft switch mapping interface, namely vtap2, which may also be recorded as interface-pair1.vtap2, corresponding to the physical interface interface-pair1.tap2 in the first interface pair interface-pair1 in the physical network card (eg, DPDK network card) may be created in advance.
[0117] Then, create the "virtual interface" in the "first interface pair interface-pair1", namely tap1, which can be recorded as interface-pair1.tap1. At the same time, create the second soft switch mapping interface for the "virtual interface interface-pair1.tap1" in the "first interface pair interface-pair1", namely vtap1, which can also be recorded as interface-pair1.vtap1.
[0118] Among them, data is forwarded between vtap1 and vtap2 through the switching module built into the operating system.
[0119] At this time, the virtual interface interface-pair1.tap1 of the first interface pair interface-pair1 and the physical interface interface-pair1.tap2 in the first interface pair interface-pair1 form an interface pair. That is, the physical interface in the first interface pair interface-pair1 is interface-pair1.tap2, and the virtual interface is interface-pair1.tap1.
[0120] Optionally, network configuration information such as Internet Protocol (IP), Virtual Local Area Network (VLAN), and routing may be configured for the virtual interface interface-pair1.tap1 in the "first interface pair interface-pair1" according to actual usage.
[0121] In this embodiment, interface-pair1.vtap2 and interface-pair1.tap2 are in a mapping interface relationship, and interface-pair1.vtap2 and interface-pair1.vtap1 are in a bridging relationship. In this way, the message can be forwarded to the virtual interface interface-pair1.tap1 via interface-pair1.tap2 and interface-pair1.vtap2.
[0122] Similarly, the virtual interface in the second interface pair may also be obtained in the same manner as above.
[0123] Specific reference Figure 6 As shown, the above step S204: before sending the message to the virtual interface in the second interface pair via the virtual interface in the first interface pair, includes:
[0124] S601: Create a first soft switch mapping interface of a physical interface in a second interface pair and a virtual interface in the second interface pair respectively.
[0125] S602: Create a second soft switch mapping interface for the virtual interface in the second interface pair.
[0126] By adopting the method in the above embodiment, it is also possible to create "the first soft switching mapping interface interface-pair2.vtap2 of the physical interface in the second interface pair", "the virtual interface interface-pair2.tap1 in the second interface pair", and "the second soft switching mapping interface interface-pair2vtap1 of the virtual interface in the second interface pair".
[0127] How to determine the forwarding interface of the message will be explained in detail through the following embodiments.
[0128] Optionally, in the above step S203, determining the virtual interface in the second interface pair of the message according to the FDB table or routing information includes:
[0129] Determine the target virtual interface to which the message is to be forwarded according to the FDB table; or determine the target virtual interface to which the message is to be forwarded according to routing information; and use the target virtual interface as the virtual interface in the second interface pair.
[0130] In this embodiment, there are two ways to determine the forwarding interface of the message. Specifically, the target virtual interface to which the message is to be forwarded can be determined based on the FDB table. If the target virtual interface to which the message is to be forwarded cannot be found in the FDB table, the target virtual interface to which the message is to be forwarded can be determined based on the routing information, and the target virtual interface is used as the virtual interface in the second interface pair.
[0131] The following embodiments will explain in detail how to unconditionally forward the external messages received from the interface to the "virtual interface in the interface pair" via the "physical interface in a certain interface pair", or how to unconditionally forward the external messages received from the interface to the "physical interface in the interface pair" via the "virtual interface in the interface pair".
[0132] In the first case, the external message received by the interface is unconditionally forwarded to the virtual interface in the interface pair via the physical interface in the interface pair.
[0133] Specific reference Figure 7 As shown, the above step S202: forwarding the message to the virtual interface in the first interface pair via the physical interface in the first interface pair includes:
[0134] S701. According to a soft switching mapping relationship between a physical interface in a first interface pair and a first soft switching mapping interface of the physical interface in the first interface pair, forward a message to the first soft switching mapping interface of the physical interface in the first interface pair via the physical interface in the first interface pair.
[0135] In this embodiment, when the "physical interface interface-pair1.tap2 in the first interface pair" receives a message, the obtained message is sent to the "receive data buffer circular queue", which is polled by the "DPDK receiving module", and the message is taken out and handed over to the "message detection module" for detection. If the detection result is forwarding, according to the soft switching mapping relationship between "physical interface interface-pair1.tap2 in the first interface pair" and "the first soft switching mapping interface interface-pair1.vtap2 of the physical interface in the first interface pair", it is obtained that the switching mapping interface of "physical interface interface-pair1.tap2 in the first interface pair" is interface-pair1.vtap2, and the message is forwarded to "the first soft switching mapping interface interface-pair1.vtap2 of the physical interface in the first interface pair" via "physical interface interface-pair1.tap2 in the first interface pair".
[0136] S702. According to the bridging mapping relationship between the first soft switching mapping interface of the physical interface in the first interface pair and the second soft switching mapping interface of the virtual interface in the first interface pair, the message is forwarded to the second soft switching mapping interface of the virtual interface in the first interface pair via the first soft switching mapping interface of the physical interface in the first interface pair.
[0137] Optionally, by the above Figure 5 It can be seen that interface-pair1.vtap2 and interface-pair1.vtap1 are in a bridging relationship. According to the bridging mapping relationship of "the first soft switching mapping interface interface-pair1.vtap2 of the physical interface in the first interface pair" and "the second soft switching mapping interface interface-pair1.vtap1 of the virtual interface in the first interface pair", it can be obtained that the bridging mapping interface of "the first soft switching mapping interface interface-pair1.vtap2 of the physical interface in the first interface pair" is interface-pair1.vtap1, and the message is forwarded to "the second soft switching mapping interface interface-pair1.vtap1 of the virtual interface in the first interface pair" via "the first soft switching mapping interface interface-pair1.vtap2 of the physical interface in the first interface pair".
[0138] S703: forward the message to the virtual interface in the first interface pair via the second soft switching mapping interface of the virtual interface in the first interface pair according to the soft switching mapping relationship between the second soft switching mapping interface of the virtual interface in the first interface pair and the virtual interface in the first interface pair.
[0139] Optionally, according to the soft switching mapping relationship between "the second soft switching mapping interface interface-pair1.vtap1 of the virtual interface in the first interface pair" and "the virtual interface interface-pair1.tap1 in the first interface pair", it can be obtained that the soft switching mapping interface of "the second soft switching mapping interface interface-pair1.vtap1 of the virtual interface in the first interface pair" is "the virtual interface interface-pair1.tap1 in the first interface pair", then the message is forwarded to "the virtual interface interface-pair1.tap1 in the first interface pair" via "the second soft switching mapping interface interface-pair1.vtap1 of the virtual interface in the first interface pair".
[0140] At this point, the two bridge mapping interfaces, "the first soft switching mapping interface interface-pair1.vtap2 of the physical interface in the first interface pair" and "the second soft switching mapping interface interface-pair1.vtap1 of the virtual interface in the first interface pair", are realized, and the message received by "the physical interface interface-pair1.tap2 in the first interface pair" is finally forwarded to "the virtual interface interface-pair1.tap1 in the first interface pair".
[0141] In the second case, the external message received by the interface is also unconditionally forwarded to the physical interface in the interface pair via the virtual interface in the interface pair.
[0142] Specific reference Figure 8 As shown, the above step S205: sending the received message to the physical interface in the second interface pair via the virtual interface in the second interface pair includes:
[0143] S801. According to the soft switching mapping relationship between the virtual interface in the second interface pair and the second soft switching mapping interface of the virtual interface in the second interface pair, forward a message to the second soft switching mapping interface of the virtual interface in the second interface pair via the virtual interface in the second interface pair.
[0144] S802. According to the bridging mapping relationship between the second soft switching mapping interface of the virtual interface in the second interface pair and the first soft switching mapping interface of the physical interface in the second interface pair, the message is forwarded to the first soft switching mapping interface of the physical interface in the second interface pair via the second soft switching mapping interface of the virtual interface in the second interface pair.
[0145] S803: forward the message to the physical interface in the second interface pair via the first soft switching mapping interface of the physical interface in the second interface pair according to the soft switching mapping relationship between the first soft switching mapping interface of the physical interface in the second interface pair and the physical interface in the second interface pair.
[0146] In this embodiment, if the operating system selects a route based on routing information, the routing result is that the "virtual interface interface-pair2.tap1 in the second interface pair" performs message forwarding. Similarly, based on the soft switching mapping relationship between the "virtual interface interface-pair2.tap1 in the second interface pair" and the "second soft switching mapping interface interface-pair2.vtap1 of the virtual interface in the second interface pair", the message can be forwarded to its mapping interface "the second soft switching mapping interface interface-pair2.vtap1 of the virtual interface in the second interface pair" via the "virtual interface interface-pair2.tap1 in the second interface pair".
[0147] Then, according to the bridging mapping relationship between "the second soft switching mapping interface interface-pair2.vtap1 of the virtual interface in the second interface pair" and "the first soft switching mapping interface interface-pair2.vtap2 of the physical interface in the second interface pair", the message can be forwarded to its mapping interface "the first soft switching mapping interface interface-pair2.vtap2 of the physical interface in the second interface pair" via "the second soft switching mapping interface interface-pair2.vtap1 of the virtual interface in the second interface pair".
[0148] In addition, the built-in soft switching module can forward the message to "physical interface interface-pair2.tap2 in the second interface pair" via "the first soft switching mapping interface interface-pair2.vtap2 of the physical interface in the second interface pair" based on the soft switching mapping relationship between "the first soft switching mapping interface interface-pair2.vtap2 of the physical interface in the second interface pair" and "the physical interface interface-pair2.tap2 in the second interface pair".
[0149] At this point, the packets received by "virtual interface interface-pair1.tap1 in the second interface pair" are forwarded to "physical interface interface-pair1.tap2 in the second interface pair" via the two soft switching mapping interfaces "second soft switching mapping interface interface-pair2.vtap1 of the virtual interface in the second interface pair" and "first soft switching mapping interface interface-pair2.vtap2 of the physical interface in the second interface pair".
[0150] In addition, after the message reaches "physical interface interface-pair1.tap2 in the second interface pair", the message can be forwarded to other receiving devices using the packet sending process in the prior art.
[0151] How to send a message via the physical interface in the second interface pair in the above step S205 will be explained in detail through the following embodiments, including:
[0152] Optionally, the message is copied to a sending data buffer address circular queue, and the message is sent to a target receiving device via a physical interface in the second interface pair.
[0153] You can refer to Fig. 9 As shown in the figure, a lock-free packet sending queue Tx Queue is established between the physical interface and DPDK, and a send data buffer address pool (such as DMA addr1, ..., DMA addrn) is opened. When forwarding data packets, the "data buffer address" is put into the lock-free packet sending queue Tx Queue, and the DMA controller takes the message data and forwards it to the physical interface, and sets the buffer address to sent.
[0154] Specifically, the CPU reads the sending side descriptor tx_ring queue and checks whether the DD flag is 1. If it is 1, it means that the transmission is completed. For the descriptor that has been sent, the corresponding buffer in the descriptor needs to be released. The CPU fills the virtual address of the buffer rte_mbuf to be sent into the descriptor sw_ring in a polling manner. The CPU fills the virtual address of the buffer rte_mbuf to be sent into the descriptor sw_ring. The CPU obtains the "physical address of the data part in the rte_mbuf" obtained by "converting the virtual address of the buffer rte_mbuf to be sent" and fills it into the sending side descriptor tx_ring queue, and clears the DD flag to 0.
[0155] The DMA controller reads the base register, obtains the send-side descriptor, obtains the tx_ring queue address according to the send-side descriptor, reads the element in the head pointer, and obtains the data buffer address from the descriptor when the DD flag is released to 0. It copies the data to the NIC hardware Tx_FIFO buffer through the high-speed serial computer expansion bus (peripheral component interconnect express, referred to as PCIE) and sends the data out.
[0156] The DMA controller writes back the DD flag in the queue in the descriptor and sets it to 1, notifying the CPU that the data in the cache has been successfully sent.
[0157] The following is a description of the serial firewall message forwarding device and storage medium provided in this application. The specific implementation process and technical effects are described above and will not be repeated below.
[0158] Fig.10 A serial firewall message forwarding device provided in an embodiment of the present application is applied to a serial firewall, wherein the serial firewall includes: a plurality of interface pairs, each interface pair includes a physical interface and a virtual interface; the virtual interface is controlled by an operating system in the serial firewall, and the physical interface is managed by an application process in the serial firewall; the device includes:
[0159] The receiving module 1001 is used to receive a message via a physical interface in a first interface pair, and write a source MAC in the message and a virtual interface in the first interface pair into an FDB table;
[0160] The forwarding module 1002 is used for forwarding the message to the virtual interface in the first interface pair via the physical interface in the first interface pair if the message is a message to be forwarded;
[0161] A determination module 1003, configured to determine, according to the FDB table or routing information, a virtual interface in the second interface pair to which the message is to be forwarded;
[0162] The forwarding module 1002 is also used to send the message to the virtual interface in the second interface pair via the virtual interface in the first interface pair; send the message to the physical interface in the second interface pair via the virtual interface in the second interface pair, and send the message via the physical interface in the second interface pair.
[0163] Optionally, the device further includes:
[0164] The creation module is used to respectively create a first soft switching mapping interface of the physical interface in the first interface pair and a virtual interface in the first interface pair; and create a second soft switching mapping interface of the virtual interface in the first interface pair.
[0165] Optionally, the forwarding module 1002 is further configured to:
[0166] forwarding the message to the first soft switch mapping interface of the physical interface in the first interface pair via the physical interface in the first interface pair according to the soft switch mapping relationship between the physical interface in the first interface pair and the first soft switch mapping interface of the physical interface in the first interface pair;
[0167] According to the bridge mapping relationship between the first soft switching mapping interface of the physical interface in the first interface pair and the second soft switching mapping interface of the virtual interface in the first interface pair, the message is forwarded to the second soft switching mapping interface of the virtual interface in the first interface pair via the first soft switching mapping interface of the physical interface in the first interface pair;
[0168] According to the soft switching mapping relationship between the second soft switching mapping interface of the virtual interface in the first interface pair and the virtual interface in the first interface pair, the message is forwarded to the virtual interface in the first interface pair via the second soft switching mapping interface of the virtual interface in the first interface pair.
[0169] Optionally, the determination module 1003 is further configured to:
[0170] Determine the target virtual interface to which the message is to be forwarded according to the FDB table; or determine the target virtual interface to which the message is to be forwarded according to routing information; and use the target virtual interface as the virtual interface in the second interface pair.
[0171] Optionally, create modules that also:
[0172] A first soft switching mapping interface of the physical interface in the second interface pair and a virtual interface in the second interface pair are respectively created; and a second soft switching mapping interface of the virtual interface in the second interface pair is created.
[0173] Optionally, the forwarding module 1002 is further configured to:
[0174] forwarding the message to the second soft switching mapping interface of the virtual interface in the second interface pair via the virtual interface in the second interface pair according to the soft switching mapping relationship between the virtual interface in the second interface pair and the second soft switching mapping interface of the virtual interface in the second interface pair;
[0175] According to the bridge mapping relationship between the second soft switching mapping interface of the virtual interface in the second interface pair and the first soft switching mapping interface of the physical interface in the second interface pair, the message is forwarded to the first soft switching mapping interface of the physical interface in the second interface pair via the second soft switching mapping interface of the virtual interface in the second interface pair;
[0176] According to the soft switching mapping relationship between the first soft switching mapping interface of the physical interface in the second interface pair and the physical interface in the second interface pair, the message is forwarded to the physical interface in the second interface pair via the first soft switching mapping interface of the physical interface in the second interface pair.
[0177] Optionally, the forwarding module 1002 is further configured to:
[0178] The message is copied to the sending data buffer address circular queue, and the message is sent to the target receiving device via the physical interface in the second interface pair.
[0179] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0180] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0181] Optionally, the present invention also provides a program product, such as a computer-readable storage medium, comprising a program, which is used to execute the above method embodiment when executed by a processor.
[0182] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0183] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0184] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0185] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
Claims
1. A serial firewall message forwarding method, characterized in that: Applied to a serial firewall, the serial firewall comprises: a plurality of interface pairs, each of the interface pairs comprises a physical interface and a virtual interface; the virtual interface is controlled by an operating system in the serial firewall, the physical interface is managed by an application process in the serial firewall, the physical interface is a DPDK physical interface, and the application process is a DPDK application process; The method comprises: receiving a message via a physical interface in a first interface pair, and writing a source physical address in the message and a virtual interface in the first interface pair into a bridge forwarding database table; If the message is a message to be forwarded, forwarding the message to the virtual interface in the first interface pair via the physical interface in the first interface pair; Determine, according to the bridge forwarding database table or routing information, a virtual interface in the second interface pair to which the message is to be forwarded; Sending the message to the virtual interface in the second interface pair via the virtual interface in the first interface pair; The message is sent to a physical interface in the second interface pair via a virtual interface in the second interface pair, and the message is sent via the physical interface in the second interface pair.
2. The method according to claim 1, characterized in that Before receiving the message via the physical interface in the first interface pair, the method further includes: Respectively create a first soft switch mapping interface of the physical interface in the first interface pair and a virtual interface in the first interface pair; A second soft switch mapping interface of the virtual interface in the first interface pair is created.
3. The method according to claim 2, characterized in that The forwarding the message to the virtual interface in the first interface pair via the physical interface in the first interface pair includes: forwarding the message to the first soft switching mapping interface of the physical interface in the first interface pair via the physical interface in the first interface pair according to the soft switching mapping relationship between the physical interface in the first interface pair and the first soft switching mapping interface of the physical interface in the first interface pair; According to the bridge mapping relationship between the first soft switching mapping interface of the physical interface in the first interface pair and the second soft switching mapping interface of the virtual interface in the first interface pair, the message is forwarded to the second soft switching mapping interface of the virtual interface in the first interface pair via the first soft switching mapping interface of the physical interface in the first interface pair; According to the second soft switching mapping interface of the virtual interface in the first interface pair and the soft switching mapping relationship with the virtual interface in the first interface pair, the message is forwarded to the virtual interface in the first interface pair via the second soft switching mapping interface of the virtual interface in the first interface pair.
4. The method according to claim 2, characterized in that: The step of determining the virtual interface in the second interface pair of the message according to the bridge forwarding database table or routing information includes: The target virtual interface to which the message is to be forwarded is determined according to the bridge forwarding database table, or the target virtual interface to which the message is to be forwarded is determined by selecting a route according to the routing information; and the target virtual interface is used as the virtual interface in the second interface pair.
5. The method according to claim 1, characterized in that Before sending the message to the virtual interface in the second interface pair via the virtual interface in the first interface pair, the method includes: Respectively create a first soft switch mapping interface of the physical interface in the second interface pair and a virtual interface in the second interface pair; A second soft switch mapping interface of the virtual interface in the second interface pair is created.
6. The method according to claim 5, characterized in that The step of sending the received message to a physical interface in the second interface pair via the virtual interface in the second interface pair includes: Forwarding the message to the second soft switching mapping interface of the virtual interface in the second interface pair via the virtual interface in the second interface pair according to the soft switching mapping relationship between the virtual interface in the second interface pair and the second soft switching mapping interface of the virtual interface in the second interface pair; Forwarding the message to the first soft switching mapping interface of the physical interface in the second interface pair via the second soft switching mapping interface of the virtual interface in the second interface pair according to the bridge mapping relationship between the second soft switching mapping interface of the virtual interface in the second interface pair and the first soft switching mapping interface of the physical interface in the second interface pair; According to the first soft switching mapping interface of the physical interface in the second interface pair and the soft switching mapping relationship between the physical interface in the second interface pair, the message is forwarded to the physical interface in the second interface pair via the first soft switching mapping interface of the physical interface in the second interface pair.
7. The method according to any one of claims 1 to 6, characterized in that: The sending the message via the physical interface in the second interface pair includes: The message is copied to a sending data buffer address circular queue, and the message is sent to a target receiving device via a physical interface in the second interface pair.
8. A serial firewall message forwarding device, characterized in that: Applied to a serial firewall, the serial firewall comprises: a plurality of interface pairs, each of the interface pairs comprises a physical interface and a virtual interface; the virtual interface is controlled by an operating system in the serial firewall, the physical interface is managed by an application process in the serial firewall, the physical interface is a DPDK physical interface, and the application process is a DPDK application process; The device comprises: A receiving module, configured to receive a message via a physical interface in a first interface pair, and write a source physical address in the message and a virtual interface in the first interface pair into a bridge forwarding database table; a forwarding module, configured to forward the message to the virtual interface in the first interface pair via the physical interface in the first interface pair if the message is a message to be forwarded; A determination module, used to determine the virtual interface in the second interface pair to which the message is to be forwarded according to the bridge forwarding database table or routing information; The forwarding module is also used to send the message to the virtual interface in the second interface pair via the virtual interface in the first interface pair; send the message to the physical interface in the second interface pair via the virtual interface in the second interface pair, and send the message via the physical interface in the second interface pair.
9. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of any method as described in claims 1-7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are executed.
