Message forwarding method and device based on bus network technology, and readable storage medium

By using bus switches and routing rules to directly forward messages in computer systems, the problem of path length and delay caused by message forwarding in the prior art relying on the superior switch is solved, and more efficient message forwarding is achieved.

CN119788601APending Publication Date: 2025-04-08HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311861662.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-10-07
Filing Date
2023-12-29
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the prior art, message forwarding in computer systems depends on the superior switch, resulting in a long message forwarding path and a large delay.

Method used

The message forwarding method based on bus network technology is adopted to obtain the messages generated by the processor through the bus switch, and directly forward the messages to the corresponding processor according to the routing rules to avoid relying on the superior switch.

Benefits of technology

Shorten the message forwarding path, reduce the forwarding delay, and improve forwarding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788601A_ABST
    Figure CN119788601A_ABST
Patent Text Reader

Abstract

The invention discloses a message forwarding method and device based on a bus network technology and a readable storage medium, and belongs to the technical field of computer communication. The computer system comprises a bus switch, a plurality of processors and a plurality of NIC, the bus switch is connected with the plurality of processors, and the bus switch is further connected with the plurality of NIC. Wherein the bus switch obtains a message generated by a first processor in the plurality of processors, determines that a destination IP address of the message is the IP address of the first NIC in the plurality of NICs, and forwards the message to a second processor according to a routing rule, and the second processor is a processor corresponding to the first NIC in the plurality of processors. According to the invention, the message forwarding path is shortened, and the message forwarding time delay is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Chinese patent application No. 202311290368.1 filed on October 7, 2023, with invention name “Method, device, equipment and computer-readable storage medium for forwarding messages”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computer communication technology, and in particular to a message forwarding method, device and readable storage medium based on bus network technology. Background Art

[0003] With the development of computer communication technology, there are more and more layout methods of computer systems. For example, a computer system includes a processor, a network interface card (NIC) and an upper switch. Among them, the processor is connected to the upper switch through the NIC.

[0004] In the related art, when forwarding a message in the above-mentioned computer system, the processor generates a message and sends the message to the NIC, the NIC sends the message to the upper switch, and then the upper switch implements the message forwarding.

[0005] However, the message forwarding process in the related art depends on the upper-level switch, and the message forwarding path is long and the delay is large. Summary of the invention

[0006] The present application provides a message forwarding method, device and readable storage medium based on bus network technology to improve the problem of long message forwarding path and large delay. The technical solution provided by the present application includes the following aspects.

[0007] In a first aspect, a message forwarding method based on bus network technology is provided. In a computer system, a bus switch, multiple processors and multiple NICs are included, the bus switch is connected to the multiple processors, and the bus switch is also connected to the multiple NICs. The bus switch obtains a message generated by a first processor among the multiple processors, determines that the destination Internet Protocol (IP) address of the message is the IP address of the first NIC among the multiple NICs, and forwards the message to a second processor according to a routing rule, and the second processor is a processor among the multiple processors corresponding to the first NIC.

[0008] After the bus switch in the present application obtains the message generated by the first processor, if the destination IP address of the message is the IP address of the first NIC, the message is considered to be a message within the computer system, and the message is forwarded to the second processor according to the routing rules. For example, the message forwarding process may not need to rely on the upper-level switch connected to multiple NICs in the computer system, thereby making the message forwarding path shorter and the message forwarding delay smaller.

[0009] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the second processor, and forwarding the message to the second processor according to the routing rule includes: forwarding the message to the second processor according to the correspondence included in the routing rule.

[0010] In this implementation, the bus switch can forward the message directly to the second processor according to the routing rules. For example, the bus switch forwards the message to the second processor through the bus between the bus switch and the second processor according to the routing rules without passing through other components in the computer system. The forwarding method is relatively simple and fast, and the message forwarding efficiency is high and the delay is short.

[0011] In one possible implementation, the routing rule includes a correspondence between the destination IP address of the message and the first NIC, and forwarding the message to the second processor according to the routing rule includes: forwarding the message to the first NIC according to the correspondence included in the routing rule, so as to forward the message to the second processor through the first NIC.

[0012] In this implementation, the bus switch can forward the message through the first NIC according to the routing rule, which is more flexible. This application supports flexible selection of appropriate routing rules to adapt to different business needs.

[0013] In a possible implementation manner, the destination IP address of the message is a virtual destination IP address.

[0014] This implementation method determines that the message is a message within the computer system through the virtual destination IP address, has strong universality, and can be widely used in bus switches in computer systems, so that the message forwarding method based on bus network technology provided in this application is applicable to a variety of scenarios.

[0015] In one possible implementation, the IP address of the first NIC is a physical IP address; determining the destination Internet Protocol IP address of the message to be the IP address of the first NIC among multiple NICs includes: if the destination IP address of the message is a virtual destination IP address, converting the virtual destination IP address of the message to the physical destination IP address of the message; determining the physical destination IP address of the message to be the physical IP address of the first NIC among multiple NICs.

[0016] When the destination IP address carried in the message is in a different form (virtual or physical) from the IP address of the NIC, the IP addresses of different forms are unified into the same form of IP addresses, so as to accurately determine that the physical destination IP address of the message is the physical IP address of the first NIC among multiple NICs, thereby ensuring the efficiency and success rate of message forwarding.

[0017] In one possible implementation, the bus switch includes a virtual switch; determining the destination Internet Protocol IP address of the message to be the IP address of the first NIC among multiple NICs includes: determining the destination IP address of the message to be the IP address of the first NIC among multiple NICs through the virtual switch.

[0018] In this implementation, a virtual switch is deployed in the bus switch. After the virtual switch obtains the message through the bus switch, it can determine that the message is a message in the computer system. The virtual switch can be in software form, so there is no need to upgrade the hardware of the bus switch to enable the bus switch to support the message forwarding method provided in this application.

[0019] In a possible implementation, the method further includes: determining that the destination IP address of the message is not the IP address of any NIC among the multiple NICs, and forwarding the message to an upper-level switch connected to the multiple NICs in the computer system.

[0020] In this implementation, the message is a message outside the computer system, so the bus switch needs to forward the message to the upper switch, such as forwarding the message to the upper switch through the NIC, so that the upper switch can forward the message to the outside of the computer system in time. When the message is a message outside the computer system, the normal forwarding of the message is also guaranteed.

[0021] In a second aspect, a message forwarding method based on bus network technology is provided, the method is applied to a second NIC among multiple network interface cards NIC in a computer system, the computer system also includes a bus switch and multiple processors, the multiple NICs are connected to the bus switch, and the bus switch is also connected to the multiple processors. In the method, the second NIC obtains a message generated by a first processor among multiple processors, the first processor corresponds to the second NIC; determines that the destination Internet Protocol IP address of the message is the IP address of the first NIC among multiple NICs; sends the message so that the bus switch forwards the message to the second processor according to the routing rule, the second processor is the processor among the multiple processors corresponding to the first NIC.

[0022] After the second NIC obtains the message generated by the first processor, if the destination IP address of the message is the IP address of the first NIC, it considers the message to be a message in the computer system, and thus sends the message to the bus switch, so that the bus switch forwards the message to the second processor according to the routing rules without relying on components such as the upper switch. Therefore, the forwarding path of the message is shorter and the forwarding delay is smaller.

[0023] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the second processor, and the routing rule is used for the bus switch to forward the message to the second processor according to the correspondence.

[0024] In this implementation, after the second NIC sends a message to the bus switch, the bus switch can quickly forward the message to the second processor according to the routing rules, for example, forwarding the message to the second processor through the bus. The forwarding method is relatively simple and fast, and the message forwarding efficiency is high and the delay is short.

[0025] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the first NIC, and the routing rule is used by the bus switch to forward the message to the first NIC according to the correspondence, so as to forward the message to the second processor through the first NIC.

[0026] In this implementation, the bus switch can forward the message through the first NIC, which is more flexible.

[0027] In a possible implementation manner, the destination IP address of the message is a virtual destination IP address.

[0028] Through the virtual destination IP address carried by the message, it is possible to quickly determine that the message is a message within the computer system, which has strong universality, making the message forwarding method based on bus network technology provided in this application applicable to a variety of scenarios.

[0029] In one possible implementation, the IP address of the first NIC is a physical IP address; determining the destination Internet Protocol IP address of the message to be the IP address of the first NIC among multiple NICs includes: if the destination IP address of the message is a virtual destination IP address, converting the virtual destination IP address of the message to the physical destination IP address of the message; determining the physical destination IP address of the message to be the physical IP address of the first NIC among multiple NICs.

[0030] By converting the form of the destination IP address, it is possible to flexibly determine whether the message belongs to a message in the computer system even when the form of the destination IP address carried in the message is different from the IP form of the first NIC.

[0031] In one possible implementation, the second NIC includes a virtual switch; determining the destination Internet Protocol IP address of the message to be the IP address of the first NIC among the multiple NICs includes: determining the destination IP address of the message to be the IP address of the first NIC among the multiple NICs through the virtual switch.

[0032] The second NIC determines whether the message belongs to a message in the computer system through the virtual switch, which is conducive to improving the determination efficiency and thus shortening the forwarding delay of the message.

[0033] In a possible implementation, the method further includes: determining that the destination IP address of the message is an IP address other than the IP address of any NIC among the multiple NICs, and forwarding the message to an upper-level switch connected to the multiple NICs.

[0034] In this implementation, the message is outside the computer system, and therefore needs to be forwarded to an upper-level switch so that the upper-level switch forwards the message outside the computer system, thereby ensuring normal forwarding of the message.

[0035] In a third aspect, a message forwarding method based on bus network technology is provided, the method is applied to a first processor among multiple processors in a computer system, the computer system also includes a bus switch and multiple NICs, the multiple processors are connected to the bus switch, and the bus switch is also connected to the multiple NICs, the method includes: generating a message, determining that the destination IP address of the message is the IP address of the first NIC among the multiple NICs, sending the message so that the bus switch forwards the message to the second processor according to the routing rules, the second processor being the processor corresponding to the first NIC among the multiple processors.

[0036] After the first processor generates a message, if the destination IP address of the message is the IP address of the first NIC, the message is considered to be a message in the computer system, and the first processor sends the message to the bus switch, so that the bus switch forwards the message according to the routing rules without relying on components such as the upper switch. Therefore, the forwarding path of the message is shorter and the forwarding delay is smaller.

[0037] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the second processor, and the routing rule is used for the bus switch to directly forward the message to the second processor according to the correspondence.

[0038] After the first processor sends a message to the bus switch, the bus switch can quickly forward the message to the second processor according to the routing rules, for example, forwarding the message to the second processor through the bus, thereby ensuring that the message forwarding process has high efficiency and shortening the message forwarding delay.

[0039] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the first NIC, and the routing rule is used by the bus switch to forward the message to the first NIC according to the correspondence, so as to forward the message to the second processor through the first NIC.

[0040] In this implementation, the bus switch can forward the message through the first NIC according to the routing rule, which is more flexible. This application supports flexible selection of appropriate routing rules to adapt to different business needs.

[0041] In a possible implementation manner, the destination IP address of the message is a virtual destination IP address.

[0042] The virtual destination IP address has strong universality, making the message forwarding method based on bus network technology provided in the present application applicable to a variety of scenarios.

[0043] In a possible implementation, the IP address of the first NIC is a physical IP address. Determining the destination Internet Protocol IP address of the message to be the IP address of the first NIC among the multiple NICs includes: if the destination IP address of the message is a virtual destination IP address, converting the virtual destination IP address of the message to the physical destination IP address of the message; and determining the physical destination IP address of the message to be the physical IP address of the first NIC among the multiple NICs.

[0044] When the destination IP address carried in the message is in a different form (virtual or physical) from the IP address of the NIC, the IP addresses of different forms are unified into an IP address of the same form, so as to accurately determine that the physical destination IP address of the message is the physical IP address of the first NIC among multiple NICs, and then determine that the message is a message within the computer system, and can quickly forward the message, thereby ensuring the efficiency and success rate of message forwarding.

[0045] In a possible implementation, the first processor includes a virtual switch. Determining the destination Internet Protocol IP address of the message as the IP address of the first NIC among the multiple NICs includes: determining the destination IP address of the message as the IP address of the first NIC among the multiple NICs through the virtual switch.

[0046] In this implementation, by deploying a virtual switch in the first processor, the first processor can determine that the message is a message within the computer system through the virtual switch after generating the message, which is conducive to efficient forwarding of the message.

[0047] In a possible implementation, the method further includes: determining that the destination IP address of the message is an IP address other than the IP address of any NIC among the multiple NICs, and forwarding the message to an upper-level switch connected to the multiple NICs.

[0048] In this implementation, the message is outside the computer system, so it is necessary to forward the message to the upper switch, for example, through the bus switch and NIC to forward the message to the upper switch, so that the upper switch forwards the message to the outside of the computer system, ensuring the normal forwarding of the message.

[0049] In a fourth aspect, a message forwarding method based on bus network technology is provided, the method is applied to a computer system, the computer system includes a bus switch, multiple processors and multiple NICs, the method includes: a first processor among multiple processors generates a message; the bus switch obtains the message generated by the first processor; the bus switch determines that the destination IP address of the message is the IP address of the first NIC among multiple NICs; the bus switch forwards the message to the second processor according to the routing rule, the second processor is the processor corresponding to the first NIC among the multiple processors. Among them, the possible implementation methods of the steps executed by the bus switch can refer to the various possible implementation methods corresponding to the first aspect.

[0050] In the fifth aspect, a message forwarding method based on bus network technology is provided, the method is applied to a computer system, the computer system includes a bus switch, multiple processors and multiple NICs, the method includes: a first processor among multiple processors generates a message; a second NIC among multiple NICs obtains the message generated by the first processor, the first processor corresponds to the second NIC; the second NIC determines that the destination IP address of the message is the IP address of the first NIC among multiple NICs; the second NIC sends a message so that the bus switch forwards the message to the second processor according to the routing rule, the second processor is the processor corresponding to the first NIC among multiple processors. Among them, the possible implementation methods of the steps performed by the second NIC can refer to the various possible implementation methods corresponding to the second aspect.

[0051] In the sixth aspect, a message forwarding method based on bus network technology is provided, the method is applied to a computer system, the computer system includes a bus switch, multiple processors and multiple NICs, the method includes: a first processor among the multiple processors generates a message, determines that the destination IP address of the message is the IP address of the first NIC among the multiple NICs, sends the message so that the bus switch forwards the message to the second processor according to the routing rule, and the second processor is the processor corresponding to the first NIC among the multiple processors. Among them, the possible implementation methods of the steps executed by the first processor can refer to the various possible implementation methods corresponding to the third aspect.

[0052] In a seventh aspect, a message forwarding device based on bus network technology is provided, the device comprising:

[0053] An acquisition module, used for acquiring a message generated by a first processor among multiple processors;

[0054] a determination module, configured to determine that a destination Internet Protocol IP address of the message is an IP address of a first NIC among the multiple NICs;

[0055] The forwarding module is used to forward the message to the second processor according to the routing rule, and the second processor is a processor corresponding to the first NIC among the multiple processors.

[0056] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the second processor; and the forwarding module is configured to forward the message to the second processor according to the correspondence included in the routing rule.

[0057] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the first NIC; and the forwarding module is used to forward the message to the first NIC according to the correspondence included in the routing rule, so as to forward the message to the second processor through the first NIC.

[0058] In a possible implementation manner, the destination IP address of the message is a virtual destination IP address.

[0059] In one possible implementation, the IP address of the first NIC is a physical IP address; a determination module is used to convert the virtual destination IP address of the message into the physical destination IP address of the message if the destination IP address of the message is a virtual destination IP address; and determine that the physical destination IP address of the message is the physical IP address of the first NIC among multiple NICs.

[0060] In a possible implementation, the bus switch includes a virtual switch; and a determination module, configured to determine, through the virtual switch, that the destination IP address of the message is the IP address of the first NIC among the multiple NICs.

[0061] In a possible implementation, the determination module is further used to determine that the destination IP address of the message is an IP address other than the IP address of any NIC among the multiple NICs; the forwarding module is further used to forward the message to an upper-level switch connected to the multiple NICs.

[0062] In an eighth aspect, a message forwarding device based on bus network technology is applied to a second NIC among a plurality of network interface cards NIC in a computer system, the computer system further includes a bus switch and a plurality of processors, the plurality of NICs are connected to the bus switch, the bus switch is also connected to the plurality of processors, and the device includes:

[0063] An acquisition module, used to acquire a message generated by a first processor among the multiple processors, where the first processor corresponds to the second NIC;

[0064] a determination module, configured to determine that a destination Internet Protocol IP address of the message is an IP address of a first NIC among the multiple NICs;

[0065] The sending module is used to send a message so that the bus switch forwards the message to the second processor according to the routing rule, and the second processor is a processor corresponding to the first NIC among the multiple processors.

[0066] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the second processor, and the routing rule is used for the bus switch to forward the message to the second processor according to the correspondence.

[0067] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the first NIC, and the routing rule is used by the bus switch to forward the message to the first NIC according to the correspondence, so as to forward the message to the second processor through the first NIC.

[0068] In a possible implementation manner, the destination IP address of the message is a virtual destination IP address.

[0069] In one possible implementation, the IP address of the first NIC is a physical IP address;

[0070] The determination module is used to convert the virtual destination IP address of the message into the physical destination IP address of the message if the destination IP address of the message is a virtual destination IP address; and determine that the physical destination IP address of the message is the physical IP address of the first NIC among the multiple NICs.

[0071] In one possible implementation, the second NIC includes a virtual switch;

[0072] The determination module is used to determine, through the virtual switch, that the destination IP address of the message is the IP address of the first NIC among the multiple NICs.

[0073] In a possible implementation, the determination module is further used to determine that the destination IP address of the message is an IP address other than the IP address of any NIC among the multiple NICs; the sending module is further used to forward the message to an upper-level switch connected to the multiple NICs.

[0074] In a ninth aspect, a message forwarding device based on bus network technology is provided, the device is applied to a first processor among multiple processors in a computer system, the computer system further includes a bus switch and multiple NICs, the multiple processors are connected to the bus switch, the bus switch is also connected to the multiple NICs, the device includes:

[0075] A generation module, used for generating messages;

[0076] A determination module, used to determine that the destination IP address of the message is the IP address of the first NIC among the multiple NICs;

[0077] The sending module is used to send a message so that the bus switch forwards the message to the second processor according to the routing rule, and the second processor is a processor corresponding to the first NIC among the multiple processors.

[0078] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the second processor, and the routing rule is used for the bus switch to directly forward the message to the second processor according to the correspondence.

[0079] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the first NIC, and the routing rule is used by the bus switch to forward the message to the first NIC according to the correspondence, so as to forward the message to the second processor through the first NIC.

[0080] In a possible implementation manner, the destination IP address of the message is a virtual destination IP address.

[0081] In a possible implementation, the IP address of the first NIC is a physical IP address. The determination module is used to convert the virtual destination IP address of the message into the physical destination IP address of the message if the destination IP address of the message is a virtual destination IP address; and determine that the physical destination IP address of the message is the physical IP address of the first NIC among the multiple NICs.

[0082] In a possible implementation, the first processor includes a virtual switch. A determination module is configured to determine, through the virtual switch, that the destination IP address of the message is the IP address of a first NIC among the multiple NICs.

[0083] In a possible implementation, the determination module is further used to determine that the destination IP address of the message is an IP address other than the IP address of any NIC among the multiple NICs; the sending module is further used to forward the message to an upper-level switch connected to the multiple NICs.

[0084] In the tenth aspect, a computer system is provided, which includes a bus switch, multiple processors and multiple NICs, wherein a first processor among the multiple processors is used to generate a message; the bus switch is used to obtain the message generated by the first processor, determine that the destination Internet Protocol IP address of the message is the IP address of the first NIC among the multiple NICs, and forward the message to a second processor according to a routing rule, wherein the second processor is a processor among the multiple processors corresponding to the first NIC.

[0085] In the eleventh aspect, another computer system is provided, which includes a bus switch, multiple processors and multiple NICs, wherein a first processor among the multiple processors is used to generate a message; a second NIC among the multiple NICs is used to obtain the message generated by the first processor, the first processor corresponds to the second NIC, determines that the destination Internet Protocol IP address of the message is the IP address of the first NIC among the multiple NICs, sends the message so that the bus switch forwards the message to the second processor according to the routing rules, and the second processor is the processor among the multiple processors corresponding to the first NIC.

[0086] In the twelfth aspect, another computer system is provided, which includes a bus switch, multiple processors and multiple NICs, wherein a first processor among the multiple processors is used to generate a message, determine that the destination IP address of the message is the IP address of the first NIC among the multiple NICs, and send the message so that the bus switch forwards the message to the second processor according to the routing rules, and the second processor is a processor among the multiple processors corresponding to the first NIC.

[0087] In a thirteenth aspect, a bus switch is provided, and the bus switch is used to implement the message forwarding method based on bus network technology provided by the first aspect and any possible implementation method of the first aspect.

[0088] In a fourteenth aspect, a network interface card, namely, NIC, is provided, and the network interface card is used to implement the message forwarding method based on bus network technology provided by the second aspect and any possible implementation method of the second aspect.

[0089] In a fifteenth aspect, a processor is provided, and the processor is used to implement the message forwarding method based on bus network technology provided by the third aspect and any possible implementation method of the third aspect.

[0090] In a sixteenth aspect, a message forwarding device based on bus network technology is provided, the device comprising a memory and a processor; the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor, so that the message forwarding device based on bus network technology implements the message forwarding method based on bus network technology provided by the above aspects. For example, the message forwarding device based on bus network technology includes but is not limited to a bus switch.

[0091] Optionally, there are one or more processors and one or more memories.

[0092] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0093] In the seventeenth aspect, a computer program or a computer program product is provided, and the computer program or the computer program product includes: computer instructions, when the computer instructions are executed by the computer, the computer executes the message forwarding method based on the bus network technology provided by the above aspects.

[0094] In an eighteenth aspect, a computer-readable storage medium is provided, which stores computer instructions. When the computer instructions are executed on a computer, the message forwarding method based on bus network technology provided by the above aspects is executed by the computer.

[0095] In the nineteenth aspect, a chip is provided, comprising a processor for calling and executing instructions stored in a memory, so that a computer equipped with the chip executes the message forwarding method based on bus network technology provided by the above aspects.

[0096] In the twentieth aspect, another chip is provided, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, a computer equipped with the chip executes the message forwarding method based on bus network technology provided by the above aspects.

[0097] It should be understood that the technical effects achieved by the technical solutions provided by the fourth to twentieth aspects of the present application and the corresponding possible implementation methods can be referred to the above description of the technical effects achieved by the technical solutions provided by the first to third aspects and the corresponding possible implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] Figure 1 A schematic diagram of forwarding a message in a related technology provided in an embodiment of the present application;

[0099] Figure 2 A schematic diagram of a computer system provided in an embodiment of the present application;

[0100] Figure 3 A schematic diagram of another computer system provided in an embodiment of the present application;

[0101] Figure 4 A schematic diagram of forwarding a message in another related technology provided in an embodiment of the present application;

[0102] Figure 5 A schematic diagram of a message forwarding method based on bus network technology provided in an embodiment of the present application;

[0103] Figure 6 A flowchart of a message forwarding method based on bus network technology provided in an embodiment of the present application;

[0104] Figure 7 A schematic diagram of another message forwarding method based on bus network technology provided in an embodiment of the present application;

[0105] Figure 8 A flowchart of another message forwarding method based on bus network technology provided in an embodiment of the present application;

[0106] Fig. 9 A schematic diagram of another message forwarding method based on bus network technology provided in an embodiment of the present application;

[0107] Fig.10 A flowchart of another message forwarding method based on bus network technology provided in an embodiment of the present application;

[0108] Fig.11 A schematic diagram of the structure of a message forwarding device based on bus network technology provided in an embodiment of the present application;

[0109] Fig.12 A schematic diagram of another message forwarding structure based on bus network technology provided in an embodiment of the present application;

[0110] Fig.13 A schematic diagram of another message forwarding structure based on bus network technology provided in an embodiment of the present application;

[0111] Fig.14 A schematic diagram of the structure of a message forwarding device based on bus network technology provided in an embodiment of the present application. DETAILED DESCRIPTION

[0112] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.

[0113] The process of computer communication involves the forwarding of messages. Figure 1 , Figure 1A method of forwarding a message in a computer system in a related art is shown. The computer system includes a processor 1, a processor 2, a NIC 1, a NIC 2, a virtual switch 1 deployed on NIC 1, a virtual switch 2 deployed on NIC 2, and an upper switch. The processor 1 and NIC 1 are located on a server 1, and the processor 2 and NIC 2 are located on a server 2. Among them, the processor 1 and NIC 1, and the processor 2 and NIC 2 are connected through a peripheral component interconnect express (PCIe) bus. The NIC 1 and the upper switch, and the NIC 2 and the upper switch are connected through an Ethernet (ETH) link. Taking the message forwarding process in which the processor 1 sends a message and the processor 2 receives a message as an example, that is, the message forwarding process across servers as an example, the message forwarding process includes the following steps 1 to 7, and the units of delay in these steps include nanoseconds (ns) and microseconds (us).

[0114] Step 1: Delay 75ns. Processor 1 generates a message.

[0115] Step 2: With a delay of 500 ns, processor 1 sends the message to NIC 1 via the PCIe bus.

[0116] Step 3: Delay 10us. Virtual switch 1 in NIC 1 performs address mapping on the message and sends the message after address mapping to the upper-level switch.

[0117] Step 4: Delay 1us. The upper switch queries the routing table in the upper switch and sends the message to NIC 2.

[0118] Step 5: After a delay of 10us, the virtual switch 2 in NIC 2 performs address mapping on the message.

[0119] Step 6: Delay 500ns. The virtual switch 2 in the NIC 2 performs format conversion on the message after address mapping to obtain data that meets the requirements of the PCIe bus, also known as PCIe configuration space data.

[0120] Step 7: Delay 75ns. Processor 2 obtains PCIe configuration space data.

[0121] The total delay of step 1 to step 7 is 22.15us, that is, the message forwarding delay is 22.15us. The message forwarding process of the related technology depends on the upper switch, the message forwarding path includes the upper switch, the forwarding path is long, and the message forwarding delay is large.

[0122] In an embodiment of the present application, a computer system is provided. Figure 2 As shown, the computer system includes: a bus switch, an upper switch, multiple processors and multiple NICs. The multiple processors are Figure 2 The processors 1 to N are shown, where N is a positive integer greater than or equal to 2. The multiple processors can be distributed in different communication devices, including but not limited to servers, etc. Multiple NICs are Figure 2 NIC 1 to NIC M are shown, where M is a positive integer greater than or equal to 2.

[0123] The bus switch is connected to multiple processors through the bus, and the bus switch is also connected to multiple NICs through the bus. Multiple NICs are also connected to the upper switch, for example, connected to the upper switch through an Ethernet link. Thus, a bus network is formed in the computer system, and the computer system is a system based on bus network technology. Figure 1 The Ethernet network shown in the figure has lower latency and larger bandwidth. Therefore, based on the bus network, different components can be shared over long distances, especially those that are sensitive to latency. This is conducive to decoupling different components, improving component utilization, and making the computer system suitable for various scenarios such as public clouds. Different components can include memory ( Figure 2 ), processor and NIC, etc., which are not limited in the embodiments of the present application.

[0124] Exemplarily, the above-mentioned bus includes but is not limited to a compute eXpress link (CXL) bus, an NVLink (NVDIA link) bus, and the like. Compared to a traditional PCIe bus, when communicating based on a CXL bus or an NVLink bus, there is no need to rely on the processor's operating system, making the communication process more efficient. Exemplarily, the above-mentioned upper-level switch includes but is not limited to a top of rack (TOR) switch, which is also called an in-cabinet switch.

[0125] For example, Figure 2 As shown, the computer system includes a virtual switch. In the embodiment of the present application, the virtual switch can be deployed in the NIC, bus switch and processor in the form of software. In some embodiments, a centralized deployment method can be adopted, and the virtual switch can be deployed in the NIC, bus switch or processor ( Figure 2 The case where the virtual switch is deployed in the bus switch or the processor is not shown). In other embodiments, a distributed deployment method can be adopted, and the virtual switch can be deployed in two or three components of the NIC, the bus switch and the processor. For example, see Figure 3In the illustrated case, the virtual switch is deployed in the NIC and the bus switch. Other cases of distributed deployment may also be that the virtual switch is deployed in the NIC and the processor, which are not listed here one by one.

[0126] Exemplarily, the virtual switch includes but is not limited to an open virtual switch (open virtual switch, OVS) and the like, which is not limited in the embodiments of the present application.

[0127] in addition, Figure 2 The bus switch shown adopts a centralized deployment mode. In the embodiment of the present application, the bus switch can also adopt a distributed deployment mode. For example, the bus switch includes multiple sub-switches, and each NIC can be connected to at least one of the multiple sub-switches through a bus. The bus has been described above and will not be repeated here.

[0128] In an exemplary embodiment, the computer system can access a communication network through an upper switch. For example, the communication network includes a spine network, the computer system is used as a leaf, and the upper switch in the computer system is connected to a communication device in the spine network to access the spine network. Of course, the spine network is only an example, and the embodiment of the present application does not limit the communication network to be accessed, and the communication network can be set according to actual needs.

[0129] It should be understood that if Figure 1 The corresponding related technologies are applied to Figure 2 For a computer system as shown, the message forwarding path can be found in Figure 4 The message forwarding process still depends on the upper-level switch, resulting in a longer message forwarding path and a longer message forwarding delay.

[0130] The present invention provides a method for forwarding a message based on a bus network technology, which can be applied to Figure 2 In the computer system shown in FIG. 1 , for ease of understanding, some exemplary basic steps in the method are first described here.

[0131] In a computer system, for a bus switch, each NIC in a plurality of NICs, and each processor in a plurality of processors, neighbor components in the computer system can be discovered through a neighbor discovery protocol. For example, the neighbor components of the bus switch include but are not limited to multiple processors and multiple NICs, the neighbor components of each NIC include but are not limited to the bus switch and the upper switch, and the neighbor components of each processor include but are not limited to the bus switch.

[0132] Among all the components included in the computer system, at least one component is used as a management component, and the management component manages all the components in the computer system, and the components other than the management component are non-management components. For example, one of the multiple processors can be used as a management component, and the embodiments of the present application do not limit this. The non-management component can be registered in the management component to facilitate the management of the management component. For example, the non-management component can send registration information to the management component, and the registration information includes but is not limited to the attribute information of the non-management component itself and the neighbor components of the non-management component, etc., and the embodiments of the present application do not limit this.

[0133] The management component can use at least one NIC among the multiple NICs as a communication interface, and the communication interface is connected to a remote device to obtain a first correspondence between multiple processors and multiple NICs from the remote device, and one NIC can correspond to one or more processors. Exemplarily, the remote device can be a device in a cloud scheduling platform, and the first correspondence between multiple processors and multiple NICs can be set by the user according to actual needs, which is not limited here.

[0134] After the management component obtains the first correspondence between multiple processors and multiple NICs through the communication interface, the corresponding processor and NIC can be determined according to the first correspondence. The bus switch provides a processor side port and a NIC side port, a processor uses at least one processor side port, different processors use different processor side ports, and a NIC uses at least one NIC port, and different NICs use different NIC ports. For the corresponding processor and NIC, the management component can establish a second correspondence between the processor side port used by the processor and the NIC port used by the NIC in the bus switch, and the bus switch implements message forwarding between the corresponding processor and NIC according to the second correspondence.

[0135] For example, processor 1 uses port 1 (processor side port), processor 2 uses port 2 (processor side port), NIC A uses port 3 and port 4 (NIC side ports), and NIC A corresponds to processor 1 and processor 2. The second correspondence established by the management component in the bus switch may include: correspondence 1 between port 1 and port 3, and correspondence 2 between port 2 and port 4. Therefore, after the bus switch receives a message generated and sent by processor 1 from port 1, it can query the second correspondence according to port 1, hit correspondence 1 in the second correspondence, and thus determine that port 1 corresponds to port 3 according to correspondence 1, so that the message is forwarded through port 3, and NIC A receives the message through port 3, thereby realizing message forwarding between the corresponding processor 1 and NIC A.

[0136] The management component can also establish a first routing table (also called a flow table), which includes the IP address of each NIC in the computer system, and the IP address of the NIC can be a physical (underlay) IP address. For example, when the computer system includes 16 NICs, the first routing table includes 16 IP addresses, and the 16 NICs correspond to the 16 IP addresses one by one. The first routing table is used to determine whether a message is a message in the computer system. For example, the first routing table is used by a component (bus switch, NIC or processor) in the computer system, or the first routing table is used by a virtual switch deployed in these components. In the method embodiment below, the role of the first routing table will be described in detail, which will not be repeated here.

[0137] The management component may synchronize the first routing table to the component. For example, the management component may synchronize a first routing table to each NIC. In addition, the management component may also establish a second routing table in the NIC, and the second routing table is used for the NIC to forward messages to the upstream switch. The process of the NIC using the second routing table will be described in the following method embodiment, which will not be repeated here.

[0138] Next, the message forwarding method based on bus network technology provided in an embodiment of the present application is described.

[0139] In an exemplary embodiment, the message forwarding method based on bus network technology provided in the embodiment of the present application can be applied to Figure 2 The bus switch in the computer system shown in FIG. Figure 5 As shown, the method includes the following steps 501 to 503.

[0140] Step 501: The bus switch obtains a message generated by a first processor among multiple processors.

[0141] Wherein, the first processor is any one of the multiple processors. The first processor can generate a message, and the message header of the message includes a source IP address, a destination IP address, a source port and a destination port. Exemplarily, the destination IP address of the message is a virtual (overlay) destination IP address. In addition to the message header, the message also includes a payload part, which is also called bus data. The payload part may include a bus address or may not include a bus address. The destination IP address is an address that can be applied to a network domain, and the network domain includes NIC, an upper switch and other devices outside the computer system. The bus address is an address that can be applied to a bus domain, and the bus domain includes a bus switch and a processor.

[0142] After the first processor generates a message, it sends the message to the bus switch, and the bus switch receives the message, thereby acquiring the message generated by the first processor.

[0143] Step 502: The bus switch determines that the destination IP address of the message is the IP address of the first NIC among the multiple NICs.

[0144] According to the description in step 501, the message header of the message includes a destination IP address, and the bus switch parses the message to obtain the destination IP address of the message. Exemplarily, the bus switch parses the message header of the message, but does not parse the payload part, to obtain the destination IP address of the message. The parsing method here is only an example and is not intended to limit the embodiments of the present application.

[0145] After the bus switch obtains the destination IP address of the message, it determines whether the destination IP address of the message is the IP address of the first NIC among the multiple NICs, where the first NIC is any one of the multiple NICs. If the destination IP address of the message is the IP address of the first NIC, it means that the message belongs to a message in the computer system, and the processor used to receive the message is the second processor corresponding to the first NIC. In other words, the message does not need to be forwarded outside the computer system, and the forwarding of the message can be completed within the computer system. Alternatively, if the destination IP address of the message is not the IP address of the first NIC, it means that the message does not belong to a message in the computer system, and the processor used to receive the message is not the processor corresponding to any one of the multiple NICs, but the processor corresponding to other NICs outside the computer system. In other words, the message needs to be forwarded outside the computer system, and the forwarding of the message cannot be completed within the computer system.

[0146] Exemplarily, the bus switch queries the first routing table described above according to the destination IP address of the message. Since the first routing table includes the IP address of each NIC in the computer system, when the destination IP address of the message hits the IP address of a NIC included in the first routing table, it means that the message belongs to a message in the computer system, and the IP address of the hit NIC is the IP address of the first NIC, or, when the destination IP address of the message does not hit the IP address of any NIC included in the first routing table, it means that the message does not belong to a message in the computer system.

[0147] In an exemplary embodiment, the IP address of each NIC included in the first routing table is a physical IP address, and thus the IP address of the first NIC is also a physical IP address. Then, illustratively, determining the destination Internet Protocol IP address of the message to be the IP address of the first NIC among the multiple NICs includes: if the destination IP address of the message is a virtual destination IP address, converting the virtual destination IP address of the message to the physical destination IP address of the message; and determining the physical destination IP address of the message to be the physical IP address of the first NIC among the multiple NICs.

[0148] Since the destination IP address of the message is a virtual destination IP address, and the IP address of each NIC included in the first routing table is a physical IP address, the virtual destination IP address of the message cannot be directly matched with the physical IP address of each NIC included in the first routing table. Instead, the virtual destination IP address of the message needs to be converted into the physical destination IP address of the message first, and then the physical destination IP address of the message needs to be matched with the physical IP address of each NIC included in the first routing table. If the physical destination IP address of the message is the physical IP address of the first NIC, it means that the message belongs to a message within the computer system. If the physical destination IP address of the message is not the physical IP address of any NIC among the multiple NICs, it means that the message belongs to a message outside the computer system.

[0149] In the case where the message belongs to a message in the computer system, the bus switch controls the bus switch to forward the message to the second processor according to the routing rule. This forwarding method does not need to rely on the upper switch. Exemplarily, the forwarding path of the message does not include the upper switch connected to multiple NICs in the computer system. In other words, the components included in the forwarding path of the message refer to all or part of the components in the computer system other than the upper switch. In this way, the forwarding path of the message can be shortened and the forwarding delay of the message can be reduced.

[0150] In an exemplary embodiment, the bus switch includes a virtual switch. Since the virtual switch is deployed in the bus switch, after the bus switch receives the message, the virtual switch can obtain the message. Accordingly, the bus switch determines that the destination IP address of the message is the IP address of the first NIC among multiple NICs, including: determining the destination IP address of the message as the IP address of the first NIC among multiple NICs through the virtual switch. Exemplarily, in the case where the IP address of the first NIC is a physical IP address, if the destination IP address of the message is a virtual destination IP address, the virtual switch can first convert the virtual destination IP address of the message into the physical destination IP address of the message, and then determine that the physical destination IP address of the message is the physical IP address of the first NIC among multiple NICs.

[0151] Step 503: The bus switch forwards the message to the second processor according to the routing rule, where the second processor is a processor corresponding to the first NIC among the multiple processors.

[0152] The routing rule may be pre-configured or established in real time, for example, the bus switch establishes the routing rule, or the bus switch establishes the routing rule through a virtual switch.

[0153] In the embodiment of the present application, the established routing rule may be the following routing rule 1 or routing rule 2.

[0154] Routing rule 1, the routing rule includes a correspondence between the destination IP address of the message and the second processor. The routing rule is used for the bus switch to directly forward the message to the second processor according to the correspondence. The bus switch forwards the message to the second processor according to the routing rule, including: the bus switch forwards the message to the second processor according to the correspondence included in the routing rule.

[0155] The bus switch parses the message to obtain the destination IP address of the message, and directly forwards the message to the second processor according to the corresponding relationship between the parsed destination IP address of the message and the routing rule 1. Since the bus switch has the routing rule 1, the bus switch queries the corresponding relationship included in the routing rule 1 according to the destination IP address of the message, obtains the second processor corresponding to the destination IP address of the message, and can directly forward the message to the second processor. For example, the bus switch can parse the payload part from the message, and forward the payload part to the second processor, thereby realizing the forwarding process of forwarding.

[0156] In the case of using routing rule 1, the forwarding path of the message includes: the first processor, the bus switch and the second processor. This forwarding path not only does not include the upper switch, but also does not include any NIC, so it can not only reduce the bandwidth occupation on the upper switch side of the NIC, but also reduce the bandwidth occupation on the bus switch side of the NIC, and can reduce the forwarding delay of the message. For example, if the traffic of the message accounts for more than 30% of the total traffic, the bandwidth occupation on the upper switch side of the first NIC and the second NIC is reduced by more than 30%, the bandwidth occupation on the bus switch side of the first NIC and the second NIC is also reduced by more than 30%, and the forwarding delay of more than 95% of the messages is reduced.

[0157] However, this forwarding path is still a slow forwarding path, because the bus switch or the virtual switch deployed in the bus switch needs to establish routing rules, and it takes a certain amount of time to establish routing rules. Of course, the routing rules do not need to be established repeatedly. Therefore, if the bus switch receives the message sent by the first processor again after the routing rules are established, the bus switch can directly parse the destination IP address of the message from the message, and forward the message directly to the second processor according to the corresponding relationship between the destination IP address of the message obtained by the parsing and the routing rules. Then, although the forwarding path of the message still includes: the first processor, the bus switch and the second processor, the forwarding path is a fast forwarding path.

[0158] like Figure 6As shown, the first processor is processor 2, and the second processor is processor 1. When routing rule 1 is adopted, the slow forwarding path and the fast forwarding path of the message include: processor 2, bus switch and processor 1 in sequence.

[0159] Taking the slow forwarding path of the message when the routing rule 1 is adopted as an example, the message forwarding process may include the following steps 601 to 605, and the forwarding delay of the message is only about 1050ns.

[0160] Step 601, the delay is about 75ns. Processor 2 generates a message, the destination IP address of the message is the destination IP address of the overlay.

[0161] Step 602, with a delay of about 100 ns, processor 2 sends a message to the bus switch.

[0162] Step 603, with a delay of about 500 ns, the virtual switch in the bus switch converts the overlay destination IP address of the message into the underlay destination IP address.

[0163] Step 604, the delay is about 300ns. The virtual switch queries the first routing table according to the destination IP address of the underlay, and the destination IP address of the underlay hits the underlay IP address of NIC 1 in the first routing table. In addition, the virtual switch establishes routing rules in the bus switch (including the correspondence between the destination IP address of the overlay and CPU 1). The bus switch parses the payload part from the message and forwards the payload part to CPU 1 according to the routing rules.

[0164] Step 605, the delay is about 75ns. CPU 1 obtains the payload part, and the message forwarding process is completed.

[0165] Taking the fast forwarding path of the message when the routing rule 1 is adopted as an example, the message forwarding process may include the following steps 606 to 609.

[0166] Step 606, the delay is about 75ns. Processor 2 generates a message, the destination IP address of the message is the destination IP address of the overlay.

[0167] Step 607, with a delay of about 100 ns, processor 2 sends a message to the bus switch.

[0168] Step 608, the delay is about 100ns. The bus switch parses the message to obtain the payload part, and forwards the payload part to CPU 1 according to the established routing rules.

[0169] Step 609, the delay is about 75ns. CPU 1 obtains the payload part, and the message forwarding process is completed.

[0170] Routing rule 2, the routing rule includes a correspondence between the destination IP address of the message and the first NIC. The routing rule is used for the bus switch to forward the message to the first NIC according to the correspondence, so as to forward the message to the second processor through the first NIC. The bus switch forwards the message to the second processor according to the routing rule, including: the bus switch forwards the message to the first NIC according to the correspondence included in routing rule 2, so as to forward the message to the second processor through the first NIC.

[0171] The bus switch parses the message to obtain the destination IP address of the message, and forwards the message to the first NIC according to the corresponding relationship between the parsed destination IP address of the message and the routing rule 2, so as to forward the message to the second processor through the first NIC. Since the bus switch has routing rule 2, the bus switch queries the corresponding relationship included in routing rule 2 according to the destination IP address of the message, obtains the first NIC corresponding to the destination IP address of the message, and then forwards the message to the first NIC. Then, the first NIC parses the message to obtain the destination IP address of the message. Since the destination IP address of the message is the IP address of the first NIC itself, the first NIC continues to process the message.

[0172] In some embodiments, if the payload portion of the message does not include a bus address, and the destination IP address of the message is a virtual destination IP address, the first NIC determines the physical destination IP address based on the virtual destination IP address, encapsulates the determined physical destination IP address in the outer layer of the message, obtains an updated message, and sends the updated message to the bus switch. The bus switch queries the physical destination IP address in the updated message to obtain the second processor corresponding to the physical destination IP address, parses the payload portion in the updated message, and sends the payload portion to the second processor.

[0173] In other embodiments, if the payload portion of the message does not include a bus address, and the destination IP address of the message is a physical destination IP address, the first NIC sends the message to the bus switch, the bus switch queries the physical destination IP address in the message, obtains the second processor corresponding to the physical destination IP address, and sends the payload portion of the message to the second processor.

[0174] In some other embodiments, if the payload portion of the message includes a bus address, the first NIC can parse out the payload portion including the bus address and send the payload portion including the bus address to the bus switch. The bus switch queries based on the bus address, obtains the second processor corresponding to the bus address, and sends the payload portion to the second processor.

[0175] In some other embodiments, if the payload portion of the message includes a bus address, the first NIC sends the message to the bus switch, the bus switch parses the payload portion including the bus address by itself, queries based on the bus address, obtains the second processor corresponding to the bus address, and sends the payload portion to the second processor.

[0176] Thus, the message forwarding process is completed through the above process.

[0177] In the case of using routing rule 2, the slow forwarding path and the fast forwarding path of the message both include: the first processor, the bus switch, the first NIC, the bus switch and the second processor. Compared with the slow forwarding path, the fast forwarding path does not need to repeatedly establish routing rules, so it can reduce the message forwarding delay.

[0178] The above describes the case where the message belongs to a message within the computer system. The following describes the case where the message is a message outside the computer system. Exemplarily, the method also includes: the bus switch determines (for example, through a virtual switch) that the destination IP address of the message is an IP address other than the IP address of any NIC among multiple NICs (indicating that the message is a message outside the computer system), and forwards the message to an upper-level switch connected to multiple NICs in the computer system. After determining that the message is a message outside the computer system, the bus switch can send the message to the second NIC, so that the second NIC queries the second routing table described above to forward the message to the upper-level switch, and the upper-level switch forwards the message to the destination IP address of the message.

[0179] In summary, after the bus switch in the embodiment of the present application obtains the message generated by the first processor, if the destination IP address of the message is the IP address of the first NIC, the message is considered to be a message within the computer system, and the message is forwarded to the second processor according to the routing rule without relying on components such as the upper switch. Therefore, the forwarding path of the message is shorter and the forwarding delay is smaller.

[0180] In an exemplary embodiment, the message forwarding method based on bus network technology provided in the embodiment of the present application can be applied to Figure 2 A second NIC in the computer system shown. Figure 7 As shown, the method includes the following steps 701 to 703.

[0181] Step 701: The second NIC obtains a message generated by a first processor among multiple processors, where the first processor corresponds to the second NIC.

[0182] The message generated by the first processor is described in step 501. After the first processor generates the message, it sends the message to the bus switch, and the bus switch receives the message through the processor side port used by the first processor. The bus switch queries the second corresponding relationship described above based on the processor side port used by the first processor, and obtains the NIC side port corresponding to the processor side port, and the NIC side port is used by the second NIC corresponding to the first processor. Therefore, the bus switch sends the message through the NIC side port corresponding to the processor side port, and the second NIC using the NIC side port can receive the message, thereby realizing the second NIC to obtain the message generated by the first processor.

[0183] Step 702: The second NIC determines that the destination IP address of the message is the IP address of the first NIC among the multiple NICs.

[0184] The second NIC parses the message to obtain the destination IP address of the message. Exemplarily, the second NIC parses the entire message (including the message header and the payload) to obtain the destination IP address of the message.

[0185] Exemplarily, the destination IP address of the message is a virtual destination IP address. In an exemplary embodiment, the IP address of the first NIC is a physical IP address. Determining that the destination Internet Protocol IP address of the message is the IP address of the first NIC among multiple NICs includes: if the destination IP address of the message is a virtual destination IP address, converting the virtual destination IP address of the message into the physical destination IP address of the message; and determining that the physical destination IP address of the message is the physical IP address of the first NIC among multiple NICs. The manner in which the second NIC determines that the destination IP address of the message is the IP address of the first NIC among multiple NICs can be referred to the determination process of the bus switch in step 502, which will not be repeated here.

[0186] In an exemplary embodiment, the second NIC includes a virtual switch. The second NIC determines that the destination Internet Protocol IP address of the message is the IP address of the first NIC among the multiple NICs, including: the second NIC determines the destination IP address of the message is the IP address of the first NIC among the multiple NICs through the virtual switch. Exemplarily, in the case where the IP address of the first NIC is a physical IP address, if the destination IP address of the message is a virtual destination IP address, the virtual switch can first convert the virtual destination IP address of the message into the physical destination IP address of the message, and then determine the physical destination IP address of the message to be the physical IP address of the first NIC among the multiple NICs.

[0187] Step 703: The second NIC sends a message so that the bus switch forwards the message to the second processor according to the routing rule, and the second processor is a processor corresponding to the first NIC among the multiple processors.

[0188] The routing rules can be found in the description of step 503 above, which will not be described in detail here. After the second NIC determines that the destination IP address of the message is the IP address of the first NIC, it returns the message to the bus switch, so that the bus switch forwards the message to the second processor according to the routing rules. The process of the bus switch sending the message to the second processor according to routing rule 1 or routing rule 2 can be found in the description of step 503, which will not be described in detail here.

[0189] When routing rule 1 is adopted, the forwarding path of the message includes: the first processor, the bus switch, the second NIC, the bus switch, and the second processor. The forwarding path does not include the upper switch, which can reduce the bandwidth occupation on the upper switch side of the NIC and reduce the forwarding delay of the message. For example, if the traffic of the message accounts for more than 30% of the total traffic, the bandwidth occupation on the upper switch side of the first NIC and the second NIC is reduced by more than 30%, and the forwarding delay of more than 90% of the messages is reduced.

[0190] However, this forwarding path is still a slow forwarding path because routing rules need to be established, and it takes a certain amount of time to establish routing rules. Of course, the routing rules do not need to be established repeatedly. Therefore, if the bus switch receives the message sent by the first processor again after the routing rules are established, the bus switch can directly parse the destination IP address of the message from the message, and forward the message directly to the second processor according to the corresponding relationship between the destination IP address of the message obtained by parsing and the routing rule 1. Then, the forwarding path of the message includes: the first processor, the bus switch, and the second processor, and no longer includes the interaction between the bus switch and the second NIC, making the forwarding path a fast forwarding path.

[0191] When routing rule 2 is adopted, the forwarding path of the message includes: the first processor, the bus switch, the second NIC, the bus switch, the first NIC, the bus switch and the second processor. Since the forwarding path does not include the upper switch, the bandwidth occupation on the upper switch side (or Ethernet side) of the NIC can be reduced, and the forwarding delay of the message can be reduced. For example, if the traffic of the message accounts for more than 30% of the total traffic, the bandwidth occupation on the upper switch side of the first NIC and the second NIC is reduced by more than 30%, and the forwarding delay of more than 90% of the message can be reduced.

[0192] However, this forwarding path still belongs to a slow forwarding path, because the bus switch needs to send the message to the second NIC, the bus switch or the virtual switch deployed in the second NIC needs to establish routing rules, and the virtual switch deployed in the second NIC needs to return the message to the bus switch, and control the bus switch to forward the message to the second processor according to the established routing rules. Of course, the routing rules do not need to be established repeatedly. Therefore, if the bus switch receives the message sent by the first processor again after the routing rules are established, the bus switch does not need to send the message to the second NIC again, but can directly parse the destination IP address of the message from the message, and forward the message to the first NIC according to the corresponding relationship between the destination IP address of the message obtained by parsing and the routing rules, so as to forward the message to the second processor through the first NIC. Then, the forwarding path of the message includes: the first processor, the bus switch, the first NIC, the bus switch and the second processor, and no longer includes the interaction between the bus switch and the second NIC, so that the forwarding path is a fast forwarding path.

[0193] like Figure 8 As shown, the first processor is processor 2, the second NIC is NIC M, the second processor is processor 1, and the first NIC is NIC 1. When routing rule 2 is adopted, the slow forwarding path of the message includes: processor 2, bus switch, NIC M, bus switch, NIC 1, bus switch and processor 1. The fast forwarding path of the message includes: processor 2, bus switch, NIC 1, bus switch and processor 1.

[0194] Taking the slow forwarding path of the message when the routing rule 2 is adopted as an example, the message forwarding process may include the following steps 801 to 807, and the forwarding delay of the message is only about 2.65us.

[0195] Step 801, the delay is about 75ns. Processor 2 generates a message, the destination IP address of the message is the destination IP address of the overlay.

[0196] Step 802, with a delay of about 100 ns. Processor 2 sends a message to NIC M through the bus switch.

[0197] Step 803, with a delay of about 1000 ns, the virtual switch M in the NIC M converts the overlay destination IP address of the message into the underlay destination IP address.

[0198] Step 804, the delay is about 300ns. Virtual switch M queries the first routing table according to the destination IP address of the underlay, and the destination IP address of the underlay hits the underlay IP address of NIC 1 in the first routing table. Virtual switch M returns the message to the bus switch and establishes routing rules in the bus switch (including the correspondence between the destination IP address of the overlay and NIC 1), and the bus switch forwards the message to NIC 1 according to the routing rules.

[0199] Step 805, with a delay of about 1000ns. Virtual switch 1 in NIC 1 converts the overlay destination IP address of the message into the underlay destination IP address, which is the same as the underlay IP address of NIC 1. Afterwards, virtual switch 1 in NIC 1 converts the overlay destination IP address of the message into the underlay destination IP address, encapsulates the underlay destination IP address in the outer layer of the message, obtains an updated message, and sends the updated message to the bus switch.

[0200] Step 806, the delay is about 100ns. The bus switch parses the updated message to obtain the payload part, obtains CPU 1 according to the underlay destination IP address in the updated message, and sends the payload part to CPU 1, for example, to the configuration space of CPU 1.

[0201] Step 807, the delay is about 75ns. CPU 1 obtains the payload part, and the message forwarding process is completed.

[0202] Taking the fast forwarding path of the message when the routing rule 2 is adopted as an example, the message forwarding process may include the following steps 808 to 812.

[0203] Step 808, the delay is about 75ns. Processor 2 generates a message, the destination IP address of the message is the destination IP address of the overlay.

[0204] Step 809, the delay is about 100ns. Processor 2 sends a message to the bus switch, and the bus switch forwards the message to NIC 1 according to the established routing rules.

[0205] Step 810, with a delay of about 1000ns. Virtual switch 1 in NIC 1 converts the overlay destination IP address of the message into the underlay destination IP address, which is the same as the underlay IP address of NIC 1. Afterwards, virtual switch 1 in NIC 1 converts the overlay destination IP address of the message into the underlay destination IP address, encapsulates the underlay destination IP address in the outer layer of the message, obtains an updated message, and sends the updated message to the bus switch.

[0206] Step 811, with a delay of about 100 ns, the bus switch parses the updated message to obtain the payload part, obtains CPU 1 according to the underlay destination IP address in the updated message, and sends the payload part to CPU 1, for example, to the configuration space of CPU 1.

[0207] Step 812, the delay is about 75ns. CPU 1 obtains the payload part, and the message forwarding process is completed.

[0208] The above is an explanation of the case where the message belongs to a message within the computer system. The following is a brief explanation of the case where the message is a message outside the computer system. Exemplarily, the method also includes: the second NIC determines (for example, through a virtual switch) that the destination IP address of the message is an IP address other than the IP address of any NIC among the multiple NICs (indicating that the message is a message outside the computer system), and forwards the message to an upper-level switch connected to multiple NICs in the computer system. After the second NIC determines that the message is a message outside the computer system, it queries the second routing table described above to forward the message to the upper-level switch, and the upper-level switch forwards the message to the destination IP address of the message.

[0209] In summary, after the second NIC in the embodiment of the present application obtains the message generated by the first processor, if the destination IP address of the message is the IP address of the first NIC, the message is considered to be a message within the computer system, and the message is returned to the bus switch, so that the bus switch forwards the message to the second processor according to the routing rules without relying on components such as the upper switch. Therefore, the forwarding path of the message is shorter and the forwarding delay is smaller.

[0210] In an exemplary embodiment, the message forwarding method based on bus network technology provided in the embodiment of the present application can be applied to Figure 2 The first processor in the computer system shown. Fig. 9 As shown, the method includes the following steps 901 to 903.

[0211] Step 901: The first processor generates a message.

[0212] The message generated by the first processor refers to the description in step 503 and will not be described here in detail.

[0213] Step 902: The first processor determines that the destination IP address of the message is the IP address of the first NIC among the multiple NICs.

[0214] The first processor parses the message to obtain the destination IP address of the message. Exemplarily, the first processor parses the message header of the message but does not parse the payload part to obtain the destination IP address of the message.

[0215] Exemplarily, the destination IP address of the message is a virtual destination IP address. In an exemplary embodiment, the IP address of the first NIC is a physical IP address. The first processor determines that the destination IP address of the message is the IP address of the first NIC among multiple NICs, including: if the destination IP address of the message is a virtual destination IP address, the first processor converts the virtual destination IP address of the message into the physical destination IP address of the message; and determines that the physical destination IP address of the message is the physical IP address of the first NIC among multiple NICs. The manner in which the first processor determines that the destination IP address of the message is the IP address of the first NIC among multiple NICs can be referred to the determination process of the bus switch in step 502, which will not be repeated here.

[0216] Exemplarily, the first processor includes a virtual switch. The first processor determines that the destination Internet Protocol IP address of the message is the IP address of the first NIC among the multiple NICs, including: the first processor determines the destination IP address of the message is the IP address of the first NIC among the multiple NICs through the virtual switch. Exemplarily, in the case where the IP address of the first NIC is a physical IP address, if the destination IP address of the message is a virtual destination IP address, the virtual switch can first convert the virtual destination IP address of the message into the physical destination IP address of the message, and then determine that the physical destination IP address of the message is the physical IP address of the first NIC among the multiple NICs.

[0217] Step 903: The first processor sends a message so that the bus switch forwards the message to the second processor according to the routing rule, and the second processor is a processor corresponding to the first NIC among the multiple processors.

[0218] The routing rules can be found in the description of step 503 above, which will not be described in detail here. After the first processor determines that the destination IP address of the message is the IP address of the first NIC, it sends the message to the bus switch so that the bus switch forwards the message to the second processor according to the routing rules. The process of the bus switch sending the message to the second processor according to routing rule 1 or routing rule 2 can be found in the description of step 503, which will not be described in detail here.

[0219] In the case of using routing rule 1, the forwarding path of the message includes: the first processor, the bus switch and the second processor. The reduction of the bandwidth of the upper switch side of the NIC, the bandwidth of the bus switch side of the NIC and the forwarding delay of the forwarding path can be referred to the description in the above implementation mode 2, which will not be repeated here.

[0220] However, this forwarding path is still a slow forwarding path, because the bus switch or the virtual switch deployed in the first processor needs to establish routing rules, and it takes a certain amount of time to establish routing rules. Of course, the routing rules do not need to be established repeatedly. Therefore, if the first processor generates a message again after the routing rules are established, there is no need to establish the routing rules again. The bus switch can directly parse the destination IP address of the message from the message, and forward the message directly to the second processor according to the corresponding relationship between the destination IP address of the message obtained by parsing and the routing rules. Then, although the forwarding path of the message still includes: the first processor, the bus switch and the second processor, the forwarding path is a fast forwarding path.

[0221] like Fig.10 As shown, the first processor is processor 2, and the second processor is processor 1. When routing rule 1 is adopted, the slow forwarding path and the fast forwarding path of the message include: processor 2, bus switch and processor 1 in sequence.

[0222] Taking the slow forwarding path of the message when the routing rule 1 is adopted as an example, the forwarding process of the message may include the following steps 1001 to 1006, and the forwarding delay of the message is only about 1050ns.

[0223] Step 1001, the delay is about 75ns. Processor 2 generates a message, the destination IP address of the message is the destination IP address of the overlay.

[0224] Step 1002, with a delay of about 500 ns, the virtual switch 2 in the processor 2 converts the overlay destination IP address of the message into the underlay destination IP address.

[0225] Step 1003, the delay is about 200ns. Virtual switch 2 queries the first routing table according to the destination IP address of the underlay, and the destination IP address of the underlay hits the underlay IP address of NIC 1 in the first routing table. Therefore, virtual switch 2 establishes routing rules in the bus switch (including the correspondence between the destination IP address of the overlay and CPU 1).

[0226] Step 1004, delay 100ns. Processor 2 sends a message to the bus switch.

[0227] Step 1005, the delay is about 100ns. The bus switch parses the message to obtain the payload part, and forwards the payload part to CPU 1 according to the routing rule.

[0228] Step 1006, the delay is about 75ns. CPU 1 obtains the bus data, and the message forwarding process is completed.

[0229] Taking the fast forwarding path of the message when the routing rule 1 is adopted as an example, the message forwarding process may include the following steps 1007 to 1010.

[0230] Step 1007, the delay is about 75ns. Processor 2 generates a message, the destination IP address of the message is the destination IP address of the overlay.

[0231] Step 1008, with a delay of about 100 ns, processor 2 sends a message to the bus switch.

[0232] Step 1009, the delay is about 100ns. The bus switch parses the message to obtain the payload part, and forwards the payload part to CPU 1 according to the established routing rules.

[0233] Step 1010, the delay is about 75ns. CPU 1 obtains the payload part, and the message forwarding process is completed.

[0234] In the case of using routing rule 2, the slow forwarding path and the fast forwarding path of the message both include: the first processor, the bus switch, the first NIC, the bus switch and the second processor. Compared with the slow forwarding path, the fast forwarding path does not need to repeatedly establish routing rules, so it can reduce the message forwarding delay, which is not described here.

[0235] The above is an explanation of the case where the message belongs to a message within the computer system. The following is a brief explanation of the case where the message is a message outside the computer system. Exemplarily, the method also includes: the first processor determines that the destination IP address of the message is not the IP address of any NIC among the multiple NICs (indicating that the message is a message outside the computer system), and forwards the message to an upper-level switch connected to the multiple NICs in the computer system. After determining that the message is a message outside the computer system, the first processor sends the message to the bus switch, and the bus switch sends the message to the second NIC, so that the second NIC queries the second routing table described above to forward the message to the upper-level switch, and the upper-level switch forwards the message to the destination IP address of the message.

[0236] In summary, after the first processor generates a message in the embodiment of the present application, if the destination IP address of the message is the IP address of the first NIC, the message is considered to be a message within the computer system, and the message is sent to the bus switch, so that the bus switch forwards the message according to the routing rules without relying on components such as the upper switch. Therefore, the forwarding path of the message is shorter and the forwarding delay is smaller.

[0237] In the exemplary embodiment, the above description is made by taking the virtual switch centrally deployed on the bus switch, the second NIC or the first processor as an example. Figure 3 It can be seen from the corresponding description that the virtual switch can also be deployed in a distributed manner. In this case, the virtual switches can be graded, and the upper-level virtual switch establishes multiple routing rules, and the lower-level virtual switch establishes some of the multiple routing rules to avoid too many routing rules affecting the forwarding efficiency of the message. If the message to be forwarded fails to hit the partial routing rules, for example, the corresponding processor or NIC cannot be queried according to the destination IP address of the message to be forwarded, the lower-level virtual switch will obtain one or more other routing rules from the upper-level virtual switch except for the partial routing rules, so that the message to be forwarded can hit the other one or more routing rules obtained, thereby realizing the forwarding of the message.

[0238] For example, a virtual switch is deployed in a bus switch and a second NIC, a lower-level virtual switch is deployed in the bus switch, and an upper-level virtual switch is deployed in the second NIC. If the bus switch receives a message and the message cannot match some routing rules deployed by the lower-level virtual switch in the bus switch, the lower-level virtual switch can obtain one or more other routing rules from the upper-level virtual switch to facilitate the bus switch to forward the message.

[0239] In an exemplary embodiment, the embodiment of the present application provides a message forwarding method based on bus network technology, the method is applied to a computer system, the computer system includes a bus switch, multiple processors and multiple NICs, the method includes: the first processor among the multiple processors generates a message; the bus switch obtains the message generated by the first processor; the bus switch determines that the destination IP address of the message is the IP address of the first NIC among the multiple NICs; the bus switch forwards the message to the second processor according to the routing rule, the second processor is the processor corresponding to the first NIC among the multiple processors. The steps performed by the bus switch can be referred to above. Figure 5 The corresponding instructions are not repeated here.

[0240] Exemplarily, the embodiment of the present application also provides a message forwarding method based on bus network technology, the method is applied to a computer system, the computer system includes a bus switch, multiple processors and multiple NICs, the method includes: the first processor among the multiple processors generates a message; the second NIC among the multiple NICs obtains the message generated by the first processor, the first processor corresponds to the second NIC; the second NIC determines that the destination IP address of the message is the IP address of the first NIC among the multiple NICs; the second NIC sends the message so that the bus switch forwards the message to the second processor according to the routing rules, the second processor is the processor among the multiple processors corresponding to the first NIC. Among them, the steps performed by the second NIC can be referred to above Figure 7 The corresponding instructions are not repeated here.

[0241] Exemplarily, the embodiment of the present application also provides a message forwarding method based on bus network technology, the method is applied to a computer system, the computer system includes a bus switch, multiple processors and multiple NICs, the method includes: a first processor among the multiple processors generates a message, determines that the destination IP address of the message is the IP address of the first NIC among the multiple NICs, sends the message so that the bus switch forwards the message to the second processor according to the routing rule, and the second processor is the processor corresponding to the first NIC among the multiple processors. The steps performed by the first processor can be referred to above. Fig. 9 The corresponding instructions are not repeated here.

[0242] The above describes the message forwarding method based on bus network technology provided by the embodiment of the present application. Corresponding to the above method, the embodiment of the present application also provides a message forwarding device based on bus network technology. The device is applied to a virtual switch. The device is used to Fig.11 The modules shown above perform the Figure 5 The message forwarding method based on bus network technology is shown in FIG. Fig.11 As shown, the message forwarding device based on bus network technology provided in the embodiment of the present application includes the following modules.

[0243] An acquisition module 1101 is used to acquire a message generated by a first processor among multiple processors;

[0244] A determination module 1102, configured to determine that a destination Internet Protocol IP address of the message is an IP address of a first NIC among the multiple NICs;

[0245] The forwarding module 1103 is used to forward the message to the second processor according to the routing rule, and the second processor is a processor corresponding to the first NIC among the multiple processors.

[0246] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the second processor; and the forwarding module 1103 is configured to forward the message to the second processor according to the correspondence included in the routing rule.

[0247] In a possible implementation, the routing rule includes a correspondence between the destination IP address of the message and the first NIC; the forwarding module 1103 is used to forward the message to the first NIC according to the correspondence included in the routing rule, so as to forward the message to the second processor through the first NIC.

[0248] In a possible implementation manner, the destination IP address of the message is a virtual destination IP address.

[0249] In one possible implementation, the IP address of the first NIC is a physical IP address; the determination module 1102 is used to convert the virtual destination IP address of the message into the physical destination IP address of the message if the destination IP address of the message is a virtual destination IP address; and determine that the physical destination IP address of the message is the physical IP address of the first NIC among the multiple NICs.

[0250] In a possible implementation, the bus switch includes a virtual switch; and the determination module 1102 is configured to determine, through the virtual switch, that the destination IP address of the message is the IP address of the first NIC among the multiple NICs.

[0251] In a possible implementation, the determination module 1102 is further used to determine that the destination IP address of the message is an IP address other than the IP address of any NIC among the multiple NICs; the forwarding module 1103 is further used to forward the message to an upper-level switch connected to the multiple NICs.

[0252] Corresponding to the above method, the embodiment of the present application also provides a message forwarding device based on bus network technology. The device is applied to a bus switch. The device is used to Fig.12 The modules shown above perform the Figure 7 The message forwarding method based on bus network technology is shown in FIG. Fig.12 As shown, the message forwarding device based on bus network technology provided in the embodiment of the present application includes the following modules.

[0253] An acquisition module 1201 is used to acquire a message generated by a first processor among multiple processors, where the first processor corresponds to the second NIC;

[0254] A determination module 1202 is used to determine that a destination Internet Protocol IP address of the message is an IP address of a first NIC among the multiple NICs;

[0255] The sending module 1203 is used to send a message so that the bus switch forwards the message to the second processor according to the routing rule, and the second processor is a processor corresponding to the first NIC among the multiple processors.

[0256] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the second processor, and the routing rule is used for the bus switch to forward the message to the second processor according to the correspondence.

[0257] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the first NIC, and the routing rule is used by the bus switch to forward the message to the first NIC according to the correspondence, so as to forward the message to the second processor through the first NIC.

[0258] In a possible implementation manner, the destination IP address of the message is a virtual destination IP address.

[0259] In one possible implementation, the IP address of the first NIC is a physical IP address;

[0260] The determination module 1202 is used to convert the virtual destination IP address of the message into the physical destination IP address of the message if the destination IP address of the message is a virtual destination IP address; and determine that the physical destination IP address of the message is the physical IP address of the first NIC among the multiple NICs.

[0261] In one possible implementation, the second NIC includes a virtual switch;

[0262] The determination module 1202 is used to determine, through the virtual switch, that the destination IP address of the message is the IP address of the first NIC among the multiple NICs.

[0263] In a possible implementation, the determination module 1202 is further used to determine that the destination IP address of the message is an IP address other than the IP address of any NIC among the multiple NICs; the sending module 1203 is further used to forward the message to an upper-level switch connected to the multiple NICs.

[0264] Corresponding to the above method, the embodiment of the present application also provides a message forwarding device based on bus network technology. The device is applied to a bus switch. The device is used to Fig.13 The modules shown above perform the Fig. 9 The message forwarding method based on bus network technology is shown in FIG. Fig.13 As shown, the message forwarding device based on bus network technology provided in the embodiment of the present application includes the following modules.

[0265] A generating module 1301, used for generating a message;

[0266] A determination module 1302 is used to determine that the destination IP address of the message is the IP address of the first NIC among the multiple NICs;

[0267] The sending module 1303 is used to send a message so that the bus switch forwards the message to the second processor according to the routing rule, and the second processor is a processor corresponding to the first NIC among the multiple processors.

[0268] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the second processor, and the routing rule is used for the bus switch to directly forward the message to the second processor according to the correspondence.

[0269] In a possible implementation, the routing rule includes a correspondence between a destination IP address of the message and the first NIC, and the routing rule is used by the bus switch to forward the message to the first NIC according to the correspondence, so as to forward the message to the second processor through the first NIC.

[0270] In a possible implementation manner, the destination IP address of the message is a virtual destination IP address.

[0271] In a possible implementation, the IP address of the first NIC is a physical IP address. The determination module 1302 is used to convert the virtual destination IP address of the message into the physical destination IP address of the message if the destination IP address of the message is a virtual destination IP address; and determine that the physical destination IP address of the message is the physical IP address of the first NIC among the multiple NICs.

[0272] In a possible implementation, the first processor includes a virtual switch. The determination module 1302 is configured to determine, through the virtual switch, that the destination IP address of the message is the IP address of the first NIC among the multiple NICs.

[0273] In a possible implementation, the determination module 1302 is further used to determine that the destination IP address of the message is an IP address other than the IP address of any NIC among the multiple NICs; the sending module 1303 is further used to forward the message to an upper-level switch connected to the multiple NICs.

[0274] It should be understood that the above Fig.11 , Fig.12 and Fig.13 The device shown in the figure has the following beneficial effects when realizing its function: Figure 5 , Figure 7 and Fig. 9 The methods shown have the same beneficial effects. Fig.11 , Fig.12 and Fig.13When the device shown implements its functions, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0275] See also Fig.14 , Fig.14 A schematic structural diagram of an exemplary message forwarding device 1400 based on bus network technology of the present application is shown. The message forwarding device 1400 based on bus network technology includes at least one processor 1401, a memory 1403 and at least one network interface 1404.

[0276] Processor 1401 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing units (NPU), a data processing unit (DPU), a microprocessor or one or more integrated circuits or application-specific integrated circuits (ASICs) for implementing the solution of the present application, a programmable logic device (PLD), other general-purpose processors or other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components or any combination thereof. PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting an advanced RISC machines (ARM) architecture. It can implement or execute various logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of DSP and microprocessor, and so on.

[0277] Optionally, the message forwarding device 1400 based on bus network technology also includes a bus 1402. The bus 1402 is used to transmit information between the components of the message forwarding device 1400 based on bus network technology. The bus 1402 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus 1402 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.14 The fact that only one line is used in the diagram does not mean that there is only one bus or only one type of bus.

[0278] The memory 1403 is, for example, a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache.

[0279] By way of example but not limitation, many forms of ROM and RAM are available. For example, ROM is a compact disc read-only memory (CD-ROM). RAM includes, but is not limited to, static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).

[0280] The memory 1403 may also be other types of storage devices that can store static information and instructions. Or it may be other types of dynamic storage devices that can store information and instructions. Or it may be other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, blue-ray disk, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by the computer, but is not limited to this. The memory 1403, for example, exists independently and is connected to the processor 1401 through the bus 1402. The memory 1403 may also be integrated with the processor 1401.

[0281] The network interface 1404 uses any transceiver-like device to communicate with other devices or communication networks, and the communication network can be Ethernet, radio access network (RAN) or wireless local area network (WLAN), etc. The network interface 1404 may include a wired network interface and may also include a wireless network interface. Specifically, the network interface 1404 may be an Ethernet interface, such as a fast Ethernet (FE) interface, a gigabit Ethernet (GE) interface, an asynchronous transfer mode (ATM) interface, a WLAN interface, a cellular network interface or a combination thereof. The Ethernet interface may be an optical interface, an electrical interface or a combination thereof. In some embodiments of the present application, the network interface 1404 may be used for the message forwarding device 1400 based on bus network technology to communicate with other devices.

[0282] In a specific implementation, as some embodiments, the processor 1401 may include one or more CPUs, such as Fig.14 0 and CPU1 shown in FIG. Each of these processors may be a single-core processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0283] In a specific implementation, as some implementation methods, the message forwarding device 1400 based on bus network technology may include multiple processors, such as Fig.14 1401 and 1405 shown in FIG. Each of these processors may be a single-core processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0284] In some implementations, the memory 1403 is used to store program instructions 1410 for executing the solution of the present application, and the processor 1401 can execute the program instructions 1410 stored in the memory 1403. That is, the message forwarding device 1400 based on the bus network technology can implement the method provided in the method embodiment through the processor 1401 and the program instructions 1410 in the memory 1403, that is, Figure 5 , Figure 7 or Fig. 9 The method shown. The program instruction 1410 may include one or more software modules. Optionally, the processor 1401 itself may also store program instructions for executing the solution of the present application.

[0285] In the specific implementation process, the message forwarding device 1400 based on bus network technology of the present application may correspond to a virtual switch or a bus switch for executing the above method, and the processor 1401 in the message forwarding device 1400 based on bus network technology reads the instruction in the memory 1403, so that Fig.14 The bus network technology-based message forwarding device 1400 shown can execute all or part of the steps in the method embodiment.

[0286] The message forwarding device 1400 based on bus network technology can also correspond to the above Fig.11 , Fig.12 or Fig.13 The device shown, Fig.11 , Fig.12 or Fig.13 Each functional module in the device shown is implemented by software of the message forwarding device 1400 based on bus network technology. In other words, Fig.11 , Fig.12 or Fig.13 The functional modules included in the device shown are generated after the processor 1401 of the message forwarding device 1400 based on the bus network technology reads the program instructions 1410 stored in the memory 1403.

[0287] Among them, Figure 5 , Figure 7 or Fig. 9 Each step of the method shown is completed by an integrated logic circuit of hardware or software instructions in the processor of the message forwarding device 1400 based on bus network technology. The steps of the method embodiment disclosed in the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method embodiment in combination with its hardware. To avoid repetition, it is not described in detail here.

[0288] In an exemplary embodiment, a computer system is provided, the computer system includes a bus switch, multiple processors and multiple NICs, a first processor among the multiple processors is used to generate a message; the bus switch is used to obtain the message generated by the first processor, determine that the destination Internet Protocol IP address of the message is the IP address of the first NIC among the multiple NICs, and forward the message to the second processor according to the routing rule, the second processor is the processor among the multiple processors corresponding to the first NIC. This computer system can refer to Figure 5 Corresponding description.

[0289] In an exemplary embodiment, another computer system is provided, the computer system includes a bus switch, multiple processors and multiple NICs, a first processor among the multiple processors is used to generate a message; a second NIC among the multiple NICs is used to obtain the message generated by the first processor, the first processor corresponds to the second NIC, determines that the destination Internet Protocol IP address of the message is the IP address of the first NIC among the multiple NICs, sends the message so that the bus switch forwards the message to the second processor according to the routing rule, the second processor is the processor among the multiple processors corresponding to the first NIC, and this computer system can refer to Figure 7 Corresponding description.

[0290] In an exemplary embodiment, another computer system is provided, the computer system includes a bus switch, multiple processors and multiple NICs, a first processor among the multiple processors is used to generate a message, determine that the destination IP address of the message is the IP address of the first NIC among the multiple NICs, send the message so that the bus switch forwards the message to the second processor according to the routing rule, the second processor is the processor corresponding to the first NIC among the multiple processors, and this computer system can refer to Fig. 9 Corresponding description.

[0291] In an exemplary embodiment, a bus switch is provided, the bus switch is used to implement Figure 5 The message forwarding method based on bus network technology is shown.

[0292] In an exemplary embodiment, a network interface card, NIC, is provided, which is used to implement Figure 7 The message forwarding method based on bus network technology is shown.

[0293] In an exemplary embodiment, a processor is provided, the processor being configured to implement Fig. 9 The message forwarding method based on bus network technology is shown.

[0294] In an exemplary embodiment, the present application provides a message forwarding device based on bus network technology, the device comprising a memory and a processor; the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to enable the message forwarding device based on bus network technology to implement Figure 5 , Figure 7 or Fig. 9 The message forwarding method based on bus network technology is shown. For example, the message forwarding device based on bus network technology includes but is not limited to a bus switch.

[0295] In an exemplary embodiment, the present application provides a computer program or a computer program product, the computer program or the computer program product comprising: computer instructions, when the computer instructions are executed by a computer, the computer executes the above Figure 5 , Figure 7 or Fig. 9 The message forwarding method based on bus network technology is shown.

[0296] Exemplarily, an embodiment of the present application provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the above Figure 5 , Figure 7 or Fig. 9 The message forwarding method based on bus network technology is executed by a computer.

[0297] Exemplarily, an embodiment of the present application provides a chip, including a processor, for calling and executing instructions stored in a memory from a memory, so that a computer equipped with the chip executes the above-mentioned Figure 5 , Figure 7 or Fig. 9 The message forwarding method based on bus network technology is shown.

[0298] In an exemplary embodiment, the present application provides another chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the computer equipped with the chip executes the above Figure 5 , Figure 7 or Fig. 9 The message forwarding method based on bus network technology is shown.

[0299] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk), etc.

[0300] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limitation on the quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another.

[0301] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0302] The term "at least one" in this application means one or more, and the term "multiple" in this application means two or more, for example, multiple processors means two or more processors. The terms "system" and "network" are often used interchangeably herein.

[0303] It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0304] It should also be understood that the term "and / or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and / or" is a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.

[0305] It should also be understood that the terms "if" and "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrases "if it is determined that ..." or "if [a stated condition or event] is detected" may be interpreted to mean "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.

[0306] The above description is only an embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present application.

[0307] The above description is only an embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A message forwarding method based on bus network technology, characterized in that: The method is applied to a bus switch in a computer system, wherein the computer system further comprises a plurality of processors and a plurality of network interface cards NICs, wherein the bus switch is connected to the plurality of processors, and the bus switch is also connected to the plurality of NICs, and the method comprises: Obtaining a message generated by a first processor among the multiple processors; Determining that a destination Internet Protocol IP address of the message is an IP address of a first NIC among the multiple NICs; The message is forwarded to a second processor according to a routing rule, where the second processor is a processor among the multiple processors corresponding to the first NIC.

2. The method according to claim 1, characterized in that The routing rule includes a correspondence between the destination IP address of the message and the second processor; The forwarding the message to the second processor according to the routing rule includes: The message is forwarded to the second processor according to the corresponding relationship included in the routing rule.

3. The method according to claim 1, characterized in that The routing rule includes a correspondence between the destination IP address of the message and the first NIC; The forwarding the message to the second processor according to the routing rule includes: The message is forwarded to the first NIC according to the corresponding relationship included in the routing rule, so as to forward the message to the second processor through the first NIC.

4. The method according to any one of claims 1 to 3, characterized in that: The destination IP address of the message is a virtual destination IP address.

5. The method according to any one of claims 1 to 4, characterized in that: The IP address of the first NIC is a physical IP address; The step of determining that the destination Internet Protocol IP address of the message is the IP address of a first NIC among the multiple NICs includes: If the destination IP address of the message is a virtual destination IP address, convert the virtual destination IP address of the message into a physical destination IP address of the message; The physical destination IP address of the message is determined to be the physical IP address of the first NIC among the multiple NICs.

6. The method according to any one of claims 1 to 4, characterized in that: The bus switch includes a virtual switch; The step of determining that the destination Internet Protocol IP address of the message is the IP address of a first NIC among the multiple NICs includes: The destination IP address of the message is determined by the virtual switch to be the IP address of the first NIC among the multiple NICs.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Determine that the destination IP address of the message is an IP address other than the IP address of any NIC among the multiple NICs, and forward the message to an upper-level switch connected to the multiple NICs.

8. A message forwarding method based on bus network technology, characterized in that: The method is applied to a second NIC among a plurality of network interface cards NIC in a computer system, wherein the computer system further comprises a bus switch and a plurality of processors, the plurality of NICs are connected to the bus switch, and the bus switch is also connected to the plurality of processors, and the method comprises: Obtain a message generated by a first processor among the multiple processors, where the first processor corresponds to the second NIC; Determining that a destination Internet Protocol IP address of the message is an IP address of a first NIC among the multiple NICs; The message is sent so that the bus switch forwards the message to a second processor according to a routing rule, where the second processor is a processor corresponding to the first NIC among the multiple processors.

9. The method according to claim 8, characterized in that The routing rule includes a correspondence between a destination IP address of the message and the second processor, and the routing rule is used by the bus switch to forward the message to the second processor according to the correspondence.

10. The method according to claim 8, characterized in that The routing rule includes a correspondence between a destination IP address of the message and the first NIC, and the routing rule is used by the bus switch to forward the message to the first NIC according to the correspondence, so as to forward the message to the second processor through the first NIC.

11. The method according to any one of claims 8 to 10, characterized in that: The destination IP address of the message is a virtual destination IP address.

12. The method according to any one of claims 8 to 11, characterized in that: The IP address of the first NIC is a physical IP address; The step of determining that the destination Internet Protocol IP address of the message is the IP address of a first NIC among the multiple NICs includes: If the destination IP address of the message is a virtual destination IP address, convert the virtual destination IP address of the message into a physical destination IP address of the message; The physical destination IP address of the message is determined to be the physical IP address of the first NIC among the multiple NICs.

13. The method according to any one of claims 8 to 11, characterized in that: The second NIC includes a virtual switch; The step of determining that the destination Internet Protocol IP address of the message is the IP address of a first NIC among the multiple NICs includes: The destination IP address of the message is determined by the virtual switch to be the IP address of the first NIC among the multiple NICs.

14. The method according to any one of claims 8 to 13, characterized in that: The method further comprises: Determine that the destination IP address of the message is an IP address other than the IP address of any NIC among the multiple NICs, and forward the message to an upper-level switch connected to the multiple NICs.

15. A message forwarding method based on bus network technology, characterized in that: The method is applied to a computer system, wherein the computer system includes a bus switch, multiple processors, and multiple network interface cards NIC, and the method includes: A first processor among the multiple processors generates a message; The bus switch obtains a message generated by the first processor; The bus switch determines that the destination Internet Protocol IP address of the message is the IP address of a first NIC among the multiple NICs; The bus switch forwards the message to a second processor according to a routing rule, where the second processor is a processor corresponding to the first NIC among the multiple processors.

16. A message forwarding method based on bus network technology, characterized in that: The method is applied to a computer system, wherein the computer system includes a bus switch, multiple processors, and multiple network interface cards NIC, and the method includes: A first processor among the multiple processors generates a message; A second NIC among the multiple NICs obtains a message generated by the first processor, and the first processor corresponds to the second NIC; The second NIC determines that the destination Internet Protocol IP address of the message is the IP address of the first NIC among the multiple NICs; The second NIC sends a message so that the bus switch forwards the message to a second processor according to a routing rule, and the second processor is a processor corresponding to the first NIC among the multiple processors.

17. A message forwarding device based on bus network technology, characterized in that: The device is applied to a bus switch in a computer system, the computer system further comprising a plurality of processors and a plurality of network interface cards NIC, wherein the bus switch is connected to the plurality of processors, and the bus switch is also connected to the plurality of NICs, and the device comprises: An acquisition module, used for acquiring a message generated by a first processor among the multiple processors; a determination module, configured to determine that a destination Internet Protocol IP address of the message is an IP address of a first NIC among the multiple NICs; A forwarding module is used to forward the message to a second processor according to a routing rule, where the second processor is a processor corresponding to the first NIC among the multiple processors.

18. The device according to claim 17, characterized in that The routing rule includes a correspondence between the destination IP address of the message and the second processor; The forwarding module is used to forward the message to the second processor according to the corresponding relationship included in the routing rule.

19. The device according to claim 17, characterized in that The routing rule includes a correspondence between the destination IP address of the message and the first NIC; The forwarding module is used to forward the message to the first NIC according to the corresponding relationship included in the routing rule, so as to forward the message to the second processor through the first NIC.

20. The device according to any one of claims 17 to 19, characterized in that: The destination IP address of the message is a virtual destination IP address.

21. The device according to any one of claims 17 to 20, characterized in that: The IP address of the first NIC is a physical IP address; The determining module is used for converting the virtual destination IP address of the message into the physical destination IP address of the message if the destination IP address of the message is a virtual destination IP address; The physical destination IP address of the message is determined to be the physical IP address of the first NIC among the multiple NICs.

22. The device according to any one of claims 17 to 20, characterized in that: The bus switch includes a virtual switch; The determination module is used to determine, through the virtual switch, that the destination IP address of the message is the IP address of the first NIC among the multiple NICs.

23. The device according to any one of claims 17 to 22, characterized in that: The determination module is further configured to determine that the destination IP address of the message is an IP address other than the IP address of any NIC among the multiple NICs; The forwarding module is further used to forward the message to an upper-level switch connected to the multiple NICs.

24. A message forwarding device based on bus network technology, characterized in that: The device is applied to a second NIC among a plurality of network interface cards NIC in a computer system, wherein the computer system further comprises a bus switch and a plurality of processors, wherein the plurality of NICs are connected to the bus switch, and the bus switch is also connected to the plurality of processors, and the device comprises: An acquisition module, configured to acquire a message generated by a first processor among the multiple processors, where the first processor corresponds to the second NIC; a determination module, configured to determine that a destination Internet Protocol IP address of the message is an IP address of a first NIC among the multiple NICs; A sending module is used to send a message so that the bus switch forwards the message to a second processor according to a routing rule, and the second processor is a processor corresponding to the first NIC among the multiple processors.

25. The device according to claim 24, characterized in that The routing rule includes a correspondence between a destination IP address of the message and the second processor, and the routing rule is used by the bus switch to forward the message to the second processor according to the correspondence.

26. The device according to claim 24, characterized in that The routing rule includes a correspondence between a destination IP address of the message and the first NIC, and the routing rule is used by the bus switch to forward the message to the first NIC according to the correspondence, so as to forward the message to the second processor through the first NIC.

27. The device according to any one of claims 24 to 26, characterized in that: The destination IP address of the message is a virtual destination IP address.

28. The device according to any one of claims 24 to 27, characterized in that: The IP address of the first NIC is a physical IP address; The determining module is used for converting the virtual destination IP address of the message into the physical destination IP address of the message if the destination IP address of the message is a virtual destination IP address; The physical destination IP address of the message is determined to be the physical IP address of the first NIC among the multiple NICs.

29. The device according to any one of claims 24 to 27, characterized in that: The second NIC includes a virtual switch; The determination module is used to determine, through the virtual switch, that the destination IP address of the message is the IP address of the first NIC among the multiple NICs.

30. The device according to any one of claims 24 to 29, characterized in that: The determination module is further configured to determine that the destination IP address of the message is an IP address other than the IP address of any NIC among the multiple NICs; The sending module is further used to forward the message to an upper-level switch connected to the multiple NICs.

31. A bus switch, characterized in that: The bus switch is used to execute the message forwarding method based on bus network technology as described in any one of claims 1-7.

32. A network interface card, characterized in that: The network interface card is used to execute the message forwarding method based on bus network technology as described in any one of claims 8-14.

33. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor so that the computer implements the message forwarding method based on bus network technology as described in any one of claims 1-14.

34. A computer program product, characterized in that The computer program product includes computer instructions, and the computer instructions are executed by a processor to enable a computer to implement the message forwarding method based on bus network technology as described in any one of claims 1-14.

Citation Information

Cited By

  • Packet forwarding method and apparatus based on bus network technology, and readable storage medium

    EP4783541A1

  • Packet forwarding method and apparatus based on bus network technology, and readable storage medium

    WO2025073178A1