Networking method, line card, switching device, electronic device, chip and storage medium
By introducing networking methods into online cards and switching devices, receiving and assembling packet groups and distributing them to switching devices through load balancing algorithms, solving the shortcomings of traditional router/switch architectures in terms of high bandwidth, low latency and scalability. , realizes efficient and low-cost network data forwarding.
Patent Information
- Application Number
- CN202310961672.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-01
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2043-08-01
AI Technical Summary
The high complexity, high power consumption, high cost and tightly coupled architecture of traditional cluster routers/switches limits their application in big data cloud services, computing power networks, 5G and AI scenarios, especially for high bandwidth and low The requirements for delay and scalability are difficult to meet.
By introducing networking methods into online cards and switching devices, multiple data packets are received, assembled into data packet groups, and distributed to switching devices through load balancing algorithms to realize data forwarding. This method uses packet switching technology to reduce network costs and reduce latency.
The packet switching technology based on load balancing algorithm is realized, which reduces network costs and delays, supports high bandwidth and low latency networks, and has elastic expansion capabilities to meet the needs of real-time and high-speed business scenarios.
Smart Images

Figure CN119449719A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a networking method, a networking method, a line card, a switching device, an electronic device, a chip, and a computer-readable storage medium. Background Art
[0002] With the booming development of emerging businesses such as big data cloud services, computing power networks, 5G, and AI, network traffic is growing rapidly at a rate of 30% per year. However, traditional cluster architecture routers / switches are hindered from further development due to various limitations such as high requirements for the deployment environment, poor single-point heat dissipation performance, and large impact of single-point failures. The high complexity, high power consumption, high cost, and tightly coupled architecture of traditional cluster routers / switches urgently need to be changed to redefine a simple, low-carbon, open, and massively scalable new IP product architecture. At the same time, with the development of distributed storage and high-performance computing, there is an urgent need for networks with high bandwidth, low latency, and other characteristics to meet real-time, high-speed business scenarios through elastic expansion. Summary of the invention
[0003] Embodiments of the present application provide a networking method, a line card, a switching device, an electronic device, a chip, and a computer-readable storage medium.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] In a first aspect, an embodiment of the present application provides a networking method, which is applied to a first line card and is characterized by comprising:
[0006] Receive multiple first data packets; the multiple first data packets are data packets sent by the first device to the second device;
[0007] Assembling the multiple first data packets to obtain at least one first data packet group, each of the first data packet groups including one or more first data packets;
[0008] The at least one first data packet group is distributed to at least one first switching device through a load balancing algorithm, so that the at least one first data packet group is forwarded to at least one second line card through the at least one first switching device.
[0009] In a second aspect, an embodiment of the present application provides a networking method, which is applied to a switching device and is characterized by comprising:
[0010] receiving a first data packet group sent by a first line card, wherein the first data packet group includes one or more first data packets, and the first data packet is one of a plurality of first data packets sent by a first device to a second device;
[0011] The first data packet group is forwarded to a second line card; wherein the first line card is a line card to which the first device is connected, and the second line card is a line card to which the second device is connected.
[0012] In a third aspect, an embodiment of the present application provides a line card, characterized in that it includes:
[0013] A first receiving unit: configured to receive a plurality of first data packets; the plurality of first data packets are data packets sent by the first device to the second device;
[0014] A first sending unit: used to assemble the multiple first data packets to obtain at least one first data packet group, each of which includes one or more first data packets; distribute the at least one first data packet group to at least one first switching device through a load balancing algorithm, so that the at least one first data packet group is forwarded to at least one second line card through the at least one first switching device.
[0015] In a fourth aspect, an embodiment of the present application provides a switching device, characterized in that it includes:
[0016] A second receiving unit: configured to receive a first data packet group sent by a first line card, wherein the first data packet group includes one or more first data packets, and the first data packet is one of a plurality of first data packets sent by a first device to a second device;
[0017] A second sending unit: configured to forward the first data packet group to a second line card; wherein the first line card is a line card to which the first device is connected, and the second line card is a line card to which the second device is connected.
[0018] In a fifth aspect, the present application provides an electronic device, comprising: a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory, and executing any one of the networking methods provided in the embodiments of the present application.
[0019] In a sixth aspect, the present application provides a chip, comprising: a processor, used to call and run a computer program from a memory, so that a device equipped with the chip executes any one of the networking methods provided in the embodiments of the present application.
[0020] In a seventh aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program enables a computer to execute any one of the networking methods provided in the embodiments of the present application.
[0021] The networking method provided in the embodiment of the present application assembles the data packets sent by the first device to the second device through the line card to obtain a data packet group, and distributes the data packet group to the switching device through a load balancing algorithm. In this way, data forwarding based on packet switching technology can be implemented through the switching device. This data forwarding method uses packet switching technology based on a load balancing algorithm to achieve lower network costs and smaller network latency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 Schematic diagram of the implementation process of the networking method provided in the embodiment of the present application Figure 1 ;
[0023] Figure 2 A schematic diagram of the combination and restoration of Packet groups provided in an embodiment of the present application;
[0024] Figure 3 A schematic diagram of the location of the Packet group information in the VXLAN message provided in the embodiment of the present application;
[0025] Figure 4 A schematic diagram of the location of the Packet group information in the SRv6 message provided in an embodiment of the present application;
[0026] Figure 5 The network diagram provided in the embodiment of the present application Figure 1 ;
[0027] Figure 6 A schematic diagram of data forwarding provided in an embodiment of the present application;
[0028] Figure 7 The network diagram provided in the embodiment of the present application Figure 2 ;
[0029] Figure 8 A schematic diagram of the message format header of the space request message and the space request response message provided in the embodiment of the present application;
[0030] Fig. 9 Schematic diagram of the implementation process of the networking method provided in the embodiment of the present application Figure 2 ;
[0031] Fig.10 A schematic diagram of the structure of the line card 1000 provided in an embodiment of the present application;
[0032] Fig.11 A schematic diagram of the structure of a switching device 1100 provided in an embodiment of the present application;
[0033] Fig.12A schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0034] Fig.13 A schematic structural diagram of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The following will describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0036] It should be noted that in the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the embodiments of the present application, the character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0037] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between two items, or an association relationship between the two items, or a relationship between indication and being indicated, configuration and being configured, and the like.
[0038] To facilitate understanding of the technical solutions of the embodiments of the present application, the relevant technologies of the embodiments of the present application are described below. The following related technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application.
[0039] In related technologies, networking is done in the following three ways:
[0040] The first one: Infiniband. Infiniband networking is the optimal solution for high-performance networks. It uses ultra-high bandwidth and a credit-based mechanism to ensure zero congestion and ultra-low latency. The dedicated network protocol stack tailored by IBTA for RDMA can ensure the reliability of data transmission at the hardware level, relying on the data link layer (IB Link Layer) to achieve flow control and reliable low-latency transmission. A dedicated IB network card and IB switch are required.
[0041] The second type: frame cluster. It is a network device with independent main control board, business board, power module, fan module, etc., and comes with an external frame. Each device is connected in a cluster to form a multi-level and multi-plane system, enabling it to work together.
[0042] The third type: DDC. DCC is a distributed decoupled chassis device solution. The service line card acts as the front end and becomes the NCP (Network Cloud Packet (Line card in Chassis)) role, and the switching network board acts as the back end and becomes the NCF (Network Cloud Fabric (Fabric card in Chassis)) role. The original connector components between the two are now replaced by optical fiber cables, and forwarding supports cell switching.
[0043] However, the above-mentioned related technologies still have the following technical problems:
[0044] 1. IB Network
[0045] Using ultra-high bandwidth and a credit-based mechanism to ensure zero congestion and ultra-low latency is several times more expensive than traditional Ethernet networking at the same bandwidth. It is costly, slow to evolve, and difficult to maintain.
[0046] 2. Frame Cluster
[0047] The expansion capability is limited, the frame size limits the maximum number of ports, the equipment consumes a lot of power, the cabinet power requirements are high, the number of ports on a single device is large, and the fault domain is large.
[0048] 3. DDC
[0049] DDC technology is closed, and line cards and switching network boards must use Broadcom chips, which makes it impossible for end users to have a second source of supply. In addition, DDC requires line cards and switching network cards to support cell switching, which has high cost and technical requirements.
[0050] Figure 1 Schematic diagram of the implementation process of the networking method provided in the embodiment of the present application Figure 1 ,like Figure 1 As shown, an embodiment of the present application provides a networking method, which is applied to a line card, and the method includes the following steps:
[0051] Step 101: Receive multiple first data packets; the multiple first data packets are data packets sent by a first device to a second device.
[0052] In actual application, the first device and the second device may be virtual machines or other devices, and this application does not limit this.
[0053] In actual application, the line card can be an independent box switch or router device, or other devices, which is not limited in this application.
[0054] Step 102: Assemble the multiple first data packets to obtain at least one first data packet group, each of which includes one or more first data packets.
[0055] The messages in the data packet group are only virtually reassembled, so the order of the messages remains unchanged.
[0056] The message in the data packet group carries at least one of the following information: first information, second information and third information; wherein,
[0057] The first information represents the number of the data packet group to which the data packet belongs;
[0058] The second information indicates whether the data packet is the starting data packet of the data packet group to which the data packet belongs;
[0059] The third information indicates whether the data packet is the end data packet of the data packet group to which it belongs.
[0060] refer to Figure 2 , Figure 2 The schematic diagram of the combination and restoration of Packet groups provided in the embodiment of the present application. Packet groups are based on the virtual reorganization and restoration technology of data packets. The incoming line card needs to support combination, and the outgoing line card needs to support restoration. The incoming line card LC side implements the assembly of messages, and the outgoing line card LC side implements the separation of messages. Packet group is a logical fixed-length message, such as 10000, which can be uniformly agreed upon according to the chip and device conditions. Packet group1, Packet group2 and Packet group3 are three data packet groups, Figure 2 Packet group 1, Packet group 2 and Packet group 3 can be arranged to be sorted and restored with sequence numbers. The sorting and restoration can be done with the help of the original message. For example, refer to Figure 3 , Figure 3 The schematic diagram of the location of the Packet group information in the VXLAN message provided in the embodiment of the present application, taking the VXLAN message as an example, the reserved bits in the VXLAN header can store the Packet group number, the start and end information of the Packet group message. By querying the Packet group number of the message, the order of the entire large packet can be obtained. The First of group and Last of group can be used to determine whether the message is the start message and the end message in the package; wherein the Packet group number corresponds to the first information, and the First of group and Last of group correspond to the second information and the third information respectively. Reference Figure 4 , Figure 4The schematic diagram of the location of the Packet group information in the SRv6 message provided in the embodiment of the present application, the reserved bit in the SRv6 header can store the Packet group number, the start and end information of the Packet group message. The order of the entire large packet can be obtained by querying the Packet group number of the message. The First of group and Last of group can be used to determine whether the message is the start message and the end message in the package; wherein the Packet group number corresponds to the first information, and the First of group and Last of group correspond to the second information and the third information respectively.
[0061] Step 103: Distribute the at least one first data packet group to at least one first switching device through a load balancing algorithm, so that the at least one first data packet group is forwarded to at least one second line card through the at least one first switching device.
[0062] In some optional implementations, distributing the at least one first data packet group to at least one first switching device through a load balancing algorithm includes:
[0063] Obtain the load connection diagram of the line card and the switching equipment;
[0064] selecting a distribution link for the at least one first data packet group based on the load condition connection map;
[0065] According to the distribution link, the at least one first data packet group is distributed to at least one first switching device.
[0066] In actual application, the line card can obtain the load connection diagram between the line card and the switching device by itself; it can also obtain the load connection diagram between the line card and the switching device through an external control device. By obtaining the load connection diagram between each line card and each switching device through an external control device, energy consumption and resources of the line card can be saved.
[0067] In some optional embodiments, the load condition connection diagram is obtained by traffic marking the connections between the line card and the switching device in the first connection diagram based on the traffic interval and the first traffic, wherein the first connection diagram is drawn based on the connection relationship between the line card and the switching device, and the first traffic includes the traffic from the line card to the switching device and / or the traffic from the switching device to the line card.
[0068] The second line card is one of the at least one second line card connected to the second device.
[0069] Exemplary, reference Figure 5 and Figure 6 , Figure 5 The network diagram provided in the embodiment of the present application Figure 1 , Figure 6 A schematic diagram of data forwarding provided in an embodiment of the present application. Figure 6 In the example, Ingress LC is an incoming line card connected to the first device, and EgressLC is an outgoing line card connected to the second device. After the incoming line card receives the data packet sent by the first device, it obtains the connection relationship between each line card and each switching device, and draws a connection diagram based on the connection relationship between each line card and each switching device to count the bidirectional traffic between each line card and each switching device; sets a traffic interval, and based on the traffic interval and the bidirectional traffic between each line card and each switching device, marks the connection between each line card and each switching device in the connection diagram to generate a load condition connection diagram between each line card and each switching device; selects the distribution link of at least one data packet group based on the load condition connection diagram, and distributes the at least one data packet group to the switching device on the distribution link. The switching device then forwards the data packet to the outgoing line card corresponding to the second device, and the outgoing line card restores the data packet and sends it to the second device.
[0070] In some implementations, the load conditions are divided into three levels, with a green line for message volume below 60%, a yellow line for message volume between 60% and 80%, and a red line for message volume above 80%.
[0071] Exemplary, reference Figure 5 , Figure 5In the figure, LC1, LC2, LC3, and LC4 are line cards, and FE1, FE2, FE3, and FE4 are switching devices. Exemplarily, VM1 is connected to LC1, and VM2 is connected to LC2. When VM1 wants to send data to VM2, VM1 sends multiple first data packets to LC1, and LC1 stores the first data packets. LC1 obtains a load condition connection diagram. In this embodiment, the paths of data sent from LC1 to LC2 include LC1-FE1-LC2, LC1-FE2-LC2, LC1-FE3-LC2, and LC1-FE4-LC2. LC1 selects a link to send a first space request message through a load balancing algorithm. Exemplarily, if the selected sending link is LC1-FE1-LC2, the first space request message is forwarded to LC2 via FE1. After LC2 receives the first space request message, LC2 calculates whether VM2 has cache space to process the data that VM1 wants to send to VM2. If VM2 has The cache space processes these data, LC2 sends a first space request response message to FE1 to inform VM2 that it has cache space to process the data, FE1 forwards the first space request response message to LC1, after LC1 receives the first space request response message, LC1 assembles the first data packet sent by VM1 to obtain at least one first data packet group, and selects a distribution link for at least one first data packet group through a load balancing algorithm. Exemplarily, the paths LC1-FE1-LC2, LC1-FE2-LC2, and LC1-FE3-LC2 are selected to distribute at least one first data packet group, FE1, FE2, and FE3 forward one or more first data packet groups sent by LC1 to LC2. Schematically, if FE1 receives a first data packet group sent by LC1, FE1 forwards the first data packet group to LC2, and if FE1 receives two first data packet groups sent by LC1, FE1 forwards the two first data packet groups to LC2. In this embodiment, the second device is connected to only one line card LC2, so at least one first data packet group is forwarded to LC2 through three switching devices. LC2 restores one or more first data packet groups received from FE1, FE2 and FE3 to obtain multiple first data packets, stores the first data packets in the buffer of each port, and forwards the first data packets to VM2.
[0072] refer to Figure 7 , Figure 7 The network diagram provided in the embodiment of the present application Figure 2 , and networking diagram Figure 1The difference is that an external control device is added. The control device is a control line card. The control device collects the topological connection relationship of the entire system, and collects the bidirectional traffic of each FE and LC through message statistics, and forms an overall load connection diagram. When WMA sends a message to VMB, the LC1 line card can use the control device to obtain the load situation from LC1 to each FE node and from each FE node to LC3 node, and then decide on the route selection.
[0073] It should be noted that Figure 5 , Figure 6 and Figure 7 The networking connection method shown in is only an example. When the present application is actually applied to a specific networking connection method, other networking connection methods can be used for networking. For example, in order to improve transmission efficiency or facilitate backup, a virtual machine is connected to multiple line cards.
[0074] In some optional implementations, after receiving the plurality of first data packets, the method further includes:
[0075] storing the plurality of first data packets;
[0076] Sending a first space request message to a switching network board, wherein the switching network board includes the at least one first switching device;
[0077] receiving a first space request response message sent by the switching network board, where the first space request response message is used to indicate whether the second device has a cache space for processing the first data packet;
[0078] The step of assembling the plurality of first data packets to obtain at least one first data packet group includes:
[0079] If the first space request response message indicates that the second device has cache space for processing the first data packet, the multiple first data packets are assembled to obtain at least one first data packet group.
[0080] Due to the easy scalability of switching equipment, each device involved in data forwarding can be elastically expanded, and interactive devices suitable for different business scenarios can be added to the switching network board to meet different business scenarios. For example, switching devices suitable for real-time and high-speed business scenarios can be added to the switching network board to meet real-time and high-speed business scenarios.
[0081] The line card receives data packets from the network and classifies them into the VOQ of the line card for storage. Before sending the data packets, a space request control message is sent to determine whether the second device has enough buffer space to process the messages.
[0082] If the first space request response message is not received or the second device is temporarily unable to process the message, the message will be temporarily stored in the storage of the first device, where the line card has on-chip and off-chip caches, which can cache data for a period of time. The message will only be sent when the second device confirms that it can be received, avoiding the problem of packet loss caused by direct forwarding to the second device.
[0083] In some optional implementations, the sending the first space request message to the switching network board includes:
[0084] selecting a link for sending the first space request message based on the load condition connection diagram;
[0085] According to the sending link, a first space request message is sent to the switching network board.
[0086] In networking, a line card can be used as both an inbound line card and an outbound line card.
[0087] In some optional implementations, the networking method further includes
[0088] receiving a second data packet group sent by a second switching device; the second data packet group includes one or more second data packets, and the second data packet is a data packet sent by the second device to the first device;
[0089] Restoring the received second data packet group to obtain the one or more second data packets;
[0090] The one or more second data packets are sent to the first device.
[0091] In actual application, the line card restores the second data packet group to one or more second data packets, stores the second data packets in the buffer of each port, and then forwards the second data packets to the first device.
[0092] In some optional implementations, the networking method further includes
[0093] receiving a second space request message sent by the second switching device, where the second space request message is used to determine whether the buffer space of the first device is greater than or equal to the buffer space required for processing the second data packet;
[0094] Based on the second space request message, obtaining a cache space of the first device;
[0095] When the cache space of the first device is greater than or equal to the cache space required for processing the second data packet, a second space request response message is sent to the second switching device, where the second space request response message is used to indicate that the first device has cache space for processing the second data packet.
[0096] Exemplary, reference Figure 8 , Figure 8 A schematic diagram of the message format header of the space request message and the space request response message provided in the embodiment of the present application, such as Figure 8 As shown, the DMAC position is the MAC of the outgoing line card, the SMAC position is the MAC of the incoming line card, the TYPE position is the message type, the DIP position is the IP of the outgoing line card, the SIP position is the IP of the incoming line card, the Command Type is the message type, exemplarily, 00 represents request, 01 represents response, and it can be set according to the actual situation in actual application, and this application does not limit this, the Space position is the requested space, the Free space or not position is the result of the response, exemplarily, 00 represents initialization, 01 represents no space, and 10 represents space. It can be set according to the actual situation in actual application, and this application does not limit this, and the Payload position is the load.
[0097] refer to Fig. 9 , Fig. 9 Schematic diagram of the implementation process of the networking method provided in the embodiment of the present application Figure 2 In this embodiment, the networking method is applied to a switching device, and the method includes the following steps:
[0098] Step 901: Receive a first data packet group sent by a first line card, where the first data packet group includes one or more first data packets, and the first data packet is one of multiple first data packets sent by a first device to a second device.
[0099] In actual application, the switching device may be an independent box switch or router device, or other device, and this application does not limit this.
[0100] Step 902: forward the first data packet group to a second line card; wherein the first line card is a line card to which the first device is connected, and the second line card is a line card to which the second device is connected.
[0101] In some optional implementations, the data packet carries at least one of the following information: first information, second information, and third information; wherein,
[0102] The first information represents the number of the data packet group to which the data packet belongs;
[0103] The second information indicates whether the data packet is the starting data packet of the data packet group to which the data packet belongs;
[0104] The third information indicates whether the data packet is the end data packet of the data packet group to which it belongs.
[0105] In some optional embodiments, the method further comprises:
[0106] receiving a first space request message sent by the first line card, and sending the first space request message to the second line card;
[0107] Receive a first space request response message sent by the second line card, and send the first space request response message to the first line card; wherein the first space request response message is used to indicate whether the second device has a cache space for processing the first data packet.
[0108] The networking method provided in the embodiment of the present application adopts a high-performance network architecture solution with packet switching technology as a whole. The line card device and the switching network device adopt the control request message and space confirmation message format in the embodiment of the present application to confirm the space information. Multiple messages are combined into a group in the line card device. Packet group information is stored in the message and participates in the sorting of the group message. A control card or control device is added to form an overall load connection topology diagram, and a full-path load balancing solution is adopted.
[0109] The networking method provided in the embodiment of the present application adopts packet switching technology, with a large number of optional chips and product forms, and can be realized by simple transformation of existing equipment. At the same time, it can flexibly support larger-scale networks. There is no need to support cell switching. The adopted packet switching method is simple and convenient, and the network cost is lower. At the same time, since the message remains unchanged, the problem that the cell exchange is fragmented into small pieces and difficult to track and locate can be solved; the system packet loss can be reduced through simple message interaction; the packet group information can ensure the correct order of the message; the full-path load balancing solution makes the flow load more balanced on different paths when forwarding through multiple paths.
[0110] refer to Fig.10 , Fig.10 A schematic diagram of the structure of the line card 1000 provided in the embodiment of the present application is shown in FIG. Fig.10 As shown, the line card 1000 includes:
[0111] The first receiving unit 1010 is configured to receive a plurality of first data packets; the plurality of first data packets are data packets sent by the first device to the second device;
[0112] The first sending unit 1020 is used to assemble the multiple first data packets to obtain at least one first data packet group, each of which includes one or more first data packets; distribute the at least one first data packet group to at least one first switching device through a load balancing algorithm, so that the at least one first data packet group is forwarded to at least one second line card through the at least one first switching device.
[0113] In an embodiment of the present application, the first sending unit 1020: is also used to store the multiple first data packets; sends a first space request message to the switching network board, and the switching network board includes the at least one first switching device; the first receiving unit 1010: is also used to receive a first space request response message sent by the switching network board, and the first space request response message is used to indicate whether the second device has a cache space for processing the first data packet; the first sending unit 1020: is specifically used to assemble the multiple first data packets to obtain at least one first data packet group if the first space request response message indicates that the second device has a cache space for processing the first data packet.
[0114] In an embodiment of the present application, the first sending unit 1020 is specifically used to obtain a load condition connection diagram between a line card and a switching device; select a distribution link for the at least one first data packet group based on the load condition connection diagram; and distribute the at least one first data packet group to at least one first switching device according to the distribution link.
[0115] In an embodiment of the present application, the load condition connection diagram is obtained by marking the connection lines between the line card and the switching device in the first connection diagram based on the traffic interval and the first traffic, wherein the first connection diagram is drawn based on the connection relationship between the line card and the switching device, and the first traffic includes the traffic from the line card to the switching device and / or the traffic from the switching device to the line card.
[0116] In the embodiment of the present application, the first sending unit 1020 is further used to select a sending link for the first space request message based on the load condition connection diagram; and send the first space request message to the switching network board according to the sending link.
[0117] In an embodiment of the present application, the first receiving unit 1010: is also used to receive a second data packet group sent by a second switching device; the second data packet group includes one or more second data packets, and the second data packet is a data packet sent by the second device to the first device; the received second data packet group is restored to obtain the one or more second data packets; and the one or more second data packets are sent to the first device.
[0118] In an embodiment of the present application, the first receiving unit 1010: receives a second space request message sent by the second switching device, the second space request message is used to determine whether the cache space of the first device is greater than or equal to the cache space required for processing the second data packet; based on the second space request message, obtains the cache space of the first device; the first sending unit 1020: is also used to send a second space request response message to the second switching device when the cache space of the first device is greater than or equal to the cache space required for processing the second data packet, the second space request response message is used to indicate that the first device has cache space for processing the second data packet.
[0119] In an embodiment of the present application, the data packet carries at least one of the following information: first information, second information and third information; wherein the first information represents the number of the data packet group to which the data packet belongs; the second information represents whether the data packet is the starting data packet of the data packet group to which it belongs; and the third information represents whether the data packet is the ending data packet of the data packet group to which it belongs.
[0120] Those skilled in the art should understand that Fig.10 The implementation functions of each unit in the line card shown can be understood by referring to the relevant description of the aforementioned method. Fig.10 The functions of each unit in the line card shown may be implemented by a program running on a processor, or may be implemented by a specific logic circuit.
[0121] refer to Fig.11 , Fig.11 A schematic diagram of the structure of the switching device 1100 provided in the embodiment of the present application is shown in FIG. Fig.11 As shown, the switching device 1100 includes:
[0122] The second receiving unit 1110 is configured to receive a first data packet group sent by a first line card, where the first data packet group includes one or more first data packets, and the first data packet is one of multiple first data packets sent by a first device to a second device;
[0123] The second sending unit 1120: forwards the first data packet group to a second line card; wherein the first line card is a line card to which the first device is connected, and the second line card is a line card to which the second device is connected.
[0124] In an embodiment of the present application, the second receiving unit 1110 is further used to receive a first space request message sent by the first line card; the second sending unit 1120 is further used to send the first space request message to the second line card; the second receiving unit 1110 is further used to receive a first space request response message sent by the second line card; the second sending unit 1120 is further used to send the first space request response message to the first line card; wherein the first space request response message is used to indicate whether the second device has cache space for processing the first data packet.
[0125] Fig.12 It is a schematic structural diagram of an electronic device 1200 provided in an embodiment of the present application. Fig.12 The electronic device 1200 shown includes a processor 1210, which can call and run a computer program from a memory to implement the method in the embodiment of the present application.
[0126] Alternatively, if Fig.12 As shown, the electronic device 1200 may further include a memory 1220. The processor 1210 may call and run a computer program from the memory 1220 to implement the method in the embodiment of the present application.
[0127] The memory 1220 may be a separate device independent of the processor 1210 , or may be integrated into the processor 1210 .
[0128] Alternatively, if Fig.12 As shown, the electronic device 1200 may further include a transceiver 1230, and the processor 1210 may control the transceiver 1230 to communicate with other devices, specifically, may send information or data to other devices, or receive information or data sent by other devices.
[0129] The transceiver 1230 may include a transmitter and a receiver. The transceiver 1230 may further include an antenna, and the number of antennas may be one or more.
[0130] The electronic device 1200 may specifically be a line card or a switching device in an embodiment of the present application, and the electronic device 1200 may implement the corresponding processes implemented by the line card or the switching device in each method in the embodiment of the present application, which will not be described in detail here for the sake of brevity.
[0131] Fig.13 It is a schematic structural diagram of the chip of an embodiment of the present application. Fig.13 The chip 1300 shown includes a processor 1310, which can call and run a computer program from a memory to implement the method in the embodiment of the present application.
[0132] Alternatively, if Fig.13 As shown, the chip 1300 may further include a memory 1320. The processor 1310 may call and run a computer program from the memory 1320 to implement the method in the embodiment of the present application.
[0133] The memory 1320 may be a separate device independent of the processor 1310 , or may be integrated into the processor 1310 .
[0134] Optionally, the chip 1300 may further include an input interface 1330. The processor 1310 may control the input interface 1330 to communicate with other devices or chips, and specifically, may obtain information or data sent by other devices or chips.
[0135] Optionally, the chip 1300 may further include an output interface 1340. The processor 1310 may control the output interface 1340 to communicate with other devices or chips, and specifically, may output information or data to other devices or chips.
[0136] The chip can be applied to the line cards and switching devices in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the line cards and switching devices in the various methods of the embodiments of the present application. For the sake of brevity, they will not be repeated here.
[0137] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0138] It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and performed. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, and other mature storage media in the art. 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 in combination with its hardware.
[0139] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can 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 can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as 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 RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0140] It should be understood that the above-mentioned memory is exemplary but not restrictive. For example, the memory in the embodiments of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM), etc. That is to say, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.
[0141] The embodiment of the present application also provides a computer-readable storage medium for storing a computer program. The computer-readable storage medium can be applied to the line card and switching device in the embodiment of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the line card and switching device in each method of the embodiment of the present application, which will not be described here for the sake of brevity.
[0142] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are 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 this application.
[0143] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0144] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0145] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0146] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0147] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or line card, switching device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., and other media that can store program codes.
[0148] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A networking method, applied to a first line card, characterized in that: include: receiving a plurality of first data packets; The multiple first data packets are data packets sent by the first device to the second device; Assembling the multiple first data packets to obtain at least one first data packet group, each of the first data packet groups including one or more first data packets; The at least one first data packet group is distributed to at least one first switching device through a load balancing algorithm, so that the at least one first data packet group is forwarded to at least one second line card through the at least one first switching device.
2. The networking method according to claim 1, characterized in that: After receiving the plurality of first data packets, the method further comprises: storing the plurality of first data packets; Sending a first space request message to a switching network board, the switching network board including the at least one first switching device, the first space request message being used to determine whether the second device has a cache space for processing the first data packet; receiving a first space request response message sent by the switching network board based on the first space request message, where the first space request response message is used to indicate that the second device has a cache space for processing the first data packet; The step of assembling the plurality of first data packets to obtain at least one first data packet group includes: Based on the first space request response message, the multiple first data packets are assembled to obtain the at least one first data packet group.
3. The networking method according to claim 2, characterized in that: The step of distributing the at least one first data packet group to at least one first switching device through a load balancing algorithm includes: Obtain the load connection diagram of the line card and the switching equipment; selecting a distribution link for the at least one first data packet group based on the load condition connection map; According to the distribution link, the at least one first data packet group is distributed to the at least one first switching device.
4. The networking method according to claim 3, characterized in that: The load condition connection diagram is obtained by marking the connection lines between the line card and the switching device in the first connection diagram based on the traffic interval and the first traffic, wherein the first connection diagram is drawn based on the connection relationship between the line card and the switching device, and the first traffic includes the traffic from the line card to the switching device and / or the traffic from the switching device to the line card.
5. The networking method according to claim 3 or 4, characterized in that: The sending a first space request message to the switching network board includes: selecting a link for sending the first space request message based on the load condition connection diagram; According to the sending link, a first space request message is sent to the switching network board.
6. The networking method according to claim 5, characterized in that: Also includes: receiving a second data packet group sent by a second switching device; The second data packet group includes one or more second data packets, and the second data packets are data packets sent by the second device to the first device; Restoring the received second data packet group to obtain the one or more second data packets; The one or more second data packets are sent to the first device.
7. The networking method according to claim 6, characterized in that: Also includes: receiving a second space request message sent by the second switching device, where the second space request message is used to determine whether the buffer space of the first device is greater than or equal to the buffer space required for processing the second data packet; Based on the second space request message, obtaining a cache space of the first device; When the cache space of the first device is greater than or equal to the cache space required for processing the second data packet, a second space request response message is sent to the second switching device, where the second space request response message is used to indicate that the first device has cache space for processing the second data packet.
8. The networking method according to any one of claims 1 to 7, characterized in that: The data packet carries at least one of the following information: first information, second information, and third information; wherein, The first information represents the number of the data packet group to which the data packet belongs; The second information indicates whether the data packet is the starting data packet of the data packet group to which it belongs; The third information indicates whether the data packet is the end data packet of the data packet group to which it belongs.
9. A networking method, applied to a switching device, characterized in that: include: receiving a first data packet group sent by a first line card, wherein the first data packet group includes one or more first data packets, and the first data packet is one of a plurality of first data packets sent by a first device to a second device; The first data packet group is forwarded to a second line card; wherein the first line card is a line card to which the first device is connected, and the second line card is a line card to which the second device is connected.
10. The networking method according to claim 9, characterized in that: Also includes: receiving a first space request message sent by the first line card, and sending the first space request message to the second line card; Receive a first space request response message sent by the second line card, and send the first space request response message to the first line card; wherein the first space request response message is used to indicate whether the second device has a cache space for processing the first data packet.
11. A line card, characterized in that: include: A first receiving unit: configured to receive a plurality of first data packets; The multiple first data packets are data packets sent by the first device to the second device; A first sending unit: configured to assemble the plurality of first data packets to obtain at least one first data packet group, each of which includes one or more first data packets; The at least one first data packet group is distributed to at least one first switching device through a load balancing algorithm, so that the at least one first data packet group is forwarded to at least one second line card through the at least one first switching device.
12. A switching device, characterized in that: include: A second receiving unit: configured to receive a first data packet group sent by a first line card, wherein the first data packet group includes one or more first data packets, and the first data packet is one of a plurality of first data packets sent by a first device to a second device; A second sending unit: configured to forward the first data packet group to a second line card; wherein the first line card is a line card to which the first device is connected, and the second line card is a line card to which the second device is connected.
13. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory, and executing the networking method as described in any one of claims 1-8, or the networking method as described in any one of claims 9-10.
14. A chip, characterized in that: include: A processor, used to call and run a computer program from a memory, so that a device equipped with the chip executes the networking method described in any one of claims 1-8, or the networking method described in any one of claims 9-10.
15. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program enables a computer to execute the networking method according to any one of claims 1 to 8, or the networking method according to any one of claims 9 to 10.
Citation Information
Patent Citations
Control method and device for cell switching
CN102340441A
Load balancing systems, devices, and methods
CN108632156A
Data packet transmission method and device
CN108881062A
Data processing method and device and computer readable storage medium
CN112882651A
Load balancing method and device based on line cards
CN113014502A