Message forwarding method and device for NUMA architecture

By converting network messages in the NUMA architecture, and brushing session information to the corresponding FPGA, the problem of message forwarding performance bottleneck under the multi-channel/multi-band CPU architecture is solved, and message processing is improved Efficiency and reduce resource waste.

CN118964278APending Publication Date: 2024-11-15HANGZHOU DPTECH TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411042252.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

Under the multi-channel/multi-band CPU architecture, there are performance bottlenecks in the forwarding of network packets, especially the delay and overhead caused by cross-FPGA chips or cross-CPU memory access, which wastes FPGA memory and reduces session specifications.

Method used

In the NUMA architecture, after the FPGA network card receives forward messages, it will send them to the corresponding core packet collection queue according to the queue policy, determine the destination port according to the business needs and forwarding policy to convert the network address, and brush the session information to The corresponding FPGA is used to facilitate reverse packet forwarding.

Benefits of technology

It reduces the need for memory access across FPGA chips or across CPUs, reduces the latency and overhead of data exchange, significantly improves the efficiency of message processing and forwarding, and avoids resource waste and complex management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964278A_ABST
    Figure CN118964278A_ABST
Patent Text Reader

Abstract

The invention relates to a message forwarding method and device for an NUMA (Non Uniform Memory Access) architecture. The method comprises the steps that an FPGA network card in the NUMA architecture receives a forward message; sending the forward message to a corresponding core packet receiving queue according to a queue strategy; the core packet receiving queue determines a destination port according to a service requirement and a forwarding strategy; performing network address translation on the forward message according to the destination port; after network address translation, establishing a session to forward the forward message; and brushing the session information of the session to the corresponding FPGA so as to facilitate reverse message forwarding. According to the message forwarding method and device for the NUMA architecture, the requirement for cross-FPGA chip or cross-CPU memory access can be reduced, the delay and overhead of data exchange are reduced, and therefore the message processing and forwarding efficiency is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer information processing, and in particular to a message forwarding method and device for a NUMA architecture. Background Art

[0002] Due to the rapid development of multi-core CPUs, each core has to access the memory by sharing a north bridge. As the number of cores continues to increase, the performance of the north bridge in terms of response time has become a new bottleneck, so multi-channel / multi-band CPUs have become a new solution; Figure 1 As shown in the figure, each CPU accesses its own memory, which is called Local Memory Access. CPUs can also access each other's memory through the internal bus, which is called Remote Memory Access. Therefore, Local Memory Access and Remote Memory Access in the multi-way / multi-band CPU architecture are collectively referred to as NUMA.

[0003] In a single CPU architecture, the time it takes for each core to access the memory is almost the same. In this case, the network message forwarding session is established on the Node0 memory. Accessing this session on a different core has almost no impact on its business processing performance. However, for multi-channel / multi-band CPUs, if the session is still allocated to Node0, it means that if a core other than Node0 accesses this session, Remote Memory Access will be generated, affecting performance.

[0004] Generally speaking, when the network card of a network device receives forward and reverse messages, the network card RSS function calculates a hash value based on the message quintuple, takes the remainder of this hash value and the total number of CPU cores, uses the remainder as the destination core, and DMAs the message to the corresponding core packet receiving queue.

[0005] The thread running on the Core searches for the forwarding session based on the message information, and first searches on the Node where the current core is located. If not found, it traverses other nodes to search. If found, it copies the forwarding session information to the memory of the Node where the current core is located and saves it. The current message is forwarded based on this session. If not found, it needs to establish a forwarding session based on routing information and other information before forwarding. At the same time, the session information is refreshed once in the memory of each FPGA chip, so that after the message arrives at the FPGA chip, the session information in the chip memory can be searched for and forwarded. In the prior art, for the same table entry, each FPGA chip memory is refreshed, which wastes FPGA memory and reduces the total session specification of the FPGA chip.

[0006] Therefore, a new message forwarding method and device for NUMA architecture is needed.

[0007] The above information disclosed in the Background section is only for enhancement of understanding of the background of the present application and therefore it may contain information that does not constitute the prior art that is already known to a person of ordinary skill in the art. Summary of the invention

[0008] In view of this, the present application provides a message forwarding method and device for a NUMA architecture, which can reduce the need for cross-FPGA chip or cross-CPU memory access, reduce the delay and overhead of data exchange, and thus significantly improve the efficiency of message processing and forwarding.

[0009] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0010] According to one aspect of the present application, a message forwarding method for a NUMA architecture is proposed, the method comprising: an FPGA network card in the NUMA architecture receives a forward message; sending the forward message to its corresponding core packet receiving queue according to a queue strategy; the core packet receiving queue determines a destination port according to business requirements and a forwarding strategy; performing network address translation on the forward message according to the destination port; after the network address translation, establishing a session to forward the forward message; and flushing the session information of the session to the corresponding FPGA to facilitate reverse message forwarding.

[0011] In an exemplary embodiment of the present application, before the FPGA network card in the NUMA architecture receives the forward message, the method further includes: performing NUMA architecture configuration; and determining a queue strategy for the FPGA network card in the NUMA architecture.

[0012] In an exemplary embodiment of the present application, performing NUMA architecture configuration includes: determining that the server supports the NUMA architecture; and determining that the FPGA network card supports the RSS function.

[0013] In an exemplary embodiment of the present application, a queue strategy is determined for an FPGA network card in a NUMA architecture, including: allocating an independent packet receiving queue to each core of each CPU on the FPGA network card; determining a corresponding hash value for each packet receiving queue; and generating the queue strategy according to the correspondence between CPU, core, packet receiving queue, and hash value.

[0014] In an exemplary embodiment of the present application, the core packet receiving queue determines the destination port according to business requirements and forwarding strategies, including: the core packet receiving queue determines the destination address according to business requirements; and determines the destination port in the destination address according to the forwarding strategy.

[0015] In an exemplary embodiment of the present application, determining a destination port in a destination address according to a forwarding strategy includes: determining a five-tuple hash value of a reverse message based on an RSS function; and determining a destination port in a destination address according to the five-tuple hash value of the reverse message.

[0016] In an exemplary embodiment of the present application, determining a destination port in a destination address according to a five-tuple hash value of a reverse message includes: adjusting the destination port so that the hash value of the reverse message is the same as that of the forward message.

[0017] In an exemplary embodiment of the present application, the session information of the session is flushed to the corresponding FPGA to facilitate reverse message forwarding, including: recording the hash value of the forward message and the chip id of the FPGA; and flushing the session information of the session to the corresponding FPGA according to the chip id.

[0018] In an exemplary embodiment of the present application, the session information of the session is flushed to the corresponding FPGA to facilitate reverse message forwarding, including: the FPGA receives the reverse message; sends the reverse message to its corresponding core packet receiving queue according to the queue strategy; the core packet receiving queue forwards according to the pre-issued session information.

[0019] According to one aspect of the present application, a message forwarding device for a NUMA architecture is proposed, the device comprising: a receiving module, used for an FPGA network card in the NUMA architecture to receive a forward message; a queue module, used for sending the forward message to its corresponding core packet receiving queue according to a queue strategy; a port module, used for the core packet receiving queue to determine a destination port according to business requirements and a forwarding strategy; a conversion module, used for performing network address conversion on the forward message according to the destination port; a session module, used for establishing a session to forward the forward message after the network address conversion; and a flushing module, used for flushing the session information of the session to the corresponding FPGA to facilitate reverse message forwarding.

[0020] According to one aspect of the present application, an electronic device is proposed, which includes: one or more processors; a storage device for storing 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 method as described above.

[0021] According to one aspect of the present application, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described above is implemented.

[0022] According to the message forwarding method and device for NUMA architecture of the present application, a forward message is received by an FPGA network card in the NUMA architecture; the forward message is sent to its corresponding core packet receiving queue according to the queue strategy; the core packet receiving queue determines the destination port according to the business demand and the forwarding strategy; the network address of the forward message is converted according to the destination port; after the network address conversion, a session is established to forward the forward message; the session information of the session is flushed to the corresponding FPGA to facilitate the reverse message forwarding, which can reduce the need for cross-FPGA chip or cross-CPU memory access, reduce the delay and overhead of data exchange, and thus significantly improve the efficiency of message processing and forwarding.

[0023] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and other objects, features and advantages of the present application will become more apparent by describing in detail the exemplary embodiments thereof with reference to the accompanying drawings. The accompanying drawings described below are only some embodiments of the present application, and it is clear to a person skilled in the art that other accompanying drawings can be obtained from these accompanying drawings without creative effort.

[0025] Figure 1 This is a schematic diagram of multi-way CPU memory access.

[0026] Figure 2 The present invention is a flowchart of a message forwarding method for a NUMA architecture according to an exemplary embodiment.

[0027] Figure 3 It is a flow chart of a message forwarding method for NUMA architecture according to another exemplary embodiment.

[0028] Figure 4 It is a flow chart of a message forwarding method for NUMA architecture according to another exemplary embodiment.

[0029] Figure 5 It is a schematic diagram of a message forwarding method for NUMA architecture according to another exemplary embodiment.

[0030] Figure 6 It is a block diagram of a message forwarding device for NUMA architecture according to another exemplary embodiment.

[0031] Figure 7 It is a block diagram of an electronic device according to an exemplary embodiment.

[0032] Figure 8It is a block diagram of a computer-readable medium according to an exemplary embodiment. DETAILED DESCRIPTION

[0033] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this application will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0034] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0035] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0036] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0037] It should be understood that although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another component. Therefore, the first component discussed below can be referred to as the second component without departing from the teachings of the concepts of the present application. As used herein, the term "and / or" includes any one of the associated listed items and all combinations of one or more.

[0038] Those skilled in the art will appreciate that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present application, and therefore cannot be used to limit the scope of protection of the present application.

[0039] The technical abbreviations involved in this application are explained as follows:

[0040] CPU (Central Processing Unit): The central processing unit is the core component of the computer system, responsible for executing program instructions and processing data.

[0041] DMA (Direct Memory Access): Direct memory access is a technology that allows hardware subsystems (such as disk drives, graphics cards, and network interface cards) to exchange data directly with main memory without the intervention of the CPU. This can significantly increase data transfer speeds and reduce the burden on the CPU.

[0042] NUMA (Non-Uniform Memory Access): Non-Uniform Memory Access is a computer memory architecture in which the time it takes a processor to access memory depends on the location of the memory relative to the processor. In a NUMA system, processors are organized into nodes, each with its own local memory, and accessing local memory is usually faster than accessing memory on other nodes.

[0043] RSS (Receive Side Scaling): Receive side scaling is a network technology used to distribute the processing load of received network packets on the network interface card (NIC) so that multiple CPU cores can process the packets simultaneously, thereby improving network throughput.

[0044] NAT (Network Address Translation): Network address translation is a technology that rewrites the source or destination IP address when an IP packet passes through a router or firewall. NAT is often used to solve the problem of insufficient IPv4 address space and to provide a certain degree of security and privacy protection.

[0045] LB (Load Balancer): Load balancer is a network device or software service used to evenly distribute network traffic to multiple servers or network nodes to improve the overall performance and reliability of the system.

[0046] FPGA (Field-Programmable Gate Array): Field-programmable gate array is a semi-custom circuit that allows users to configure its internal logic circuits through software to implement specific functions. FPGA is highly flexible and reconfigurable and is widely used in various applications that require high performance, low latency, and customization.

[0047] In view of the technical defects in the prior art, the present application proposes a message forwarding method for NUMA architecture, and the solution in the present application is optimized for multi-channel / multi-band CPU architecture in an environment where the NUMA function is turned on. By implementing network address translation (NAT) to select a suitable port, it is ensured that the reverse message can utilize the RSS (ReceiveSide Scaling) function of the network card, and the hash value calculated based on the five-tuple information is the same as the forward message. In this way, the reverse message can be accurately routed to the same core of the same CPU that processes the forward message. On this core, the forwarding table entries in the memory of the node to which the core belongs can be efficiently established and accessed, thereby achieving excellent forwarding performance and simplifying the management complexity of the forwarding table entries.

[0048] When a message is sent to the CPU through the FPGA chip, the system will record which FPGA chip sent the message. This record allows the CPU to clearly know which FPGA chip will process this flow when creating a new session. Subsequently, the CPU will also flush a copy of the session information to the corresponding FPGA memory. In this way, subsequent messages of this flow can be forwarded directly through this FPGA chip, and the FPGA chip will search for the corresponding session information in its memory for fast forwarding processing, thereby further improving the overall processing efficiency and flexibility.

[0049] The content of this application is described in detail below with the help of specific embodiments.

[0050] Figure 2 The flowchart of a message forwarding method for NUMA architecture is shown according to an exemplary embodiment. The message forwarding method 20 for NUMA architecture at least includes steps S202 to S208.

[0051] like Figure 2 As shown, in S202, the FPGA network card in the NUMA architecture receives the forward message. More specifically, through limited settings, the server of the NUMA architecture is configured with an FPGA network card that supports RSS (Receive Side Scaling). When the forward message in the network arrives at the server, the FPGA network card first captures these messages. The FPGA network card uses its high-speed processing capability and programmability to perform preliminary processing on the message, such as checking and verification.

[0052] In S204, the forward message is sent to its corresponding core packet receiving queue according to the queue strategy.

[0053] The FPGA network card uses RSS technology to calculate a hash value based on the five-tuple of the message (source IP, destination IP, source port, destination port, and protocol type). Then, based on this hash value and the configured queue strategy (such as polling, based on hash modulus, etc.), the message is assigned to the packet receiving queue of the corresponding CPU core.

[0054] It is worth mentioning that each CPU core can have its own packet receiving queue through pre-configuration, which can reduce cache consistency traffic between CPUs and improve overall processing efficiency.

[0055] In S206, the core packet receiving queue determines the destination port according to the service demand and the forwarding strategy. The core packet receiving queue may, for example, determine the destination address according to the service demand; or may, for example, determine the destination port in the destination address according to the forwarding strategy.

[0056] In one embodiment, after the message processing thread running on the CPU core takes out the message from the packet receiving queue, it may, for example, parse the message content, and then determine the destination port of the message according to business requirements and a predefined forwarding policy.

[0057] In S208, the forward message is subjected to network address translation according to the destination port. After determining the destination port of the message, the message processing thread translates the source address or destination address of the message according to the NAT rule. This process may include the translation of private addresses to public network addresses, or port-based multiplexing, etc.

[0058] In S210, after the network address translation, a session is established to forward the forward message. After NAT is completed, the message processing thread establishes or updates the session table in the CPU memory, and records the relevant information of the session (such as source address, destination address, source port, destination port, session status, etc.). Then, according to the forwarding strategy of the session, the message is sent to the corresponding network interface or FPGA for further processing.

[0059] In S212, the session information of the session is flushed to the corresponding FPGA to facilitate reverse message forwarding. For example, the hash value of the forward message and the chip id of the FPGA are recorded; and the session information of the session is flushed to the corresponding FPGA according to the chip id.

[0060] In one embodiment, for example, the FPGA receives a reverse message; sends the reverse message to its corresponding core packet receiving queue according to a queue strategy; and the core packet receiving queue forwards the message according to pre-delivered session information.

[0061] After establishing a session and determining which FPGA the message will be forwarded through, the message processing thread flushes the session information (such as session ID, status, flow information, etc.) to the corresponding FPGA memory. In this way, when a reverse message arrives, the FPGA can directly look up the session information in its memory and forward it quickly.

[0062] In an actual application, when the reverse message arrives at the FPGA network card, the FPGA uses the same queue strategy to send the message to the corresponding CPU core packet receiving queue. The message processing thread on the CPU core quickly searches and matches the pre-delivered session information, and then forwards the message to the correct destination according to the session forwarding strategy.

[0063] According to the message forwarding method for NUMA architecture of the present application, a forward message is received by an FPGA network card in the NUMA architecture; the forward message is sent to its corresponding core packet receiving queue according to the queue strategy; the core packet receiving queue determines the destination port according to the business demand and the forwarding strategy; the network address of the forward message is converted according to the destination port; after the network address conversion, a session is established to forward the forward message; the session information of the session is flushed to the corresponding FPGA to facilitate reverse message forwarding, which can reduce the need for cross-FPGA chip or cross-CPU memory access, reduce the delay and overhead of data exchange, and thus significantly improve the efficiency of message processing and forwarding.

[0064] It should be clearly understood that the present application describes how to form and use specific examples, but the principles of the present application are not limited to any details of these examples. On the contrary, based on the teaching of the content disclosed in the present application, these principles can be applied to many other embodiments.

[0065] Figure 3 It is a flow chart of a message forwarding method for NUMA architecture according to another exemplary embodiment. Figure 3 The process 30 shown is for Figure 2 Supplementary description of the process shown.

[0066] like Figure 3 As shown, in S302, NUMA architecture configuration is performed. Further, it may include: determining that the server supports NUMA architecture; and determining that the FPGA network card supports RSS function.

[0067] In S304, an independent packet receiving queue is allocated to each core of each CPU on the FPGA network card.

[0068] In S306, a corresponding hash value is determined for each packet receiving queue.

[0069] In S308, the queue strategy is generated according to the correspondence between the CPU, the core, the packet receiving queue, and the hash value.

[0070] In actual application scenarios, the FPGA network card can, for example, allocate a packet receiving queue on each core of each CPU, that is, the number of packets received by the network card is equal to the number of cores, so that the messages received from the network port of the network card can be DMAed to the packet receiving queue of any core. When a forward message arrives, the network card RSS function calculates a hash value, takes the remainder of the number of cores, and then DMAs the forward message to the packet receiving queue of the core corresponding to the remainder. The message processing thread running on the current core records the hash value of the forward message and the chip id of the FPGA chip from which it comes.

[0071] Figure 4 The present invention is a flowchart of a message forwarding method for a NUMA architecture according to another exemplary embodiment. Figure 4 The process 40 shown is for Figure 2 The process shown in FIG. 1 is a detailed description of S206 “the core packet receiving queue determines the destination port according to the service demand and the forwarding strategy”.

[0072] like Figure 4 As shown, in S402, the core packet receiving queue determines the destination address according to the service demand.

[0073] In one embodiment, the message processing thread on the current core performs destination NAT on the forward message according to the diversion requirement. The IP address of the destination NAT is configured according to the service, but the destination port is adjustable.

[0074] In S404, the quintuple hash value of the reverse message is determined based on the RSS function. For example, the hash of the reverse quintuple can be calculated according to the hash algorithm of the RSS function of the network card.

[0075] In S406, the destination port in the destination address is determined according to the five-tuple hash value of the reverse message. More specifically, the destination port may be adjusted, for example, so that the hash value of the reverse message is the same as that of the forward message.

[0076] By adjusting the destination port after NAT, the hash calculated with the five-tuple of the recorded forward message is obtained, and this port is used as the final selected port for destination NAT. At this time, the five-tuples of the forward and reverse messages are known, and the CPU can establish a session. At the same time, a copy of the session information is flushed to the corresponding FPGA memory according to the chip id. Subsequent forward messages can find the session on the FPGA and forward it.

[0077] In one embodiment, when a reverse message arrives, if the forward FPGA network card DMAs the message to the queue of the same core as the forward message according to the RSS function, the message processing thread running on the current core can find the session and forward it according to the session forwarding strategy, and the subsequent message processing is similar; if it is not on the forward FPGA network card, the chip id of the FPGA chip from which the reverse message comes is recorded, and a reverse session information is flushed to the memory of the FPGA chip with the chip id. When the subsequent reverse message arrives at the FPGA, it is forwarded by looking up the session information in its memory.

[0078] Figure 5 This article introduces the message forwarding process of a NAT application scenario (single FPGA chip) in load balancing. The specific contents are as follows:

[0079] For example, a user (218.29.50.48) sends an HTTP request to visit the XX website. This HTTP request is placed in a TCP message and then in an IP datagram. The final destination is the LoadBalancer (115.39.19.22) of the XX website, that is, the data packet is 218.29.50.48:3345->115.39.19.22:80.

[0080] When the data packet reaches LB, a forward TCP session 218.29.50.48:3345->115.39.19.22:80 is established. According to the protocol stack forwarding strategy, the real server RS1 needs to be accessed after destination NAT. The data packet is 218.29.50.48:3345->192.168.0.10:Port, that is, the destination port Port is adjustable. It is sent to RS1 after encapsulation.

[0081] RS1 responds with a message of 192.168.0.10:Port->218.29.50.48:3345. When it reaches LB, a reverse TCP session of 192.168.0.10:Port->218.29.50.48:3345 is established. The message is source NATed to 115.39.19.22:80->218.29.50.48:3345 and sent to the client, completing the entire access.

[0082] In summary, a session is established on the LB device, and its forward and reverse directions are as follows:

[0083] 218.29.50.48:3345->115.39.19.22:80

[0084] 192.168.0.10:Port->218.29.50.48:3345

[0085] That is, the hash method is calculated by the network card RSS:

[0086] hash=func(sip,dip,sport,dport,protocol);

[0087] To derive a suitable Port value, so that the hash value calculated by the five-tuple of the forward and reverse messages is the same, that is, this Port is selected as the NAT port.

[0088] This application can solve the problem that when the NUMA function of the multi-channel / multi-band CPU architecture is turned on, for multiple FPGA chips, each new message records which FPGA chip it comes from, and the CPU software accurately refreshes the session only to the memory of the FPGA chip, thereby achieving good performance and not wasting the memory of other FPGA chips. More specifically, this application has the following advantages:

[0089] Since session information is directly stored in the memory of the FPGA chip that processes the message, this technology reduces the need for cross-FPGA chip or cross-CPU memory access, reduces the latency and overhead of data exchange, and thus significantly improves the efficiency of message processing and forwarding.

[0090] This technology simplifies the management of forwarding table entries so that each FPGA chip only processes and maintains session information related to it, reducing the complexity of global management and synchronization, and lowering the overall maintenance cost and error rate of the system.

[0091] By precisely controlling session information on each FPGA chip, this technology helps implement more sophisticated load balancing strategies, ensuring that the system maintains stable performance and responsiveness under high load conditions.

[0092] Since each FPGA chip only processes messages and sessions related to itself, this technology avoids idleness and waste of resources and improves the resource utilization of the overall system.

[0093] By reducing data exchange and dependency across components, this technology reduces the risk of system failure and improves system stability and reliability. At the same time, even if an FPGA chip fails, it will only affect the message processing related to the chip, without causing a catastrophic impact on the entire system.

[0094] Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments are implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, the above functions defined by the above method provided in the present application are executed. The program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0095] In addition, it should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present application, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0096] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0097] Figure 6 FIG. 1 is a block diagram of a message forwarding device for a NUMA architecture according to another exemplary embodiment. Figure 6 As shown, the message forwarding device 60 for NUMA architecture includes: a receiving module 602 , a queue module 604 , a port module 606 , a conversion module 608 , a session module 610 , and a flushing module 612 .

[0098] The receiving module 602 is used for the FPGA network card in the NUMA architecture to receive forward messages;

[0099] The queue module 604 is used to send the forward message to its corresponding core packet receiving queue according to the queue strategy;

[0100] The port module 606 is used for the core packet receiving queue to determine the destination port according to the business requirements and forwarding strategy;

[0101] The conversion module 608 is used to perform network address conversion on the forward message according to the destination port;

[0102] The session module 610 is used to establish a session to forward the forward message after the network address translation;

[0103] The flush module 612 is used to flush the session information of the session to the corresponding FPGA to facilitate reverse message forwarding.

[0104] According to the message forwarding device for NUMA architecture of the present application, a forward message is received through an FPGA network card in the NUMA architecture; the forward message is sent to its corresponding core packet receiving queue according to the queue strategy; the core packet receiving queue determines the destination port according to the business demand and the forwarding strategy; the network address of the forward message is converted according to the destination port; after the network address conversion, a session is established to forward the forward message; the session information of the session is flushed to the corresponding FPGA to facilitate the reverse message forwarding, which can reduce the need for cross-FPGA chip or cross-CPU memory access, reduce the delay and overhead of data exchange, and thus significantly improve the efficiency of message processing and forwarding.

[0105] Figure 7 It is a block diagram of an electronic device according to an exemplary embodiment.

[0106] Refer to the following Figure 7 hereinafter describes an electronic device 700 according to this embodiment of the present application. Figure 7 The electronic device 700 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0107] like Figure 7 As shown, the electronic device 700 is in the form of a general computing device. The components of the electronic device 700 may include, but are not limited to: at least one processing unit 710, at least one storage unit 720, a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710), a display unit 740, etc.

[0108] The storage unit stores a program code, which can be executed by the processing unit 710, so that the processing unit 710 performs the steps described in this specification according to various exemplary embodiments of the present application. For example, the processing unit 710 can perform the following steps: Figure 2 , Figure 3 , Figure 4 Follow the steps shown in .

[0109] The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 7201 and / or a cache memory unit 7202 , and may further include a read-only memory unit (ROM) 7203 .

[0110] The storage unit 720 may also include a program / utility 7204 having a set (at least one) of program modules 7205, such program modules 7205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.

[0111] Bus 730 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0112] The electronic device 700 may also communicate with one or more external devices 700' (e.g., keyboards, pointing devices, Bluetooth devices, etc.) to enable a user to communicate with the electronic device 700, and / or any device (e.g., routers, modems, etc.) that the electronic device 700 can communicate with one or more other computing devices. Such communication may be performed via an input / output (I / O) interface 750. In addition, the electronic device 700 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 760. The network adapter 760 may communicate with other modules of the electronic device 700 via a bus 730. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0113] Through the above description of the implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by combining software with necessary hardware. Figure 8 As shown, the technical solution according to the implementation mode of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the implementation mode of the present application.

[0114] The software product may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0115] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0116] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0117] The computer-readable medium carries one or more programs. When the one or more programs are executed by a device, the computer-readable medium implements the following functions: the FPGA network card in the NUMA architecture receives a forward message; sends the forward message to its corresponding core packet receiving queue according to the queue strategy; the core packet receiving queue determines the destination port according to the business requirements and forwarding strategy; performs network address translation on the forward message according to the destination port; after the network address translation, establishes a session to forward the forward message; and flushes the session information of the session to the corresponding FPGA to facilitate reverse message forwarding.

[0118] Those skilled in the art will appreciate that the above modules can be distributed in the device according to the description of the embodiment, or can be changed accordingly and only used in one or more devices different from the embodiment. The modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.

[0119] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present application.

[0120] The exemplary embodiments of the present application are specifically shown and described above. It should be understood that the present application is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present application is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended claims.

Claims

1. A message forwarding method for NUMA architecture, characterized in that: include: The FPGA network card in the NUMA architecture receives the forward message; Send the forward message to its corresponding core packet receiving queue according to the queue strategy; The core packet receiving queue determines the destination port according to business requirements and forwarding strategies; Performing network address translation on the forward message according to the destination port; After the network address translation, establishing a session to forward the forward message; The session information of the session is flushed to the corresponding FPGA to facilitate reverse message forwarding.

2. The method according to claim 1, characterized in that Before the FPGA network card in the NUMA architecture receives the forward message, it also includes: Perform NUMA architecture configuration; Determines the queue policy for FPGA NICs in NUMA architectures.

3. The method according to claim 2, characterized in that Perform NUMA architecture configuration, including: Determining that the server supports NUMA architecture; Make sure the FPGA network card supports the RSS function.

4. The method according to claim 2, characterized in that Determine the queue strategy for the FPGA NIC in the NUMA architecture, including: Allocate an independent packet receiving queue to each core of each CPU on the FPGA network card; Determine the corresponding hash value for each packet receiving queue; The queue strategy is generated according to the corresponding relationship among CPU, core, packet receiving queue and hash value.

5. The method according to claim 1, characterized in that The core packet receiving queue determines the destination port according to the service requirements and forwarding strategy, including: The core packet receiving queue determines the destination address according to business requirements; Determine the destination port in the destination address based on the forwarding policy.

6. The method according to claim 5, characterized in that Determine the destination port in the destination address based on the forwarding policy, including: Determine the five-tuple hash value of the reverse message based on the RSS function; The destination port in the destination address is determined based on the five-tuple hash value of the reverse message.

7. The method according to claim 6, characterized in that Determine the destination port in the destination address based on the five-tuple hash value of the reverse message, including: Adjust the destination port so that the hash value of the reverse message is the same as that of the forward message.

8. The method according to claim 1, characterized in that The session information of the session is flushed to the corresponding FPGA to facilitate reverse message forwarding, including: Record the hash value of the forward message and the chip ID of the FPGA; The session information of the session is flushed to the corresponding FPGA according to the chip id.

9. The method according to claim 1, characterized in that The session information of the session is flushed to the corresponding FPGA to facilitate reverse message forwarding, including: FPGA receives the reverse message; Send the reverse message to its corresponding core packet receiving queue according to the queue strategy; The core packet receiving queue forwards packets according to the pre-delivered session information.

10. A message forwarding device for NUMA architecture, characterized in that: include: A receiving module, used for receiving forward messages by the FPGA network card in the NUMA architecture; A queue module is used to send the forward message to its corresponding core packet receiving queue according to the queue strategy; A port module, used for the core packet receiving queue to determine the destination port according to business requirements and forwarding strategies; A conversion module, used for performing network address conversion on the forward message according to the destination port; A session module, used for establishing a session to forward the forward message after the network address translation; The flush module is used to flush the session information of the session to the corresponding FPGA to facilitate reverse message forwarding.

Citation Information

Cited By

  • Data transmission method, system and device under multi-NUMA architecture, medium and program product

    CN121770808A