Layer 2 message forwarding method, device and storage medium

By retrieving the forwarding port in the data processing unit DPU and avoiding forwarding using the system chip SOC, the problem of bandwidth occupied by layer 2 forwarding packets is solved, and network performance and stability are improved.

CN117579585BActive Publication Date: 2025-03-25YUSUR TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311533201.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-16
Publication Date
2025-03-25
Estimated Expiration
2043-11-16

AI Technical Summary

Technical Problem

A large number of Layer 2 forwarded packets occupy a large amount of channel bandwidth, resulting in the impact of other types of packet transmission, which in turn affects the overall network performance and leads to low network performance.

Method used

The network processor NP in the data processing unit DPU receives the message to be forwarded, and retrieves the forwarding port corresponding to the message to be forwarded in the destination MAC address table stored in the data offload engine DOE in the data processing unit DPU. There is no need to forward using the system chip SOC for forwarding, avoiding the forwarding of the message to be forwarded occupying the channel bandwidth of the system chip SOC.

Benefits of technology

It avoids affecting the transmission of other types of packets and improves the overall network performance. At the same time, when the central processing capacity of the system chip SOC is insufficient, it avoids the delay and packet loss of layer 2 packet processing, and improves the stability and performance of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117579585B_ABST
    Figure CN117579585B_ABST
Patent Text Reader

Abstract

The present invention provides a layer 2 message forwarding method, device and storage medium, the method comprising: receiving a message to be forwarded through a network processor NP, and based on the destination MAC address and VLAN information in the message to be forwarded, retrieving the forwarding port corresponding to the message to be forwarded in the destination MAC address table in the data unloading engine DOE; in the case where the forwarding port is not retrieved, sending the message to be forwarded to the virtual switch OVS through the network processor NP; in the case where the virtual switch OVS receives the proxy forwarding message, broadcasting the message to be forwarded in the VLAN through the virtual switch OVS, determining the forwarding port corresponding to the message to be forwarded, and sending the port information corresponding to the forwarding port to the network processor NP; after receiving the port information, the network processor NP forwards the message to be forwarded from the forwarding port. The method can solve the problem that a large number of layer 2 forwarding messages occupy channel bandwidth, resulting in the transmission of other types of messages being affected, thereby affecting network performance and resulting in low network performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a layer 2 message forwarding method, device and storage medium. Background Art

[0002] In a local area network, there are multiple computers and network devices that share the same physical network. Through Layer 2 message forwarding, network devices can determine the transmission path of data packets based on the MAC address of the target device, thereby achieving fast and accurate data transmission. In addition, Layer 2 message forwarding can also help network devices establish and update forwarding tables, improving network performance and stability.

[0003] A conventional method for forwarding layer 2 messages includes: processing the forwarding of layer 2 messages by software installed on a system on chip (SOC).

[0004] However, when processing Layer 2 message forwarding through SOC, a large number of Layer 2 forwarding messages will occupy a large amount of channel bandwidth, resulting in the transmission of other types of messages (such as transmission control protocol or user datagram protocol, etc.) being affected, thereby affecting the overall network performance, resulting in the problem of low overall network performance. Summary of the invention

[0005] In view of this, the embodiments of the present invention provide a layer 2 message forwarding method, device and storage medium to eliminate or improve one or more defects in the prior art. It can solve the problem that a large number of layer 2 forwarding messages will occupy a large amount of channel bandwidth, resulting in the transmission of other types of messages being affected, thereby affecting the overall network performance and causing the overall network performance to be low.

[0006] One aspect of the present invention provides a layer 2 message forwarding method, which is applied to a layer 2 message forwarding device, wherein the layer 2 message forwarding device includes a data processing unit DPU and a system chip SOC, wherein the data processing unit DPU includes a network processor NP and a data offloading engine DOE; a virtual switch OVS runs on the system chip SOC; and the method includes the following steps:

[0007] The network processor NP receives the message to be forwarded, and based on the destination MAC address and VLAN information in the message to be forwarded, retrieves the forwarding port corresponding to the message to be forwarded from the destination MAC address table in the data offloading engine DOE; the destination MAC address table is obtained after the virtual switch OVS performs source MAC learning; after obtaining the destination MAC address table, the virtual switch OVS unloads the destination MAC address table to the data offloading engine DOE; the data offloading engine DOE is used to store the destination MAC address table;

[0008] If no forwarding port is found, the packet to be forwarded is sent to the virtual switch OVS through the network processor NP.

[0009] When the virtual switch OVS receives the forwarding message, the virtual switch OVS broadcasts the message to be forwarded in the VLAN, determines the forwarding port corresponding to the message to be forwarded, and sends the port information corresponding to the forwarding port to the network processor NP;

[0010] After receiving the port information, the network processor NP forwards the message to be forwarded from the forwarding port.

[0011] Optionally, after determining the forwarding port corresponding to the message to be forwarded, the method further includes:

[0012] The source MAC is learned through the virtual switch OVS, the destination MAC address table is updated, and the updated destination MAC address table is unloaded to the data offload engine DOE.

[0013] Optionally, sending the port information corresponding to the forwarding port to the network processor NP includes:

[0014] The virtual switch OVS writes the port information and the pass tag into the metadata associated with the message to be forwarded; the pass tag is used to instruct the network processor NP to forward the message to be forwarded;

[0015] The packets to be forwarded are sent to the network processor NP through the virtual switch OVS.

[0016] Optionally, the destination MAC address table includes several MAC table items, and each MAC table item includes a destination MAC address item, a forwarding port item, a hit parameter item, and a VLAN item.

[0017] Optionally, after receiving the port information, the network processor NP forwards the message to be forwarded from the forwarding port, and further includes: setting the hit parameter of the hit parameter item corresponding to the destination MAC address and the forwarding port to 1 through the network processor NP.

[0018] Optionally, after the network processor NP receives the port information and forwards the message to be forwarded from the forwarding port, the method further includes:

[0019] The virtual switch OVS accesses the destination MAC address table at a preset time interval, and ages the MAC table entry corresponding to the hit parameter entry with a hit parameter of 0;

[0020] Through the virtual switch OVS, set the hit parameter option with a hit parameter of 1 to 0.

[0021] Optionally, after aging the MAC table entry whose hit parameter item is 0, the method further includes: generating an aged MAC table entry deletion instruction through the virtual switch OVS, and sending the instruction to the data offloading engine DOE;

[0022] When receiving the aged MAC table entry deletion instruction, the data offloading engine DOE deletes the aged MAC table entry in the destination MAC address table.

[0023] Optionally, when a forwarding port is retrieved, the message to be forwarded is forwarded from the forwarding port through the network processor NP.

[0024] Another aspect of the present invention provides a layer 2 message forwarding device, which is applied to the above-mentioned layer 2 message forwarding method, the device includes a data processing unit DPU and a system chip SOC, the data processing unit DPU includes a network processor NP and a data offloading engine DOE; a virtual switch OVS runs on the system chip SOC;

[0025] The network processor NP is used to: receive the message to be forwarded, and based on the destination MAC address and VLAN information in the message to be forwarded, retrieve the forwarding port corresponding to the message to be forwarded from the destination MAC address table in the data offloading engine DOE; if the forwarding port is not retrieved, send the message to be forwarded to the virtual switch OVS through the network processor NP; wherein the destination MAC address table is obtained after the virtual switch OVS performs source MAC learning; after obtaining the destination MAC address table, the virtual switch OVS unloads the destination MAC address table to the data offloading engine DOE; the data offloading engine DOE is used to store the destination MAC address table;

[0026] The virtual switch OVS is used to: when receiving a proxy forwarding message, broadcast the message to be forwarded in the VLAN through the virtual switch OVS, determine the forwarding port corresponding to the message to be forwarded, and send the port information corresponding to the forwarding port to the network processor NP;

[0027] The network processor NP is further configured to: after receiving the port information, forward the message to be forwarded from the forwarding port.

[0028] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the steps of the above-mentioned layer 2 message forwarding method are implemented.

[0029] The layer 2 message forwarding method, device and storage medium of the present invention can solve the problem that a large number of layer 2 forwarding messages will occupy a large amount of channel bandwidth, resulting in the transmission of other types of messages being affected, thereby affecting the overall network performance and resulting in low overall network performance. The network processor NP in the data processing unit DPU receives the message to be forwarded, and retrieves the forwarding port corresponding to the message to be forwarded from the destination MAC address table stored in the data unloading engine DEO in the data processing unit DPU. There is no need to use the system chip SOC for forwarding, which avoids the forwarding of the message to be forwarded occupying the channel bandwidth of the system chip SOC, thereby avoiding affecting the transmission of other types of messages and improving the overall network performance. At the same time, when the forwarding port corresponding to the message to be forwarded is not retrieved, the system chip SOC broadcasts the message to be forwarded in the VALIN to determine the forwarding port, and sends it to the network processor NP for forwarding. While ensuring the successful forwarding of the message to be forwarded, it avoids occupying the channel bandwidth of the system chip SOC, thereby improving the overall network performance.

[0030] Furthermore, by forwarding the Layer 2 message through the data processing unit DPU, the use of the system chip SOC for forwarding processing can be avoided. When the central processing capacity of the system chip SOC is insufficient, the delay and packet loss of the Layer 2 message processing can be avoided, thereby improving the stability and performance of the network. At the same time, it can avoid the increase in the central processing unit load on the system chip SOC affecting the flow table processing efficiency of the virtual switch OVS, thereby avoiding the increase in the delay in forwarding of network traffic, which can further improve the reliability and performance of the network.

[0031] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.

[0032] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of this application, and do not constitute a limitation of the present invention.

[0034] Figure 1 It is a structural diagram of a layer 2 message forwarding device in one embodiment of the present invention;

[0035] Figure 2The figure is a flow chart of a layer 2 message forwarding method in another embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0037] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.

[0038] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.

[0039] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection with an intermediate.

[0040] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0041] The following is an introduction to the layer 2 message forwarding device provided by this application.

[0042] like Figure 1 The figure shows a schematic diagram of the structure of a layer 2 message forwarding device provided by an embodiment of the present application. Figure 1 It can be known that the layer 2 message forwarding device at least includes: a data processing unit DPU (Data Processing Unit, DPU) and a system on a chip SOC (System on a Chip, SOC).

[0043] The data processing unit DPU includes a network processor NP (Network Processor, NP) and a data offload engine DOE (Data Offload Engine, DOE); a virtual switch OVS (OpenvSwitch, OVS) runs on the system chip SOC.

[0044] The network processor NP refers to a chip or module used for network data packet processing and routing. In this embodiment, the network processor NP is used to: receive a message to be forwarded, and based on the destination MAC address and VLAN information in the message to be forwarded, retrieve the forwarding port corresponding to the message to be forwarded from the destination MAC address table in the data offload engine DOE; if the forwarding port is not retrieved, send the message to be forwarded to the virtual switch OVS through the network processor NP.

[0045] Among them, the message to be forwarded refers to the Layer 2 message, that is, the data packet processed by the data link layer (Layer 2) in the Open Systems Interconnection (OSI) model, which includes the source MAC address, destination MAC address, VLAN information, Ethernet type or length field, etc.

[0046] In this embodiment, the forwarding port is retrieved in the destination MAC address table according to the destination MAC address and VLAN information in the message to be forwarded, so as to forward the message to be forwarded through the forwarding port.

[0047] Among them, the destination MAC address table is obtained after the virtual switch OVS performs source MAC learning. The destination MAC address table includes several MAC table items, each of which includes a destination MAC address item, a forwarding port item, a hit parameter item, and a VLAN item. For any MAC table item, the destination MAC address item is used to store the destination MAC address to be forwarded for the message to be forwarded, the forwarding port item is used to indicate the forwarding port corresponding to the destination MAC address, the hit parameter corresponding to the hit parameter item is used to indicate whether the MAC table item is hit within the aging period, and the VLAN item is used to indicate the virtual LAN to which the message to be forwarded belongs.

[0048] In this embodiment, the virtual switch OVS refers to a multi-layer virtual switch used in a virtualized environment. After obtaining the destination MAC address table, the virtual switch OVS unloads the destination MAC address table to the data unloading engine DOE. The data unloading engine DOE is used to store the destination MAC address table so that the network device NP can retrieve the forwarding port corresponding to the layer 2 message to be forwarded in the destination MAC address table through the data unloading engine DOE during the process of layer 2 message forwarding; when the forwarding port is retrieved, the message to be forwarded is forwarded through the forwarding port.

[0049] When the forwarding port is retrieved, the network processor NP sends the message to be forwarded to the virtual switch OVS. At this time, the virtual switch OVS is used to: when receiving the forwarding message, broadcast the message to be forwarded in the VLAN through the virtual switch OVS, determine the forwarding port corresponding to the message to be forwarded, and send the port information corresponding to the forwarding port to the network processor NP.

[0050] Correspondingly, the network processor NP is further configured to: after receiving the port information, forward the message to be forwarded from the forwarding port.

[0051] The following is an introduction to the layer 2 message forwarding method provided by this application.

[0052] like Figure 2 The flowchart of the layer 2 message forwarding method provided by an embodiment of the present application is shown. Figure 1 Taking the layer 2 message forwarding device shown in FIG. 1 as an example, the method at least includes steps S201 to S204:

[0053] Step S201: receiving a message to be forwarded through the network processor NP, and searching for a forwarding port corresponding to the message to be forwarded in a destination MAC address table in the data offloading engine DOE based on the destination MAC address and VLAN information in the message to be forwarded.

[0054] The destination MAC address table is obtained after the virtual switch OVS performs source MAC learning; after obtaining the destination MAC address table, the virtual switch OVS unloads the destination MAC address table to the data offloading engine DOE.

[0055] In this embodiment, the destination MAC address table includes several MAC table items, each of which includes a destination MAC address item, a forwarding port item, a hit parameter item, and a VLAN item. For any MAC table item, the destination MAC address item is used to store the destination MAC address to be forwarded for the message to be forwarded, the forwarding port item is used to indicate the forwarding port corresponding to the destination MAC address, the hit parameter corresponding to the hit parameter item is used to indicate whether the MAC table item is hit within the aging period, and the VLAN item is used to indicate the virtual local area network to which the message to be forwarded belongs.

[0056] In this embodiment, the message to be forwarded is a layer 2 message. After the message to be forwarded enters the network processor NP from the physical interface of the switch, the microcode process of the network processor NP will parse the destination MAC address in the message to be forwarded, and then use the destination MAC address and VLAN information as key fields to search the destination MAC address table in the data offload engine DOE to retrieve the forwarding port corresponding to the message to be forwarded.

[0057] For example, taking the physical interface of the switch as port1, the identifier of the virtual LAN to which the message to be forwarded belongs as vlan1, and the destination MAC address of the message to be forwarded as MAC(01-23-45-67-89-ab), after the message to be forwarded enters the network processor NP through port1, the network processor NP parses the message to be forwarded to obtain the destination MAC address MAC(01-23-45-67-89-ab), and then uses MAC(01-23-45-67-89-ab) and vlan1 as key fields to retrieve the forwarding port in the destination MAC address table.

[0058] When the forwarding port is retrieved, the message to be forwarded is forwarded from the forwarding port through the network processor NP.

[0059] Step S202: When no forwarding port is found, the message to be forwarded is sent to the virtual switch OVS through the network processor NP.

[0060] Among them, the virtual switch OVS is deployed on a single system chip SOC that integrates multiple functional modules such as processor core, memory controller, input / output interface, etc.

[0061] In this embodiment, the network processor NP sends the original message of the message to be forwarded and the VLAN information to which the message to be forwarded belongs to the virtual switch OVS, so that the virtual switch performs unknown unicast operation in the VLAN after receiving the original message and the VLAN information.

[0062] Step S203, when the virtual switch OVS receives the forwarding message, the virtual switch OVS broadcasts the message to be forwarded in the VLAN, determines the forwarding port corresponding to the message to be forwarded, and sends the port information corresponding to the forwarding port to the network processor NP.

[0063] In this embodiment, when the network processor NP fails to retrieve a forwarding port, the virtual switch OVS cooperates with the data processing unit DPU to broadcast the message to be forwarded in the VLAN to determine the forwarding port corresponding to the message to be forwarded.

[0064] After determining the forwarding port corresponding to the message to be forwarded, the port information corresponding to the forwarding port is sent to the network processor NP, so that the network processor NP can forward the message to be forwarded through the forwarding port according to the port information.

[0065] In this embodiment, the virtual switch OVS can return the port information to the network processor NP; or, write the port information into the metadata associated with the message to be forwarded, return the forwarding message written with the port information to the network processor NP, and at the same time, write a pass-through flag in the metadata associated with the message to be forwarded, and the pass-through flag is used to instruct the network processor NP to forward the message to be forwarded.

[0066] Specifically, the port information corresponding to the forwarding port is sent to the network processor NP, including: writing the port information and the pass tag in the metadata associated with the message to be forwarded through the virtual switch OVS; and sending the message to be forwarded to the network processor NP through the virtual switch OVS.

[0067] In this embodiment, while the virtual switch OVS broadcasts the message to be forwarded in the VLAN, the virtual switch OVS also needs to perform source MAC learning to update the destination MAC address table, and unload the updated destination MAC address table to the data unloading engine DOE of the data processing unit DPU. In this way, when the network processor NP in the data processing unit DPU receives a layer 2 message with the same destination MAC address, it can retrieve the forwarding port in the updated destination MAC address table according to the destination MAC address, thereby improving the message forwarding efficiency.

[0068] Specifically, after determining the forwarding port corresponding to the message to be forwarded, the method further includes: performing source MAC learning through the virtual switch OVS, updating the destination MAC address table, and unloading the updated destination MAC address table to the data unloading engine DOE.

[0069] Step S204: after receiving the port information, the network processor NP forwards the message to be forwarded from the forwarding port.

[0070] In this embodiment, in order to ensure network security, it is necessary to regularly clear the aged destination MAC addresses, that is, the destination MAC addresses that are no longer active, to prevent malicious attackers from using forged destination MAC addresses to cheat, defraud or other forms of network attacks; at the same time, in order to improve network performance, it is necessary to timely clear the aged destination MAC addresses to prevent these addresses from occupying the switch memory resources and affecting the switch search speed. By setting the aging cycle, the switch can automatically delete the destination MAC addresses that have not been active for a long time, thereby helping to keep the destination MAC address table updated and streamlined.

[0071] In this embodiment, after the message to be forwarded is forwarded from the forwarding port, the hit parameter item in the destination MAC address table is set to 1 to indicate that the destination MAC address is active. The hit parameter of the hit parameter item includes 1 or 0. When the hit parameter is 1, it indicates that the destination MAC address corresponding to the hit parameter is active. When the hit parameter is 0, it indicates that the destination MAC address corresponding to the hit parameter is inactive for a long time, that is, the destination MAC address is aged.

[0072] Specifically, after the network processor NP receives the port information and forwards the message to be forwarded from the forwarding port, the method further includes: setting the hit parameter of the hit parameter item corresponding to the destination MAC address and the forwarding port to 1 through the network processor NP.

[0073] After receiving the port information, the network processor NP forwards the message to be forwarded from the forwarding port, and also includes: accessing the destination MAC address table at a preset time interval through the virtual switch OVS, and aging the MAC table entry corresponding to the hit parameter item with a hit parameter of 0; setting the hit parameter option with a hit parameter of 1 to 0 through the virtual switch OVS.

[0074] Among them, the preset time interval is a pre-set time interval, including 10 minutes, 20 minutes or 1 hour, etc. This embodiment is not limited to the value of the preset time interval.

[0075] After the inactive destination MAC address is aged, the aged destination MAC address needs to be deleted.

[0076] In this embodiment, the virtual switch OVS generates an aged MAC table entry deletion instruction, and after the aged MAC table entry deletion instruction is sent to the data offload engine DOE, the data offload engine DOE completes the deletion of the aged destination MAC address.

[0077] Specifically, after aging the MAC table entry with the hit parameter item being 0, it also includes: generating an aged MAC table entry deletion instruction through the virtual switch OVS and sending it to the data offload engine DOE; when the data offload engine DOE receives the aged MAC table entry deletion instruction, it deletes the aged MAC table entry in the destination MAC address table.

[0078] In addition, since there is a possibility that the hit parameter corresponding to the hit parameter item in the destination MAC address table is empty, that is, the destination MAC address corresponding to the MAC table item has not been used, based on this, in this embodiment, the aged MAC table item also includes a MAC table item whose hit parameter corresponding to the hit parameter item is empty.

[0079] In addition, in this embodiment, after the network processor NP forwards the message to be forwarded from the forwarding port, it enters the traffic management module (egress Tm) for further processing and sending. The traffic management module refers to a module in the network device for managing the data flow out of the network, which is used to ensure that the network flow can be transmitted according to a certain strategy to meet the requirements of network performance, quality of service (QoS) and security.

[0080] In summary, the layer 2 message forwarding method provided in this embodiment can solve the problem that a large number of layer 2 forwarding messages will occupy a large amount of channel bandwidth, resulting in the transmission of other types of messages being affected, thereby affecting the overall network performance and resulting in low overall network performance; the network processor NP in the data processing unit DPU receives the message to be forwarded, and retrieves the forwarding port corresponding to the message to be forwarded from the destination MAC address table stored in the data unloading engine DEO in the data processing unit DPU, without using the system chip SOC for forwarding, thereby avoiding the forwarding of the message to be forwarded occupying the channel bandwidth of the system chip SOC, thereby avoiding affecting the transmission of other types of messages and improving the overall network performance; at the same time, without retrieving the forwarding port corresponding to the message to be forwarded, the system chip SOC broadcasts the message to be forwarded in the VALIN to determine the forwarding port, and sends it to the network processor NP for forwarding, while ensuring the successful forwarding of the message to be forwarded, avoiding the occupation of the channel bandwidth of the system chip SOC, thereby improving the overall network performance.

[0081] Furthermore, by forwarding the Layer 2 message through the data processing unit DPU, the use of the system chip SOC for forwarding processing can be avoided. When the central processing capacity of the system chip SOC is insufficient, the delay and packet loss of the Layer 2 message processing can be avoided, thereby improving the stability and performance of the network. At the same time, it can avoid the increase in the central processing unit load on the system chip SOC affecting the flow table processing efficiency of the virtual switch OVS, thereby avoiding the increase in the delay in forwarding of network traffic, which can further improve the reliability and performance of the network.

[0082] Corresponding to the above method, the present invention also provides a second-layer message forwarding device, which includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the device implements the steps of the second-layer message forwarding method as above.

[0083] Corresponding to the above method, the present invention also provides an electronic device comprising: a computing component 1, an acceleration component 2, a memory expansion component 3 and a heat dissipation component 4;

[0084] (1) The computing component 1 includes: a central processing unit CPU, a double data rate synchronous dynamic random access memory DDR and a power supply;

[0085] (2) The acceleration component 2 includes: a switch switch interconnecting a carrier board and an acceleration card; wherein the acceleration card includes: one or more of a graphics processor GPU, a processor distributed processing unit DPU, and a neural network processor NPU;

[0086] (3) The memory expansion component 3 includes: a carrier board, and one or more of a memory expansion chip, a dual in-line memory module DIMM, and a memory-class storage medium SCM medium;

[0087] (4) The heat dissipation component 4 includes: one or more of air cooling and liquid cooling.

[0088] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned layer 2 message forwarding method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0089] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.

[0090] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.

[0091] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.

[0092] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A layer 2 message forwarding method, characterized in that: The method is applied to a layer 2 message forwarding device, the layer 2 message forwarding device comprises a data processing unit DPU and a system chip SOC, the data processing unit DPU comprises a network processor NP and a data offloading engine DOE; a virtual switch OVS runs on the system chip SOC; the method comprises the following steps: The network processor NP receives a message to be forwarded, and based on the destination MAC address and VLAN information in the message to be forwarded, retrieves the forwarding port corresponding to the message to be forwarded from the destination MAC address table in the data offloading engine DOE; the destination MAC address table is obtained after the virtual switch OVS performs source MAC learning; after obtaining the destination MAC address table, the virtual switch OVS unloads the destination MAC address table to the data offloading engine DOE; the data offloading engine DOE is used to store the destination MAC address table; In the case where the forwarding port is not retrieved, sending the message to be forwarded to the virtual switch OVS through the network processor NP; In the case where the virtual switch OVS receives the message to be forwarded, the message to be forwarded is broadcasted in the VLAN through the virtual switch OVS, a forwarding port corresponding to the message to be forwarded is determined, and the port information corresponding to the forwarding port is sent to the network processor NP; the port information corresponding to the forwarding port is sent to the network processor NP, including: writing the port information and a pass tag in metadata associated with the message to be forwarded through the virtual switch OVS; the pass tag is used to instruct the network processor NP to forward the message to be forwarded; and sending the message to be forwarded to the network processor NP through the virtual switch OVS; After receiving the port information, the network processor NP forwards the message to be forwarded from the forwarding port.

2. The layer 2 message forwarding method according to claim 1, characterized in that: After determining the forwarding port corresponding to the message to be forwarded, the method further includes: The source MAC learning is performed through the virtual switch OVS, the destination MAC address table is updated, and the updated destination MAC address table is unloaded to the data unloading engine DOE.

3. The layer 2 message forwarding method according to claim 1, characterized in that: The destination MAC address table includes several MAC table items, each of which includes a destination MAC address item, a forwarding port item, a hit parameter item and a VLAN item.

4. The layer 2 message forwarding method according to claim 3, characterized in that: After the network processor NP receives the port information and forwards the message to be forwarded from the forwarding port, the method further includes: setting the hit parameter of the hit parameter item corresponding to the destination MAC address and the forwarding port to 1 through the network processor NP.

5. The layer 2 message forwarding method according to claim 3, characterized in that: After the network processor NP receives the port information, forwarding the message to be forwarded from the forwarding port, the method further includes: Accessing the destination MAC address table through the virtual switch OVS at a preset time interval, and aging the MAC table entry corresponding to the hit parameter entry whose hit parameter is 0; The hit parameter option whose hit parameter is 1 is set to 0 through the virtual switch OVS.

6. The layer 2 message forwarding method according to claim 5, characterized in that: After aging the MAC table entry corresponding to the hit parameter item with the hit parameter being 0, the method further includes: generating an aged MAC table entry deletion instruction through the virtual switch OVS and sending the instruction to the data offloading engine DOE; The data offloading engine DOE deletes the aged MAC table entry in the destination MAC address table when receiving the aged MAC table entry deletion instruction.

7. The layer 2 message forwarding method according to claim 4, characterized in that: When the forwarding port is retrieved, the message to be forwarded is forwarded from the forwarding port through the network processor NP.

8. A layer 2 message forwarding device, characterized in that: Applied to the layer 2 message forwarding method according to any one of claims 1 to 7, the device comprises a data processing unit DPU and a system chip SOC, the data processing unit DPU comprises a network processor NP and a data offloading engine DOE; a virtual switch OVS runs on the system chip SOC; The network processor NP is used to: receive a message to be forwarded, and based on the destination MAC address and VLAN information in the message to be forwarded, retrieve a forwarding port corresponding to the message to be forwarded from the destination MAC address table in the data offloading engine DOE; In the case where the forwarding port is not retrieved, the message to be forwarded is sent to the virtual switch OVS through the network processor NP; wherein the destination MAC address table is obtained after the virtual switch OVS performs source MAC learning; after obtaining the destination MAC address table, the virtual switch OVS unloads the destination MAC address table to the data unloading engine DOE; the data unloading engine DOE is used to store the destination MAC address table; The virtual switch OVS is used to: when receiving the message to be forwarded, broadcast the message to be forwarded in the VLAN through the virtual switch OVS, determine the forwarding port corresponding to the message to be forwarded, and send the port information corresponding to the forwarding port to the network processor NP; The network processor NP is further configured to: after receiving the port information, forward the message to be forwarded from the forwarding port.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Message forwarding device, network equipment and method

    CN101719877A