A method, apparatus, and electronic device for synchronizing multi-node protocol entries.
By synchronizing the node's table pointer and protocol entries in the NUMA architecture, the message processing failure caused by the node's inability to obtain protocol entries is resolved, thus achieving successful message processing and system real-time performance.
Patent Information
- Application Number
- CN202410804423.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-06-20
AI Technical Summary
In a NUMA architecture, nodes cannot obtain protocol entries when processing messages, leading to message processing failure.
By synchronizing the table pointers of multiple nodes, it is ensured that each node contains all table pointers, enabling the querying and synchronization of protocol table entries. This includes querying or creating updated protocol table entries in the protocol list of the target node, and retrieving missing protocol table entries through table entry retrieval requests.
This solves the problem of message processing failure under NUMA architecture, ensuring that each node can query the required protocol entries, thereby improving the success rate of message processing and the real-time performance of the system.
Smart Images

Figure CN118784563B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network security technology, and in particular to a method, apparatus and electronic device for synchronizing multi-node protocol entries. Background Technology
[0002] In a NUMA (Non-Uniform Memory Access) architecture, system memory is divided into several nodes, each with its own processor and local memory. Processors access local memory faster than non-local memory. Therefore, processing local information on a node can improve processing efficiency.
[0003] In NUMA architecture devices, firewall software is partitioned by nodes, with each node running an independent firewall software process to achieve parallel processing. When the device's network interface card (NIC) receives a packet, it distributes the packet to the firewall process of one of the nodes for processing according to load balancing.
[0004] However, when processing a message, a node needs to send an ARP (Address Resolution Protocol) request to obtain the protocol entry. Due to load balancing, the ARP response obtained by the current node's ARP request may be sent to other nodes in the NUMA architecture, causing the node processing the current message to be unable to obtain the protocol entry, thus leading to message processing failure. Summary of the Invention
[0005] This application provides a method, apparatus, and electronic device for synchronizing protocol entries across multiple nodes to solve the problem that, under a NUMA architecture, the node processing the current message cannot obtain the protocol entry, leading to message processing failure.
[0006] Firstly, this application provides a multi-node protocol entry synchronization method applied to a non-consistent memory access architecture system, the non-consistent memory access architecture system comprising multiple nodes, the method comprising:
[0007] The table pointer of the target node in a multi-node system is synchronized to the non-target nodes in the non-consistent memory access architecture system; the table pointer is used to query the protocol list of the node, which includes protocol entries, and the protocol entries include the physical addresses of the neighbors;
[0008] Acquire the first message and send the first message to the target node;
[0009] Search the protocol list of the target node for the protocol entry corresponding to the first message;
[0010] If the target node's protocol list includes the protocol entry corresponding to the first message, then the first message is sent to the neighboring device according to the protocol entry corresponding to the first message. The neighboring device is an electronic device that communicates with the non-consistent memory access architecture system and whose physical address is the same as the neighbor's physical address in the protocol entry corresponding to the first message.
[0011] The method synchronizes the table pointers of each node in the non-consistent memory access architecture system, so that any node in the system includes all table pointers. This allows the node to query the protocol table entries required for the current message when processing a message, thus solving the problem of message processing failure.
[0012] In one possible implementation of the first aspect, after querying the protocol entry corresponding to the first message in the protocol list of the target node, the method further includes:
[0013] If the protocol list of the target node does not include the protocol entry corresponding to the first message, then the protocol entry corresponding to the first message is queried in the protocol list of the non-target node through the table pointer of the non-target node.
[0014] If the protocol list of the non-target node includes the protocol entry corresponding to the first message, then create an update protocol entry on the target node, and fill the update protocol entry with the neighbor physical address from the protocol entry corresponding to the first message.
[0015] In the method, the first message is processed in the target node. If the target node does not contain the protocol entry corresponding to the first message, the protocol list of the non-target node can be queried by synchronizing the table pointer of the non-target node in the target node. If the protocol entry corresponding to the first message is found in the protocol list of the non-target node, the first message can be forwarded according to the neighbor physical address of the protocol entry corresponding to the first message.
[0016] In one possible implementation of the first aspect, after querying the protocol entry corresponding to the first message in the protocol list of the non-target node via the table pointer of the non-target node, the method further includes:
[0017] If the protocol list of the non-target node does not include the protocol entry corresponding to the first message, then create an updated protocol entry on the target node and cache the first message on the updated protocol entry.
[0018] Generate a table entry retrieval request and send the table entry retrieval request to neighboring devices.
[0019] In the method, if no protocol entry corresponding to the first message is found in either the target node or the non-target node, an update protocol entry is first created in the target node, and the first message is cached in the update protocol entry. Then, a table entry retrieval request is generated and sent to the neighboring device to retrieve the protocol entry corresponding to the first message from the neighboring device, so as to realize the forwarding of the first message.
[0020] In one possible implementation of the first aspect, the method further includes:
[0021] The table entry retrieval response is generated by the neighboring device based on the table entry retrieval request. The table entry retrieval response includes the protocol table entry corresponding to the first message.
[0022] If the table entry retrieval response is sent to the target node, the neighbor physical address in the protocol table entry corresponding to the first message in the table entry retrieval response is filled into the update protocol table entry, and a timer for the protocol table entry corresponding to the first message is generated in the target node;
[0023] If the table entry retrieval response is sent to a non-target node, a response protocol table entry is created on the non-target node, and the neighbor physical address from the protocol table entry corresponding to the first message in the table entry retrieval response is filled into the response protocol table entry. A timer for generating the protocol table entry corresponding to the first message is also generated on the non-target node.
[0024] In the method, the neighboring device generates a table entry retrieval response based on the table entry retrieval request and sends it to the target node or non-target node in the non-consistent memory access architecture system; the node that receives the table entry retrieval response will obtain the neighbor physical address of the protocol table entry corresponding to the first message and generate a timer for the protocol table entry corresponding to the first message to record the existence time of the protocol table entry.
[0025] In one possible implementation of the first aspect, the method further includes:
[0026] Obtain the neighbor's physical address from the protocol table entry according to the timer's time interval;
[0027] If the neighbor's physical address in the protocol entry is different from the physical address of the neighboring device, then delete the protocol entry from the node that includes the protocol entry.
[0028] In the method described, the system deletes aged protocol entries in real time, and all aged protocol entries on all nodes that include them are deleted to improve the real-time performance of the system.
[0029] In one possible implementation of the first aspect, the method further includes:
[0030] Obtain the second message and send the second message to the target node;
[0031] Search the protocol list of the non-target node for the protocol entry corresponding to the second message;
[0032] If the protocol list of the non-target node includes the protocol entry corresponding to the second message, then fill the neighbor physical address in the protocol entry corresponding to the second message into the updated protocol entry;
[0033] The first and second messages are sent to the neighboring device according to the protocol entry corresponding to the second message.
[0034] In the method, when the target node processes the second message, it finds that the protocol entry corresponding to the second message is the same as the protocol entry corresponding to the cached first message. Then, based on the neighbor physical address in the protocol entry corresponding to the second message, it sends the first message and the second message to the neighbor device at the same time, so as to achieve the purpose of triggering the processing of the cached first message by the second message.
[0035] In one possible implementation of the first aspect, synchronizing the table pointer of the target node among multiple nodes to non-target nodes in a non-consistent memory access architecture system includes:
[0036] Set an array of pointers on the target node across multiple nodes;
[0037] Store the table pointers of all nodes in the multiple nodes into a pointer array.
[0038] In the method described, table pointer synchronization of a non-consistent memory access architecture system can be achieved by setting a pointer array on the target node and storing the table pointers of all nodes into the array.
[0039] In one possible implementation of the first aspect, the method further includes:
[0040] When the first protocol entry in the target node is updated, the target node sends a broadcast message to non-target nodes. The broadcast message includes the update information of the first protocol entry.
[0041] Retrieve the lookup results of non-target nodes for finding protocol table entries based on broadcast messages;
[0042] If the protocol entry in the non-target node includes the first protocol entry, then update the first protocol entry in the non-target node according to the broadcast message.
[0043] In the method described, when a first protocol entry is updated in the target node, the first protocol entries in other nodes are also updated simultaneously, improving the real-time performance of the system.
[0044] Secondly, this application provides a multi-node protocol entry synchronization device, applied to a non-consistent memory access architecture system, comprising:
[0045] The table pointer synchronization module is configured to synchronize the table pointer of the target node among multiple nodes to the non-target nodes in the non-consistent memory access architecture system; wherein, the table pointer is used to query the protocol list of the node, the protocol list includes protocol entries, and the protocol entries include the physical addresses of the neighbors;
[0046] The message acquisition module is configured to: acquire the first message and send the first message to the target node;
[0047] The protocol entry query module is configured to: query the protocol entry corresponding to the first message in the protocol list of the target node;
[0048] The message sending module is configured to: if the target node's protocol list includes a protocol entry corresponding to the first message, then send the first message to the neighboring device according to the protocol entry corresponding to the first message. The neighboring device is an electronic device that communicates with the non-consistent memory access architecture system and whose physical address is the same as the neighbor's physical address in the protocol entry corresponding to the first message.
[0049] Thirdly, this application provides an electronic device, comprising:
[0050] One or more processors;
[0051] Memory, configured to store one or more programs;
[0052] When one or more programs are executed by one or more processors, the one or more processors implement the multi-node protocol entry synchronization method described in the first aspect above.
[0053] As can be seen from the above technical solutions, this application provides a multi-node protocol entry synchronization method, apparatus, and electronic device. The method includes: synchronizing the table pointer of a target node among multiple nodes to a non-target node in a non-consistent memory access architecture system; obtaining a first message and sending the first message to the target node; querying the protocol entry corresponding to the first message in the protocol list of the target node; if the protocol list of the target node includes the protocol entry corresponding to the first message, then sending the first message to a neighboring device according to the protocol entry corresponding to the first message.
[0054] The method synchronizes the table pointers of each node in the non-consistent memory access architecture system, so that any node in the system includes all table pointers. This allows the node to query the protocol table entries required for the current message when processing a message, thus solving the problem of message processing failure. Attached Figure Description
[0055] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0056] Figure 1 This is a schematic diagram illustrating how the NUMA architecture system described in this application requests protocol entries from neighboring devices.
[0057] Figure 2 This is a schematic diagram of the internal architecture of the firewall system described in the embodiments of this application;
[0058] Figure 3 This is a schematic diagram of the multi-node protocol entry synchronization method described in an embodiment of this application;
[0059] Figure 4 This is a schematic diagram illustrating the packet acquisition process of the firewall system described in this application embodiment;
[0060] Figure 5 This is a flowchart of the method for obtaining the protocol entry corresponding to the message as described in the embodiments of this application;
[0061] Figure 6 This is a schematic diagram illustrating the query operation triggered by the second message as described in an embodiment of this application;
[0062] Figure 7 This is a flowchart of the multi-node synchronous update protocol table entries described in the embodiments of this application;
[0063] Figure 8 This is a structural diagram of the multi-node protocol entry synchronization device described in the embodiments of this application. Detailed Implementation
[0064] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.
[0065] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0066] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0067] NUMA architecture is a memory architecture for multiprocessor computer systems designed to improve the performance of massively parallel computing. A NUMA architecture consists of multiple nodes, each with its own processor and local memory. Processors access local memory faster than they access the memory of other nodes; therefore, the processors in each node of a NUMA architecture are used to manage local memory.
[0068] In a NUMA architecture system, each node runs an independent firewall software process to achieve parallel processing. When a device's network interface card receives a packet, it distributes the packet to the firewall process of one of the nodes for processing according to load balancing.
[0069] However, when the node receiving the message does not contain the protocol entry for processing the message, the NUMA architecture system needs to send an entry retrieval request to the neighboring device to obtain the protocol entry. For example... Figure 1 As shown, the firewall system includes a first node 101, a second node 102, a third node 103, a fourth node 104, and a first interface 105. After receiving a packet, the second node 102 sends a table entry retrieval request to the external neighbor device 108 via the first interface 105 in the direction of the first arrow 106. Due to load balancing, the table entry retrieval response corresponding to the table entry retrieval request is sent back to the third node 103 in the direction of the second arrow 107, meaning the protocol table entry corresponding to the packet in the second node 102 is stored in the third node 103. Because the processors in each node of the NUMA architecture are used to process local memory, the second node 102 cannot retrieve the protocol table entry in the third node 103, resulting in packet processing failure.
[0070] This application provides a multi-node protocol entry synchronization method, apparatus, and electronic device, which can solve the problem that the node processing the current packet cannot obtain the protocol entry under the NUMA architecture, resulting in packet processing failure. The technical solution of this application will be described in detail below using the packet processing process of a multi-node firewall system as an example.
[0071] Figure 2 This is a schematic diagram of the internal architecture of a firewall system, wherein the first node 101 includes a first protocol table memory 201, the second node 102 includes a second protocol table memory 202, the third node 103 includes a third protocol table memory 203, and the fourth node 104 includes a fourth protocol table memory 204.
[0072] See Figure 3 This application provides a multi-node protocol entry synchronization method in some embodiments, which can be applied to the synchronization of protocol entries between different nodes in a firewall system during packet forwarding. Specifically, it includes the following steps:
[0073] Step S100: Synchronize the table pointer of the target node among multiple nodes to the non-target nodes in the non-consistent memory access architecture system.
[0074] The table pointer is used to query the protocol list of a node. The protocol list includes protocol entries, and each protocol entry includes the physical address of a neighbor.
[0075] For example, in such Figure 2 In the firewall system shown, the first node 101 is the target node, and the second node 102, the third node 103, and the fourth node 104 are non-target nodes. During the initialization phase, the first node 101 first completes the initialization of its own table pointer (i.e., the first table pointer), and then synchronizes the first table pointer to the three non-target nodes.
[0076] Understandably, when any one of the second node 102, the third node 103, or the fourth node 104 is chosen as the target node, the target node will also synchronize its own table pointer (i.e., the second table pointer, the third table pointer, or the fourth table pointer) to the non-target node during the initialization phase. Therefore, after all nodes in the firewall system have been initialized, the first node 101, the second node 102, the third node 103, and the fourth node 104, in addition to storing their own table pointers, also store the table pointers of the other three nodes.
[0077] In some embodiments, to save table pointers, a pointer array is set on the target node, and the table pointers of all nodes are stored in the pointer array.
[0078] For example, taking the second node 102 as the target node, a second pointer array void*arp_tbl_node[4] is created on the second node 102. "[4]" indicates that the second pointer array is used to store the table pointers of the four nodes. Among them, the representation of the first table pointer stored in the second pointer array is arp_tbl_node[0], the representation of the second table pointer is arp_tbl_node[1], the representation of the third table pointer is arp_tbl_node[2], and the representation of the fourth table pointer is arp_tbl_node[3].
[0079] It is understandable that, similar to the second node 102, the first pointer array arp_tb0_node[4] is created on the first node 101; the third pointer array arp_tb2_node[4] is created on the third node 103; and the fourth pointer array arp_tb3_node[4] is created on the fourth node 104.
[0080] Step S200: Obtain the first message and send the first message to the target node.
[0081] In some embodiments, the firewall system obtains the first packet and distributes it to the target node for processing according to the load balancing method.
[0082] It should be noted that load balancing refers to the allocation method used to optimize system performance, reduce latency, increase throughput, or achieve load balancing. This includes allocating packets based on packet characteristics (such as source address, destination address, protocol type, etc.). For example, packets from the same source address are assigned to processes on the same node for processing to reduce the overhead of cross-node communication.
[0083] For example, such as Figure 4 As shown, the first message 401 is sent to the first node 101 of the firewall system through the first interface 105 in the direction of the third arrow 402.
[0084] Step S300: Query the protocol entry corresponding to the first message in the protocol list of the target node.
[0085] In some embodiments, when the firewall system needs to send a message, it needs to query the protocol entry corresponding to the message in the target node where the message is located.
[0086] For example, with the first node 101 as the target node, the protocol list of the first node 101 is shown in the table below.
[0087] Neighborhood Agreement Address interface Neighbor's physical address 1.1.1.1 First Interface 68:91:d0:d6:91:d1 1.1.1.2 First Interface 68:91:d0:d6:91:d2 1.1.1.3 Second interface 68:91:d0:d6:91:d3
[0088] The neighbor protocol address in the protocol entry corresponding to the first message 401 in the first node 101 is 1.1.1.1. When the firewall system needs to send the first message 401, it queries the protocol entry with the neighbor protocol address 1.1.1.1 in the protocol list of the first node 101.
[0089] Step S400: If the target node's protocol list includes the protocol entry corresponding to the first message, then the first message is sent to the neighboring device according to the protocol entry corresponding to the first message.
[0090] Among them, the neighbor device 108 is an electronic device that communicates with the non-consistent memory access architecture system and whose physical address is the same as the neighbor physical address in the protocol table entry corresponding to the first message.
[0091] For example, taking the first node 101 as the target node, the protocol list of the first node 101 is shown in the table above. The neighbor protocol address of the first message 401 in the first node 101 is 1.1.1.1. Then the protocol list of the first node 101 includes the protocol entry corresponding to the first message 401. According to the neighbor physical address 68:91:d0:d6:91:d1 in the protocol entry corresponding to the first message 401, the first message 401 is sent to the corresponding neighbor device 108.
[0092] In some embodiments, such as Figure 5 As shown, after executing step S300, if the target node's protocol list does not include the protocol entry corresponding to the first message, the first message cannot be processed in the target node. Therefore, steps S501-S505 need to be executed.
[0093] Step S501: Query the protocol entry corresponding to the first message in the protocol list of the non-target node through the table pointer of the non-target node.
[0094] As shown in step S100, after the firewall system is initialized, the pointer arrays in the first node 101, the second node 102, the third node 103, and the fourth node 104 all store the table pointers of all nodes. Therefore, when the target node does not contain the protocol table entry corresponding to the first packet, the protocol table entry corresponding to the first packet in the corresponding non-target node can be queried in the target node according to the table pointer.
[0095] It should be noted that NUMA architecture can achieve inter-process memory access based on MMAP (Memory Mapped) technology. Therefore, by using the stored table pointers of non-target nodes in the target node, the protocol list of non-target nodes can be accessed through MMAP technology, enabling query operations on the protocol list of non-target nodes in the target node.
[0096] For example, with the first node 101 as the target node, the protocol list of the first node 101 is shown in the table below.
[0097] Neighborhood Agreement Address interface Neighbor's physical address 1.1.1.2 First Interface 68:91:d0:d6:91:d2 1.1.1.3 Second interface 68:91:d0:d6:91:d3
[0098] The neighbor protocol address in the protocol table entry corresponding to the first message 401 in the first node 101 is 1.1.1.1. As can be seen from the table above, the protocol list of the first node 101 does not include the protocol table entry corresponding to the first message 401. Therefore, the second table pointer arp_tbl_node[1] is used to query the protocol list in the second node 102 in the first pointer array of the first node 101; the third table pointer arp_tbl_node[2] is used to query the protocol list in the third node 103; and the fourth table pointer arp_tbl_node[3] is used to query the protocol list in the fourth node 104.
[0099] Step S502: If the protocol list of the non-target node includes the protocol entry corresponding to the first message, then create an updated protocol entry on the target node.
[0100] In some embodiments, if a table pointer query finds that the protocol list of a non-target node includes the protocol entry corresponding to the first message 401, then the protocol entry needs to be saved to the target node's memory. First, an updated protocol entry is created on the target node.
[0101] For example, with the first node 101 as the target node, the neighbor protocol address of the first message 401 in the first node 101 is 1.1.1.1. In the case that the first node 101 does not contain the protocol table entry corresponding to the first message 401, the second table pointer arp_tbl_node[1] is used to query the second node 102 to find the protocol table entry corresponding to the first message 401, as shown in the table below.
[0102] Neighborhood Agreement Address interface Neighbor's physical address 1.1.1.1 First Interface 68:91:d0:d6:91:d1
[0103] After querying the protocol entry corresponding to the first message 401 in the second node 102, an update protocol entry is created in the protocol list of the first node 101. The neighbor physical address in the update protocol entry is temporarily set to null, as shown in the table below.
[0104] Neighborhood Agreement Address interface Neighbor's physical address 1.1.1.1 First Interface null
[0105] Step S503: Fill the neighbor's physical address in the protocol table entry corresponding to the first message into the update protocol table entry.
[0106] In some embodiments, after the target node creates an update protocol entry, the neighbor physical address in the protocol entry corresponding to the first message 401 queried in the non-target node can be filled into the update protocol entry.
[0107] For example, with the first node 101 as the target node, the first message 401 is processed on the first node 101. If the neighbor physical address 68:91:d0:d6:91:d1 is found in the protocol table entry corresponding to the first message 401 in the non-target node 102, then the neighbor physical address 68:91:d0:d6:91:d1 is filled into the update protocol table entry created in the first node 101, so that the first node 101 contains the protocol table entry corresponding to the first message 401. At this time, the protocol list of the first node 101 is shown in the table below.
[0108] Neighborhood Agreement Address interface Neighbor's physical address 1.1.1.2 First Interface 68:91:d0:d6:91:d2 1.1.1.3 Second interface 68:91:d0:d6:91:d3 1.1.1.1 First Interface 68:91:d0:d6:91:d1
[0109] For example, with the third node 103 as the target node, the first message 401 is processed on the third node 103. If the neighbor physical address 68:91:d0:d6:91:d1 is found in the protocol table entry corresponding to the first message 401 in the non-target node 102, then the neighbor physical address 68:91:d0:d6:91:d1 is filled into the update protocol table entry created in the third node 103, so that the third node 103 contains the protocol table entry corresponding to the first message 401. At this time, the protocol list of the third node 103 is shown in the table below.
[0110] Neighborhood Agreement Address interface Neighbor's physical address 3.3.3.3 First Interface 77:91:d0:d6:91:d2 3.3.3.2 Second interface 77:91:d0:d6:91:d3 1.1.1.1 First Interface 68:91:d0:d6:91:d1
[0111] Step S504: If the protocol list of the non-target node does not include the protocol entry corresponding to the first message, then create an update protocol entry on the target node and cache the first message on the update protocol entry.
[0112] In some embodiments, if neither the target node nor the non-target node contains the protocol entry corresponding to the first message 401, then it is necessary to obtain the protocol entry corresponding to the first message 401 from the external neighbor device 108.
[0113] Before obtaining the protocol entry, the first message 401 cannot be forwarded because it lacks a corresponding protocol entry. Therefore, an update protocol entry is first created on the target node, and the first message 401 is temporarily cached in the update protocol entry.
[0114] For example, with the first node 101 as the target node, an update protocol entry is created in the protocol list of the first node 101. The neighbor physical address in the update protocol entry is temporarily set to null (empty), as shown in the table below.
[0115] Neighborhood Agreement Address interface Neighbor's physical address 1.1.1.1 First Interface null
[0116] Step S505: Generate an entry retrieval request and send the entry retrieval request to the neighboring device.
[0117] In some embodiments, obtaining the protocol entry corresponding to the first message 401 from the external neighbor device 108 requires generating an entry retrieval request and sending the entry retrieval request to the neighbor device.
[0118] For example, such as Figure 1 As shown, with the second node 102 as the target node, the first message 401 is processed on the second node 102. The second node 102 sends an entry retrieval request to the neighboring device 108 through the first interface 105 to retrieve the protocol entry corresponding to the first message 401.
[0119] In some embodiments, after receiving an entry retrieval request, the neighbor device 108 generates an entry retrieval response, which includes the protocol entry corresponding to the first message. Due to the load balancing strategy of the firewall system, the entry retrieval response generated by the neighbor device 108 is randomly sent to any node of the firewall device.
[0120] If the table entry retrieval response is sent to the target node, the neighbor physical address in the protocol table entry corresponding to the first message 401 in the table entry retrieval response is filled into the update protocol table entry, and a timer for the protocol table entry corresponding to the first message is generated in the target node.
[0121] For example, with the second node 102 as the target node, the first message 401 is processed in the second node 102. When neither the protocol list of the second node 102 nor the non-target node includes a protocol entry corresponding to the first message 401, an update protocol entry has been created in the second node 102. When the entry retrieval response generated by the neighbor device 108 is sent to the second node 102, the neighbor physical address 68:91:d0:d6:91:d1 corresponding to the first message 401 in the entry retrieval response can be filled into the update protocol entry. At this time, the protocol list of the second node 102 is as shown in the table below.
[0122] Neighborhood Agreement Address interface Neighbor's physical address 2.2.2.2 First Interface 67:91:d0:d6:91:d2 2.2.2.3 Second interface 67:91:d0:d6:91:d3 1.1.1.1 First Interface 68:91:d0:d6:91:d1
[0123] Meanwhile, a timer is generated in the second node 102 to record the existence time of the protocol entry corresponding to the first message 401.
[0124] In some embodiments, if the entry acquisition response is sent to a non-target node, a response protocol entry is created on the non-target node, and the neighbor physical address in the protocol entry corresponding to the first message 401 in the entry acquisition response is filled into the response protocol entry, and a timer for generating the protocol entry corresponding to the first message 401 is generated on the non-target node.
[0125] For example, with the second node 102 as the target node, the first message 401 is processed in the second node 102. When the response to the table entry generated by the neighbor device 108 is sent to the third node 103, a response protocol table entry is created in the third node 103, and the neighbor physical address 68:91:d0:d6:91:d1 from the protocol table entry corresponding to the first message 401 is filled into the response protocol table entry, resulting in the protocol list of the third node 103 as shown in the table below.
[0126] Neighborhood Agreement Address interface Neighbor's physical address 3.3.3.3 First Interface 77:91:d0:d6:91:d2 3.3.3.2 Second interface 77:91:d0:d6:91:d3 1.1.1.1 First Interface 68:91:d0:d6:91:d1
[0127] In some embodiments, if the entry retrieval response generated by the neighboring device 108 is sent to a non-target node, the target node still cannot obtain the protocol entry corresponding to the first message 401. Therefore, the target node can send a second message again to trigger a query operation on the non-target node using the table pointer. Figure 6 As shown, the specific steps are as follows:
[0128] S601, Obtain the second message and send the second message to the target node.
[0129] For example, such as Figure 4 As shown, with the first node 101 as the target node, the neighbor protocol address of the second message 403 is 1.1.1.1, and the second message 403 is sent to the first node 101 of the firewall system through the first interface 105 in the direction of the fourth arrow 404.
[0130] S602. Search the protocol list of the non-target node for the protocol entry corresponding to the second message.
[0131] For example, with the first node 101 as the target node, the protocol list of the first node 101 does not include the protocol entry corresponding to the second message 403. Therefore, the second table pointer arp_tbl_node[1] is used to query the protocol list in the second node 102 in the first pointer array of the first node 101; the third table pointer arp_tbl_node[2] is used to query the protocol list in the third node 103; and the fourth table pointer arp_tbl_node[3] is used to query the protocol list in the fourth node 104.
[0132] S603. If the protocol list of the non-target node includes the protocol entry corresponding to the second message, then fill the neighbor physical address in the protocol entry corresponding to the second message into the update protocol entry.
[0133] For example, with the first node 101 as the target node, the second message 403 is processed on the first node 101. If the neighbor physical address 68:91:d0:d6:91:d1 is found in the protocol table entry corresponding to the second message 403 in the non-target node 102, then the neighbor physical address 68:91:d0:d6:91:d1 is filled into the update protocol table entry created in the first node 101, so that the protocol table entry corresponding to the second message 403 is stored in the first node 101. At this time, the protocol list of the first node 101 is shown in the table below.
[0134] Neighborhood Agreement Address interface Neighbor's physical address 1.1.1.2 First Interface 68:91:d0:d6:91:d2 1.1.1.3 Second interface 68:91:d0:d6:91:d3 1.1.1.1 First Interface 68:91:d0:d6:91:d1
[0135] S604. Send the first and second messages to the neighboring device according to the protocol entry corresponding to the second message.
[0136] Since both the first message 401 and the second message 403 are processed on the first node 101, and their neighbor protocol addresses are both 1.1.1.1, the first message 401 can be forwarded according to the protocol entry corresponding to the second message 403.
[0137] For example, on the first node 101, the first message 401 is forwarded to the corresponding neighbor device 108 according to the neighbor physical address in the protocol entry corresponding to the second message 403 in the table above.
[0138] In some embodiments, protocol entries obtained through an entry retrieval request may experience aging. As can be seen from the above embodiments, when the firewall system obtains a protocol entry, it simultaneously creates a timer and retrieves the neighbor physical addresses from the protocol entry according to the timer's time interval; if the neighbor physical address in the protocol entry is different from the physical address of the neighbor device, the protocol entry is deleted from the node containing the protocol entry.
[0139] For example, the neighbor physical address of the protocol entry obtained on the first node 101 is 68:91:d0:d6:91:d3. The corresponding timer obtains the neighbor physical address of the protocol entry at 2-second intervals. The third obtained neighbor physical address is 68:91:d0:d6:91:d6, which is different from the initial neighbor physical address, so the protocol entry is deleted. Similarly, the protocol entry with the neighbor physical address 68:91:d0:d6:91:d3 also exists on the second node 102, and this protocol entry on the second node 102 is also deleted.
[0140] In some embodiments, when the first protocol entry in the target node is updated, the corresponding protocol entry in the non-target node is also updated. For example... Figure 7 As shown, the specific steps are as follows:
[0141] S701, The target node sends a broadcast message to non-target nodes.
[0142] The broadcast message includes update information for the first protocol entry.
[0143] For example, taking the first node 101 as the target node, the protocol list of the first node 101 includes a first protocol entry. The neighbor protocol address in the first protocol entry is 3.3.3.3, and the neighbor physical address is 66:91:d0:d6:91:d0. When the neighbor physical address in the first protocol entry of the first node 101 changes to 66:91:d0:d6:91:d3, the first node 101 generates a broadcast message including update information. The update information is that the neighbor physical address of the neighbor with the neighbor protocol address 3.3.3.3 changes from 66:91:d0:d6:91:d0 to 66:91:d0:d6:91:d3.
[0144] S702. Obtain the lookup results of the protocol table entries searched by the non-target node based on the broadcast message.
[0145] For example, if the first node 101 is the target node, the second node 102, the third node 103 and the fourth node 104 will all receive the broadcast message and check whether their own nodes contain a protocol entry with the neighbor protocol address 3.3.3.3 based on the broadcast message.
[0146] S703. Determine whether the protocol entries in the non-target node include the first protocol entry.
[0147] For example, with the first node 101 as the target node, if the second node 102 finds a protocol entry in its own node that includes the neighbor protocol address 3.3.3.3 based on the broadcast message sent by the first node 101, then the second node 102 includes the first protocol entry.
[0148] S704. If the protocol entries in the non-target node include the first protocol entry, then update the first protocol entry in the non-target node according to the broadcast message.
[0149] For example, taking the first node 101 as the target node, the neighbor protocol address of the first protocol entry updated in the first node 101 is 3.3.3.3. If a protocol entry with a neighbor protocol address of 3.3.3.3 is found in the second target node 102, then the physical address of the protocol entry is also updated to 66:91:d0:d6:91:d3.
[0150] Corresponding to the aforementioned embodiments of the multi-node protocol entry synchronization method, some embodiments of this application also provide a multi-node protocol entry synchronization device, applied to a non-consistent memory access architecture system. For example... Figure 8As shown, the device includes: a table pointer synchronization module 801, a message acquisition module 802, a protocol table entry query module 803, and a message sending module 804.
[0151] The table pointer synchronization module 801 is configured to synchronize the table pointer of the target node among multiple nodes to the non-target nodes in the non-consistent memory access architecture system; wherein, the table pointer is used to query the protocol list of the node, the protocol list includes protocol entries, and the protocol entries include the physical addresses of the neighbors;
[0152] The message acquisition module 802 is configured to: acquire the first message and send the first message to the target node;
[0153] The protocol entry query module 803 is configured to: query the protocol entry corresponding to the first message in the protocol list of the target node;
[0154] The message sending module 804 is configured to: if the target node's protocol list includes a protocol entry corresponding to the first message, then send the first message to the neighboring device according to the protocol entry corresponding to the first message. The neighboring device is an electronic device that communicates with the non-consistent memory access architecture system and whose physical address is the same as the neighbor's physical address in the protocol entry corresponding to the first message.
[0155] As can be seen from the above technical solutions, this application provides a multi-node protocol entry synchronization method, apparatus, and electronic device. The method includes: synchronizing the table pointer of a target node among multiple nodes to a non-target node in a non-consistent memory access architecture system; obtaining a first message and sending the first message to the target node; querying the protocol entry corresponding to the first message in the protocol list of the target node; if the protocol list of the target node includes the protocol entry corresponding to the first message, then sending the first message to a neighboring device according to the protocol entry corresponding to the first message.
[0156] The method synchronizes the table pointers of each node in the non-consistent memory access architecture system, so that any node in the system includes all table pointers. This allows the node to query the protocol table entries required for the current message when processing a message, thus solving the problem of message processing failure.
[0157] Similar parts between the embodiments provided in this application can be referred to mutually. The specific implementation methods provided above are only a few examples under the overall concept of this application and do not constitute a limitation on the scope of protection of this application. For those skilled in the art, any other implementation methods extended from the solution of this application without creative effort shall fall within the scope of protection of this application.
Claims
1. A method for synchronizing multi-node protocol entries, characterized in that, The method, applied to a non-consistent memory access architecture system comprising multiple nodes, includes: The table pointer of the target node among the plurality of nodes is synchronized to the non-target nodes in the non-consistent memory access architecture system; wherein, the table pointer is used to query the protocol list of the node, the protocol list includes protocol entries, and the protocol entries include neighbor physical addresses; Acquire the first message and send the first message to the target node; Query the protocol entry corresponding to the first message in the protocol list of the target node; If the protocol list of the target node includes the protocol entry corresponding to the first message, then the first message is sent to the neighboring device according to the protocol entry corresponding to the first message. The neighboring device is an electronic device that communicates with the non-consistent memory access architecture system and whose physical address is the same as the neighbor physical address in the protocol entry corresponding to the first message. If the protocol list of the target node does not include the protocol entry corresponding to the first message, then the protocol entry corresponding to the first message is queried in the protocol list of the non-target node through the table pointer of the non-target node. If the protocol list of the non-target node does not include the protocol entry corresponding to the first message, then an updated protocol entry is created on the target node, and the first message is cached on the updated protocol entry. Generate an entry retrieval request and send the entry retrieval request to the neighboring device; A table entry retrieval response is generated by the neighboring device based on the table entry retrieval request, and the table entry retrieval response includes the protocol table entry corresponding to the first message. If the table entry retrieval response is sent to the target node, then the neighbor physical address in the protocol table entry corresponding to the first message in the table entry retrieval response is filled into the update protocol table entry, and a timer for the protocol table entry corresponding to the first message is generated in the target node; If the table entry acquisition response is sent to the non-target node, a response protocol table entry is created on the non-target node, and the neighbor physical address in the protocol table entry corresponding to the first message in the table entry acquisition response is filled into the response protocol table entry. A timer for the protocol table entry corresponding to the first message is also generated on the non-target node.
2. The multi-node protocol entry synchronization method according to claim 1, characterized in that, After querying the protocol entry corresponding to the first message in the protocol list of the target node, the process further includes: If the protocol list of the non-target node includes the protocol entry corresponding to the first message, then an update protocol entry is created on the target node, and the neighbor physical address in the protocol entry corresponding to the first message is filled into the update protocol entry.
3. The multi-node protocol entry synchronization method according to claim 1, characterized in that, The method further includes: Obtain the neighbor physical address from the protocol table entry according to the timer interval; If the neighbor's physical address in the protocol entry is different from the physical address of the neighbor device, then the protocol entry is deleted from the node that includes the protocol entry.
4. The multi-node protocol entry synchronization method according to claim 1, characterized in that, The method further includes: Acquire the second message and send the second message to the target node; Search the protocol list of the non-target node for the protocol entry corresponding to the second message; If the protocol list of the non-target node includes the protocol entry corresponding to the second message, then the neighbor physical address in the protocol entry corresponding to the second message is filled into the update protocol entry; The first message and the second message are sent to the neighboring device according to the protocol entry corresponding to the second message.
5. The multi-node protocol entry synchronization method according to claim 1, characterized in that, The step of synchronizing the table pointer of the target node among the plurality of nodes to the non-target nodes in the non-consistent memory access architecture system includes: Set a pointer array on the target node among the plurality of nodes; Store the table pointers of all nodes among the plurality of nodes into the pointer array.
6. The multi-node protocol entry synchronization method according to claim 1, characterized in that, The method further includes: When the first protocol entry in the target node is updated, the target node sends a broadcast message to the non-target node, the broadcast message including the update information of the first protocol entry; Obtain the lookup result of the non-target node in searching the protocol table entry based on the broadcast message; If the protocol entry in the non-target node includes the first protocol entry, then the first protocol entry in the non-target node is updated according to the broadcast message.
7. A multi-node protocol entry synchronization device, characterized in that, Applied to a non-consistent memory access architecture system, the non-consistent memory access architecture system comprising multiple nodes, the device includes: The table pointer synchronization module is configured to: synchronize the table pointer of the target node among the plurality of nodes to the non-target nodes in the non-consistent memory access architecture system; wherein, the table pointer is used to query the protocol list of the node, the protocol list includes protocol entries, and the protocol entries include neighbor physical addresses; The message acquisition module is configured to: acquire a first message and send the first message to the target node; The protocol entry query module is configured to: query the protocol entry corresponding to the first message in the protocol list of the target node; The message sending module is configured to: if the protocol list of the target node includes the protocol entry corresponding to the first message, then send the first message to the neighboring device according to the protocol entry corresponding to the first message. The neighboring device is an electronic device that communicates with the non-consistent memory access architecture system and whose physical address is the same as the neighbor physical address in the protocol entry corresponding to the first message. The device is further configured to, if the protocol list of the target node does not include the protocol entry corresponding to the first message, query the protocol entry corresponding to the first message in the protocol list of the non-target node through the table pointer of the non-target node. If the protocol list of the non-target node does not include the protocol entry corresponding to the first message, then an updated protocol entry is created on the target node, and the first message is cached on the updated protocol entry. Generate an entry retrieval request and send the entry retrieval request to the neighboring device; A table entry retrieval response is generated by the neighboring device based on the table entry retrieval request, and the table entry retrieval response includes the protocol table entry corresponding to the first message. If the table entry retrieval response is sent to the target node, then the neighbor physical address in the protocol table entry corresponding to the first message in the table entry retrieval response is filled into the update protocol table entry, and a timer for the protocol table entry corresponding to the first message is generated in the target node; If the table entry acquisition response is sent to the non-target node, a response protocol table entry is created on the non-target node, and the neighbor physical address in the protocol table entry corresponding to the first message in the table entry acquisition response is filled into the response protocol table entry. A timer for the protocol table entry corresponding to the first message is also generated on the non-target node.
8. An electronic device, characterized in that, include: One or more processors; Memory, configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the multi-node protocol entry synchronization method according to any one of claims 1-6.