Packet forwarding method and apparatus based on bus network technology, and readable storage medium
By using the bus switch to the processor and the NIC in the computer system, the packets are forwarded directly according to the routing rules, solving the problems of long and delayed message forwarding paths in the prior art, and achieving more efficient packet forwarding.
Patent Information
- Application Number
- PCT/CN2024/098186
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-29
- Filing Date
- 2024-06-07
- Publication Date
- 2025-04-10
AI Technical Summary
In the prior art, the message forwarding path in the computer system is long, resulting in a large delay and depends on the superior switch.
The message forwarding method based on bus network technology is adopted, and multiple processors and NICs are connected through the bus switch, and messages are directly forwarded to the second processor according to the routing rules to avoid relying on the superior switch.
Shorten the message forwarding path, reduce the forwarding delay, and improve forwarding efficiency.
Smart Images

Figure CN2024098186_10042025_PF_FP_ABST
Abstract
Description
Message forwarding method, device and readable storage medium based on bus network technology
[0001] This application claims priority to Chinese patent application No. 202311290368.1 filed on October 7, 2023, with the invention name “Method, device, equipment and computer-readable storage medium for forwarding messages”. This application also claims priority to Chinese patent application No. 202311861662.3 filed on December 29, 2023, with the invention name “Message forwarding method, device and readable storage medium based on bus network technology”, the entire contents of which are incorporated into this application by reference. 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 computer system layouts. For example, a computer system includes a processor, a network interface card (NIC), and an upper-level switch. The processor communicates with the upper-level 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-level switch, and then the upper-level 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.
[0006] Summary of the Invention
[0007] This application provides a message forwarding method, device, and readable storage medium based on bus network technology to improve the problem of long message forwarding paths and large delays. The technical solution provided by this application includes the following aspects.
[0008] In a first aspect, a message forwarding method based on bus network technology is provided. In a computer system, the method includes a bus switch, multiple processors, and multiple NICs. The bus switch is connected to the multiple processors, and the bus switch is also connected to the multiple NICs. The bus switch receives 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. The second processor is the processor among the multiple processors corresponding to the first NIC.
[0009] 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, it is considered that the message is 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 does not need to rely on the upper-level switch connected to multiple NICs in the computer system, thereby shortening the message forwarding path and reducing the message forwarding delay.
[0010] In a possible implementation, the routing rule includes a correspondence between the 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.
[0011] In this embodiment, 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.
[0012] 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.
[0013] In this implementation, the bus switch can forward the message through the first NIC according to the routing rules, which is more flexible. This application supports flexible selection of appropriate routing rules to adapt to different business needs.
[0014] In a possible implementation, the destination IP address of the message is a virtual destination IP address.
[0015] This implementation method determines that the message is a message within the computer system through the virtual destination IP address. It has strong universality and can be widely used in bus switches in computer systems, making the message forwarding method based on bus network technology provided in this application applicable to a variety of scenarios.
[0016] 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 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.
[0017] 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 different forms of IP addresses are unified into the same form of IP address, 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.
[0018] 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 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.
[0019] In this implementation, a virtual switch is deployed within the bus switch. After the virtual switch receives a message through the bus switch, it can determine that the message is within the computer system. The virtual switch can be implemented in software, eliminating the need for hardware upgrades to enable the bus switch to support the message forwarding method provided herein.
[0020] 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.
[0021] In this implementation, the message is outside the computer system, so the bus switch needs to forward the message to the upper-level switch, for example, by forwarding the message to the upper-level switch through the NIC, so that the upper-level switch can forward the message to the outside of the computer system in a timely manner. Even when the message is outside the computer system, the normal forwarding of the message is guaranteed.
[0022] 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 (NICs) in a computer system. The computer system also includes a bus switch and multiple processors. The multiple NICs are connected to the bus switch, which is also connected to the multiple processors. In this method, the second NIC obtains a message generated by a first processor among the multiple processors, the first processor corresponding to the second NIC; determines the destination Internet Protocol (IP) address of the message to be the IP address of the first NIC among the multiple NICs; and sends the message so that the bus switch forwards the message to the second processor according to routing rules, the second processor being the processor among the multiple processors corresponding to the first NIC.
[0023] After receiving a message generated by the first processor, the second NIC, if the destination IP address of the message is the first NIC's IP address, assumes the message is from within the computer system and sends it to the bus switch. The bus switch then forwards the message to the second processor according to routing rules, without relying on components such as upper-level switches. As a result, the message forwarding path is shorter and the forwarding latency is reduced.
[0024] 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 by the bus switch to forward the message to the second processor according to the correspondence.
[0025] 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 via the bus. This forwarding method is relatively simple and fast, and the message forwarding efficiency is high and the delay is short.
[0026] In one possible implementation, the routing rule includes a correspondence between the 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.
[0027] In this implementation, the bus switch can forward the message through the first NIC, which is more flexible.
[0028] In a possible implementation, the destination IP address of the message is a virtual destination IP address.
[0029] 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.
[0030] 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 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.
[0031] By converting the format of the destination IP address, it is possible to flexibly determine whether the message belongs to the computer system even when the format of the destination IP address carried in the message is different from the IP format of the first NIC.
[0032] 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.
[0033] 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.
[0034] 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.
[0035] In this implementation, the message is outside the computer system, and therefore needs to be forwarded to the upper-level switch so that the upper-level switch forwards the message outside the computer system, thereby ensuring normal forwarding of the message.
[0036] 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 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, and sending the message so that the bus switch forwards the message to the second processor according to routing rules. The second processor is the processor corresponding to the first NIC among the multiple processors.
[0037] After the first processor generates a message, if the destination IP address of the message is the IP address of the first NIC, it is considered to be a message within the computer system. Therefore, the first processor sends the message to the bus switch, which then forwards the message according to routing rules without relying on components such as upper-level switches. As a result, the message forwarding path is shorter and the forwarding latency is reduced.
[0038] In a possible implementation, the routing rule includes a correspondence between the 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.
[0039] 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, ensuring that the message forwarding process has high efficiency and shortening the message forwarding delay.
[0040] In one possible implementation, the routing rule includes a correspondence between the 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.
[0041] In this implementation, the bus switch can forward the message through the first NIC according to the routing rules, which is more flexible. This application supports flexible selection of appropriate routing rules to adapt to different business needs.
[0042] In a possible implementation, the destination IP address of the message is a virtual destination IP address.
[0043] The virtual destination IP address has strong universality, making the message forwarding method based on bus network technology provided in this application applicable to a variety of scenarios.
[0044] 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 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 a 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.
[0045] 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 different forms of IP addresses are unified into the same form of IP address, 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.
[0046] In one possible implementation, the first processor includes a virtual switch. Determining the destination Internet Protocol (IP) address of the message as the IP address of a first NIC among the multiple NICs includes: determining, through the virtual switch, the destination IP address of the message as the IP address of the first NIC among the multiple NICs.
[0047] 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.
[0048] 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.
[0049] In this implementation, the message is outside the computer system, so it needs to be forwarded to the upper-level switch. For example, the message is forwarded to the upper-level switch through the bus switch and the NIC, so that the upper-level switch can forward the message outside the computer system, ensuring normal forwarding of the message.
[0050] In a fourth aspect, a message forwarding method based on bus network technology is provided. The method is applied to a computer system comprising a bus switch, multiple processors, and multiple NICs. The method comprises: a 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 a first NIC among the multiple NICs; and the bus switch forwards the message to a second processor according to a routing rule, the second processor being the processor among the multiple processors corresponding to the first NIC. The possible implementations of the steps performed by the bus switch can be found in the various possible implementations corresponding to the first aspect.
[0051] In a fifth aspect, a message forwarding method based on bus network technology is provided. The method is applied to a computer system comprising a bus switch, multiple processors, and multiple NICs. The method comprises: a first processor among the multiple processors generates a message; a second NIC among the multiple NICs obtains the message generated by the first processor, the first processor corresponding 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; and the second NIC sends the message so that the bus switch forwards the message to the second processor according to routing rules, the second processor being the processor among the multiple processors corresponding to the first NIC. For possible implementations of the steps performed by the second NIC, please refer to the various possible implementations corresponding to the second aspect.
[0052] In a sixth aspect, a message forwarding method based on bus network technology is provided. The method is applied to a computer system comprising a bus switch, multiple processors, and multiple NICs. The method comprises: 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, and sends the message so that the bus switch forwards the message to a second processor according to a routing rule, where the second processor is the processor among the multiple processors corresponding to the first NIC. For possible implementations of the steps performed by the first processor, refer to the various possible implementations corresponding to the third aspect.
[0053] In a seventh aspect, a message forwarding device based on bus network technology is provided, the device comprising:
[0054] an acquisition module, configured to acquire a message generated by a first processor among the multiple processors;
[0055] 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;
[0056] 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.
[0057] 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.
[0058] In one possible implementation, the routing rule includes a correspondence between the destination IP address of the message and the first NIC; the forwarding module is configured 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 via the first NIC.
[0059] In a possible implementation, the destination IP address of the message is a virtual destination IP address.
[0060] In one 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.
[0061] 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 a first NIC among the multiple NICs.
[0062] In a possible implementation, 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; and the forwarding module is further configured to forward the message to an upper-level switch connected to the multiple NICs.
[0063] In an eighth aspect, a message forwarding device based on bus network technology is applied to a second NIC among multiple network interface cards (NICs) in a computer system. The computer system further includes a bus switch and multiple processors. The multiple NICs are connected to the bus switch, and the bus switch is further connected to the multiple processors. The device includes:
[0064] an acquisition module, configured to acquire a message generated by a first processor among the plurality of processors, where the first processor corresponds to the second NIC;
[0065] 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;
[0066] The sending module is configured to send a message so that the bus switch forwards the message to the second processor according to a routing rule, where the second processor is a processor corresponding to the first NIC among the multiple processors.
[0067] 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 by the bus switch to forward the message to the second processor according to the correspondence.
[0068] In one possible implementation, the routing rule includes a correspondence between the 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.
[0069] In a possible implementation, the destination IP address of the message is a virtual destination IP address.
[0070] In one possible implementation, the IP address of the first NIC is a physical IP address;
[0071] 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.
[0072] In one possible implementation, the second NIC includes a virtual switch;
[0073] The determination module 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.
[0074] In a possible implementation, 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; and the sending module is further configured to forward the message to an upper-level switch connected to the multiple NICs.
[0075] 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, and the bus switch is further connected to the multiple NICs. The device includes:
[0076] A generation module, used for generating messages;
[0077] a determination module, configured to determine that a destination IP address of the message is an IP address of a first NIC among the multiple NICs;
[0078] The sending module is configured to send a message so that the bus switch forwards the message to the second processor according to a routing rule, where the second processor is a processor corresponding to the first NIC among the multiple processors.
[0079] In a possible implementation, the routing rule includes a correspondence between the 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.
[0080] In one possible implementation, the routing rule includes a correspondence between the 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.
[0081] In a possible implementation, the destination IP address of the message is a virtual destination IP address.
[0082] In one possible implementation, the IP address of the first NIC is a physical IP address. The determination module is configured to, 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; and determine that the physical destination IP address of the message is the physical IP address of the first NIC among the multiple NICs.
[0083] In a possible implementation, the first processor includes a virtual switch. The determining 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.
[0084] In a possible implementation, 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; and the sending module is further configured to forward the message to an upper-level switch connected to the multiple NICs.
[0085] 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 the second processor according to the routing rules, wherein the second processor is the processor among the multiple processors corresponding to the first NIC.
[0086] 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.
[0087] 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 the processor among the multiple processors corresponding to the first NIC.
[0088] In a thirteenth aspect, a bus switch is provided, which is used to implement the message forwarding method based on bus network technology provided by the first aspect and any possible implementation manner of the first aspect.
[0089] 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 of the second aspect.
[0090] In a fifteenth aspect, a processor is provided, which 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.
[0091] 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 storing at least one computer instruction, the at least one computer instruction being 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 in the above aspects. For example, the message forwarding device based on bus network technology includes, but is not limited to, a bus switch.
[0092] Optionally, there are one or more processors and one or more memories.
[0093] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0094] In the seventeenth aspect, a computer program or computer program product is provided, which includes: computer instructions, which, when executed by a computer, enable the computer to execute the message forwarding method based on bus network technology provided by the above aspects.
[0095] In the eighteenth aspect, a computer-readable storage medium is provided, which stores computer instructions. When the computer instructions are run on a computer, the message forwarding method based on bus network technology provided by the above aspects is executed by the computer.
[0096] In the nineteenth aspect, a chip is provided, including a processor for calling and executing instructions stored in the memory from the memory, so that a computer equipped with the chip executes the message forwarding method based on bus network technology provided by the above aspects.
[0097] In the twentieth aspect, another chip is provided, comprising: 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, the computer equipped with the chip executes the message forwarding method based on bus network technology provided by the above aspects.
[0098] It should be understood that the technical effects achieved by the technical solutions provided in the fourth to twentieth aspects of this application and the corresponding possible implementation methods can be referred to the above description of the technical effects achieved by the technical solutions provided in the first to third aspects and the corresponding possible implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0099] FIG1 is a schematic diagram of a related art forwarding message provided in an embodiment of the present application;
[0100] FIG2 is a schematic diagram of a computer system provided in an embodiment of the present application;
[0101] FIG3 is a schematic diagram of another computer system provided in an embodiment of the present application;
[0102] FIG4 is a schematic diagram of forwarding a message in another related technology provided in an embodiment of the present application;
[0103] FIG5 is a schematic diagram of a message forwarding method based on bus network technology provided in an embodiment of the present application;
[0104] FIG6 is a flow chart of a message forwarding method based on bus network technology provided in an embodiment of the present application;
[0105] FIG7 is a schematic diagram of another message forwarding method based on bus network technology provided in an embodiment of the present application;
[0106] FIG8 is a flow chart of another method for forwarding messages based on bus network technology according to an embodiment of the present application;
[0107] FIG9 is a schematic diagram of another message forwarding method based on bus network technology provided in an embodiment of the present application;
[0108] FIG10 is a flow chart of another method for forwarding messages based on bus network technology according to an embodiment of the present application;
[0109] FIG11 is a schematic structural diagram of a message forwarding device based on bus network technology provided in an embodiment of the present application;
[0110] FIG12 is a schematic diagram of another message forwarding structure based on bus network technology provided in an embodiment of the present application;
[0111] FIG13 is a schematic diagram of a message forwarding structure based on a bus network technology according to another embodiment of the present application;
[0112] FIG14 is a schematic structural diagram of a message forwarding device based on bus network technology provided in an embodiment of the present application. DETAILED DESCRIPTION
[0113] 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.
[0114] The computer communication process involves message forwarding. Referring to FIG. 1 , FIG. 1 illustrates a method for message forwarding within a computer system in a related art. 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-level switch. Processor 1 and NIC 1 are located on server 1, and processor 2 and NIC 2 are located on server 2. Processor 1 and NIC 1, and processor 2 and NIC 2 are connected via a Peripheral Component Interconnect Express (PCIe) bus. NIC 1 and the upper-level switch, and NIC 2 and the upper-level switch, are connected via an Ethernet (ETH) link. Taking the message forwarding process in which processor 1 sends a message and processor 2 receives a message as an example, that is, the cross-server message forwarding process, the message forwarding process includes the following steps 1 to 7, where the units of delay in these steps include nanoseconds (ns) and microseconds (us).
[0115] Step 1: Delay 75 ns. Processor 1 generates a message.
[0116] Step 2: With a delay of 500 ns, Processor 1 sends the message to NIC 1 via the PCIe bus.
[0117] Step 3: After a 10-µs delay, virtual switch 1 in NIC 1 performs address mapping on the packet and sends the mapped packet to the upper-level switch.
[0118] Step 4: After a delay of 1 μs, the upstream switch queries its routing table and sends the packet to NIC 2.
[0119] Step 5: After a delay of 10 μs, virtual switch 2 in NIC 2 performs address mapping on the packet.
[0120] Step 6: Delay 500ns. Virtual switch 2 in NIC 2 converts the format of the address-mapped message to obtain data that meets the requirements of the PCIe bus, also known as PCIe configuration space data.
[0121] Step 7: Delay 75ns. Processor 2 obtains PCIe configuration space data.
[0122] The total delay of steps 1 to 7 is 22.15us, that is, the message forwarding delay is 22.15us. The message forwarding process of this related technology depends on the upper-level switch. The message forwarding path includes the upper-level switch, the forwarding path is long, and the message forwarding delay is large.
[0123] In an embodiment of the present application, a computer system is provided. As shown in FIG2 , the computer system includes: a bus switch, an upper-level switch, multiple processors, and multiple NICs. The multiple processors are processors 1 through N shown in FIG2 , where N is a positive integer greater than or equal to 2. The multiple processors can be distributed across different communication devices, including but not limited to servers. The multiple NICs are NICs 1 through NIC M shown in FIG2 , where M is a positive integer greater than or equal to 2.
[0124] Among them, the bus switch is connected to multiple processors through a bus, and the bus switch is also connected to multiple NICs through a bus, and multiple NICs are also connected to an upper-level switch, for example, connected to an upper-level 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. Compared with the Ethernet network shown in Figure 1, the bus network has lower latency and larger bandwidth. Therefore, based on the bus network, long-distance sharing of different components can be achieved, especially long-distance sharing of different components that are sensitive to latency, which is conducive to decoupling different components, improving component utilization, and making the computer system suitable for various scenarios such as public clouds. Different components may include memory (not shown in Figure 2), processors and NICs, etc., which are not limited in the embodiments of the present application.
[0125] Exemplarily, the aforementioned buses include, but are not limited to, the Compute eXpress Link (CXL) bus, the NVLink (NVLink) bus, and the like. Compared to the traditional PCIe bus, communication based on the CXL bus or the NVLink bus does not require reliance on the processor's operating system, making the communication process more efficient. Exemplarily, the aforementioned upper-level switches include, but are not limited to, top of rack (TOR) switches, also known as in-cabinet switches.
[0126] Exemplarily, as shown in FIG2 , the computer system includes a virtual switch. In an embodiment of the present application, the virtual switch can be deployed in the form of software in the NIC, bus switch, and processor. In some embodiments, a centralized deployment method can be adopted, and the virtual switch can be deployed in the NIC, bus switch, or processor (FIG. 2 does not show the case where the virtual switch is deployed in the bus switch or processor). 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, bus switch, and processor. For example, referring to the situation shown in FIG3 , the virtual switch is deployed in the NIC and the bus switch. Other cases of distributed deployment methods can also be that the virtual switch is deployed in the NIC and the processor, which are not listed here one by one.
[0127] Exemplarily, the virtual switch includes but is not limited to an open virtual switch (OVS), etc., which is not limited in the embodiments of the present application.
[0128] In addition, the bus switch shown in FIG2 is deployed in a centralized manner. In embodiments of the present application, the bus switch may also be deployed in a distributed manner. For example, the bus switch includes multiple sub-switches, and each NIC may be connected to at least one of the multiple sub-switches via a bus. The bus has been described above and will not be repeated here.
[0129] In an exemplary embodiment, the computer system can access a communication network via an upstream switch. For example, the communication network includes a spine network, and the computer system serves as a leaf. The upstream 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 merely an example, and the embodiments of the present application do not limit the communication network to be accessed. The communication network can be set according to actual needs.
[0130] It should be understood that if the relevant technology corresponding to Figure 1 is applied to the computer system shown in Figure 2, the message forwarding path can be seen in Figure 4. This message forwarding process still relies on the upper-level switch, resulting in a longer message forwarding path and a longer message forwarding delay.
[0131] The embodiment of the present application provides a message forwarding method based on bus network technology, which can be applied to the computer system shown in Figure 2. For ease of understanding, some exemplary basic steps in the method are first described here.
[0132] In a computer system, a bus switch, each of multiple NICs, and each of multiple processors can discover neighbor components in the computer system using a neighbor discovery protocol. For example, the bus switch's neighbor components include, but are not limited to, multiple processors and multiple NICs; each NIC's neighbor components include, but are not limited to, the bus switch and its upstream switch; and each processor's neighbor components include, but are not limited to, the bus switch.
[0133] 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. The other components except the management component are non-management components. For example, one of the multiple processors can be used as a management component, and this embodiment of the present application does not limit this. The non-management component can be registered in the management component to facilitate management by the management component. For example, the non-management component can send registration information to the management component. 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 this embodiment of the present application does not limit this.
[0134] The management component can use at least one of the multiple NICs as a communication interface, and the communication interface is connected to a remote device to obtain, from the remote device, a first correspondence between multiple processors and multiple NICs. One NIC can correspond to one or more processors. Exemplarily, the remote device can be a device in a cloud scheduling platform. The first correspondence between the multiple processors and the multiple NICs can be configured by the user based on actual needs and is not limited here.
[0135] After the management component obtains a first correspondence between multiple processors and multiple NICs through the communication interface, it can determine the corresponding processors and NICs based on the first correspondence. The bus switch provides processor-side ports and NIC-side ports, with each processor using at least one processor-side port, and different processors using different processor-side ports; and each NIC using at least one NIC port, and different NICs using different NIC ports. For the corresponding processors and NICs, the management component can establish a second correspondence in the bus switch between the processor-side port used by the processor and the NIC port used by the NIC. The bus switch implements message forwarding between the corresponding processors and NICs based on the second correspondence.
[0136] For example, processor 1 uses port 1 (processor-side port), processor 2 uses port 2 (processor-side port), and NIC A uses port 3 and port 4 (NIC-side ports). 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. Thus, when the bus switch receives a message generated and sent by processor 1 from port 1, it can query the second correspondence based on port 1 and find correspondence 1 in the second correspondence. Based on correspondence 1, it is determined that port 1 corresponds to port 3. Therefore, the message is forwarded through port 3, and NIC A receives the message through port 3, thereby achieving message forwarding between processor 1 and NIC A.
[0137] 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 within the computer system. For example, the first routing table is used by a component (bus switch, NIC or processor) within 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 and will not be repeated here.
[0138] The management component can synchronize the first routing table to the component. For example, the management component can synchronize a first routing table to each NIC. In addition, the management component can also establish a second routing table in the NIC, which is used by the NIC to forward packets to the upstream switch. The process of the NIC using this second routing table will be described in the following method embodiments and will not be repeated here.
[0139] Next, the message forwarding method based on bus network technology provided in an embodiment of the present application is described.
[0140] 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 the bus switch in the computer system shown in Figure 2. As shown in Figure 5, the method includes the following steps 501 to 503.
[0141] Step 501: The bus switch obtains a message generated by a first processor among a plurality of processors.
[0142] The first processor is any one of the multiple processors. The first processor can generate a message, the message header of which 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 a NIC, an upper-level 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.
[0143] After generating a message, the first processor sends the message to the bus switch, and the bus switch receives the message, thereby acquiring the message generated by the first processor.
[0144] 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.
[0145] As described in step 501, the message header includes a destination IP address, and the bus switch parses the message to obtain the destination IP address. For example, the bus switch parses the message header, but does not parse the payload, to obtain the destination IP address. This parsing method is provided for illustrative purposes only and is not intended to limit the present embodiments.
[0146] 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 within 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 within 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.
[0147] Exemplarily, the bus switch queries the first routing table described above based on the destination IP address of the message. Because 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 indicates that the message belongs to the computer system, and the IP address of the NIC hit is the IP address of the first NIC. Alternatively, when the destination IP address of the message does not hit the IP address of any NIC included in the first routing table, it indicates that the message does not belong to the computer system.
[0148] 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. Exemplarily, 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.
[0149] 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.
[0150] If the message belongs to a computer system, the bus switch controls the bus switch to forward the message to the second processor according to the routing rules. This forwarding method does not rely on the upper-level switch. For example, the message forwarding path does not include the upper-level switch connected to multiple NICs in the computer system. In other words, the components included in the message forwarding path refer to all or part of the components in the computer system other than the upper-level switch. This shortens the message forwarding path and reduces the message forwarding latency.
[0151] 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 the multiple NICs, including: determining, through the virtual switch, that the destination IP address of the message is the IP address of the first NIC among the multiple NICs. 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.
[0152] Step 503: The bus switch forwards the message to the second processor according to the routing rule, where the second processor is the processor corresponding to the first NIC among the multiple processors.
[0153] 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.
[0154] In the embodiment of the present application, the established routing rule may be the following routing rule 1 or routing rule 2.
[0155] Routing rule 1 includes a correspondence between the destination IP address of the message and the second processor. The routing rule is used by the bus switch to forward the message directly to the second processor based on the correspondence. The bus switch forwards the message to the second processor based on the routing rule, including: the bus switch forwards the message to the second processor based on the correspondence included in the routing rule.
[0156] The bus switch parses the message to obtain the destination IP address of the message and, based on the correspondence between the parsed destination IP address and routing rule 1, directly forwards the message to the second processor. Since routing rule 1 exists in the bus switch, the bus switch queries the correspondence within routing rule 1 based on the destination IP address of the message to obtain the second processor corresponding to the destination IP address of the message, and can therefore directly forward the message to the second processor. For example, the bus switch can parse the payload portion of the message and forward the payload portion to the second processor, thereby implementing the forwarding process.
[0157] When routing rule 1 is used, the message forwarding path includes: the first processor, the bus switch, and the second processor. This forwarding path not only excludes the upstream switch, but also excludes any NICs. Therefore, it can not only reduce the bandwidth usage on the upstream switch side of the NIC, but also reduce the bandwidth usage on the bus switch side of the NIC, and can also reduce the message forwarding latency. For example, if the message traffic accounts for more than 30% of the total traffic, the bandwidth usage on the upstream switch side of the first and second NICs is reduced by more than 30%, the bandwidth usage on the bus switch side of the first and second NICs is also reduced by more than 30%, and the message forwarding latency is reduced by more than 95%.
[0158] 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 establishing routing rules takes a certain amount of time. Of course, the routing rules do not need to be established repeatedly. Therefore, if the bus switch receives a message sent by the first processor again after the routing rules are established, the bus switch can directly parse the message to obtain the destination IP address of the message, and forward the message directly to the second processor based on 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, this forwarding path is a fast forwarding path.
[0159] As shown in Figure 6, the first processor is processor 2, and the second processor is processor 1 (eg, CPU 1). When routing rule 1 is used, the slow forwarding path and the fast forwarding path of the message include: processor 2, bus switch, and processor 1 in sequence.
[0160] Taking the slow forwarding path of the message when routing rule 1 is adopted as an example, the message forwarding process may include the following steps 601 to 605, and the message forwarding delay is only about 1050ns.
[0161] Step 601: The delay is about 75 ns. Processor 2 generates a message, the destination IP address of which is the destination IP address of the overlay.
[0162] Step 602, with a delay of about 100 ns, processor 2 sends a message to the bus switch.
[0163] Step 603: The delay is 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.
[0164] Step 604, with a latency of approximately 300 ns. The virtual switch queries the first routing table based on the underlay's destination IP address. The underlay's destination IP address matches the underlay IP address of NIC 1 in the first routing table. Furthermore, the virtual switch establishes routing rules in the bus switch (including the mapping between the overlay's destination IP address and CPU 1). The bus switch parses the packet to obtain the payload and forwards it to CPU 1 according to the routing rules.
[0165] In step 605, the delay is about 75 ns. CPU 1 obtains the payload portion, thus completing the message forwarding process.
[0166] Taking the fast forwarding path of the message when routing rule 1 is adopted as an example, the message forwarding process may include the following steps 606 to 609.
[0167] Step 606: The delay is about 75 ns. Processor 2 generates a message, the destination IP address of which is the destination IP address of the overlay.
[0168] Step 607, with a delay of about 100 ns, processor 2 sends a message to the bus switch.
[0169] Step 608, with a delay of about 100 ns, the bus switch parses the message to obtain the payload portion, and forwards the payload portion to CPU 1 according to the established routing rules.
[0170] In step 609, the delay is about 75 ns. CPU 1 obtains the payload portion, thus completing the message forwarding process.
[0171] Routing rule 2 includes a correspondence between the destination IP address of the message and the first NIC. The routing rule is used by the bus switch to forward the message to the first NIC based on the correspondence, so that the message is forwarded to the second processor via the first NIC. The bus switch forwards the message to the second processor based on the routing rule, including: the bus switch forwards the message to the first NIC based on the correspondence included in routing rule 2, so that the message is forwarded to the second processor via the first NIC.
[0172] The bus switch parses the message to obtain the destination IP address of the message. Based on the correspondence between the parsed destination IP address of the message and routing rule 2, the bus switch forwards the message to the first NIC, which then forwards the message to the second processor via the first NIC. Since routing rule 2 exists in the bus switch, the bus switch queries the correspondence within routing rule 2 based on 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. The first NIC then parses the message to obtain the destination IP address of the message. Since the destination IP address of the message is the local IP address of the first NIC, the first NIC continues to process the message.
[0173] 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, obtains 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.
[0174] 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.
[0175] 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.
[0176] 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 automatically parses the payload portion including the bus address, queries based on the bus address, obtains the second processor corresponding to the bus address, and sends the payload portion to the second processor.
[0177] Thus, the message forwarding process is completed through the above process.
[0178] When using routing rule 2, both the slow and fast forwarding paths for a message include: the first processor, the bus switch, the first NIC, the bus switch, and the second processor. Compared to the slow forwarding path, the fast forwarding path reduces message forwarding latency because it does not require repeated routing rules.
[0179] The above description is directed to the case where the message belongs to a message within the computer system. The following description briefly addresses the case where the message is a message outside the computer system. Exemplarily, the method further 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 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 bus switch may 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, which then forwards the message to the destination IP address of the message.
[0180] In summary, after receiving a message generated by the first processor, the bus switch in the embodiment of the present application, if the destination IP address of the message is the IP address of the first NIC, deems the message to be from within the computer system and forwards the message to the second processor according to the routing rules, without relying on components such as the upper-level switch. Consequently, the message forwarding path is shortened and the forwarding latency is reduced.
[0181] 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 the second NIC in the computer system shown in Figure 2. As shown in Figure 7, the method includes the following steps 701 to 703.
[0182] In step 701, a second NIC obtains a message generated by a first processor among a plurality of processors, where the first processor corresponds to the second NIC.
[0183] The message generated by the first processor is described in step 501. After generating the message, the first processor sends the message to the bus switch, which then receives the message via the processor-side port used by the first processor. Based on the processor-side port used by the first processor, the bus switch queries the second correspondence described above to obtain the NIC-side port corresponding to the processor-side port. This NIC-side port is used by the second NIC corresponding to the first processor. Therefore, when the bus switch sends the message via the NIC-side port corresponding to the processor-side port, the second NIC using that NIC-side port can receive the message, thereby enabling the second NIC to obtain the message generated by the first processor.
[0184] 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.
[0185] 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.
[0186] 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 described in detail here.
[0187] 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, through the virtual switch, that the destination IP address of the message is the IP address of the first NIC among the multiple NICs. Exemplarily, if 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 may 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.
[0188] In step 703 , the second NIC sends a message 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.
[0189] The routing rules are described in step 503 above and are not further described 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, which 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 step 503 and is not further described here.
[0190] When using routing rule 1, the packet forwarding path includes: the first processor, the bus switch, the second NIC, the bus switch, and the second processor. This forwarding path does not include the upstream switch, which can reduce bandwidth usage on the upstream switch side of the NIC and reduce packet forwarding latency. For example, if the packet traffic accounts for more than 30% of the total traffic, the bandwidth usage on the upstream switch side of the first and second NICs can be reduced by more than 30%, and the forwarding latency of the packets can be reduced by more than 90%.
[0191] However, this forwarding path is still a slow forwarding path because routing rules need to be established, which takes a certain amount of time. Of course, the routing rules do not need to be established repeatedly. Therefore, if the bus switch receives a message sent by the first processor again after the routing rules are established, the bus switch can directly parse the message to obtain the destination IP address of the message, and forward the message directly to the second processor based on the corresponding relationship between the parsed destination IP address of the message and 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 this forwarding path a fast forwarding path.
[0192] When using routing rule 2, the message forwarding path includes: the first processor, the bus switch, the second NIC, the bus switch, the first NIC, the bus switch, and the second processor. Because this forwarding path does not include the upstream switch, it can reduce the bandwidth occupied by the upstream switch side (or Ethernet side) of the NIC and reduce the message forwarding delay. For example, if the message traffic accounts for more than 30% of the total traffic, the bandwidth occupied by the upstream switch side of the first and second NICs is reduced by more than 30%, and the message forwarding delay can be reduced by more than 90%.
[0193] However, this forwarding path is still 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 a 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 based on 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, making this forwarding path a fast forwarding path.
[0194] As shown in Figure 8, the first processor is processor 2, the second NIC is NIC M, the second processor is processor 1 (e.g., CPU 1), and the first NIC is NIC 1. When routing rule 2 is used, the slow forwarding path for packets includes, in order: processor 2, bus switch, NIC M, bus switch, NIC 1, bus switch, and processor 1. The fast forwarding path for packets includes, in order: processor 2, bus switch, NIC 1, bus switch, and processor 1.
[0195] Taking the slow forwarding path of the message when routing rule 2 is adopted as an example, the message forwarding process may include the following steps 801 to 807, and the message forwarding delay is only about 2.65 μs.
[0196] Step 801, with a delay of about 75 ns, processor 2 generates a message, the destination IP address of which is the destination IP address of the overlay.
[0197] Step 802, with a delay of about 100 ns, Processor 2 sends a message to NIC M via the bus switch.
[0198] In 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 packet into the underlay destination IP address.
[0199] Step 804: The latency is approximately 300 ns. Virtual switch M queries the first routing table based on the underlay destination IP address. The underlay destination IP address matches the underlay IP address of NIC 1 in the first routing table. Virtual switch M returns the message to the bus switch and establishes a routing rule in the bus switch (including the mapping between the overlay destination IP address and NIC 1). The bus switch forwards the message to NIC 1 based on the routing rule.
[0200] In step 805, with a latency of approximately 1000 ns, virtual switch 1 in NIC 1 converts the overlay destination IP address of the packet to the underlay destination IP address, which is the same as NIC 1's underlay IP address. Virtual switch 1 in NIC 1 then converts the overlay destination IP address of the packet to the underlay destination IP address, encapsulates the underlay destination IP address in the outer layer of the packet, obtains an updated packet, and sends the updated packet to the bus switch.
[0201] In step 806, with a delay of approximately 100 ns, the bus switch parses the updated message to obtain the payload, obtains CPU 1 based on the underlay destination IP address in the updated message, and sends the payload to CPU 1, for example, to the configuration space of CPU 1.
[0202] In step 807, the delay is about 75 ns. CPU 1 obtains the payload portion, thus completing the message forwarding process.
[0203] Taking the fast forwarding path of the message when routing rule 2 is adopted as an example, the message forwarding process may include the following steps 808 to 812.
[0204] Step 808: The delay is about 75 ns. Processor 2 generates a message, the destination IP address of which is the destination IP address of the overlay.
[0205] Step 809, with a delay of about 100 ns, Processor 2 sends a message to the bus switch, which forwards the message to NIC 1 according to the established routing rules.
[0206] In step 810, with a latency of approximately 1000 ns, virtual switch 1 in NIC 1 converts the packet's overlay destination IP address to the underlay destination IP address, which is the same as NIC 1's underlay IP address. Virtual switch 1 in NIC 1 then converts the packet's overlay destination IP address to the underlay destination IP address, encapsulates the underlay destination IP address in the outer layer of the packet, and sends the updated packet to the bus switch.
[0207] In step 811, with a delay of approximately 100 ns, the bus switch parses the updated message to obtain the payload, obtains CPU 1 based on the underlay destination IP address in the updated message, and sends the payload to CPU 1, for example, to the configuration space of CPU 1.
[0208] In step 812, the delay is about 75 ns. CPU 1 obtains the payload portion, thus completing the message forwarding process.
[0209] The above description is for the case where the message belongs to a message within the computer system. The following description briefly describes the case where the message is a message outside the computer system. Exemplarily, the method further 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 the multiple NICs in the computer system. After determining that the message is a message outside the computer system, the second NIC queries the second routing table described above to forward the message to the upper-level switch, which forwards the message to the destination IP address of the message.
[0210] In summary, after receiving a message generated by the first processor, the second NIC in the embodiment of the present application, if the destination IP address of the message is the IP address of the first NIC, will consider the message to be from within the computer system and will return the message to the bus switch. The bus switch will then forward the message to the second processor according to the routing rules without relying on components such as the upper-level switch. As a result, the message forwarding path is shorter and the forwarding latency is reduced.
[0211] 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 the first processor in the computer system shown in Figure 2. As shown in Figure 9, the method includes the following steps 901 to 903.
[0212] Step 901: The first processor generates a message.
[0213] The message generated by the first processor refers to the description in step 503 and is not described here in detail.
[0214] 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.
[0215] 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 without parsing the payload to obtain the destination IP address of the message.
[0216] 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 the 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 the 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 the multiple NICs can be referred to the determination process of the bus switch in step 502, which will not be repeated here.
[0217] 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, through the virtual switch, that the destination IP address of the message is the IP address of the first NIC among the multiple NICs. Exemplarily, when 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 may 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.
[0218] In step 903 , the first processor sends a message so that the bus switch forwards the message to the second processor according to a routing rule, where the second processor is a processor corresponding to the first NIC among the multiple processors.
[0219] The routing rules can be found in the description of step 503 above and are not further described 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, causing the bus switch to forward 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 and is not further described here.
[0220] When routing rule 1 is used, the packet forwarding path includes the first processor, the bus switch, and the second processor. The reduction in bandwidth on the NIC's upstream switch side, the NIC's bus switch side, and forwarding latency for this forwarding path can be found in the description of Implementation 2 above and will not be repeated here.
[0221] 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 establishing routing rules takes a certain amount of time. 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 based on the corresponding relationship between the destination IP address of the message obtained by parsing and the routing rules. So, although the forwarding path of the message still includes: the first processor, the bus switch and the second processor, this forwarding path is a fast forwarding path.
[0222] As shown in Figure 10, the first processor is processor 2, and the second processor is processor 1 (eg, CPU 1). When routing rule 1 is used, the slow forwarding path and the fast forwarding path of the message include: processor 2, bus switch, and processor 1 in sequence.
[0223] Taking the slow forwarding path of the message when routing rule 1 is adopted as an example, the message forwarding process may include the following steps 1001 to 1006, and the message forwarding delay is only about 1050ns.
[0224] Step 1001, with a delay of about 75 ns, processor 2 generates a message, the destination IP address of which is the overlay destination IP address.
[0225] 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 packet into the underlay destination IP address.
[0226] Step 1003, with a latency of approximately 200 ns. Virtual Switch 2 queries the first routing table based on the underlay destination IP address. The underlay destination IP address matches the underlay IP address of NIC 1 in the first routing table. Therefore, Virtual Switch 2 establishes a routing rule in the bus switch (including the correspondence between the overlay destination IP address and CPU 1).
[0227] Step 1004, delay 100ns. Processor 2 sends a message to the bus switch.
[0228] Step 1005, with a delay of about 100 ns, the bus switch parses the message to obtain the payload portion, and forwards the payload portion to CPU 1 according to the routing rule.
[0229] Step 1006: The delay is about 75 ns. CPU 1 obtains the bus data, thus completing the message forwarding process.
[0230] Taking the fast forwarding path of the message when routing rule 1 is adopted as an example, the message forwarding process may include the following steps 1007 to 1010.
[0231] Step 1007: The delay is about 75 ns. Processor 2 generates a message, the destination IP address of which is the destination IP address of the overlay.
[0232] Step 1008, with a delay of about 100 ns, processor 2 sends a message to the bus switch.
[0233] Step 1009, with a delay of about 100 ns, the bus switch parses the message to obtain the payload portion, and forwards the payload portion to CPU 1 according to the established routing rules.
[0234] In step 1010, with a delay of approximately 75 ns, CPU 1 obtains the payload, thus completing the message forwarding process.
[0235] When using routing rule 2, both the slow and fast forwarding paths for a message include: the first processor, the bus switch, the first NIC, the bus switch, and the second processor. Compared to the slow forwarding path, the fast forwarding path reduces message forwarding latency because it does not require repeated routing rules. This is not detailed here.
[0236] The above describes the case where the message belongs to a message within the computer system. The following briefly describes the case where the message is a message outside the computer system. Exemplarily, the method further 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.
[0237] In summary, in the embodiment of the present application, after the first processor generates a message, if the destination IP address of the message is the IP address of the first NIC, it will be considered that the message is a message within the computer system and will send the message to the bus switch. The bus switch then forwards the message according to the routing rules without relying on components such as upper-level switches. As a result, the message forwarding path is shorter and the forwarding delay is reduced.
[0238] In the exemplary embodiment, the above description is based on the example of a virtual switch being centrally deployed on a bus switch, a second NIC, or a first processor. According to the description corresponding to FIG3 , the virtual switch can also be deployed in a distributed manner. In this case, the virtual switches can be hierarchical, with the upper-level virtual switch establishing multiple routing rules and the lower-level virtual switch establishing some of the routing rules among the multiple routing rules, so as 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 destination IP address of the message to be forwarded cannot be queried for the corresponding processor or NIC, then the lower-level virtual switch obtains 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.
[0239] For example, a virtual switch is deployed in a bus switch and a second NIC. The bus switch is deployed with a lower-level virtual switch, and the second NIC is deployed with an upper-level virtual switch. If the bus switch receives a message and the message does not match some of the 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.
[0240] In an exemplary embodiment, an embodiment of the present application provides a message forwarding method based on bus network technology, the method being applied to a computer system comprising a bus switch, multiple processors, and multiple NICs. The method comprises: a first processor among the multiple processors generating a message; the bus switch acquiring the message generated by the first processor; the bus switch determining that the destination IP address of the message is the IP address of a first NIC among the multiple NICs; and the bus switch forwarding the message to a second processor according to a routing rule, the second processor being the processor among the multiple processors corresponding to the first NIC. The steps performed by the bus switch can be found in the description corresponding to FIG. 5 above and are not further described here.
[0241] For example, an embodiment of the present application further provides a message forwarding method based on bus network technology, the method being applied to a computer system including a bus switch, multiple processors, and multiple NICs, the method comprising: a first processor among the multiple processors generating a message; a second NIC among the multiple NICs acquiring the message generated by the first processor, the first processor corresponding to the second NIC; the second NIC determining that the destination IP address of the message is the IP address of the first NIC among the multiple NICs; and the second NIC sending the message so that the bus switch forwards the message to the second processor according to routing rules, the second processor being the processor among the multiple processors corresponding to the first NIC. The steps performed by the second NIC can be found in the description corresponding to FIG. 7 above and are not described in detail here.
[0242] For example, an embodiment of the present application further provides a message forwarding method based on bus network technology, the method being applied to a computer system including a bus switch, multiple processors, and multiple NICs. The method comprises: a first processor among the multiple processors generating a message, determining that the destination IP address of the message is the IP address of a first NIC among the multiple NICs, and sending the message so that the bus switch forwards the message to a second processor according to a routing rule, the second processor being the processor among the multiple processors corresponding to the first NIC. The steps executed by the first processor can be found in the description corresponding to FIG. 9 above and are not described in detail here.
[0243] The above describes a bus network technology-based message forwarding method provided in an embodiment of the present application. Corresponding to the above method, an embodiment of the present application also provides a bus network technology-based message forwarding device. This device is applied to a virtual switch. This device is used to execute the bus network technology-based message forwarding method shown in FIG. 5 above through the various modules shown in FIG. As shown in FIG. 11 , the bus network technology-based message forwarding device provided in an embodiment of the present application includes the following modules.
[0244] An acquisition module 1101 is configured to acquire a message generated by a first processor among multiple processors;
[0245] 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;
[0246] The forwarding module 1103 is configured to forward the message to the second processor according to the routing rule, where the second processor is the processor corresponding to the first NIC among the multiple processors.
[0247] In a possible implementation, the routing rule includes a correspondence between the 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.
[0248] In one 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 configured 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.
[0249] In a possible implementation, the destination IP address of the message is a virtual destination IP address.
[0250] 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.
[0251] In a possible implementation, the bus switch includes a virtual switch; and the determining 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.
[0252] In one possible implementation, the determination module 1102 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; and the forwarding module 1103 is further configured to forward the message to an upper-level switch connected to the multiple NICs.
[0253] Corresponding to the above method, embodiments of the present application also provide a message forwarding device based on bus network technology. Specifically, the device is applied to a bus switch. The device is configured to execute the message forwarding method based on bus network technology shown in FIG. 7 through the various modules shown in FIG. As shown in FIG. 12 , the message forwarding device based on bus network technology provided in embodiments of the present application includes the following modules.
[0254] An acquisition module 1201 is configured to acquire a message generated by a first processor among multiple processors, where the first processor corresponds to the second NIC;
[0255] a determination module 1202 for determining that a destination Internet Protocol (IP) address of the message is an IP address of a first NIC among the multiple NICs;
[0256] The sending module 1203 is configured to send a message so that 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.
[0257] 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 by the bus switch to forward the message to the second processor according to the correspondence.
[0258] In one possible implementation, the routing rule includes a correspondence between the 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.
[0259] In a possible implementation, the destination IP address of the message is a virtual destination IP address.
[0260] In one possible implementation, the IP address of the first NIC is a physical IP address;
[0261] The determination module 1202 is configured 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.
[0262] In one possible implementation, the second NIC includes a virtual switch;
[0263] The determination module 1202 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.
[0264] In one possible implementation, the determination module 1202 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; and the sending module 1203 is further configured to forward the message to an upper-level switch connected to the multiple NICs.
[0265] Corresponding to the above method, embodiments of the present application also provide a message forwarding device based on bus network technology. This device is applied to a bus switch. This device is configured to execute the message forwarding method based on bus network technology shown in FIG. 9 through the various modules shown in FIG. As shown in FIG. 13 , the message forwarding device based on bus network technology provided in embodiments of the present application includes the following modules.
[0266] A generating module 1301 is used to generate a message;
[0267] A determination module 1302 is configured to determine that the destination IP address of the message is the IP address of a first NIC among the multiple NICs;
[0268] The sending module 1303 is configured to send a message so that 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.
[0269] In a possible implementation, the routing rule includes a correspondence between the 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.
[0270] In one possible implementation, the routing rule includes a correspondence between the 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.
[0271] In a possible implementation, the destination IP address of the message is a virtual destination IP address.
[0272] In one possible implementation, the IP address of the first NIC is a physical IP address. Determination module 1302 is configured to, 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; and determine that the physical destination IP address of the message is the physical IP address of the first NIC among the multiple NICs.
[0273] In a possible implementation, the first processor includes a virtual switch. The determining module 1302 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.
[0274] In one possible implementation, the determination module 1302 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; and the sending module 1303 is further configured to forward the message to an upper-level switch connected to the multiple NICs.
[0275] It should be understood that the beneficial effects of the devices shown in Figures 11, 12 and 13 above when implementing their functions are the same as the beneficial effects of the methods shown in Figures 5, 7 and 9. When the devices shown in Figures 11, 12 and 13 implement their functions, they are only illustrated by the division of the above-mentioned functional modules. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the devices and method embodiments provided in the above embodiments belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0276] Referring to FIG. 14 , FIG. 14 shows a schematic structural diagram of an exemplary message forwarding device 1400 based on bus network technology of the present application. 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 .
[0277] The 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 unit (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. The 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. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports the advanced reduced instruction set machine (ARM) architecture. It can implement or execute various logic blocks, modules and circuits described in conjunction with the disclosure of this application. A processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0278] Optionally, the bus-based message forwarding device 1400 further includes a bus 1402. Bus 1402 is used to transmit information between the various components of the bus-based message forwarding device 1400. Bus 1402 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, for example. Bus 1402 may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, FIG14 shows only one line, but this does not imply that there is only one bus or only one type of bus.
[0279] The memory 1403 may be, for example, a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. The nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache.
[0280] By way of example and 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 random access memory (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).
[0281] 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 compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this. The memory 1403 is, for example, independent and connected to the processor 1401 via the bus 1402. The memory 1403 may also be integrated with the processor 1401.
[0282] The network interface 1404 uses any transceiver-like device to communicate with other devices or communication networks. The communication network can be Ethernet, a radio access network (RAN), or a wireless local area network (WLAN). The network interface 1404 can include a wired network interface or a wireless network interface. Specifically, the network interface 1404 can 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 can be an optical interface, an electrical interface, or a combination thereof. In some embodiments of the present application, the network interface 1404 can be used for the message forwarding device 1400 to communicate with other devices based on bus network technology.
[0283] In a specific implementation, as some embodiments, the processor 1401 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG14 . Each of these processors may be a single-core processor or a multi-core processor. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0284] In a specific implementation, as some embodiments, the message forwarding device 1400 based on bus network technology may include multiple processors, such as processor 1401 and processor 1405 shown in Figure 14. Each of these processors can be a single-core processor or a multi-core processor. The processor here can refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0285] In some embodiments, 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 bus network technology can implement the method provided by the method embodiment, i.e., the method shown in Figure 5, Figure 7, or Figure 9, through the processor 1401 and the program instructions 1410 in the memory 1403. The program instructions 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.
[0286] During 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 bus switch used to execute the above method. The processor 1401 in the message forwarding device 1400 based on bus network technology reads the instructions in the memory 1403, so that the message forwarding device 1400 based on bus network technology shown in Figure 14 can execute all or part of the steps in the method embodiment.
[0287] The message forwarding device 1400 based on bus network technology may also correspond to the apparatus shown in FIG. 11 , FIG. 12 , or FIG. 13 , wherein each functional module in the apparatus shown in FIG. 11 , FIG. 12 , or FIG. 13 is implemented using software of the message forwarding device 1400 based on bus network technology. In other words, the functional modules included in the apparatus shown in FIG. 11 , FIG. 12 , or FIG. 13 are generated by the processor 1401 of the message forwarding device 1400 based on bus network technology after reading the program instructions 1410 stored in the memory 1403 .
[0288] Among them, each step of the method shown in Figure 5, Figure 7 or Figure 9 is completed by the hardware integrated logic circuit 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 this 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 field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, 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 will not be described in detail here.
[0289] In an exemplary embodiment, a computer system is provided, which 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 a second processor according to a routing rule. The second processor is the processor among the multiple processors corresponding to the first NIC. This computer system can refer to the corresponding description of Figure 5.
[0290] In an exemplary embodiment, another computer system is provided, which 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 rules, and the second processor is the processor among the multiple processors corresponding to the first NIC. This computer system can refer to the corresponding description of Figure 7.
[0291] In an exemplary embodiment, another computer system is provided, which includes a bus switch, multiple processors and multiple NICs. The 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. The second processor is the processor among the multiple processors corresponding to the first NIC. This computer system can refer to the corresponding description of Figure 9.
[0292] In an exemplary embodiment, a bus switch is provided, and the bus switch is used to implement the message forwarding method based on the bus network technology shown in FIG5 .
[0293] In an exemplary embodiment, a network interface card, namely, NIC, is provided. The network interface card is used to implement the message forwarding method based on bus network technology shown in FIG. 7 .
[0294] In an exemplary embodiment, a processor is provided, and the processor is used to implement the message forwarding method based on bus network technology shown in FIG9 .
[0295] 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 processor loads and executes the at least one computer instruction, so that the message forwarding device based on bus network technology implements the message forwarding method based on bus network technology shown in Figures 5, 7, or 9. For example, the message forwarding device based on bus network technology includes, but is not limited to, a bus switch.
[0296] In an exemplary embodiment, an embodiment of the present application provides a computer program or computer program product, which includes: computer instructions, which, when executed by a computer, enable the computer to execute the message forwarding method based on bus network technology shown in Figures 5, 7 or 9 above.
[0297] 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 message forwarding method based on bus network technology shown in Figures 5, 7 or 9 is executed by the computer.
[0298] Illustratively, an embodiment of the present application provides a chip, including a processor, for calling and executing instructions stored in the memory from a memory, so that a computer equipped with the chip executes the message forwarding method based on bus network technology shown in Figures 5, 7 or 9 above.
[0299] In an exemplary embodiment, the embodiment of the present application provides another chip, including: an input interface, an output interface, a processor and a memory, the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used to execute the code in the memory, when the code is executed, the computer equipped with the chip executes the message forwarding method based on bus network technology shown in Figures 5, 7 or 9 above.
[0300] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented 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, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may 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. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive).
[0301] In this application, the terms "first," "second," and the like are used to distinguish between identical or similar items with substantially the same purpose and function. It should be understood that "first," "second," and "nth" do not have a logical or temporal dependency, nor do they limit the quantity or order of execution. It should also be understood that although the following description uses the terms "first," "second," and the like to describe various elements, these elements should not be limited by these terms. These terms are simply used to distinguish one element from another.
[0302] 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.
[0303] In this application, the term "at least one" means one or more, and the term "plurality" means two or more. For example, a plurality of processors means two or more processors. The terms "system" and "network" are often used interchangeably herein.
[0304] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing particular examples only and is 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.
[0305] It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the listed items. The term "and / or" describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this application generally indicates that the associated objects are in an "or" relationship.
[0306] 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 [stated condition or event] is detected” may be interpreted to mean “upon determining ” or “in response to determining ” or “upon detecting [stated condition or event]” or “in response to detecting [stated condition or event],” depending on the context.
[0307] The above description is merely an embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present application shall be included in the scope of protection 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 to acquire 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
Patent Citations
Message forwarding method and device based on bus network technology, and readable storage medium
CN119788601A
Network virtualization implementation method, system, device and program product
CN115189987A
Data forwarding chip and server
US20220206969A1
Forwarding device, network card, and message forwarding method
WO2021128089A1
CN202311290368A