Cloud gateway, method for network adapter, and network adapter

Through the combination of multi-core computing devices and FPGA network adapters, the cloud gateway achieves balanced packet distribution and order-preserving processing, solving the problem of excessive single-core load in the cloud gateway's large-traffic data processing, and improving network data processing capabilities and services. Guarantee of evolution.

WO2024217179A1PCT designated stage expired Publication Date: 2024-10-24HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/080854
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-21
Filing Date
2024-03-08
Publication Date
2024-10-24

AI Technical Summary

Technical Problem

Cloud gateways are prone to excessive single-core load when processing large traffic data, which affects the stability of the cloud network. Moreover, existing technology is difficult to achieve continuous evolution of network services when hardware table resources are limited.

Method used

Use multi-core computing equipment combined with FPGA-based network adapters to achieve balanced distribution and order-preserving processing of messages through bus connections, use multiple processor cores to process messages, and ensure the return of messages through message sequence information and sliding window mechanisms. Send in order.

Benefits of technology

It achieves the high performance and flexibility of the cloud gateway, avoids the high risk of single flow and single core, improves network data processing capabilities and service evolution guarantees, solves the risk of elephant flow, and achieves performance, table specification and flexibility. Take into consideration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024080854_24102024_PF_FP_ABST
    Figure CN2024080854_24102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a cloud gateway, a method for a network adapter, and a network adapter. The cloud gateway comprises a computing device and a network adapter connected to the computing device by means of a bus. The computing device comprises a plurality of processor cores configured to receive transmission packets from the network adapter, and the processor cores process the transmission packets and return the obtained return packets to the network adapter. The network adapter processes packets received from a network into transmission packets and distributes the packets one by one among the plurality of processor cores in a balanced manner, and sends out the return packets from the computing device in an order-preserving manner. The cloud gateway of the present application combines the flexibility of a multi-core computing device and the high performance of a network adapter, thereby providing better guarantees for entry specifications and service evolution.
Need to check novelty before this filing date? Find Prior Art

Description

Cloud gateway, method for network adapter, and network adapter

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 21, 2023, with application number CN 2023104514395 and invention name “Cloud Gateway and Method for Network Adapter and Network Adapter”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present invention relates to the field of network technology, and in particular to a cloud gateway, a method for a network adapter, and a network adapter. Background Art

[0003] With the development of internet technology, cloud networks and cloud computing have gradually become important network infrastructure. As a network architecture based on cloud computing and virtualization technologies, cloud networks transform physical resources (such as servers, storage, and networks) into virtual resources via the internet and provide them to users as services. As a network device, cloud gateways primarily connect local networks with cloud services, providing a secure connection across the public internet. Cloud gateways connect cloud service providers' public cloud services with enterprises' local data centers, enabling secure data transmission and management. Cloud gateways are the core forwarding nodes in cloud networks, characterized by being stateless and capable of handling large volumes of data. Therefore, as cloud networks carry increasing amounts of data, higher requirements are placed on the processing capabilities of cloud gateways.

[0004] Summary of the Invention

[0005] The present application aims to provide a cloud gateway and a method for a network adapter and a network adapter, which combine the flexibility of a multi-core computing device and the high performance of a network adapter, and provide better guarantees in terms of table item specifications and service evolution.

[0006] According to one aspect of the present application, a cloud gateway is provided, comprising a computing device and a network adapter connected to the computing device via a bus, wherein: the computing device comprises a plurality of processor cores configured to receive uplink messages from the network adapter, the processor cores processing the uplink messages and returning the obtained return messages to the network adapter; the network adapter processes messages received from the network into uplink messages and distributes them message by message among the plurality of processor cores in a balanced manner, and sends out the return messages from the computing device in an order-preserving manner.

[0007] According to some embodiments, the network adapter includes: a message scheduling module, which is used to evenly distribute the messages received from the network among the multiple processor cores one by one, and to add numbers to the uploaded messages sent to the computing device, and the return messages contain the numbers; a message sequence preservation module, which is used to send the return messages of the computing device in the order in which the uploaded messages are sent to the computing device.

[0008] According to some embodiments, the message sequence preservation module is configured to: maintain a sliding window of message sequence information according to the sending order of the uploaded messages, the message sequence information including the number of the uploaded messages; determine the window position of the return message according to the number in the return message; if the return message is located at the starting position of the sliding window, send the return message and slide the sliding window in the direction of increasing the window position; if the return message is located at the non-starting position of the sliding window, then after the return messages on the side of the window position decreasing direction of the non-starting position have arrived and been sent out, send the return message at the non-starting position and slide the sliding window in the direction of increasing the window position.

[0009] According to some embodiments, the sent message only includes a message header but no message payload.

[0010] According to some embodiments, the network adapter further comprises: a parsing module for parsing a message received from the network to extract a message header and a message payload; a payload cache module for storing the message payload and the return message; and a reassembly module for reassembling the return message and the message payload for sending.

[0011] According to some embodiments, the message sequence information further includes a confirmation identifier and a message sending timestamp.

[0012] According to some embodiments, the network adapter further comprises: a timeout polling module for periodically polling the message sequence information, comparing the uploaded timestamp with the local clock, and when the difference between the uploaded timestamp and the local clock exceeds a threshold, confirming that the return message has timed out and clearing the information in the corresponding window.

[0013] According to some embodiments, the processor core is used to convert the uploaded message into a VxLAN encapsulated message.

[0014] According to some embodiments, the cloud gateway includes an Internet gateway, a dedicated line gateway and / or a virtual private cloud gateway.

[0015] According to some embodiments, the network adapter comprises a network adapter implemented based on an FPGA.

[0016] According to another aspect of the present application, a method for a network adapter is provided, wherein the network adapter is connected to a computing device including multiple processor cores via a bus, the method comprising: processing a message received from a network into an uplink message, wherein the uplink message includes a number; distributing the uplink message one by one among the multiple processor cores in a balanced manner; receiving a return message from the computing device, wherein the return message includes the number; and sending the return message in the order in which the uplink messages were sent to the computing device.

[0017] According to some embodiments, the return message is sent out in the order in which the uploaded messages are sent to the computing device, including: maintaining a sliding window of message sequence information according to the order in which the uploaded messages are sent, the message sequence information including the number of the uploaded message; determining the window position of the return message according to the number in the return message; if the return message is located at the starting position of the sliding window, sending the return message and sliding the sliding window in the direction of increasing the window position; if the return message is located at a non-starting position of the sliding window, then after all the return messages on the side of the window position decreasing direction of the non-starting position have arrived and been sent out, sending the return message at the non-starting position and sliding the sliding window in the direction of increasing the window position.

[0018] According to another aspect of the present application, a FPGA-based network adapter is provided, which is connected to a computing device including multiple processor cores via a bus. The network adapter includes: a logic unit; and a storage unit storing an operation program, which implements any of the aforementioned methods when the operation program is executed by the logic unit.

[0019] According to another aspect of the present application, a non-transitory computer-readable storage medium is provided, on which computer-readable instructions are stored. When the instructions are executed by a processor, the processor executes the cloud gateway as described in any one of the above items.

[0020] According to an embodiment of the present application, a cloud gateway includes a computing device and a network adapter connected to the computing device via a bus. The computing device includes multiple processor cores configured to receive uplink messages from the network adapter. The processor cores process the uplink messages and return the resulting return messages to the network adapter, thereby utilizing the computing device to evolve service capabilities and providing excellent network data processing flexibility. Simultaneously, the network adapter connected to the computing device via the bus processes messages received from the network into uplink messages and distributes them message by message among the multiple processor cores in a balanced manner, achieving high performance. In this way, the cloud gateway combines the flexibility of a multi-core computing device with the high performance of a network adapter, providing better guarantees for table entry specifications and service evolution.

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

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments.

[0023] FIG1 shows a schematic diagram of a cloud network structure according to an example embodiment.

[0024] FIG2 shows a schematic diagram of a cloud gateway according to an example embodiment.

[0025] FIG3A illustrates a single-layer message format according to an example embodiment.

[0026] FIG3B illustrates a double-encapsulation message format according to an example embodiment.

[0027] FIG4 shows a schematic block diagram of a network adapter according to an example embodiment.

[0028] FIG. 5 shows a message format with numbers attached as path-associated element information according to an exemplary embodiment.

[0029] FIG6 shows a schematic diagram of a sliding window order-preserving design of a message order-preserving module according to an example embodiment.

[0030] FIG7 illustrates a flow chart of a method for a network adapter according to an example embodiment.

[0031] FIG8 illustrates an FPGA-based network adapter according to an example embodiment. DETAILED DESCRIPTION

[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. Like reference numerals in the drawings represent like or similar parts, and thus repetitive description thereof will be omitted.

[0033] In addition, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. 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 solutions of the present application may be practiced without one or more of the specific details, or other cloud gateways, components, devices, steps, etc. may be employed. In other cases, known cloud gateways, devices, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of the present application.

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

[0035] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0036] 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. Thus, the first component discussed below could be referred to as the second component without departing from the teachings of the present invention. As used herein, the term "and / or" includes any one and all combinations of one or more of the associated listed items.

[0037] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0038] Those skilled in the art will understand 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] Before describing the technical solution of this application, some terms involved in this application are explained.

[0040] VPC (Virtual Private Cloud) is a cloud computing technology that uses virtualization to carve out a "virtual private network segment" within the public cloud. Virtual machines, storage, network devices, and other resources are deployed within this segment, giving it "private cloud" features similar to those of a local data center. VPC provides a secure isolation method. Users can create their own subnets within the VPC and communicate using private IP addresses within the VPC. VPC can also be used to connect public clouds and local resources, enabling interoperability between public and private clouds.

[0041] VxLAN (Virtual Extensible LAN) is a network virtualization technology used to create overlay networks in data center networks. VxLAN is a transparent, data center-oriented Layer 2 protocol that can run on existing TCP / IP networks. VxLAN alleviates the limitations of the limited number of VLANs and provides scalable virtual networks to provide more flexible cloud computing and virtualized networks in the data center. Using VXLAN technology, different VPC environments can be connected into a virtual network, enabling higher-level cloud computing applications.

[0042] Cloud Gateway: A forwarding node in the data center gateway category that serves as a traffic aggregation point. As a key component of a cloud gateway, the forwarding gateway plays a crucial role in the cloud network, enabling cross-VPC communication, supporting cross-region communication, and implementing IP address mapping, among other functions.

[0043] Load balancing: distribute traffic evenly across multiple computing devices.

[0044] Order preservation: Maintaining the order of messages. In network communications, this is a technique or mechanism that ensures that messages are sent and received in the same order.

[0045] IGW: Internet gateway.

[0046] CGW: Customer gateway, dedicated line gateway.

[0047] VGW: VPC gateway, gateway within a VPC.

[0048] FPGA (Field Programmable Gate Array) is a programmable logic device that can be programmed and reconfigured according to user needs to implement a variety of digital circuit functions. Compared to application-specific integrated circuits (ASICs), FPGAs offer greater flexibility and programmability because they can be reprogrammed and reconfigured after production. FPGAs consist of programmable logic cells, input and output blocks, a programmable interconnect network, and configuration memory, enabling parallelism and high efficiency.

[0049] Service Evolution: Service evolution in network equipment refers to the continuous updating and upgrading of network equipment to provide users with more comprehensive, efficient, secure, and reliable network services and adapt to evolving network needs and application scenarios. This process encompasses changes and innovations at multiple levels, including hardware, software, and protocols. Examples include the intelligentization, virtualization, and cloudification of devices like switches, routers, and firewalls; the iteration and optimization of network protocols; and improvements in security, reliability, and performance. Service evolution in network equipment makes networks more stable, flexible, and reliable in an ever-changing world, providing users with a better service experience. Software-based implementation of service evolution in network equipment is easier because software allows for flexible functional expansion and upgrades through programming. Network device software can be upgraded through firmware and driver updates, and this is relatively cost-effective. In contrast, hardware-based implementation of service evolution in network equipment is more challenging because the hardware requires redesign and production, which is costly and requires consideration of hardware compatibility and stability.

[0050] The cloud gateway is the core forwarding node of the cloud network, characterized by being stateless and handling large amounts of traffic. Traditional forwarding solutions based on X86 and DPDk (Data Plane Development Kit) directly deploy gateways such as IGW, CGW, and VGW on the X86. The multi-core X86 serves as the computing unit responsible for processing job tasks. The X86 is highly flexible and can rapidly support service evolution, but the processing power of a single X86 core is limited. When hashing packets to a specific CPU core according to data flow, due to the cloud gateway's role as a core node and the high data flow, it is very easy to encounter the risk of single-core overload (single-core overload) in large data flow (elephant flow) scenarios, affecting the online stability of cloud network operations.

[0051] Solutions based on network processors (such as TOFINO) leverage the programmability and high performance of programmable switching chips, offering high performance without the risk of single-core performance issues. However, chip table resources are limited. While performance is guaranteed, factors such as hardware table resource limitations hinder the continued evolution of network service capabilities.

[0052] To this end, this application proposes a new cloud gateway system that uses computing devices (e.g., based on X86) to evolve service capabilities and has good network data processing flexibility. At the same time, high performance is achieved by using a network adapter connected to the computing device via a bus. Therefore, the cloud gateway system of this application supports high performance and large table entries, has good flexibility, and has the characteristics of continuous evolution. In addition, the cloud gateway system of this application has good integration and does not require architectural modifications to the existing cloud network.

[0053] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0054] FIG1 shows a schematic diagram of a cloud network structure according to an example embodiment.

[0055] As shown in Figure 1, when an external message is sent to the cloud network to access the private cloud, it first enters the integrated switch from the core router. The integrated switch forwards the message to a connected forwarding gateway (for example, an IGW, VGW, or CGW). The forwarding gateway processes and forwards the message before sending it to the load balancing device.

[0056] For example, according to some embodiments, a forwarding gateway (e.g., an IGW, VGW, or CGW) converts a packet into a VxLAN encapsulated packet. For example, assuming a public network user in the cloud accesses a public IP address, when accessing a virtual private cloud service in the cloud, it needs to be converted into a VxLAN encapsulated packet. In VxLAN, a data packet is encapsulated in an outer UDP packet, called a VxLAN packet. A VxLAN packet contains three main parts: an outer IP header, a UDP header, and an inner packet. The VNI is part of the inner packet and is used to identify the virtual network. The outer IP header is the first part of the VxLAN packet and contains the source IP address and the destination IP address. The source IP address is the IP address of the sender, and the destination IP address is the IP address of the receiver. The outer IP header is used to transmit the VxLAN packet from one physical network to another. The inner IP is the second part of the VxLAN packet and contains the source and destination addresses of the inner packet. In a VxLAN network, the inner IP refers to the IP address of the virtual machine or virtual machine group, also known as the inner IP address. Because the inner IP address is encapsulated in a VxLAN packet, it does not directly participate in network transmission. When a computing device encapsulates an inner packet in a VxLAN packet, it uses the VNI and the inner MAC address to generate a VxLAN MAC address, a process called VxLAN MAC address translation. Each VNI has a unique VxLAN MAC address space, uniquely identifying each virtual network in the VxLAN network. Conversely, when a packet is sent from a virtual private cloud to the public network, the virtual private cloud instance sends the packet to the VxLAN interface, which encapsulates the packet using a VxLAN header. The encapsulated packet is routed to the forwarding gateway, which removes the outer VxLAN header and sends the packet to the internet. The packet traverses the public internet and reaches its destination.

[0057] The load balancing device selects a virtual server based on the load balancing algorithm to send the packet to. To do this, the load balancing device forwards the packet to the distribution layer switch. The distribution layer switch sends the packet to the aggregation switch, which sends the packet to the access switch. The access switch sends the packet to the virtual gateway, which then sends the packet to the corresponding virtual server.

[0058] It is easy to understand that the structure and process shown in Figure 1 are for illustrative purposes only and are not intended to limit the application scenarios of the technical solution of this application. The technical solution of this application can be applied to forwarding nodes in various cloud network topologies, such as IGW, CGW, VGW, etc.

[0059] Figure 2 shows a schematic diagram of a cloud gateway according to an example embodiment. As shown in Figure 2, the cloud gateway includes a computing device 30 and a network adapter 16. According to some embodiments, the computing device 30 is a general-purpose computing device based on a multi-core X86. The cloud gateway according to the example embodiment can be the forwarding gateway described above with reference to Figure 1.

[0060] 2 , the computing device 30 includes a processor 12 and a memory 14 , as well as a bus 22 and an I / O interface 18 . The processor 12 , the memory 14 , and the I / O interface 18 can communicate with each other via the bus 22 .

[0061] The memory 14 may include machine-readable media in the form of volatile memory, such as random access memory (RAM), read-only memory (ROM), solid-state memory, and / or cache memory. The memory 14 is used to store one or more programs including instructions and data.

[0062] The processor 12 may include one or more processor cores for executing relevant program instructions.

[0063] According to an example embodiment, the computing device 30 includes a plurality of processor cores configured to receive uplink messages from the network adapter 16 . The processor cores that receive the uplink messages process the uplink messages and return the resulting return messages to the network adapter 16 .

[0064] According to the example embodiment, the processor core that receives the uploaded message converts the uploaded message into a VxLAN encapsulated message. For example, assuming that a public network user in the cloud accesses a public IP address, this public IP is the destination IP, and the message is in a single-layer format (see Figure 3A). ETH represents the Ethernet frame header, IP represents the IP message header, TCP represents the TCP message header, and payload represents the application data carried by the message.

[0065] When accessing virtual private cloud services on the cloud, packets must be converted to VxLAN encapsulated packets (see Figure 3B). The outer VxLAN and the inner new IP (nuIP) are obtained through a table lookup. For example, the table lookup can use the packet's five-tuple (source IP, destination IP, protocol type, source port, and destination port) as a key. The result is the VNI (Virtual Network Identifier) ​​of the outer VxLAN encapsulation, the outer IP2, and the new inner IP (nuIP). This table contains a large number of entries. The VNI is used to transmit packets between different physical networks, enabling communication between different virtual networks. In VxLAN, packets are encapsulated in an outer UDP packet, called a VxLAN packet. A VxLAN packet consists of three main parts: an outer IP header (IP2 in Figure 3B), a UDP header, and an inner data packet. The VNI is part of the inner data packet and is used to identify the virtual network. The outer IP header is the first part of the VxLAN packet and contains the source and destination IP addresses. The source IP address is the IP address of the sender, and the destination IP address is the IP address of the receiver. The outer IP header is used to transmit VxLAN packets from one physical network to another. The inner IP is the second part in the VxLAN packet, which contains the source and destination addresses of the inner packet. In a VxLAN network, the inner IP refers to the IP address of a virtual machine or a group of virtual machines, also known as the inner IP address. Since the inner IP is encapsulated in the VxLAN packet, it does not directly participate in network transmission. When the computing device encapsulates the inner packet in a VxLAN packet, it uses the VNI and the inner MAC address to generate a VxLAN MAC address (ETH2), which is called VxLAN MAC address translation. Each VNI has a unique VxLAN MAC address space, which uniquely identifies each virtual network in the VxLAN network.

[0066] According to an example embodiment, the inner IP of a VxLAN packet is obtained from the original IP by the computing device 30 through a lookup table. The mapping between the original IP address and the inner IP address is stored in a lookup table called a VxLAN forwarding table. When the computing device 30 receives a packet, it checks the sender's original IP address, then looks up the corresponding table entry to determine the VNI associated with the original IP address, and then uses the VNI to create a mapping between the original IP address and the inner IP address. Once the VNI is determined, the computing device 30 can use it to encapsulate an additional VxLAN header, which includes the inner IP address associated with the VNI.

[0067] The network adapter 16 can be connected to the computing device via a bus (e.g., a PCIe bus). The network adapter 16 processes the messages received from the network into uplink messages and distributes them message by message among multiple processor cores in a balanced manner, and sends the return messages from the computing device 30 in order. For example, the network adapter 16 processes the messages received from the network into uplink messages, and the uplink messages include numbers. Then, the uplink messages are distributed message by message among multiple processor cores in a balanced manner. After receiving the return messages from the computing device, the return messages can be sent out in the order in which the uplink messages are sent to the computing device. According to some embodiments, the network adapter 16 can be implemented based on FPGA, using the programmable capabilities of FPGA to achieve high-performance acceleration characteristics that combine software and hardware.

[0068] Thus, the cloud gateway according to this exemplary embodiment combines the flexibility of multi-core computing devices with the high performance of network adapters, providing better guarantees for table entry specifications and service evolution. Furthermore, the network adapter implements per-packet load balancing and order preservation, mitigating the risk of large traffic flows and achieving a balance between performance, table entry specifications, and flexibility.

[0069] Figure 4 shows a schematic block diagram of a network adapter according to an example embodiment. Referring to Figure 4, the network adapter 16 includes a message scheduling module 401 and a message sequence preservation module 405. According to an example embodiment, the network adapter 16 communicates with the computing device 30 via a PCIe (Peripheral Component Interconnect Express) bus.

[0070] The message dispatching module 401 distributes the messages received from the network evenly among the multiple processor cores (e.g., cores 0 to 4) of the computing device 30, and averages the load of each core in a balanced manner, thereby avoiding the problem of single-stream single-core load being high. For example, assuming that the CPU has 4 cores (cores 0 to 4), the first incoming message is distributed to core 0, the second incoming message is distributed to core 1, the third incoming message is distributed to core 2, and the fourth incoming message is distributed to core 3.

[0071] According to some embodiments, when network adapter 16 performs load balancing across CPU cores, it typically utilizes multiple hardware queues. These hardware queues can be configured to match the available CPU cores. Each hardware queue is assigned to a specific CPU core, allowing network adapter 16 to distribute network processing across multiple cores, thereby more efficiently utilizing resources and improving network performance.

[0072] After per-packet load balancing, the processing delay of each core may vary slightly, resulting in inconsistent ordering of messages sent and returned. Network adapter 16 can provide a sequence-preserving function. To this end, according to an exemplary embodiment, message scheduling module 401 also assigns a number to messages sent to computing device 30, and messages returned from computing device 30 also include this number to track and preserve message order. For example, referring to Figure 5 , messages sent to the CPU core are assigned a PSN as path-based metadata, which is used for subsequent message tracking and sequence preservation.

[0073] The message sequence preservation module 405 transmits the return message from the computing device 30 in the order in which the message was sent to the computing device 30, thereby preserving the message sequence. After processing the message, the CPU core returns the message along with the PSN to the network adapter 16. The network adapter 16 compares the PSN to determine whether the message is returned in order. If the message meets the order specified by the sender, it can be directly transmitted. If not, it can be temporarily stored and transmitted when the message's turn arrives.

[0074] Referring again to FIG. 4 , according to some embodiments, the network adapter 16 may further include a parsing module 407 , a payload buffering module 409 , and a reassembly module 411 .

[0075] To improve the single-core processing performance of computing device 30, packets sent to the CPU core can include only headers, without payloads. The payloads are stored on network adapter 16. To this end, parsing module 407 parses packets received from the network, extracting the headers and payloads. Payload buffer module 409 stores the payloads and messages returned by computing device 30. Reassembly module 411 reassembles the returned packets and payloads for transmission.

[0076] According to an example embodiment, the network adapter includes an FPGA-based implementation, which has higher flexibility and programmability than an application-specific integrated circuit, and has a great cost advantage for the purpose of implementing the network adapter of the present application.

[0077] In this way, the network adapter according to the exemplary embodiment achieves message balancing and order preservation, solves the problem of large flows by combining with a computing device, and achieves a balance among performance, table entry specifications, and flexibility.

[0078] Figure 6 illustrates a schematic diagram of a sliding window design for a message sequence preservation module according to an example embodiment. Referring to Figure 6 , to implement the sequence preservation function, the message sequence preservation module maintains a sliding window of message sequence information based on the order in which the messages are sent. This message sequence information includes the message sequence number (PSN) of the sent message, and may also include an acknowledgment flag (ACK) (ACK=1 indicates the message has been returned) and the message sending timestamp (TO). The sliding window uses left and right pointers to mark the left and right boundaries of the window, which then slides.

[0079] After the CPU core processes the sent message and returns the message together with the number PSN to the network adapter 16, the network adapter 16 can determine the window position of the returned message according to the number in the returned message, for example, by comparing the number PSN.

[0080] If the return message is located at the starting position of the sliding window, the return message can be sent and the sliding window can be slid in the direction of increasing window position. For example, referring to Figure 6, if the return message is located at the window position pointed to by the tail pointer Tail, the return message can be sent and the window can be slid to the right, that is, the pointer Tail slides one window to the right.

[0081] If the return message is located at a non-starting position of the sliding window, then after all return messages on the side of the non-starting position that decreases the window position have arrived and been sent, the return message at the non-starting position is sent, and the sliding window is slid in the direction of increasing the window position. For example, referring to FIG6 , if the return message is located at the second window position of the sliding window (ACK=1), the sliding window does not slide until all return messages on the left side have arrived and been sent. Only then is the return message at the second window position sent, and the sliding window is slid to the right, that is, the pointer Tail slides one window to the right.

[0082] According to some embodiments, the network adapter includes a timeout polling module. To prevent module hangs in the event of a message loss, timeout polling can be implemented using an upload timestamp. When a message is uploaded to the CPU core of the computing device, the upload timestamp TO is recorded. The timeout polling module periodically polls message sequence information and compares the upload timestamp with the local clock. When the difference between the upload timestamp and the local clock exceeds a threshold, the module confirms that the return message has timed out and clears the information in the corresponding window.

[0083] FIG7 illustrates a flow chart of a method for a network adapter according to an exemplary embodiment. A network adapter implementing the method illustrated in FIG7 is connected to a computing device including multiple processor cores via a bus. As illustrated in FIG7 , at S701, a message received from a network is processed into an uplink message, where the uplink message includes a serial number.

[0084] According to some embodiments, a number is attached to the uploaded message, and the message returned from the computing device also contains the number, so as to track and maintain the order of the message. The delay of the computing device in processing the verification message may have slight differences, resulting in the problem of inconsistent order of message upload and return. To this end, a number can be attached to the uploaded message sent to the computing device, and the message returned from the computing device also contains the number, so as to track and maintain the order of the message. For example, referring to Figure 5, the uploaded message sent to the CPU core is attached with the number PSN as the path element information, which is used for subsequent tracking and maintaining the order of the message.

[0085] According to some embodiments, to improve the single-core processing performance of a computing device, the message sent to the CPU core can only carry a message header, without a payload, and the payload is stored on the network adapter. To this end, the message received from the network is parsed to extract the message header and message payload.

[0086] In S703 , the transmitted messages are distributed among the multiple processor cores in a balanced manner one by one.

[0087] For example, if the CPU has four cores (cores 0 to 4), the first incoming packet is distributed to core 0, the second incoming packet is distributed to core 1, the third incoming packet is distributed to core 2, and the fourth incoming packet is distributed to core 3. By balancing the load on each core, the problem of high traffic on a single core due to a single flow can be avoided.

[0088] At S705 , a return message from the computing device is received, where the return message includes a number.

[0089] According to some embodiments, after the CPU core processes the sent message and returns the message together with the number to the network adapter, the network adapter may determine whether the message is returned in sequence according to the number in the returned message.

[0090] In S707 , the return messages are sent out in the order in which the sent messages are sent to the computing device.

[0091] According to some embodiments, the return message and the message payload are reassembled for transmission. According to some embodiments, S707 includes the following processing: maintaining a sliding window of message sequence information according to the order in which the messages are transmitted, the message sequence information including the numbers of the transmitted messages; determining the window position of the return message according to the numbers in the return message; if the return message is located at the starting position of the sliding window, sending the return message and sliding the sliding window in the direction of increasing the window position; if the return message is located at a non-starting position of the sliding window, after all the return messages on the side of the non-starting position in the direction of decreasing the window position have arrived and been sent, sending the return message at the non-starting position and sliding the sliding window in the direction of increasing the window position.

[0092] According to some embodiments, to implement the order preservation function, a sliding window of message sequence information can be maintained according to the order in which the uploaded messages are sent. The message sequence information includes the PSN of the uploaded message, and may also include an acknowledgment mark ACK (ACK=1 indicates that the message has been returned) and the message sending timestamp TO. The sliding window uses left and right pointers to mark the left and right boundaries of the window, and then the left and right pointers move to form a sliding window. After the CPU core processes the uploaded message and returns the message along with the PSN to the network adapter, the network adapter can determine the window position of the returned message based on the number in the returned message. For example, the window position of the returned message can be determined by comparing the PSN. If the returned message is located at the starting position of the sliding window, the returned message can be sent, and the sliding window can be slid in the direction of increasing window position. For example, referring to Figure 6, if the returned message is located at the window position pointed to by the tail pointer Tail, the returned message can be sent, and the window slides to the right, that is, the pointer Tail slides one window to the right. If the return message is located at a non-starting position of the sliding window, then after all the return messages on the side of the window position decreasing direction of the non-starting position have arrived and been sent, the return message at the non-starting position is sent out, and the sliding window is slid in the direction of increasing the window position. For example, referring to Figure 6, if the return message is located at the second window position of the sliding window (ACK=1), the sliding window does not slide until all the return messages at the left position have arrived and been sent out, and then the return message at the second window position is sent out, and the sliding window is slid to the right, that is, the pointer Tail slides one window to the right. According to some embodiments, in order to prevent the module from hanging in the event of a message being lost, a timeout polling can be implemented using an uploaded timestamp. When a message is uploaded to the CPU core of a computing device, the uploaded timestamp TO can be recorded. By periodically polling the message sequence information, the uploaded timestamp is compared with the local clock. When the difference between the uploaded timestamp and the local clock exceeds a threshold, it can be confirmed that the return message has timed out and the information in the corresponding window is cleared.

[0093] Figure 8 illustrates an FPGA-based network adapter according to an exemplary embodiment. The network adapter according to the exemplary embodiment is connected to a computing device including multiple processor cores via a bus. Referring to Figure 8 , the network adapter according to the exemplary embodiment includes a logic unit 801 and a storage unit 803. Storage unit 803 stores a computing program. When the computing program is executed by logic unit 801, the method of the aforementioned embodiment of the present application is implemented.

[0094] For example, the logic unit 801 is configured to process a message received from the network into an uplink message according to the instructions stored in the storage unit 803 , where the uplink message includes a number.

[0095] According to some embodiments, a number is attached to the uploaded message, and the message returned from the computing device also includes the number, so as to track and maintain the order of the message. There may be slight differences in the delay of the computing device in processing the verification message, resulting in the problem of inconsistent order of message upload and return. To this end, the logic unit 801 can be configured to attach a number to the uploaded message sent to the computing device, and the message returned from the computing device also includes the number, so as to track and maintain the order of the message. For example, referring to Figure 5, the uploaded message sent to the CPU core is attached with the number PSN as the path element information, which is used for subsequent tracking and maintaining the order of the message.

[0096] According to some embodiments, to improve the single-core processing performance of a computing device, the message sent to the CPU core may only carry a message header, without a payload, and the payload is stored on the network adapter. To this end, the logic unit 801 may be configured to parse the message received from the network and extract the message header and message payload.

[0097] The logic unit 801 is further configured to process the message received from the network into an uplink message according to the instructions stored in the storage unit 803, wherein the uplink message includes a serial number and distribute the uplink message one by one among the multiple processor cores in a balanced manner.

[0098] For example, assuming the CPU has four cores (cores 0 to 4), the logic unit 801 can be configured to distribute the first incoming packet to core 0, the second incoming packet to core 1, the third incoming packet to core 2, and the fourth incoming packet to core 3. This balance can average the load on each core and avoid the problem of high traffic on a single core due to a single flow.

[0099] The logic unit 801 is further configured to receive a return message from the computing device according to the instructions stored in the storage unit 803 , where the return message includes a serial number.

[0100] According to some embodiments, after the CPU core processes the sent message and returns the message together with the number to the network adapter, the logic unit 801 may be configured to determine whether the message is returned in sequence according to the number in the returned message.

[0101] The logic unit 801 is further configured to send the return message in the order in which the uplink message was sent to the computing device according to the instructions stored in the storage unit 803. According to some embodiments, the logic unit 801 is configured to reassemble the return message and the message payload for sending.

[0102] According to some embodiments, to implement the order preservation function, the logic unit 801 can be configured to maintain a sliding window of message sequence information according to the order in which the messages were sent. The message sequence information includes the sent message number (PSN), and may also include an acknowledgment flag (ACK) (ACK = 1 indicates that the message has been returned) and the message sending timestamp (TO). The sliding window uses left and right pointers to mark the left and right boundaries of the window, and the left and right pointers move to form a sliding window. After the CPU core processes the sent message and returns the message along with the number (PSN) to the network adapter, the logic unit 801 can be configured to determine the window position of the return message based on the number in the returned message. For example, the window position of the return message can be determined by comparing the number (PSN). If the return message is located at the starting position of the sliding window, the return message can be sent and the sliding window can be slid in the direction of increasing window position. For example, referring to Figure 6, if the return message is located at the window position pointed to by the tail pointer (Tail), the logic unit 801 can be configured to send the return message and slide the window to the right, that is, the pointer (Tail) slides one window to the right. If the return message is located at a non-starting position of the sliding window, then after all the return messages on the side of the window position decreasing direction of the non-starting position have arrived and been sent, the logic unit 801 can be configured to send the return message at the non-starting position and slide the sliding window in the direction of increasing the window position. For example, referring to Figure 6, if the return message is located at the second window position of the sliding window (ACK=1), the sliding window does not slide until all the return messages at the left position have arrived and been sent, and then the return message at the second window position is sent, and the sliding window slides to the right, that is, the pointer Tail slides one window to the right. According to some embodiments, in order to prevent the module from hanging in the event of a message being lost, the logic unit 801 can be configured to implement timeout polling using the uploaded timestamp. When the message is uploaded to the CPU core of the computing device, the uploaded timestamp TO can be recorded. By periodically polling the message sequence information, the uploaded timestamp is compared with the local clock. When the difference between the uploaded timestamp and the local clock exceeds the threshold, it can be confirmed that the return message has timed out and the information in the corresponding window is cleared.

[0103] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0104] Through the description of the example embodiments, it is easy for those skilled in the art to understand that the technical solutions according to the embodiments of the present application have at least one or more of the following advantages.

[0105] According to the embodiment, the service capability is evolved by using a computing device (e.g., based on X86), which provides good flexibility in network data processing. At the same time, high performance is achieved by using a network adapter connected to the computing device via a bus.

[0106] According to the embodiment, the cloud gateway combines the flexibility of a multi-core computing device and the high performance of a network adapter, providing better guarantees in terms of table item specifications and service evolution.

[0107] According to the embodiment, load balancing and order preservation on a packet-by-packet basis are achieved through a network adapter, which can solve the risk of large flows, achieve a balance between performance, table entry specifications, and flexibility, and avoid the problem of single-flow single-core high traffic.

[0108] According to the embodiment, a cloud gateway is implemented by using a computing device and an FPGA-based network adapter, which has good flexibility and integration, and does not require architectural modification of the existing cloud network.

[0109] According to the embodiment, the network adapter realizes message balancing and order preservation, solves the problem of large flows by combining with computing equipment, and achieves a balance among performance, table entry specifications, and flexibility.

[0110] According to an embodiment, the network adapter includes an FPGA-based implementation, which has higher flexibility and programmability than a dedicated integrated circuit, and has a great cost advantage in terms of the implementation purpose of the network adapter of the present application.

[0111] It should be noted that, during the specific implementation process, the above technical solution may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the embodiment of this specification, and does not necessarily include all the components shown in the figure.

[0112] It should be noted that, for the sake of simplicity, the aforementioned embodiments are described as a series of action combinations. However, those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0113] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interface, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0114] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0115] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0116] Those skilled in the art will clearly understand that the technical solutions of this application can be implemented with the aid of software and / or hardware. "Unit" and "module" in this specification refer to software and / or hardware that can independently perform specific functions or cooperate with other components to perform specific functions. Examples of hardware include field programmable gate arrays and integrated circuits.

[0117] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the cloud gateway in each embodiment of the present application.

[0118] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above method. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a microdrive and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), a network storage device, a cloud storage device, or any type of medium or device suitable for storing instructions and / or data.

[0119] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any one of the methods described in the above embodiments.

[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 structure, configuration or implementation of the cloud gateway described herein; on the contrary, the present application is intended to cover various modifications and equivalent configurations included within the spirit and scope of the appended clauses.

Claims

1. A cloud gateway, characterized in that: The invention comprises a computing device and a network adapter connected to the computing device via a bus, wherein: The computing device includes a plurality of processor cores configured to receive an upward message from the network adapter, the processor cores processing the upward message and returning the obtained return message to the network adapter; The network adapter processes the messages received from the network into uplink messages, distributes them message by message among the multiple processor cores in a balanced manner, and sends out the return messages from the computing device in an order-preserving manner.

2. The cloud gateway according to claim 1, characterized in that: The network adapter includes: A message scheduling module, used for evenly distributing messages received from the network among the multiple processor cores one by one, and adding numbers to the messages sent to the computing device, wherein the return messages contain the numbers; The message sequence preservation module is used to send out the return messages of the computing device in the order in which the sent messages are sent to the computing device.

3. The cloud gateway according to claim 2, characterized in that: The message sequence preservation module is configured as follows: Maintaining a sliding window of message sequence information according to the order in which the messages are sent, wherein the message sequence information includes the serial number of the messages sent; Determine the window position where the returned message is located according to the number in the returned message; If the return message is located at the starting position of the sliding window, sending the return message and sliding the sliding window in a direction in which the window position increases; If the return message is located at a non-starting position of the sliding window, after all the return messages on the direction where the window position of the non-starting position decreases have arrived and been sent out, the return message at the non-starting position is sent out and the sliding window is slid in the direction where the window position increases.

4. The cloud gateway according to claim 3, characterized in that: The sent message only includes a message header but no message payload.

5. The cloud gateway according to claim 4, characterized in that: The network adapter also includes: A parsing module, used for parsing the message received from the network to extract the message header and the message payload; A payload cache module, used for storing the message payload and the return message; The reassembly module is used to reassemble the return message and the message payload for sending out.

6. The cloud gateway according to claim 3, characterized in that: The message sequence information also includes a confirmation mark and a message sending timestamp.

7. The cloud gateway according to claim 6, characterized in that: The network adapter also includes: A timeout polling module is used to periodically poll the message sequence information and compare the uploaded timestamp with the local clock. When the difference between the sent timestamp and the local clock exceeds a threshold, it is confirmed that the return message has timed out and the information in the corresponding window is cleared.

8. The cloud gateway according to claim 1, characterized in that: The processor core is used to convert the uploaded message into a VxLAN encapsulated message.

9. The cloud gateway according to claim 1, characterized in that: The cloud gateway includes an Internet gateway, a dedicated line gateway and / or a virtual private cloud gateway.

10. The cloud gateway according to claim 1, characterized in that: The network adapter includes a network adapter implemented based on FPGA.

11. A method for a network adapter, the network adapter being connected to a computing device including a plurality of processor cores via a bus, characterized in that: The method comprises: Processing a message received from the network as an uplink message, wherein the uplink message includes a number; Distributing the sent messages message by message among the multiple processor cores in a balanced manner; receiving a return message from the computing device, wherein the return message includes the number; The return messages are sent out in the order in which the uplink messages are sent to the computing device.

12. The method according to claim 11, characterized in that Sending the return message in the order in which the sent message is sent to the computing device includes: Maintaining a sliding window of message sequence information according to the order in which the messages are sent, wherein the message sequence information includes the serial number of the messages sent; Determine the window position where the returned message is located according to the number in the returned message; If the return message is located at the starting position of the sliding window, sending the return message and sliding the sliding window in a direction in which the window position increases; If the return message is located at a non-starting position of the sliding window, after all the return messages on the direction where the window position of the non-starting position decreases have arrived and been sent out, the return message at the non-starting position is sent out and the sliding window is slid in the direction where the window position increases.

13. A network adapter based on FPGA, the network adapter being connected to a computing device including a plurality of processor cores via a bus, characterized in that: The network adapter includes: Logical units; and A storage unit stores a calculation program, and when the calculation program is executed by the logic unit, the method according to claim 11 or 12 is implemented.

Citation Information

Patent Citations

  • Method for accessing VXLAN (Virtual eXtensible Local Access Network) from VLAN (Virtual Local Access Network), device and system

    CN107659484A

  • Flow forwarding method

    CN115174674A

  • Cloud gateway, method for network adapter and network adapter

    CN116633726A

  • Method and device for network load balancing, control, and network interaction

    WO2017140216A1