Traffic processing system and method, computer equipment and readable storage medium

By processing multiple links between the chip and the kernel group, data packets are output from the same source and destination, solving the problem of limited CPU network card processing capabilities, improving data packet processing efficiency and diversion capabilities in high-traffic scenarios, and meeting the data editing and transmission needs of different business scenarios.

CN118984306APending Publication Date: 2024-11-19DAWNING NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411069508.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

In existing technologies, the processing efficiency of data packets in high-traffic scenarios is low due to the limited processing power of CPU network cards in L4 to L7 layer traffic processing.

Method used

A traffic processing system is adopted, which uses a processing chip to connect to the kernel group through multiple links to achieve the same source and destination of data packets and output them to the corresponding PCIe links of different dies, avoiding cross-die access of the CPU. The system also improves the efficiency of data diversion by using hash calculation and preset hash value to match links with virtualization queues.

Benefits of technology

It can efficiently process multiple data packets in high-traffic, high-bandwidth scenarios, meet the data editing and data transmission needs of different business scenarios, and achieve data traceability and efficient traffic distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984306A_ABST
    Figure CN118984306A_ABST
Patent Text Reader

Abstract

The invention relates to a traffic processing system and method, computer equipment and a readable storage medium. The system comprises a processing chip used for receiving a data packet through an ingress port, determining a target link in a plurality of links based on the data packet, generating a first message based on ingress port information, and transmitting the first message to a kernel corresponding to the target link through the target link; the kernel is used for processing the first message to obtain a processing result, determining output port information corresponding to the first message based on input port information carried by the first message, obtaining a second message based on the output port information and the processing result, and transmitting the second message to the processing chip through a link corresponding to the kernel; and the processing chip is also used for rejecting the second message to obtain a third message, and outputting the third message through a port corresponding to the output port information in the second message. By adopting the system, a plurality of data packets in a large-flow scene can be efficiently processed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of network traffic processing, and in particular to a traffic processing system, method, computer device and readable storage medium. Background Art

[0002] Traffic from L4 to L7 is generally processed by the CPU. In the related art, after the network card receives the data packet, the data packet is processed to obtain the data flow identifier corresponding to the data packet; in the CPU, the data packet is processed through the memory in the network card queue corresponding to the data flow identifier. Due to the limited processing capacity of the network card in the CPU, the processing efficiency of the data packet is low when the traffic is too large. Summary of the invention

[0003] Based on this, it is necessary to provide a traffic processing system, method, computer device and readable storage medium that can efficiently process data packets in large-traffic and high-bandwidth scenarios in response to the above technical problems.

[0004] In a first aspect, the present application provides a traffic processing system, the traffic processing system comprising at least one processing chip and at least one core group, the core group comprising multiple cores, the processing chip being connected to at least the multiple cores included in the core group via multiple links, wherein:

[0005] The processing chip is used to receive a data packet through an ingress port, determine a target link among multiple links based on the data packet, generate a first message based on the ingress port information, and transmit the first message to a core corresponding to the target link through the target link;

[0006] The core is used to process the first message to obtain a processing result, determine the egress port information corresponding to the first message based on the ingress port information carried by the first message, obtain the second message based on the egress port information and the processing result, and transmit the second message to the processing chip through the link corresponding to the core;

[0007] The processing chip is further used to remove the second message to obtain a third message, and output the third message through a port corresponding to the egress port information in the second message.

[0008] In this embodiment, the processing chip can be used to output data packets to the PCIe links corresponding to different dies with the same source and destination, avoiding cross-die access of the CPU, and efficiently processing multiple data packets in large-traffic and high-bandwidth scenarios to meet the needs of large-traffic and high-bandwidth scenarios. Through the processing chip with editable capabilities, the carrying and stripping of message information can be achieved to meet the data editing and data transmission needs in different business scenarios.

[0009] In one embodiment, the processing chip is specifically used for:

[0010] Receive a data packet through an ingress port, extract a target field in the data packet, and perform a hash calculation based on the target field to obtain a hash result;

[0011] Among the multiple links, a target link is determined based on the hash result, and a first message is generated based on the ingress port information and the hash calculation result.

[0012] In this embodiment, hash calculation can be performed on the specified fields in the data packet, link matching can be performed through the hash value corresponding to the hash result, and complex message parsing can be performed on the message to meet the hash diversion requirements of different application scenarios and improve data diversion efficiency.

[0013] In one embodiment, the processing chip is further specifically used for:

[0014] Based on the preset correspondence between the hash value and the link, a target link corresponding to the hash value represented by the hash result is determined.

[0015] In this embodiment, the processing chip can be connected to each core through multiple independent PCIE links, and link screening can be performed in multiple links through hash results corresponding to data packets to ensure the accuracy of link selection.

[0016] In one embodiment, the processing chip is further specifically used for:

[0017] Based on the preset correspondence between the hash value and the link, determine the target link corresponding to the hash value represented by the hash result;

[0018] Based on the application type corresponding to the data packet, a target virtualization queue matching the application type is determined among multiple virtualization queues of the target link, and the first message is transmitted to the kernel corresponding to the target link through the target virtualization queue on the target link.

[0019] In this embodiment, the processing chip can be connected to each core through multiple independent PCIE links, and each link can be configured with multiple virtualization queues bound to each application. The hash results corresponding to the data packets can be used to screen the multiple links and the multiple virtualization queues contained in each link to ensure the accuracy of link selection and queue selection.

[0020] In one embodiment, the kernel is specifically used for:

[0021] Determine, by using preset configured link pair information, the egress port information corresponding to the first message corresponding to the ingress port information carried by the first message; or,

[0022] The output port information corresponding to the first message is determined through a preset forwarding rule.

[0023] In this embodiment, the egress port information corresponding to the first message can be determined through link pair information or forwarding rules, and the egress port for outputting the processing result of the first message can be accurately determined.

[0024] In one embodiment, the processing chip is further specifically used for:

[0025] The target information in the second message is removed to obtain a third message, where the target information includes the egress port information and the information added by the processing chip in the second message.

[0026] In this embodiment, data is accurately eliminated to avoid redundancy in data transmission.

[0027] In one of the embodiments, the traffic processing system includes a plurality of core groups, and the processing chip is connected to each of the core groups via different link groups, and the link group includes a plurality of PCIe links.

[0028] In this embodiment, the processing chip is connected to multiple core groups, and the same FPGA simultaneously provides different PCIe links to different DIEs on multiple CPUs. The traffic of all DIEs meets the processing requirements of the same source and destination, ensuring the same source and destination of data processing and achieving data traceability.

[0029] In one embodiment, the traffic processing system includes multiple processing chips and multiple core groups. The processing chips are connected to each other through an Ethernet interface. Each processing chip is connected to each core group through a link group corresponding to each processing chip. The preset hash value in each core is consistent with the corresponding relationship between the link.

[0030] In this embodiment, the requirements of the PCIe link are met by multiple FPGAs, and the multiple FPGAs are interconnected through Ethernet interfaces to meet the requirement of sending the same stream with the same source and destination to the same DIE, further expanding the ability to process data packets and efficiently processing large amounts of data traffic.

[0031] In one embodiment, the traffic processing system includes a first processing chip and a second processing chip, wherein:

[0032] The first processing chip is used to receive the second message, and if it is determined that the port corresponding to the egress port information in the second message belongs to the second processing chip, forward the second message to the second processing chip through the Ethernet interface;

[0033] The second processing chip is used to receive the second message, and if the direction of the second message is a reverse sending direction, the second message is discarded to obtain a third message, and the third message is output through the port corresponding to the output port information on the second processing chip.

[0034] In this embodiment, the requirements of the PCIe link are met by multiple FPGAs, and the multiple FPGAs are interconnected through Ethernet interfaces to meet the requirement of sending the same stream with the same source and destination to the same DIE, further expanding the ability to process data packets and efficiently processing large amounts of data traffic.

[0035] In a second aspect, the present application further provides a traffic processing method, which is applied to a traffic processing system, wherein the traffic processing system includes at least one processing chip and at least one kernel group, wherein the kernel group includes multiple kernels, and the processing chip is connected to at least one of the kernel groups via multiple links. The method further includes:

[0036] Receiving a data packet through an ingress port of the processing chip, determining a target link among multiple links based on the data packet, generating a first message based on the ingress port information, and transmitting the first message to a core corresponding to the target link through the target link;

[0037] Processing the first message through the kernel to obtain a processing result, determining the egress port information corresponding to the first message based on the ingress port information carried by the first message, obtaining a second message based on the egress port information and the processing result, and transmitting the second message to the processing chip through the link corresponding to the kernel;

[0038] The second message is removed by the processing chip to obtain a third message, and the third message is output through the port corresponding to the egress port information in the second message.

[0039] In a third aspect, the present application further provides a traffic processing device, which is applied to a traffic processing system, wherein the traffic processing system includes at least one processing chip and at least one kernel group, wherein the kernel group includes multiple kernels, and the processing chip is connected to at least one of the kernel groups via multiple links. The device also includes:

[0040] A first processing module, configured to receive a data packet through an ingress port of the processing chip, determine a target link among multiple links based on the data packet, generate a first message based on the ingress port information, and transmit the first message to a core corresponding to the target link through the target link;

[0041] a second processing module, configured to process the first message through the kernel to obtain a processing result, determine the egress port information corresponding to the first message based on the ingress port information carried by the first message, obtain a second message based on the egress port information and the processing result, and transmit the second message to the processing chip through the link corresponding to the kernel;

[0042] The third processing module is used to remove the second message through the processing chip to obtain a third message, and output the third message through a port corresponding to the egress port information in the second message.

[0043] In a fourth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0044] Receiving a data packet through an ingress port of the processing chip, determining a target link among multiple links based on the data packet, generating a first message based on the ingress port information, and transmitting the first message to a core corresponding to the target link through the target link;

[0045] Processing the first message through the kernel to obtain a processing result, determining the egress port information corresponding to the first message based on the ingress port information carried by the first message, obtaining a second message based on the egress port information and the processing result, and transmitting the second message to the processing chip through the link corresponding to the kernel;

[0046] The second message is removed by the processing chip to obtain a third message, and the third message is output through the port corresponding to the egress port information in the second message.

[0047] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0048] Receiving a data packet through an ingress port of the processing chip, determining a target link among multiple links based on the data packet, generating a first message based on the ingress port information, and transmitting the first message to a core corresponding to the target link through the target link;

[0049] Processing the first message through the kernel to obtain a processing result, determining the egress port information corresponding to the first message based on the ingress port information carried by the first message, obtaining a second message based on the egress port information and the processing result, and transmitting the second message to the processing chip through the link corresponding to the kernel;

[0050] The second message is removed by the processing chip to obtain a third message, and the third message is output through the port corresponding to the egress port information in the second message.

[0051] In a sixth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0052] Receiving a data packet through an ingress port of the processing chip, determining a target link among multiple links based on the data packet, generating a first message based on the ingress port information, and transmitting the first message to a core corresponding to the target link through the target link;

[0053] Processing the first message through the kernel to obtain a processing result, determining the egress port information corresponding to the first message based on the ingress port information carried by the first message, obtaining a second message based on the egress port information and the processing result, and transmitting the second message to the processing chip through the link corresponding to the kernel;

[0054] The second message is removed by the processing chip to obtain a third message, and the third message is output through the port corresponding to the egress port information in the second message.

[0055] The above-mentioned traffic processing system, method, computer device and readable storage medium, wherein the traffic processing system includes at least one processing chip and at least one kernel group, the kernel group includes multiple kernels, and the processing chip is connected to multiple kernels contained in at least one kernel group through multiple links, wherein: the processing chip is used to receive data packets through an input port, and determine a target link based on the data packet among multiple links, and generate a first message based on the input port information, and transmit the first message to the kernel corresponding to the target link through the target link; the kernel is used to process the first message to obtain a processing result, and determine the output port information corresponding to the first message based on the input port information carried by the first message, obtain the second message based on the output port information and the processing result, and transmit the second message to the processing chip through the link corresponding to the kernel; the processing chip is also used to remove the second message to obtain a third message, and output the third message through the port corresponding to the output port information in the second message.

[0056] By adopting this system, data packets can be output to the PCIe links corresponding to different dies through the processing chip, avoiding cross-die access of the CPU, and efficiently processing multiple data packets in large-traffic and high-bandwidth scenarios to meet the needs of large-traffic and high-bandwidth scenarios. Through the processing chip with editable capabilities, the carrying and stripping of message information can be realized to meet the data editing and data transmission needs in different business scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0058] Figure 1 is a structural diagram of a traffic processing system in one embodiment;

[0059] Figure 2 is a structural diagram of a traffic processing system in one embodiment;

[0060] Figure 3 is a structural diagram of a traffic processing system in one embodiment;

[0061] Figure 4 is a structural diagram of a traffic processing system in one embodiment;

[0062] Figure 5 is a structural diagram of a traffic processing system in one embodiment;

[0063] Figure 6A flow chart of a traffic processing method in one embodiment;

[0064] Figure 7 is a structural block diagram of a flow processing device in an embodiment;

[0065] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0067] like Figure 1 As shown, an embodiment of the present application provides a traffic processing system 100, which includes at least one processing chip 101 and at least one kernel group, the kernel group includes multiple kernels 102, and the processing chip is connected to multiple kernels included in at least one kernel group through multiple links, wherein:

[0068] The processing chip is used to receive a data packet through an ingress port, determine a target link among multiple links based on the data packet, generate a first message based on the ingress port information, and transmit the first message to a core corresponding to the target link through the target link.

[0069] Specifically, the processing chip can be an FPGA chip, which is used to realize the data signal conversion from Ethernet to PCIE. The processing chip can be configured with multiple Ethernet ports. The processing chip can receive network traffic sent by an external device through the Ethernet interface, that is, the processing chip can receive data packets sent by an external device through the Ethernet interface, and the Ethernet port receiving the data packet is the ingress port of the data packet. The processing chip in the traffic processing system can be connected to the kernel group, and specifically can be connected to multiple kernels contained in the kernel group through multiple links, and the kernels correspond to the links one by one. The multiple links can be multiple independent PCIE links.

[0070] After receiving the data packet, the processing chip can calculate the data packet to obtain the calculation result of the data packet, and select a target link matching the data packet from multiple links based on the calculation result of the data packet; and the processing chip can also generate a first message based on the ingress port information, and the ingress port information can be a port on the processing chip that identifies the receiving port of the data packet. In this way, the processing chip can send the first insulation to the core connected to the target link through the target link. The core group can be a DIE group, and the DIE group can include multiple DIEs, and each DIE can be connected to the processing chip through different pcie links.

[0071] In one example, the specific process of generating the first message based on the inbound port information may be that the processing chip may be pre-configured with the type of information carried when the processing chip sends the message to the kernel, for example, the type of information carried may include inbound port information and hash results, etc. Based on the type of information carried, the processing chip may encapsulate the inbound port information, other information carried, and data packets in the information carried to obtain the first message. The hash results will be described in detail in subsequent embodiments and will not be repeated here.

[0072] The kernel is used to process the first message, obtain a processing result, and determine the output port information corresponding to the first message based on the input port information carried by the first message, obtain the second message based on the output port information and the processing result, and transmit the second message to the processing chip through the link corresponding to the kernel.

[0073] Specifically, the kernel may receive a first message sent to the kernel by the processing chip through a link connected to the kernel. After receiving the first message, the kernel may process the network traffic in the data packet based on the needs of the service user to obtain a processing result; the kernel may also determine the output port information matching the input port information based on the input port information carried by the first message, and the port represented by the output port information is an Ethernet interface for at least outputting the processing result corresponding to the first message.

[0074] After obtaining the processing result of the first message and determining the egress port information corresponding to the ingress port information, the kernel can generate a second message based on the processing result of the first message and the egress port information, and transmit the second message to the processing chip via a link connected to the processing chip.

[0075] In one example, the specific process by which the kernel obtains the second message may include: the kernel may generate the second message based on added information, output port information, and the processing result of the first message, and the added information may be custom information determined based on demand; for example, the custom information, output port information, and the processing result of the first message may be encapsulated to obtain the encapsulation result, and the encapsulation result may be determined as the second message, etc., wherein the custom information may be information defined based on business needs, such as a matching rule identification value, etc.

[0076] The processing chip is further used to remove the second message to obtain a third message, and output the third message through a port corresponding to the egress port information in the second message.

[0077] Specifically, the processing chip can receive the second message returned by the kernel through the link, and parse the second message to obtain the output port information, the processing result of the first message and other information carried by the second message; the processing chip can determine the Ethernet interface for outputting data based on the output port information, and perform elimination processing on the second message, strip off the information added by the kernel in the second message, determine the remaining processing result of the first message as the third message, and output the third message through the Ethernet interface corresponding to the output port information.

[0078] In the above-mentioned traffic processing system, the processing chip is used to receive a data packet through an input port, determine a target link based on the data packet among multiple links, and generate a first message based on the input port information, and transmit the first message to the core corresponding to the target link through the target link; the core is used to process the first message to obtain a processing result, and determine the output port information corresponding to the first message based on the input port information carried by the first message, obtain a second message based on the output port information and the processing result, and transmit the second message to the processing chip through the link corresponding to the core; the processing chip is also used to remove the second message to obtain a third message, and output the third message through the port corresponding to the output port information in the second message.

[0079] By adopting this system, data packets can be output to the PCIe links corresponding to different dies through the processing chip, avoiding cross-die access of the CPU, and efficiently processing multiple data packets in large-traffic and high-bandwidth scenarios to meet the needs of large-traffic and high-bandwidth scenarios. Through the processing chip with editable capabilities, the carrying and stripping of message information can be realized to meet the data editing and data transmission needs in different business scenarios.

[0080] In one embodiment, the processing chip is specifically used for:

[0081] The data packet is received through the inbound port, and the target field in the data packet is extracted. A hash calculation is performed based on the target field to obtain a hash result.

[0082] Among the multiple links, a target link is determined based on the hash result, and a first message is generated based on the ingress port information and the hash calculation result.

[0083] Specifically, the packet header parsing function on the processing chip can be defined based on the actual application scenario, and the type of the target field for extracting the data packet can be defined by customizing the packet header parsing function on the processing chip, that is, the packet header parsing function on the processing chip can be defined as being related to a first type of field. When the processing chip parses the data packet through the packet header parsing function related to the first type of field, the field related to the first type of field in the data packet, namely, the target field, can be extracted; the target field can be the packet content of concern specified by the user. In one example, the target field can be a five-tuple field, and the specific five-tuple field can include SIP, DIP, SPORT, DPORT, and PROTOCOL.

[0084] The processing chip can extract the target field in the data packet, and perform hash calculation on the extracted target field based on a preset hash algorithm to obtain a hash result; the processing chip can be connected to each core through multiple links, and after obtaining the hash result, the processing chip can determine the target link that matches the hash result among the multiple links, and send the data to the CPU through the target link, that is, send the data to the core corresponding to the target link through the target link. For example, it can be a target link that matches the hash value corresponding to the hash result.

[0085] For example, the specific process of generating the first message based on the inbound port information may be that the processing chip may be pre-configured with the type of information carried when the processing chip sends the message to the kernel, for example, the type of information carried may include inbound port information and hash results, etc. Based on the type of information carried, the processing chip may encapsulate the inbound port information, other information carried, and data packets in the information carried to obtain the first message. The hash results will be described in detail in subsequent embodiments and will not be repeated here.

[0086] In this embodiment, hash calculation can be performed on the specified fields in the data packet, link matching can be performed through the hash value corresponding to the hash result, and complex message parsing can be performed on the message to meet the hash diversion requirements of different application scenarios and improve data diversion efficiency.

[0087] In one embodiment, the processing chip is further specifically used for:

[0088] Based on the preset correspondence between the hash value and the link, the target link corresponding to the hash value represented by the hash result is determined.

[0089] Specifically, the processing chip can extract the target field in the data packet, and perform hash calculation on the extracted target field based on a preset hash algorithm to obtain a hash result; the processing chip can be connected to each core through multiple links respectively. After obtaining the hash result, the processing chip can determine the target link that matches the hash value represented by the hash result among the above-mentioned multiple links, and send the data to the CPU through the target link, that is, send the data to the core corresponding to the target link through the target link.

[0090] In one example, the processing chip can be configured with a preset correspondence between hash values ​​and links, that is, a mapping relationship between hash values ​​and links, that is, each hash value corresponds to a link that should be selected. After obtaining the hash result, the processing chip can query the hash value corresponding to the hash result in the preset correspondence between hash values ​​and links to obtain the target link corresponding to the hash value.

[0091] In this embodiment, the processing chip can be connected to each core through multiple independent PCIE links, and link screening can be performed in multiple links through hash results corresponding to data packets to ensure the accuracy of link selection.

[0092] In one embodiment, the processing chip is further specifically used for:

[0093] Based on the preset correspondence between the hash value and the link, the target link corresponding to the hash value represented by the hash result is determined.

[0094] Based on the application type corresponding to the data packet, a target virtualization queue matching the application type is determined among multiple virtualization queues of the target link, and the first message is transmitted to the kernel corresponding to the target link through the target virtualization queue on the target link.

[0095] Specifically, the processing chip can extract the target field in the data packet, and perform hash calculation on the extracted target field based on a preset hash algorithm to obtain a hash result; the processing chip can be connected to each core through multiple links respectively, and after obtaining the hash result, the processing chip can determine the target link that matches the hash value represented by the hash result in the above multiple links; the target link can be configured with virtualization queues bound to each application type respectively, based on which, the processing chip can select a target virtualization queue consistent with the application type corresponding to the data packet from the multiple virtualization queues contained in the target link. In this way, the processing chip can transmit the first message to the core connected to the target link through the target virtualization queue.

[0096] In one example, the processing chip can be configured with a preset correspondence between hash values ​​and links, that is, a mapping relationship between hash values ​​and links, that is, each hash value corresponds to a link that should be selected. After obtaining the hash result, the processing chip can query the hash value corresponding to the hash result in the preset correspondence between hash values ​​and links to obtain the target link corresponding to the hash value.

[0097] In this embodiment, the processing chip can be connected to each core through multiple independent PCIE links, and each link can be configured with multiple virtualization queues bound to each application. The hash results corresponding to the data packets can be used to screen the multiple links and the multiple virtualization queues contained in each link to ensure the accuracy of link selection and queue selection.

[0098] In one embodiment, the kernel is specifically configured to:

[0099] Determine the egress port information corresponding to the first message corresponding to the ingress port information carried by the first message through the preset configured link pair information. Or,

[0100] The output port information corresponding to the first message is determined through the preset configured forwarding rule.

[0101] The link pair information may include the egress port information corresponding to each ingress port information, such as the first egress port corresponding to the first ingress port, etc. The preset forwarding rule may be a forwarding rule pre-configured by the user for specifying the egress port information of the output message.

[0102] Specifically, after receiving the first message, the kernel can obtain the input port information carried by the first message, and query the preset configured link pair information based on the input port information carried by the first message to obtain the output port information corresponding to the input port information carried by the first message; for example, the input port information carried by the first message may be the first input port, and the preset configured link pair information may include the correspondence between the first input port and the first output port. In this way, the kernel queries the preset configured link pair information and can determine that the output port information corresponding to the first input port may be the first output port.

[0103] Or, specifically, the kernel may also determine, based on a preset forwarding rule, the egress port information corresponding to the first message corresponding to the ingress port information carried by the first message.

[0104] In one example, in a serial scenario, the kernel can query based on the input port information carried by the first message to obtain the output port information corresponding to the input port information carried by the first message; in a non-serial scenario, the kernel can determine the output port information corresponding to the first message corresponding to the input port information carried by the first message based on a preset configured forwarding rule.

[0105] In this embodiment, the egress port information corresponding to the first message can be determined through link pair information or forwarding rules, and the egress port for outputting the processing result of the first message can be accurately determined.

[0106] In one embodiment, the processing chip is further specifically used for:

[0107] The target information in the second message is removed to obtain a third message.

[0108] The target information includes the egress port information and the information added by the processing chip in the second message.

[0109] Specifically, after receiving the second message, the processing chip can remove the target information in the second message except the processing result of the first message to obtain a third message, that is, the processing chip can remove the carried information added by the kernel in the second message to obtain the third message, that is, the third message contains the processing result of the first message.

[0110] In this embodiment, data is accurately eliminated to avoid redundancy in data transmission.

[0111] In one embodiment, if Figure 2 As shown, the traffic processing system includes multiple core groups, and the processing chip is connected to each core group through different link groups, and the link group includes multiple PCIe links.

[0112] Specifically, the traffic processing system may include multiple kernel groups, each kernel group may include multiple kernels, and the processing chip may be connected to each kernel group through different link groups, that is, the processing chip may be connected to each kernel in each kernel group through multiple links included in different link groups.

[0113] In one example, a traffic processing system may include a first processing chip, a first core group, and a second core group. The first processing chip may be connected to each core in the first core group through multiple PCIE links included in the first link group. For example, the first link group may include PCIE link 1, PCIE link 2, PCIE link 3, and PCIE link 4. The first core group may include core 1, core 2, core 3, and core 4. The first processing chip may be connected to core 1 through PCIE link 1, that is, the first processing chip may send a message to core 1 through PCIE link 1. The first processing chip may be connected to core 2 through PCIE link 2. The first processing chip may The first processing chip is connected to core 3 through pcie link 3, and can be connected to core 4 through pcie link 4; correspondingly, the second link group can include pcie link 5, pcie link 6, pcie link 7 and pcie link 8, and the second core group can include core 5, core 6, core 7 and core 8; the first processing chip can be connected to core 5 through pcie link 5, that is, the first processing chip can send messages to core 5 through pcie link 5; the first processing chip can be connected to core 6 through pcie link 6, the first processing chip can be connected to core 7 through pcie link 7, and the first processing chip can be connected to core 8 through pcie link 8.

[0114] In this embodiment, the processing chip is connected to multiple core groups, and the same FPGA simultaneously provides different PCIe links to different DIEs on multiple CPUs. The traffic of all DIEs meets the processing requirements of the same source and destination, ensuring the same source and destination of data processing and achieving data traceability.

[0115] In one embodiment, if Figure 3 As shown, the traffic processing system includes multiple processing chips and multiple core groups. The processing chips are connected through Ethernet interfaces. Each processing chip is connected to each core group through a link group corresponding to each processing chip. The preset hash value in each core is consistent with the corresponding relationship of the link.

[0116] Specifically, each core group may include multiple cores, the corresponding relationship between the hash value and the link configured in each core may be the same, and the forwarding rules configured in each core may also be consistent. Each processing chip may be connected through an interconnected Ethernet interface, and each processing chip may be connected to different core groups through different link groups.

[0117] In this embodiment, the requirements of the PCIe link are met by multiple FPGAs, and the multiple FPGAs are interconnected through Ethernet interfaces to meet the requirement of sending the same stream with the same source and destination to the same DIE, further expanding the ability to process data packets and efficiently processing large amounts of data traffic.

[0118] In one embodiment, if Figure 4 As shown, the traffic processing system includes a first processing chip FPGA1 and a second processing chip FPGA2, and the first processing chip is connected to the second processing chip through an interconnected Ethernet interface, wherein:

[0119] The first processing chip is used to receive the second message, and if it is determined that the port corresponding to the egress port information in the second message belongs to the second processing chip, forward the second message to the second processing chip through the Ethernet interface.

[0120] Specifically, the first processing chip can receive a second message, which can be obtained by the kernel based on the processing result of the first message and the output port information of the first message. If the first processing chip determines that the output port information carried in the second message currently received represents a port on the second processing chip, the first processing chip can forward the second message to the second processing chip through the interconnected Ethernet interface connected to the second processing chip.

[0121] In one example, the first processing chip can also be used to use the link connected to the first processing chip and the Ethernet interface interconnected with the second processing chip as an outlet for hash diversion. If the first processing chip receives a data packet and performs hash calculation based on the data packet to obtain a hash result, and determines that the PCIE link corresponding to the hash value represented by the hash result is the PCIE link connected to the second processing chip, the first processing chip can transmit the first message corresponding to the data packet to the PCIE link on the second processing chip through the interconnected Ethernet interface, and transmit it to the core corresponding to the PCIE link.

[0122] The second processing chip is used to receive the second message, and if the direction of the second message is the reverse sending direction, the second message is discarded to obtain a third message, and the third message is output through the port corresponding to the output port information on the second processing chip.

[0123] The forward sending direction may be data sent by the first processing chip to the second processing chip, and the reverse sending direction may be data sent by the second processing chip to the first processing chip.

[0124] Specifically, after receiving the second message, the second processing chip can determine the direction of the second message. If it is determined that the second message is sent in the reverse direction, the second message is discarded, the information added by the kernel in the second message is stripped off, and the processing result of the remaining first message is determined as the third message, and the third message is output through the output port (Ethernet interface) on the second processing chip corresponding to the output port information.

[0125] In an example, a traffic processing system may include a first processing chip FPGA1 and a second processing chip FPGA2, a first core group and a second core group, wherein the first processing chip FPGA1 is connected to the second processing chip FPGA2 via an Ethernet interface; the first processing chip may be connected to each core in the first core group via multiple pcie links included in the first link group, for example, the first link group may include pcie link 1, pcie link 2, pcie link 3 and pcie link 4, and the first core group may include core 1, core 2, core 3 and core 4; the first processing chip may be connected to core 1 via pcie link 1, that is, the first processing chip may send a message to core 1 via pcie link 1; the first processing chip It can be connected to core 2 through pcie link 2, the first processing chip can be connected to core 3 through pcie link 3, and the first processing chip can be connected to core 4 through pcie link 4; correspondingly, the second link group can include pcie link 5, pcie link 6, pcie link 7 and pcie link 8, and the second core group can include core 5, core 6, core 7 and core 8; the second processing chip can be connected to core 5 through pcie link 5, that is, the second processing chip can send a message to core 5 through pcie link 5; the second processing chip can be connected to core 6 through pcie link 6, the second processing chip can be connected to core 7 through pcie link 7, and the second processing chip can be connected to core 8 through pcie link 8.

[0126] In this embodiment, the requirements of the PCIe link are met by multiple FPGAs, and the multiple FPGAs are interconnected through Ethernet interfaces to meet the requirement of sending the same stream with the same source and destination to the same DIE, further expanding the ability to process data packets and efficiently processing large amounts of data traffic.

[0127] In one embodiment, if Figure 5 As shown, the traffic processing system may include a first processing chip FPGA1 and a second processing chip FPGA2, a first core group and a second core group, and the first processing chip FPGA1 is connected to the second processing chip FPGA2 via an Ethernet interface.

[0128] Specifically, the first link group may include pcie link 1, pcie link 2, pcie link 3 and pcie link 4, and the first core group may include core 1, core 2, core 3 and core 4; the first processing chip may be connected to core 1 through pcie link 1, that is, the first processing chip may send a message to core 1 through pcie link 1; the first processing chip may be connected to core 2 through pcie link 2, the first processing chip may be connected to core 3 through pcie link 3, and the first processing chip may be connected to core 4 through pcie link 4; correspondingly, the second link group may include pcie link 5, pcie link 6, pcie link 7 and pcie link 8, and the second core group may include core 5, core 6, core 7 and core 8; the first processing chip may be connected to core 5 through pcie link 5, that is, the first processing chip may send a message to core 5 through pcie link 5; the first processing chip may be connected to core 6 through pcie link 6, the first processing chip may be connected to core 7 through pcie link 7, and the first processing chip may be connected to core 8 through pcie link 8.

[0129] The second link group may include pcie link 1, pcie link 2, pcie link 3 and pcie link 4, and the first core group may include core 1, core 2, core 3 and core 4; the second processing chip may be connected to core 1 via pcie link 1, that is, the second processing chip may send a message to core 1 via pcie link 1; the second processing chip may be connected to core 2 via pcie link 2, the second processing chip may be connected to core 3 via pcie link 3, and the second processing chip may be connected to core 4 via pcie link 4; correspondingly, the second link group may include pcie link 5, pcie link 6, pcie link 7 and pcie link 8, and the second core group may include core 5, core 6, core 7 and core 8; the second processing chip may be connected to core 5 via pcie link 5, that is, the second processing chip may send a message to core 5 via pcie link 5; the second processing chip may be connected to core 6 via pcie link 6, the second processing chip may be connected to core 7 via pcie link 7, and the second processing chip may be connected to core 8 via pcie link 8.

[0130] In this embodiment, the data processing capacity of the traffic processing system can be further expanded, and the requirements of the PCIe link can be met through multiple FPGAs, and multiple FPGAs can be interconnected through Ethernet interfaces to meet the requirement of sending the same flow with the same source and destination to the same DIE.

[0131] In an exemplary embodiment, based on the same inventive concept, the embodiment of the present application also provides a flow processing method for implementing the flow processing system involved above. The implementation scheme for solving the problem provided by the method is similar to the implementation scheme recorded in the above system, so the specific limitations in one or more flow processing method embodiments provided below can refer to the limitations on the flow processing system above, and will not be repeated here. Figure 6 As shown, a traffic processing method is provided, which is applied to Figure 1 The flow processing system in is taken as an example, and includes the following steps 602 to 606. The flow processing system includes at least one processing chip and at least one core group, the core group includes multiple cores, and the processing chip is connected to multiple cores included in at least one core group through multiple links. The flow processing method includes:

[0132] Step 602, receiving a data packet through an ingress port of a processing chip, determining a target link among multiple links based on the data packet, generating a first message based on the ingress port information, and transmitting the first message to a core corresponding to the target link through the target link.

[0133] Step 604, processes the first message through the kernel to obtain a processing result, and determines the egress port information corresponding to the first message based on the ingress port information carried by the first message, obtains the second message based on the egress port information and the processing result, and transmits the second message to the processing chip through the link corresponding to the kernel.

[0134] Step 606: The second message is removed by the processing chip to obtain a third message, and the third message is output through the port corresponding to the egress port information in the second message.

[0135] In the following, in conjunction with a specific embodiment, a specific implementation process of the above-mentioned traffic processing method is described in detail, which may include:

[0136] A traffic processing method provided in this embodiment uses an FPGA chip to implement data signal conversion from Ethernet to PCIe, receives messages through the Ethernet interface of the FPGA, and customizes the message header parsing function. After hash calculation is performed on the message content specified by the user, the same source and destination are diverted to the corresponding DIE for processing. Each DIE only receives and processes the traffic received by the PCIe controller where the DIE is located, avoiding the problem of cross-DIE access.

[0137] FPGA provides an Ethernet interface to receive network traffic and a PCIe interface to send the received network traffic to the CPU for processing. By utilizing the rich SerDes resources of FPGA, multiple independent PCIe channels can be provided to each DIE of the CPU to meet the processing requirements of large traffic and high bandwidth.

[0138] Step 1, FPGA receives a data packet from the Ethernet interface;

[0139] Step 2: Configure the FPGA custom message header parsing function, extract the message fields that the user is concerned about to participate in the hash calculation, and select which PCIe link to send to the CPU based on the result of the hash calculation. For the refined traffic diversion scenario of virtual machines or containers, you can further select which queue of the specified PCIe link to send to the CPU;

[0140] Step 3: Configure the information that the FPGA carries when sending data to the CPU, such as the inbound port information and hash calculation results. The inbound port information can identify the inbound port from which the message enters the FPGA, and the hash calculation results can be directly used by the CPU flow table processing engine, further unloading the CPU's calculation pressure;

[0141] Step 4: FPGA encapsulates and sends the relevant data according to the carrying information set by the user, and sends the encapsulated traffic to the CPU for processing through PCIe.

[0142] In step 5, each DIE of the CPU processes the network traffic it receives. Since the same flow belonging to the same service / slice has been sourced and sent to the same DIE by the FPGA, cross-DIE processing is avoided.

[0143] Step 6, after CPU processing, in the serial scenario, the egress port of the message can be obtained according to the ingress port information carried by the message and the link pair information configured by the user. In the non-serial scenario, the egress port information of the message can also be specified according to the forwarding rule configured by the user.

[0144] Step 7: The CPU adds information such as the output port to the message and sends it to the FPGA for processing via PCIe.

[0145] Step 8: FPGA directly sends the message through the corresponding Ethernet port according to the output port information specified by the CPU. Before sending it out, the carried information added by the CPU will be stripped off.

[0146] When processing traffic from multiple CPUs, the same FPGA simultaneously provides different PCIe links to different DIEs on multiple CPUs, and ensures that the traffic from all DIEs meets the processing requirements of the same source and destination through the above traffic processing method.

[0147] In one example, FPGA1 uses all PCIe links and the Ethernet interface interconnected with FPGA2 as the exit of Hash diversion. If the traffic is diverted to the interconnected Ethernet interface and sent to FPGA2, FPGA2 will divert the traffic Hash received from the interconnected interface to the PCIe link of FPGA2, and the processing flow of FPGA2 is the same. Therefore, as long as the diversion configuration of FPGA1 and FPGA2 is completely consistent, the traffic received by FPGA1 and FPGA2 can achieve the effect of global co-source and co-destination. For reverse traffic, if FPGA1 detects that the exit port carried by the traffic sent from the CPU is located on FPGA2, it will send the traffic to FPGA2 through the interconnected Ethernet interface. FPGA2 detects that the traffic is sent in the reverse direction based on the carried information, and directly strips off the carried information of the message and outputs it from the corresponding Ethernet port.

[0148] A traffic processing method provided in this embodiment can send data packets with the same source and destination to PCIe links of different DIEs through FPGA, avoiding cross-DIE access of the CPU and meeting the processing requirements of large traffic and high bandwidth; complex message parsing can be performed on the message through FPGA to meet the Hash diversion requirements of different scenarios; the editable capability of FPGA can be used to realize message information carrying and information stripping to meet the requirements of various business scenarios such as serial connection; and in large bandwidth processing scenarios, the FPGA can be replaced by a programmable switching chip and a network card, that is, the processing chip can also be a programmable switching chip and a network card.

[0149] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0150] Based on the same inventive concept, the embodiment of the present application also provides a flow processing device for implementing the flow processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more flow processing device embodiments provided below can refer to the limitations on the flow processing method above, and will not be repeated here.

[0151] In an exemplary embodiment, Figure 7 As shown, a traffic processing device 700 is provided, which is applied to a traffic processing system, wherein the traffic processing system includes at least one processing chip and at least one kernel group, wherein the kernel group includes multiple kernels, and the processing chip is connected to at least the multiple kernels included in the kernel group through multiple links, including:

[0152] A first processing module 702 is configured to receive a data packet through an ingress port of the processing chip, determine a target link among multiple links based on the data packet, generate a first message based on the ingress port information, and transmit the first message to a core corresponding to the target link through the target link;

[0153] The second processing module 704 is used to process the first message through the kernel to obtain a processing result, determine the egress port information corresponding to the first message based on the ingress port information carried by the first message, obtain a second message based on the egress port information and the processing result, and transmit the second message to the processing chip through the link corresponding to the kernel;

[0154] The third processing module 706 is used to remove the second message through the processing chip to obtain a third message, and output the third message through the port corresponding to the egress port information in the second message.

[0155] Each module in the above-mentioned traffic processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0156] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data packets and message data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a traffic processing method is implemented.

[0157] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0158] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps described in the above embodiment when executing the computer program.

[0159] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps described in the above embodiment are implemented.

[0160] In one embodiment, a computer program product is provided, including a computer program, which implements the steps described in the above embodiment when executed by a processor.

[0161] It should be noted that 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 relevant regulations.

[0162] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0163] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0164] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A flow processing system, characterized in that: The traffic processing system includes at least one processing chip and at least one kernel group, the kernel group includes multiple kernels, the processing chip is connected to at least the multiple kernels included in the kernel group through multiple links, wherein: The processing chip is used to receive a data packet through an ingress port, determine a target link among multiple links based on the data packet, generate a first message based on the ingress port information, and transmit the first message to a core corresponding to the target link through the target link; The core is used to process the first message to obtain a processing result, determine the egress port information corresponding to the first message based on the ingress port information carried by the first message, obtain the second message based on the egress port information and the processing result, and transmit the second message to the processing chip through the link corresponding to the core; The processing chip is further used to remove the second message to obtain a third message, and output the third message through a port corresponding to the egress port information in the second message.

2. The system according to claim 1, characterized in that The processing chip is specifically used for: Receive a data packet through an ingress port, extract a target field in the data packet, and perform a hash calculation based on the target field to obtain a hash result; Among the multiple links, a target link is determined based on the hash result, and a first message is generated based on the ingress port information and the hash calculation result.

3. The system according to claim 2, characterized in that The processing chip is also specifically used for: Based on the preset correspondence between the hash value and the link, a target link corresponding to the hash value represented by the hash result is determined.

4. The system according to claim 2, characterized in that The processing chip is also specifically used for: Based on the preset correspondence between the hash value and the link, determine the target link corresponding to the hash value represented by the hash result; Based on the application type corresponding to the data packet, a target virtualization queue matching the application type is determined among multiple virtualization queues of the target link, and the first message is transmitted to the kernel corresponding to the target link through the target virtualization queue on the target link.

5. The system according to claim 2, characterized in that The kernel is specifically used for: Determine, by using preset configured link pair information, the egress port information corresponding to the first message corresponding to the ingress port information carried by the first message; or, The output port information corresponding to the first message is determined through a preset forwarding rule.

6. The system according to claim 1, characterized in that The processing chip is also specifically used for: The target information in the second message is removed to obtain a third message, where the target information includes the egress port information and the information added by the processing chip in the second message.

7. The system according to any one of claims 1 to 6, characterized in that: The traffic processing system includes a plurality of core groups, and the processing chip is respectively connected to each of the core groups through different link groups, and the link group includes a plurality of PCIe links.

8. The system according to claim 3 or 4, characterized in that: The traffic processing system includes multiple processing chips and multiple core groups. The processing chips are connected to each other through an Ethernet interface. Each processing chip is connected to each core group through a link group corresponding to each processing chip. The preset hash value in each core is consistent with the corresponding relationship between the link.

9. The system according to claim 8, characterized in that The traffic processing system includes a first processing chip and a second processing chip, wherein: The first processing chip is used to receive the second message, and if it is determined that the port corresponding to the egress port information in the second message belongs to the second processing chip, forward the second message to the second processing chip through the Ethernet interface; The second processing chip is used to receive the second message, and if the direction of the second message is a reverse sending direction, the second message is discarded to obtain a third message, and the third message is output through the port corresponding to the output port information on the second processing chip.

10. A traffic processing method, characterized in that: Applied to a traffic processing system, the traffic processing system includes at least one processing chip and at least one kernel group, the kernel group includes multiple kernels, the processing chip is connected to at least the multiple kernels included in the kernel group through multiple links, and the method further includes: Receiving a data packet through an ingress port of the processing chip, determining a target link among multiple links based on the data packet, generating a first message based on the ingress port information, and transmitting the first message to a core corresponding to the target link through the target link; Processing the first message through the kernel to obtain a processing result, determining the egress port information corresponding to the first message based on the ingress port information carried by the first message, obtaining a second message based on the egress port information and the processing result, and transmitting the second message to the processing chip through the link corresponding to the kernel; The second message is removed by the processing chip to obtain a third message, and the third message is output through a port corresponding to the egress port information in the second message.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to claim 10 are implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 10 are implemented.

Citation Information

Cited By

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

    CN121770808A