Multicast data transmission method suitable for switch, switch and system
By using the multicast bit field and indicator field method in the switch, the port receiving data is directly determined, avoiding the hardware copy and addressing process, solving the latency and cost problems of PCIe switches in high-performance computing, and realizing efficient and low-latency multicast data transmission.
Patent Information
- Application Number
- CN202511121030.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-08-12
AI Technical Summary
Existing PCIe switches have problems with increased data transmission latency and rising hardware costs in high-performance computing scenarios, making it difficult to achieve low-latency, low-cost, and efficient multicast capabilities.
The multicast bit field and multicast indication field method is adopted to directly determine whether the port receives data by setting the multicast bit and indication bit, avoiding the hardware copy and addressing process, combining with the MCU to perform target port matching, and realizing efficient multicast data transmission.
It improves the efficiency of multicast operations, reduces data latency and hardware costs, enhances the accuracy and reliability of data transmission, and is suitable for large-scale data synchronization scenarios.
Smart Images

Figure CN120639730A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a multicast data transmission method, a switch, and a system applicable to a switch. Background Art
[0002] With the rapid development of artificial intelligence and large language models, model training often requires synchronizing data from one compute node to other compute nodes. In large-scale distributed computing environments, data synchronization is a critical step in the training process. This large-scale data synchronization demand places higher demands on switch performance. Especially in scenarios like large language model training, it is crucial to efficiently synchronize massive amounts of data in a short period of time to ensure efficient and accurate model training.
[0003] To enable efficient data exchange between computing nodes, traditional PCIe switches are widely used for data transmission. However, existing PCIe switches, whether using a store-and-forward architecture or a cut-through forwarding architecture, suffer from several insurmountable drawbacks that limit their application in high-performance computing scenarios.
[0004] First, during data transmission, traditional PCIe switches need to detect the header address of the PCIe data packet to determine the target port of the data packet, and then use hardware to copy the data in parallel and send it to multiple ports. Figure 1 As shown in the figure, the host sets multicast data within the switch. During data transmission, the address within the packet determines the multicast group. The multicast group data indicates the port to which the packet should be transmitted. This process increases data transmission latency. The packet header address detection step itself takes a considerable amount of time. When the number of packets is large and the switch has numerous ports, the cumulative effect of this latency is particularly significant, seriously affecting data synchronization efficiency.
[0005] Secondly, as the number of switch ports continues to increase, the hardware resources required to maintain parallel replication capabilities also increase exponentially. This not only leads to a significant increase in hardware costs but also further increases the time it takes to replicate packets. This increase in hardware not only increases equipment complexity and maintenance costs but also may introduce additional latency due to interoperability issues between the hardware.
[0006] In summary, existing PCIe switches cannot achieve efficient multicast functions while taking into account low latency and low cost, and cannot meet the current demand for high-performance, low-cost data transmission in the field of communication technology.
[0007] The disclosure of the above background technology content is only used to assist in understanding the inventive concept and technical solution of the present invention. It does not necessarily belong to the prior art of the present application, nor does it necessarily provide technical guidance. In the absence of clear evidence that the above content has been disclosed before the filing date of the present application, the above background technology should not be used to evaluate the novelty and creativity of the present application. Summary of the Invention
[0008] The object of the present invention is to provide a multicast data transmission method, a switch and a system applicable to a switch, which can realize multicast data transmission applicable to the switch with low cost and high efficiency.
[0009] In order to achieve the above object, the technical solution adopted by the present invention is as follows: A multicast data transmission method applicable to a switch comprises the following steps: For multicast data to be transmitted, a multicast request is initiated, a multicast bit field is set in the multicast request, the multicast bit field includes a plurality of multicast bits, the multicast bits have a corresponding relationship with other ports other than the source port, and the multicast bit corresponding to the target port is set to a first preset value, and the multicast bit corresponding to the non-target port is set to a non-first preset value, the source port is one of the ports, and the other ports include the target port and the non-target port; The source port transmits the multicast request to other ports, and each other port determines whether to receive the multicast data in the following manner: checking whether the multicast bit corresponding to the port in the multicast bit field is a first preset value; if so, receiving the multicast data; if not, not receiving the multicast data.
[0010] Furthermore, any one of the above technical solutions or a combination of multiple technical solutions may further include the following steps: Pre-setting a multicast port status register in the switch, wherein the multicast port status register is configured to store a multicast indication field indicating whether each port supports multicast transmission; Before checking the multicast bit corresponding to the port in the multicast bit field, first determine whether the port supports multicast transmission according to the multicast indication field; if so, determine whether to receive the multicast data according to the multicast bit corresponding to the port; if not, the port does not receive the multicast data.
[0011] Further, based on any one of the technical solutions or a combination of multiple technical solutions described above, the multicast indication field includes an indication bit, and the indication bit has a corresponding relationship with the port. If the indication bit is a second preset value, the port supports multicast transmission; if the indication bit is not a second preset value, the port does not support multicast transmission; the second preset value is the same as the first preset value, or the second preset value is different from the first preset value.
[0012] Further, based on any one of the above technical solutions or a combination of multiple technical solutions, the second preset value is 1, and the non-second preset value is 0; or, The second preset value is 0, and the non-second preset value is 1.
[0013] Further, based on any one of the above technical solutions or a combination of multiple technical solutions, the multicast indication field further includes one or more reserved bits, and the reserved bits are set to non-second preset values; If the switch adds a new port, the corresponding reserved bit is determined as the indication bit corresponding to the new port. If the new port supports multicast transmission, the corresponding indication bit is configured as the second preset value; otherwise, the corresponding indication bit is configured as a non-second preset value.
[0014] Furthermore, based on any one of the aforementioned technical solutions or a combination of multiple technical solutions, the multicast indication field includes 32 indication bits or 64 indication bits.
[0015] Furthermore, any one of the above technical solutions or a combination of multiple technical solutions may further include the following steps: Initiating a communication request, setting a multicast identification field in the communication request, if the communication request is the multicast request, setting the multicast identification field to a target sequence, otherwise setting the multicast identification field to a non-target sequence; When the source port transmits the communication request to the switch, the switch determines whether the communication request is a multicast request based on the multicast identification field. If the multicast identification field is a target sequence, the communication request is determined to be a multicast request; otherwise, the communication request is determined not to be a multicast request.
[0016] Furthermore, according to any one of the aforementioned technical solutions or a combination of multiple technical solutions, the multicast bit field is set after the multicast identification field.
[0017] Further, based on any one of the above technical solutions or a combination of multiple technical solutions, the first preset value is 1, and the non-first preset value is 0; or, The first preset value is 0 and the non-first preset value is 1.
[0018] Further, based on any one of the above technical solutions or a combination of multiple technical solutions, the switch includes an MCU electrically connected to each port, and the multicast data transmission method further includes: The source port transmits the multicast request to the MCU and other ports; For each of the other ports, if the port determines according to the multicast bit field that it receives multicast data, the port returns a first signal to the MCU; otherwise, the port does not send the first signal; The MCU determines whether the port that returns the first signal matches the target port determined based on the multicast bit field, and if they match, the MCU returns a second signal to the source port; In response to receiving the second signal, the source port transmits the multicast data to each other port.
[0019] Furthermore, any one of the above technical solutions or a combination of multiple technical solutions may further include the following steps: Each port of the pre-configured switch includes a receiving end and a transmitting end, wherein the receiving end is configured to receive data transmitted from the outside to the switch and transmit it to the transmitting end of another port, and the transmitting end is configured to receive data sent by the receiving end of another port and transmit it to the outside of the switch; Setting N layers of circuits in the switch, and setting N ports of the switch on the N layers of circuits, wherein each layer of the circuits includes a receiving end of one of the ports and a transmitting end of the other ports, and the receiving end of one of the ports is electrically connected to the transmitting ends of the other ports respectively; Each transmitting end on the circuit at each layer determines whether to receive multicast data transmission according to the multicast bit field.
[0020] Furthermore, according to any one of the above technical solutions or a combination of multiple technical solutions, the receiving ends on different layers of circuits are different; and / or, The receiving end and the sending end on the circuit of each layer perform multicast data transmission independently from each other.
[0021] Furthermore, any one of the above technical solutions or a combination of multiple technical solutions may further include the following steps: On each layer of the circuit, a corresponding temporary storage area is set for the receiving end and each sending end. The sending end receives data transmitted by the receiving end and stores it in the corresponding temporary storage area on the circuit where it is located. When M source ports simultaneously send multicast data to the sending end of a port through M layers of circuits, the sending ends of the ports on the M layers of circuits simultaneously and separately receive the multicast data and store it in the corresponding temporary storage area. or, For the same port, the receiving ends of the ports on multiple layers of circuits share a temporary storage area, and the sending ends of the ports on multiple layers of circuits share a temporary storage area. When M source ports simultaneously send multicast data to the sending end of one port through M layers of circuits, the sending end of the port on the M layers of circuits receives the multicast data transmitted by each source port based on the first-in-first-out principle or the principle of high to low priority and stores it in the corresponding temporary storage area.
[0022] According to another aspect of the present invention, a switch capable of implementing multicast data transmission is provided, wherein the switch performs multicast data transmission based on the multicast data transmission method applicable to switches as described in any one of the above technical solutions or a combination of multiple technical solutions.
[0023] According to another aspect of the present invention, a data transmission system is provided, comprising a switch capable of implementing multicast data transmission as described in any one of the above technical solutions or a combination of multiple technical solutions.
[0024] The beneficial effects brought about by the technical solution provided by the present invention are as follows: a. The present invention proposes a multicast data transmission method for switches. A source port directly sends a communication request to all other ports. Each other port then determines whether to receive the data based on its corresponding multicast bit. This eliminates the need for complex addressing and address matching to determine the target port, nor does it require hardware-based parallel data replication. Furthermore, since bits can only be 0 or 1, a single bit is used to directly indicate whether a port is a target port. Each port then determines whether to receive the multicast data based on its corresponding multicast bit. This method improves multicast operation efficiency, reduces data latency, and requires minimal hardware cost. b. The present invention sets a multicast indication field and uses the various indication bits in the multicast indication field to define whether each port supports multicast transmission. This makes it very convenient to distinguish between ports that support and do not support multicast transmission. When a device on a port fails, the faulty port can be isolated by modifying the corresponding indication bit in the multicast indication field. The support status of each port corresponding to multicast transmission can be flexibly adjusted according to usage requirements. c. The present invention returns a first signal to the MCU by confirming the port receiving the multicast data. The MCU matches the port that returns the first signal with the target port determined by the MCU. If a match is found, a second signal is sent to the source port. The source port performs the multicast operation only after receiving the second signal. This improves the accuracy and reliability of data transmission. d. The multicast data transmission method proposed in the present invention is applicable to switches with multiple layers of independent transmission circuits. It can realize the simultaneous transmission of multicast data from multiple source ports to one destination port, and can also greatly improve data transmission efficiency and reduce data transmission latency. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0026] Figure 1 A schematic diagram of the addressing principle in the multicast transmission process in the prior art; Figure 2 A module block diagram of a switch capable of implementing multicast transmission is provided for an exemplary embodiment of the present invention; Figure 3 An overall flow chart of a multicast data transmission method provided for an exemplary embodiment of the present invention; Figure 4 A detailed flow chart of a multicast data transmission method provided for an exemplary embodiment of the present invention; Figure 5 A schematic diagram of a first communication request setting method provided by an exemplary embodiment of the present invention; Figure 6 A schematic diagram of a second communication request setting method provided by an exemplary embodiment of the present invention; Figure 7 A schematic diagram of a first switch with multi-layer circuits provided as a first exemplary embodiment of the present invention; Figure 8 A schematic diagram of a second switch with multi-layer circuits provided as an exemplary embodiment of the present invention; Figure 9 A schematic diagram of the signal transmission principle during multicast data transmission is provided for an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] Based on the shortcomings of the existing technology, the present invention proposes a multicast data transmission method, switch and system suitable for switches, which can realize multicast transmission without increasing latency and a large amount of hardware, breaking through the bottleneck of the existing technology and promoting the further development of artificial intelligence and high-performance computing technology.
[0030] In one embodiment of the present invention, a multicast data transmission method applicable to a switch is provided. Figures 2 to 4 as well as Figure 9 As shown, the following steps are included: For multicast data to be transmitted, a multicast request is initiated, a multicast bit field is set in the multicast request, the multicast bit field includes a plurality of multicast bits, the multicast bits have a corresponding relationship with other ports other than the source port, and the multicast bit corresponding to the target port is set to a first preset value, and the multicast bit corresponding to the non-target port is set to a non-first preset value, the source port is one of the ports, and the other ports include the target port and the non-target port; The source port transmits the multicast request to other ports, and each other port determines whether to receive the multicast data in the following manner: checking whether the multicast bit corresponding to the port in the multicast bit field is a first preset value; if so, receiving the multicast data; if not, not receiving the multicast data.
[0031] The values of a bit include 0 and 1. Therefore, in this embodiment, the first preset value can be set to 1, and the non-first preset value can be set to 0. Alternatively, the first preset value can be set to 0, and the non-first preset value can be set to 1. For example, if a switch has a total of four ports, including port 1 to port 4, and port 1 is the source port and needs to transmit multicast data to port 2 and port 4, the multicast bit field can be set to 101 (the multicast bit of the second port is 1, the multicast bit of the third port is 0, and the multicast bit of the fourth port is 1, where 1 indicates reception and 0 indicates non-reception).
[0032] More preferably, the multicast bit field is set to 0101. That is, including the source port, each port of the switch is set with a corresponding multicast bit, and the multicast bit corresponding to each port in the multicast bit field is fixed and unique. The multicast bit field corresponding to a four-port switch includes 4 multicast bits, and the multicast bit field corresponding to a 16-port switch includes 16 multicast bits. Taking a four-port switch as an example, the 4 multicast bits, from the first to the last bit, correspond to ports one to four. If port one is the source port and transmits data to ports two and three, the multicast bit field is set to 0110; if port two is the source port and transmits data to ports three and four, the multicast bit field is set to 0011. In this paragraph, a port with a multicast bit of 1 is a target port and receives data, and a port with a multicast bit of 0 is a non-target port and does not receive data.
[0033] It can be seen from the above examples that the multicast data transmission method for switches proposed in the present invention is different from the multicast transmission method of existing PCIe switches. Regardless of whether a store-and-forward architecture or a direct-forwarding architecture is adopted, it is necessary to detect the header address of the PCIe data packet, determine the target port based on the header address, and then forward it. In addition, it is also necessary to copy the data in parallel through hardware and send it to multiple target ports. The present application directly sends the communication request / multicast request to all ports, and each port directly determines whether to receive the data based on its corresponding multicast bit. Not only does it not require complex addressing and matching addresses to determine the target port process, but it also does not require the use of hardware to copy the data in parallel. It can improve the efficiency of multicast operations, reduce data delays, and the required hardware cost is also very low.
[0034] In one embodiment of the present invention, Figure 1 and Figure 4 As shown, the switch is provided with an MCU and a multicast port status register. The MCU is electrically connected to each port and the multicast port status register, and the multicast port status register is also electrically connected to each port. The multicast port status register is configured to store a multicast indication field indicating whether each port supports multicast transmission.
[0035] The multicast indication field includes an indication bit, and the indication bit has a corresponding relationship with the port. For example, the multicast indication field includes 32 bits or 64 bits. If the indication bit is a second preset value, the port supports multicast transmission; if the indication bit is a non-second preset value, the port does not support multicast transmission; the second preset value is the same as the first preset value, or the second preset value is different from the first preset value. Similarly, the second preset value is 1 and the non-second preset value is 0; or the second preset value is 0 and the non-second preset value is 1.
[0036] Preferably, the multicast indication field further includes one or more reserved bits, wherein the reserved bits are set to values other than the second preset value. If a new port is added to the switch, the corresponding reserved bits are determined as indication bits corresponding to the new port. If the new port supports multicast transmission, the corresponding indication bits are configured to the second preset value; otherwise, the corresponding indication bits are configured to a value other than the second preset value.
[0037] For example, a switch includes 32 ports, each of which has an independent multicast packet reception mode configured based on the multicast bit. The chip within the switch also includes a multicast port status register. This register identifies whether multicast is enabled on a port. For example, a value of 0x0000_000E (hexadecimal, converted to binary: 00000000000000000000000000001110) indicates that ports 2, 3, and 4 of the switch support multicast transmission, while the remaining ports do not.
[0038] In this embodiment, a communication request, i.e., a data transmission request, is initiated for a data packet to be transmitted. A multicast identification field is set in the communication request. If the communication request is a multicast request, the multicast identification field is set to the target sequence; otherwise, the multicast identification field is set to a non-target sequence. The multicast identification field is unique. For example, the multicast identification field is set to 32 bits of 0xFFFF (i.e., the target sequence is a sequence of 32 consecutive 1s). When the source port transmits the communication request to the switch, the switch determines whether the communication request is a multicast request based on the multicast identification field. If the multicast identification field is the target sequence, the communication request is determined to be a multicast request; otherwise, the communication request is determined to be not a multicast request. Preferably, the multicast bit field is set after the multicast identification field. In this way, each port and MCU can determine the starting address of the multicast bit field based on the multicast identification field.
[0039] The FMT field (format field) can also be configured in the communication request to indicate the number of bits in the Multicast Bits field. For example, a value of 40 (hexadecimal) in the FMT field indicates that the Multicast Bits field contains 64 bits. Other FMT field configurations can also be used to indicate the number of bits in the Multicast Bits field.
[0040] In this embodiment, for a 32-port switch, a requesting device at a source port initiates a communication request. If multicast data is to be sent to multiple destination ports, the multicast identification field in the communication request is set to a 32-bit value of 0xFFFF. If the transmission is point-to-point, non-multicast data, the multicast identification field is set to a 32-bit sequence / field other than 0xFFFF. A continuous 32-bit multicast bit sequence is set after 0xFFFF. By detecting the multicast bit corresponding to the port in the 32 bits following the multicast identification field, it is determined whether the port has received the data packet and transmitted it to the corresponding device (which can be a host or another PCIe device such as a GPU).
[0041] In this embodiment, before checking the multicast bit corresponding to the port in the multicast bit field, it is first determined based on the multicast indication field whether the port supports multicast transmission. If supported, it is determined whether to receive the multicast data based on the multicast bit corresponding to the port; if not supported, the port does not receive the multicast data.
[0042] Multicast data transmission is performed based on the UIO mode. For each of the other ports, if the port determines that multicast data is received based on the multicast indication field and the multicast bit field, the port returns a first signal to the MCU; otherwise, the first signal is not sent. Specifically, a rejection signal or no signal may be returned. The MCU determines whether the port that returns the first signal matches the target port determined based on the multicast indication field and the multicast bit field. If they match, the MCU returns a second signal to the source port. In response to receiving the second signal, the source port transmits the multicast data to each of the other ports.
[0043] like Figure 2 As shown in the figure, for an 8-port switch, port 1 as the source port needs to multicast data to ports 2, 3, 4, 5, and 7. Port 1 sends a communication request to the MCU and other ports. The communication request contains a 32-bit multicast identification field (0xFFFF) followed by an 8-bit multicast bit field (01111010).
[0044] When the other ports detect that the multicast identification field is 0xFFFF, the following multicast determination process is performed: Ports 2-8 first determine whether they support multicast transmission based on the multicast indication field stored in the multicast port status register. Assuming that ports 2-8 determine that they all support multicast transmission based on the multicast indication field, then ports 2, 3, 4, 5, and 7 further determine the received data based on the multicast bit field (01111010). Ports 2, 3, 4, 5, and 7 then return the first signal to the MCU (e.g., Figure 2 As shown by the thin dotted line in FIG), although ports 6 and 8 determine that they support multicast transmission according to the multicast indication field, they determine that they do not receive data according to the multicast bit field (01111010), and therefore do not return the first signal to the MCU.
[0045] After receiving the communication request, the MCU detects that the multicast identification field is 0xFFFF, and then performs the following multicast judgment process: the MCU determines that the target port is port 2, 3, 4, 5, or 7 based on the multicast indication field stored in the multicast port status register and the multicast indication field after the multicast identification field; the MCU matches the target port determined by itself with the port that returns the first signal. If the match is consistent (that is, the MCU determines that ports 2, 3, 4, 5, and 7 are multicast targets, and the ports that return the first signal are also ports 2, 3, 4, 5, and 7), the MCU returns the second signal to port 1 ( Figure 2 (As shown by the thick dashed line in FIG). It should be noted that the first signal and the second signal can both be ACK data indicating confirmation of receipt. If they do not match, the MCU issues an error message.
[0046] After receiving the second signal, port 1 transmits the multicast data to all ports. Ports 2, 3, 4, 5, and 7 receive the multicast data, while ports 6 and 8 do not. This allows for efficient and fast multicast operations without complex hardware.
[0047] If port 1 does not need to perform multicast operations as the source port, it will use the existing one-to-one transmission method to perform address matching based on the communication request / data packet to determine the target port. The target port with the matching address returns an acknowledgment signal to port 1. After receiving the acknowledgment signal, port 1 transmits data to the target port.
[0048] The present invention can cope with the non-posted mode of memory write required by the newly added UIO (Unorder Input Output) mode of PCIe. The original PCIe multicast can only use data packets in the forwarding mode (posted form), that is, there is no need to reply to the ACK data packet after receiving it. Therefore, the present invention further improves the compatibility of multicast operations.
[0049] It should be noted that the above communication request / multicast request can be data independent of the data packet being transmitted, or it can be a part of the data packet. Figure 5 Set the communication request as shown, and send a pre-communication request (multicast request) before the data packet header is sent; you can also Figure 6 As shown, the communication request (multicast request) is directly set in the data packet, for example, it can be set after the data packet header.
[0050] The multicast data transmission method described in any of the above embodiments is also applicable to a switch having multiple layers of independent transmission circuits. The switch having multiple layers of independent transmission circuits includes N ports, each of which includes a receiving end and a transmitting end. The receiving end is configured to receive data transmitted from an external source to the switch and transmit it to the receiving end of another port. The transmitting end is configured to receive data sent by the receiving end of another port and transmit it to the outside of the switch.
[0051] The switch is provided with N layers of circuits, with the switch's N ports arranged on the N layers of circuits. Each layer of circuits includes a receiving end for one port and a transmitting end for the other ports, and the receiving end for one port is electrically connected to the transmitting ends for the other ports. Each transmitting end on each layer of circuits determines whether to receive multicast data transmission based on the multicast bit field. The receiving ends on different layers of circuits are different; the receiving ends on each layer of circuits independently transmit multicast data to the transmitting ends.
[0052] When a switch with multiple layers of independent transmission circuits applies the above multicast data transmission method, a contention situation may occur where the sender of one port is simultaneously the target port / multicast object of multiple other ports.
[0053] To deal with the possible contention that multiple ports simultaneously broadcast data to one port, one way is as follows Figure 8 As shown, for the same port, the receiving ends of the ports on multiple layers of circuits share a single temporary buffer, and the sending ends of the ports on multiple layers of circuits share a single temporary buffer. When M source ports simultaneously send multicast data to the sending end of a port via M layers of circuits, the sending ends of the ports on the M layers of circuits receive the multicast data transmitted by each source port based on a first-in-first-out principle or a descending priority principle, and store the data in the corresponding temporary buffer. This approach does not increase costs, but inevitably introduces a certain degree of data transmission delay.
[0054] like Figure 8As shown (the second and third layer circuits are not shown), for a 4-port switch, the first receiving port on the 4-layer circuit shares the first port buffer 1 (the first receiving port only exists on the first layer circuit), the first transmitting port on the 4-layer circuit (the first transmitting port exists on the second to fourth layer circuits) shares the first port buffer 2; the second receiving port on the 4-layer circuit (the second receiving port only exists on the second layer circuit) shares the first port buffer 2. Figure 8 Port 2's Buffer 1 is shared by the sender on Layer 4 (not shown). The sender on Layer 1, Layer 3, and Layer 4 (a sender on Layer 1, Layer 3, and Layer 4) shares Buffer 2 on Port 2. Similarly, the senders and receivers on Ports 3 and 4 share the same Buffers, which will not be described further. When the receive on Port 1 multicasts data to Ports 3 and 4, and Port 4 multicasts data to Ports 2 and 3, there may be contention for the sender on Port 3 to receive multicast data from both Ports 1 and 4. In this case, the sender on Port 3 can receive the multicast data from both the receive on Port 1 and Port 4 based on a first-in-first-out (FIFO) or priority comparison method and store it in Buffer 2 on Port 3.
[0055] Another way is, Figure 7 As shown, on each layer of the circuit, corresponding buffers are set for the receiving end and each sending end. The sending end receives the data transmitted by the receiving end and stores it in the corresponding buffer on the circuit. When M source ports simultaneously send multicast data to the sending end of a port through M layers of circuits, the sending ends of the ports on the M layers of circuits simultaneously and separately receive the multicast data and store it in the corresponding buffer. This method increases costs to a certain extent, but it can enable multiple source ports to simultaneously transmit multicast data to a single destination port, and it also greatly improves data transmission efficiency and reduces data transmission latency.
[0056] like Figure 7As shown (the second and third layer circuits are not shown), for a four-port switch, the first layer circuit has a corresponding buffer area 11 for the receiving end of port 1, a corresponding buffer area 12 for the sending end of port 2, a corresponding buffer area 13 for the sending end of port 3, and a corresponding buffer area 14 for the sending end of port 4. On the fourth layer circuit, the sending end of port 1 has a corresponding buffer area 41 for the sending end of port 2, a corresponding buffer area 42 for the sending end of port 3, a corresponding buffer area 43 for the sending end of port 4, and a corresponding buffer area 44 for the receiving end of port 4. The buffer areas on the second and third layer circuits are configured similarly and will not be described in detail. When the receiving end of port 1 multicasts data to ports 3 and 4, and port 4 multicasts data to ports 2 and 3, a contention situation may arise where the sending end of port 3 needs to receive multicast data from both ports 1 and 4. In this situation, the sending end of port 3 on the first layer circuit receives the multicast data from port 1 and stores it in the corresponding buffer area 13, while the sending end of port 3 on the fourth layer circuit receives the multicast data from port 4 and stores it in the corresponding buffer area 43. This achieves a data transmission method in which multiple ports simultaneously broadcast data to one port without any conflict.
[0057] Based on the multicast data transmission method applicable to switches proposed in the above embodiment, precise control of multicast transmission can be achieved through the multicast bit field, and there is no need to detect the packet header address as in the traditional multicast method, which greatly reduces the data transmission delay, improves the efficiency of data transmission, and reduces hardware costs. Combined with the multicast indication field, the switch of the multicast function can be flexibly adjusted according to the port requirements. Both unicast and multicast transmission modes can be freely switched according to actual needs to meet the data transmission requirements in different scenarios. In addition, the use of MCU for target port matching and comparison can avoid the security risks in traditional multicast technology and improve the stability and reliability of the system. The technical solution proposed in the present invention is particularly suitable for large-scale data synchronization scenarios such as AI model training, can meet the rapidly developing AI needs, and provides important technical support for building an efficient and reliable AI infrastructure.
[0058] In one embodiment of the present invention, a switch capable of implementing multicast data transmission is provided. The switch performs multicast data transmission based on the multicast data transmission method applicable to the switch as described in any of the above embodiments.
[0059] In one embodiment of the present invention, a data transmission system is provided, including the multicast data transmission method applicable to a switch as described in any of the above embodiments.
[0060] It should be noted that the embodiments of the switch and data transmission system capable of realizing multicast data transmission provided by the present invention have the same inventive concept as the above-mentioned embodiment of the multicast data transmission method applicable to the switch, and the entire content of the embodiment of the multicast data transmission method applicable to the switch is incorporated into the embodiments of the switch and data transmission system capable of realizing multicast data transmission by introduction.
[0061] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0062] The above is only a specific implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A multicast data transmission method applicable to a switch, characterized in that: The following steps are involved: For multicast data to be transmitted, a multicast request is initiated, a multicast bit field is set in the multicast request, the multicast bit field includes a plurality of multicast bits, the multicast bits have a corresponding relationship with other ports other than the source port, and the multicast bit corresponding to the target port is set to a first preset value, and the multicast bit corresponding to the non-target port is set to a non-first preset value, the source port is one of the ports, and the other ports include the target port and the non-target port; The source port transmits the multicast request to other ports, and each other port determines whether to receive the multicast data in the following manner: checking whether the multicast bit corresponding to the port in the multicast bit field is a first preset value; if so, receiving the multicast data; if not, not receiving the multicast data.
2. The multicast data transmission method applicable to a switch according to claim 1, characterized in that: The following steps are also included: Pre-setting a multicast port status register in the switch, wherein the multicast port status register is configured to store a multicast indication field indicating whether each port supports multicast transmission; Before checking the multicast bit corresponding to the port in the multicast bit field, first determine whether the port supports multicast transmission according to the multicast indication field; if so, determine whether to receive the multicast data according to the multicast bit corresponding to the port; if not, the port does not receive the multicast data.
3. The multicast data transmission method applicable to a switch according to claim 2, characterized in that: The multicast indication field includes an indication bit, and the indication bit has a corresponding relationship with the port. If the indication bit is a second preset value, the port supports multicast transmission; if the indication bit is not a second preset value, the port does not support multicast transmission; the second preset value is the same as the first preset value, or the second preset value is different from the first preset value.
4. The multicast data transmission method applicable to a switch according to claim 3, characterized in that: The second preset value is 1, and the non-second preset value is 0; or The second preset value is 0, and the non-second preset value is 1.
5. The multicast data transmission method applicable to a switch according to claim 3, characterized in that: The multicast indication field further includes one or more reserved bits, and the reserved bits are set to a non-second preset value; If the switch adds a new port, the corresponding reserved bit is determined as the indication bit corresponding to the new port. If the new port supports multicast transmission, the corresponding indication bit is configured as the second preset value; otherwise, the corresponding indication bit is configured as a non-second preset value.
6. The multicast data transmission method applicable to a switch according to claim 3, characterized in that: The multicast indication field includes 32 bits or 64 bits.
7. The multicast data transmission method applicable to a switch according to claim 1, characterized in that: The following steps are also included: Initiating a communication request, setting a multicast identification field in the communication request, if the communication request is the multicast request, setting the multicast identification field to a target sequence, otherwise setting the multicast identification field to a non-target sequence; When the source port transmits the communication request to the switch, the switch determines whether the communication request is a multicast request based on the multicast identification field. If the multicast identification field is a target sequence, the communication request is determined to be a multicast request; otherwise, the communication request is determined not to be a multicast request.
8. The multicast data transmission method applicable to a switch according to claim 7, characterized in that: The multicast bit field is set after the multicast identification field.
9. The multicast data transmission method applicable to a switch according to claim 1, characterized in that: The first preset value is 1, and the non-first preset value is 0; or The first preset value is 0, and the non-first preset value is 1.
10. The multicast data transmission method applicable to a switch according to claim 1, characterized in that: The switch includes an MCU electrically connected to each port, and the multicast data transmission method further includes: The source port transmits the multicast request to the MCU and other ports; For each of the other ports, if the port determines according to the multicast bit field that it receives multicast data, the port returns a first signal to the MCU; otherwise, the port does not send the first signal; The MCU determines whether the port that returns the first signal matches the target port determined based on the multicast bit field, and if they match, the MCU returns a second signal to the source port; In response to receiving the second signal, the source port transmits the multicast data to each other port.
11. The multicast data transmission method applicable to a switch according to claim 1, characterized in that: The following steps are also included: Each port of the pre-configured switch includes a receiving end and a transmitting end, wherein the receiving end is configured to receive data transmitted from the outside to the switch and transmit it to the transmitting end of another port, and the transmitting end is configured to receive data sent by the receiving end of another port and transmit it to the outside of the switch; Setting N layers of circuits in the switch, and setting N ports of the switch on the N layers of circuits, wherein each layer of the circuits includes a receiving end of one of the ports and a transmitting end of the other ports, and the receiving end of one of the ports is electrically connected to the transmitting ends of the other ports respectively; Each transmitting end on the circuit of each layer determines whether to receive multicast data according to the multicast bit field.
12. The multicast data transmission method applicable to a switch according to claim 11, characterized in that: The receiving ends on different layers of circuits are different; and / or, The receiving end and the sending end on the circuit of each layer perform multicast data transmission independently from each other.
13. The multicast data transmission method applicable to a switch according to claim 11, characterized in that: The following steps are also included: On each layer of the circuit, a corresponding temporary storage area is set for the receiving end and each sending end. The sending end receives data transmitted by the receiving end and stores it in the corresponding temporary storage area on the circuit where it is located. When M source ports simultaneously send multicast data to the sending end of a port through M layers of circuits, the sending ends of the ports on the M layers of circuits simultaneously and separately receive the multicast data and store it in the corresponding temporary storage area. or, For the same port, the receiving ends of the ports on multiple layers of circuits share a temporary storage area, and the sending ends of the ports on multiple layers of circuits share a temporary storage area. When M source ports simultaneously send multicast data to the sending end of one port through M layers of circuits, the sending end of the port on the M layers of circuits receives the multicast data transmitted by each source port based on the first-in-first-out principle or the principle of high to low priority and stores it in the corresponding temporary storage area.
14. A switch capable of implementing multicast data transmission, characterized in that: The switch performs multicast data transmission based on the multicast data transmission method applicable to the switch according to any one of claims 1 to 13.
15. A data transmission system, characterized in that: The invention comprises a switch capable of implementing multicast data transmission as claimed in claim 14.
Citation Information
Patent Citations
Routing method based on FC switched network
CN104734961A
Message forwarding method and device
CN112671642A
Data multicast transmission method and device, equipment and storage medium
CN113055193A
Data transmission device and method
CN114079627A
Switch for reducing data exchange delay and data transmission method and system
CN118972349A