Multicast data transmission method, switch and system suitable for switch

By setting the multicast bit field and multicast indicator field in the switch, it is possible to directly determine whether the port receives data, thus solving the latency and cost problems of PCIe switches in high-performance computing and realizing efficient and low-latency multicast data transmission.

CN120639730BActive Publication Date: 2025-11-18SHANGHAI XINLIJI SEMICON CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511121030.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2025-11-18
Estimated Expiration
2045-08-12

AI Technical Summary

Technical Problem

Existing PCIe switches suffer from increased data transmission latency and higher hardware costs in high-performance computing scenarios, making it difficult to achieve low-latency, low-cost, and efficient multicast functionality.

Method used

By setting the multicast bit field and multicast indicator field in the switch, communication requests can be sent directly to all ports. Each port determines whether to receive data based on the multicast bit and uses the MCU to match the target port, avoiding hardware copying and addressing processes.

Benefits of technology

It improves the efficiency of multicast operations, reduces data latency and hardware costs, and enhances the accuracy and reliability of data transmission, making it suitable for large-scale data synchronization scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120639730B_ABST
    Figure CN120639730B_ABST
Patent Text Reader

Abstract

The application discloses a multicast data transmission method, a switch and a system suitable for the switch. The multicast data transmission method comprises the following steps: configuring a multicast bit field in a multicast request, wherein the multicast bit field comprises a plurality of multicast bit positions, the multicast bit positions have a corresponding relationship with other ports except a source port, a multicast bit position corresponding to a target port is set as a first preset value, and a multicast bit position corresponding to a non-target port is set as a non-first preset value; the source port is one of the ports, and the other ports comprise the target port and the non-target port; the source port transmits the multicast request to the other ports; and each of the other ports determines whether to receive multicast data according to the following manner: checking whether the multicast bit position corresponding to the other port in the multicast bit field is the first preset value; if yes, receiving the multicast data; and if no, not receiving the multicast data. The application can be applied to the switch to realize multicast data transmission, and has low cost and high efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a multicast data transmission method, switch, and system applicable to switches. Background Technology

[0002] With the rapid development of artificial intelligence and large language models, training models often requires synchronizing data from one computing node to other computing nodes. In large-scale distributed computing environments, data synchronization is a critical step in the training process. The demands of large-scale data synchronization place higher requirements on the performance of switches. Especially in scenarios such as large language model training, it is necessary to efficiently synchronize massive amounts of data within a short period of time to ensure the efficiency and accuracy of model training.

[0003] To achieve efficient data interaction between computing nodes, traditional PCIe switches are widely used in data transmission tasks. However, existing PCIe switches, whether employing store-and-forward or cut-through architectures, have some insurmountable drawbacks that limit their application in high-performance computing scenarios.

[0004] First, traditional PCIe switches require detecting the header address of PCIe data packets during data transmission to determine the destination port. Then, they use hardware to copy the data in parallel and send it to multiple ports. Specifically, for example... Figure 1 As shown, the host configures multicast data within the switch. During transmission, the multicast group is determined by the address within the data packet, and the data within the multicast group indicates which port the data packet should be sent to. This process increases data transmission latency. The step of detecting the packet header address itself consumes time; with a large number of data packets and numerous switch ports, this cumulative effect of latency is particularly pronounced, severely impacting data synchronization efficiency.

[0005] Secondly, as the number of switch ports continues to increase, the hardware resources required to maintain parallel replication functionality also grow exponentially. This not only leads to a significant increase in hardware costs but also further increases the time required to replicate data packets. The increase in the number of hardware components not only increases the complexity and maintenance costs of the equipment but may also introduce additional latency due to coordination issues between hardware components.

[0006] In summary, existing PCIe switches cannot achieve efficient multicast functionality while maintaining low latency and low cost, and therefore cannot meet the current demand for high-performance, low-cost data transmission in the field of communication technology.

[0007] The above background information is provided only to assist in understanding the inventive concept and technical solution of this invention. It does not necessarily belong to the prior art of this application, nor does it necessarily provide technical teaching. In the absence of clear evidence that the above information was disclosed before the filing date of this application, the above background information should not be used to evaluate the novelty and inventiveness of this application. Summary of the Invention

[0008] The purpose of this invention is to provide a multicast data transmission method, switch, and system suitable for switches, which can realize multicast data transmission in a low-cost and high-efficiency manner.

[0009] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0010] A multicast data transmission method suitable for switches includes the following steps:

[0011] For a multicast data to be transmitted, a multicast request is initiated. In the multicast request, a multicast bit field is set. The multicast bit field includes multiple multicast bits. The multicast bits correspond to other ports besides the source port. The multicast bit corresponding to the target port is set to a first preset value, and the multicast bit corresponding to non-target ports 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 ports.

[0012] The source port transmits the multicast request to other ports, and each other port determines whether to receive the multicast data in the following way: it checks whether the multicast bit corresponding to the port in the multicast bit field is a first preset value. If it is, the multicast data is received; if not, the multicast data is not received.

[0013] Furthermore, following any one or a combination of the aforementioned technical solutions, the method further includes the following steps:

[0014] A multicast port status register is pre-configured within the switch, and the multicast port status register is configured to store a multicast indication field indicating whether each port supports multicast transmission.

[0015] Before checking the multicast bit corresponding to the port in the multicast bit field, it is first determined whether the port supports multicast transmission according to the multicast indication field. If it supports multicast transmission, it is determined whether to receive the multicast data according to the multicast bit corresponding to the port. If it does not support multicast transmission, the port does not receive the multicast data.

[0016] Furthermore, following any one or a combination of the aforementioned technical solutions, the multicast indication field includes an indication bit, which corresponds to the port. If the indication bit is a second preset value, the port supports multicast transmission; if the indication bit is not the 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.

[0017] Furthermore, following any one or a combination of the aforementioned technical solutions, the second preset value is 1, and the non-second preset value is 0; or,

[0018] The second preset value is 0, and the non-second preset value is 1.

[0019] Furthermore, in accordance with any or a combination of the aforementioned technical solutions, the multicast indication field further includes one or more reserved bits, wherein the reserved bits are set to a value other than the second preset value;

[0020] If a new port is added to the switch, the corresponding reserved bit is determined as the indicator bit for the new port. If the new port supports multicast transmission, its corresponding indicator bit is configured to the second preset value; otherwise, its corresponding indicator bit is configured to a non-second preset value.

[0021] Furthermore, following any one or a combination of the aforementioned technical solutions, the multicast indication field includes 32 indication bits or 64 indication bits.

[0022] Furthermore, following any one or a combination of the aforementioned technical solutions, the method further includes the following steps:

[0023] Initiate a communication request, and set a multicast identifier field in the communication request. If the communication request is a multicast request, set the multicast identifier field to the target sequence; otherwise, set the multicast identifier field to a non-target sequence.

[0024] 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 identifier field. If the multicast identifier field is a target sequence, the switch determines that the communication request is a multicast request; otherwise, the switch determines that the communication request is not a multicast request.

[0025] Furthermore, following any one or a combination of the aforementioned technical solutions, the multicast bit field is set after the multicast identifier field.

[0026] Furthermore, following any one or a combination of the aforementioned technical solutions, the first preset value is 1, and the non-first preset value is 0; or,

[0027] The first preset value is 0, and the non-first preset value is 1.

[0028] Furthermore, following any or a combination of the aforementioned technical solutions, the switch includes an MCU electrically connected to each port, and the multicast data transmission method further includes:

[0029] The source port transmits the multicast request to the MCU and other ports;

[0030] For each of the other ports, if the port determines that it has received multicast data based on the multicast bit field, it returns a first signal to the MCU; otherwise, it does not send the first signal.

[0031] The MCU determines whether the port that returns the first signal matches the target port determined based on the multicast bit field. If they match, the MCU returns the second signal to the source port.

[0032] In response to receiving the second signal, the source port transmits the multicast data to each of the other ports.

[0033] Furthermore, following any one or a combination of the aforementioned technical solutions, the method further includes the following steps:

[0034] Each port of the pre-configured switch includes a receiver and a transmitter. The receiver is configured to receive data transmitted to the switch from the outside and transmit it to the transmitter of other ports. The transmitter is configured to receive data sent by the receiver of other ports and send it to the outside of the switch.

[0035] An N-layer circuit is set up inside the switch, and the N ports of the switch are set on the N-layer circuit. Each layer of the circuit includes a receiving end of one port and a transmitting end of other ports, and the receiving end of one port is electrically connected to the transmitting end of other ports respectively.

[0036] Each transmitter on each layer of the circuit determines whether to receive multicast data transmission based on the multicast bit field.

[0037] Furthermore, as described above, the receiving terminals on different layers of the circuit are different; and / or,

[0038] The receiving end and the transmitting end on each layer of the circuit independently perform multicast data transmission.

[0039] Furthermore, following any one or a combination of the aforementioned technical solutions, the method further includes the following steps:

[0040] On each layer of the circuit, a corresponding temporary storage area is set for the receiving end and each of the transmitting ends. The transmitting end receives the data transmitted by the receiving end and stores it in the corresponding temporary storage area on its circuit. When M source ports simultaneously send multicast data to the transmitting end of a port through the M layer circuit, the transmitting end of the port on the M layer circuit simultaneously and separately receives the multicast data and stores it in the corresponding temporary storage area.

[0041] or,

[0042] For the same port, the receiving end of the port on the multi-layer circuit shares a common temporary storage area, and the transmitting end of the port on the multi-layer circuit shares a common temporary storage area. When M source ports simultaneously send multicast data to the transmitting end of a port through the M-layer circuit, the transmitting end of the port on the M-layer circuit receives the multicast data transmitted by each source port based on the first-in-first-out principle or according to the principle of high priority to low priority and stores it in the corresponding temporary storage area.

[0043] 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 described in any one or a combination of the above technical solutions.

[0044] According to another aspect of the present invention, a data transmission system is provided, including a switch capable of multicast data transmission as described in any of the above technical solutions or a combination of multiple technical solutions.

[0045] The beneficial effects of the technical solution provided by this invention are as follows:

[0046] a. The multicast data transmission method for switches proposed in this invention allows the source port to directly send communication requests to all other ports. Each other port determines whether to receive data based on its corresponding multicast bit. This eliminates the need for complex addressing and address matching to determine the target port, as well as the need for hardware to perform parallel data copying. Moreover, since bits only have 0 and 1, using a single bit to directly indicate whether a port is the target port, and allowing each port to determine whether to receive multicast data based on the corresponding multicast bit, can improve the efficiency of multicast operations, reduce data latency, and requires very low hardware costs.

[0047] b. This invention sets a multicast indicator field and uses each indicator bit in the multicast indicator field to limit whether each port supports multicast transmission. This makes it very convenient to distinguish between ports that support and do not support multicast transmission. Furthermore, when there is a fault on the device side of a port, the faulty port can be isolated by modifying the corresponding indicator bit in the multicast indicator field. The multicast transmission support status of each port can be flexibly adjusted according to usage requirements.

[0048] c. The present invention confirms that the port receiving multicast data returns a first signal to the MCU. The MCU matches the port that returned the first signal with the target port determined by the MCU. If the match is consistent, a second signal is sent to the source port. The source port will only perform multicast operation after receiving the second signal. This can improve the accuracy and reliability of data transmission.

[0049] d. The multicast data transmission method proposed in this invention is applicable to switches with multiple independent transmission circuits. It can enable multiple source ports to transmit multicast data to a single target port simultaneously, and can also greatly improve data transmission efficiency and reduce data transmission latency. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 This is a schematic diagram illustrating the addressing principle in the multicast transmission process of existing technologies;

[0052] Figure 2 A block diagram of a switch capable of multicast transmission is provided as an exemplary embodiment of the present invention;

[0053] Figure 3 A general flowchart of a multicast data transmission method provided as an exemplary embodiment of the present invention;

[0054] Figure 4 A detailed flowchart of a multicast data transmission method provided as an exemplary embodiment of the present invention;

[0055] Figure 5 A schematic diagram illustrating a first communication request setting method provided for an exemplary embodiment of the present invention;

[0056] Figure 6 A schematic diagram illustrating a second communication request setting method provided as an exemplary embodiment of the present invention;

[0057] Figure 7 A schematic diagram of a first type of switch with multi-layer circuitry provided as an exemplary embodiment of the present invention;

[0058] Figure 8 A schematic diagram of a second type of switch with multi-layer circuitry provided as an exemplary embodiment of the present invention;

[0059] Figure 9 This is a schematic diagram illustrating the signal transmission principle during multicast data transmission, provided as an exemplary embodiment of the present invention. Detailed Implementation

[0060] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0061] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0062] Based on the shortcomings of existing technologies, this invention proposes a multicast data transmission method, switch, and system suitable for switches. It can achieve multicast transmission without increasing latency or requiring a large amount of hardware, thus breaking through the bottlenecks of existing technologies and promoting the further development of artificial intelligence and high-performance computing technologies.

[0063] In one embodiment of the present invention, a multicast data transmission method suitable for switches is provided, such as... Figures 2 to 4 as well as Figure 9 As shown, it includes the following steps:

[0064] For a multicast data to be transmitted, a multicast request is initiated. In the multicast request, a multicast bit field is set. The multicast bit field includes multiple multicast bits. The multicast bits correspond to other ports besides the source port. The multicast bit corresponding to the target port is set to a first preset value, and the multicast bit corresponding to non-target ports 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 ports.

[0065] The source port transmits the multicast request to other ports, and each other port determines whether to receive the multicast data in the following way: it checks whether the multicast bit corresponding to the port in the multicast bit field is a first preset value. If it is, the multicast data is received; if not, the multicast data is not received.

[0066] The bit values ​​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 the switch has a total of 4 ports, including port 1 to port 4, and port 1 is the source port, needing to transmit multicast data to port 2 and port 4, then 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 no reception).

[0067] More preferably, the multicast bit field is set to 0101. That is, including the source port, each port of the switch has a corresponding multicast bit, and the multicast bit field corresponding to each port is fixed and unique. The multicast bit field for a four-port switch includes 4 multicast bits, and the multicast bit field for a 16-port switch includes 16 multicast bits. Taking a four-port switch as an example, the 4 multicast bits correspond to ports one through four from the first bit to the last bit. If port one is the source port transmitting data to ports two and three, the multicast bit field is set to 0110; if port two is the source port transmitting data to ports three and four, the multicast bit field is set to 0011. In this paragraph, ports with a multicast bit of 1 are destination ports and receive data, while ports with a multicast bit of 0 are non-destination ports and do not receive data.

[0068] As can be seen from the above examples, the multicast data transmission method for switches proposed in this invention, compared with the existing multicast transmission methods of PCIe switches, which, regardless of whether a store-and-forward architecture or a cut-through forwarding architecture is used, require detecting the header address of the PCIe data packet, determining the target port based on the header address, and forwarding the data, and also require hardware to copy the data in parallel and send it to multiple target ports, this 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. It not only eliminates the need for complex addressing and address matching to determine the target port, but also eliminates the need for hardware to copy the data in parallel, thereby improving the efficiency of multicast operations, reducing data latency, and requiring very low hardware costs.

[0069] In one embodiment of the present invention, such as Figure 1 and Figure 4 As shown, the switch contains 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 that indicates whether each port supports multicast transmission.

[0070] The multicast indication field includes indication bits, which correspond to 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 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. 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.

[0071] Preferably, the multicast indication field further includes one or more reserved bits, which are set to a value other than the second preset value. If a new port is added to the switch, the corresponding reserved bit is determined as the indication bit for the new port. If the new port supports multicast transmission, its corresponding indication bit is configured to the second preset value; otherwise, its corresponding indication bit is configured to a value other than the second preset value.

[0072] For example, a switch may have 32 ports, each configured with an independent multicast packet reception mode based on multicast bits. The switch's internal chip also includes a multicast port status register. This register indicates whether multicast functionality is enabled on the port. For instance, a value of 0x0000_000E (hexadecimal, converted to binary: 0000000000000000000000000001110) indicates that ports 2, 3, and 4 support multicast transmission, while ports 4 and 5 do not.

[0073] In this embodiment, a communication request, i.e., a data transmission request, is initiated for a data packet to be transmitted. A multicast identifier field is set in the communication request. If the communication request is a multicast request, the multicast identifier field is set to the target sequence; otherwise, it is set to a non-target sequence. The multicast identifier field is unique. For example, the multicast identifier field can be set to 32 bits 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 identifier field. If the multicast identifier field is the target sequence, the communication request is determined to be a multicast request; otherwise, it is determined not to be a multicast request. Preferably, the multicast bit field is set after the multicast identifier field. In this way, each port and the MCU can determine the starting address of the multicast bit field based on the multicast identifier field.

[0074] The FMT field (format field) can also be configured in the communication request to indicate the number of bits in the multicast bit field. For example, an FMT field of 40 (hexadecimal) indicates that the multicast bit field consists of 64 bits. Other FMT field settings can also be used to indicate the number of bits in the multicast bit field.

[0075] In this embodiment, for a 32-port switch, the requesting device at the source port initiates a communication request. If multicast data needs to be sent to multiple target ports, the multicast identifier field in the communication request is set to 32 bits of 0xFFFF. If it is a point-to-point non-multicast data transmission, the multicast identifier field in the communication request is set to a 32-bit sequence / field other than 0xFFFF. A consecutive 32-bit multicast bit is set after 0xFFFF. By detecting the multicast bit corresponding to the port in the 32 bits following the multicast identifier field, it is determined whether the port receives the data packet and transmits it to its corresponding device (which can be a host or other PCIe devices such as a GPU).

[0076] In this embodiment, before checking the multicast bit corresponding to the port in the multicast bit field, it is first determined whether the port supports multicast transmission according to the multicast indication field. If it supports multicast transmission, it is determined whether to receive the multicast data according to the multicast bit corresponding to the port. If it does not support multicast transmission, the port does not receive the multicast data.

[0077] Multicast data transmission is performed based on the UIO mode. For each of the other ports, if the port determines that it receives multicast data based on the multicast indication field and the multicast bit field, it returns a first signal to the MCU; otherwise, it does not send the first signal. Specifically, it may return a rejection signal or not return any signal. The MCU determines whether the port that returned 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.

[0078] like Figure 2 As shown, 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 communication requests to the MCU and other ports. The communication request contains a 32-bit multicast identifier field (0xFFFF) and an 8-bit multicast bit field (01111010) that follows.

[0079] If other ports detect a multicast identifier field of 0xFFFF, the following multicast determination process is performed: Ports 2-8 first determine whether they support multicast transmission based on the multicast indicator field stored in the multicast port status register. Assuming that ports 2-8 determine that they all support multicast transmission based on the multicast indicator 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 dashed line in the image, although ports 6 and 8 determine that they both support multicast transmission according to the multicast indicator field, they do not receive data according to the multicast bit field (01111010), and therefore do not return the first signal to the MCU.

[0080] After receiving a communication request, the MCU detects that the multicast identifier field is 0xFFFF, and then performs the following multicast determination process: The MCU determines the target port to be port 2, 3, 4, 5, or 7 based on the multicast indicator field and the multicast identifier field stored in the multicast port status register; the MCU matches the target port it has determined with the port that returned the first signal. If they match (i.e., the MCU determines that ports 2, 3, 4, 5, and 7 are multicast targets, and the port that returned the first signal is also port 2, 3, 4, 5, or 7), then the MCU returns the second signal to port 1. Figure 2 (As shown by the thick dashed line in the diagram). It should be noted that both the first and second signals can represent ACK data confirming receipt. If they do not match, the MCU will issue an error message.

[0081] 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 receive data. In this way, efficient and fast multicast operation can be achieved without complex hardware.

[0082] If port 1, as the source port, does not need to perform multicast operations, then based on the existing one-to-one transmission method, address matching is performed according to the communication request / data packet to determine the target port. The target port that matches the address returns an acknowledgment signal to port 1, and port 1 transmits data to the target port upon receiving the acknowledgment signal.

[0083] This invention can address the non-posted mode memory write requirement of the newly added PCIe UIO (Unordered Input Output) mode. The original PCIe multicast could only use data packets in forwarded mode (posted form), that is, no ACK data packet was required after receiving the data from the device. Therefore, this invention further improves the compatibility of multicast operations.

[0084] It should be noted that the aforementioned communication request / multicast request can be data independent of the transmitted data packet, or it can be part of the data packet. Specifically, it can be as follows: Figure 5 The communication request is set up as shown, sending a preceding communication request (multicast request) before the packet header is sent; alternatively, it can be set up as follows: Figure 6 As shown, the communication request (multicast request) can be set directly in the data packet, for example, it can be set after the data packet header.

[0085] The multicast data transmission method described in any of the above embodiments is also applicable to switches with multi-layer independent transmission circuits. A switch with multi-layer independent transmission circuits includes N ports, each port including a receiver and a transmitter. The receiver is configured to receive data transmitted to the switch from the outside and transmit it to the receivers of other ports. The transmitter is configured to receive data sent by the receivers of other ports and transmit it to the outside of the switch.

[0086] The switch has N layers of circuitry, and its N ports are configured on these N layers. Each layer includes a receiver for one port and transmitters for the other ports, with each receiver electrically connected to the transmitters of the other ports. Each transmitter on each layer determines whether to receive multicast data transmission based on a multicast bit field. The receivers on different layers are different; the receivers and transmitters on each layer transmit multicast data independently of each other.

[0087] When a switch with multiple independent transmission circuits applies the above-mentioned multicast data transmission method, a situation may arise where the sender of one port is simultaneously the target port / multicast object of multiple other ports.

[0088] To address this potential contention where multiple ports simultaneously multicast data to a single port, one approach is as follows: Figure 8 As shown, for the same port, the receiving ends of the port on the multi-layer circuit share a common temporary storage area, and the transmitting ends of the port on the multi-layer circuit share a common temporary storage area. When M source ports simultaneously send multicast data to the transmitting end of a single port through the M-layer circuit, the transmitting end of the port on the M-layer circuit receives the multicast data transmitted by each source port according to the first-in-first-out principle or according to the principle of high priority to low priority, and stores it in the corresponding temporary storage area. This method is low-cost and does not increase costs, but it inevitably introduces a certain amount of data transmission delay.

[0089] like Figure 8 As shown (the second and third layer circuits are not shown), for a 4-port switch, the receiving ports on the 4-layer circuit share Port 1 buffer 1 (Port 1 receivers only exist on the first layer circuit), and the transmitting ports on the 4-layer circuit (Port 1 transmitters exist on the second to fourth layer circuits) share Port 1 buffer 2; the receiving ports on the 4-layer circuit (Port 2 receivers only exist on the second layer circuit) share Port 1 buffer 2. Figure 8(Not shown in the diagram) The Port 2 senders on the Layer 1, Layer 2, and Layer 4 circuits (all have Port 2 senders on Layer 1, Layer 3, and Layer 4 circuits) share the same Port 2 buffer area 2; the buffer areas corresponding to the receivers and senders of Port 3 and Port 4 are similarly shared, and will not be described further. When the receiver of Port 1 multicasts data to Port 3 and 4, and Port 4 multicasts data to Port 2 and 3, a competitive situation may arise where the sender of Port 3 needs to simultaneously receive multicast data from Port 1 and Port 4. In this case, the sender of Port 3 can receive multicast data from the receivers of Port 1 and Port 4 based on first-in-first-out or priority comparison and store it in the Port 3 buffer area 2.

[0090] Another way is, such as Figure 7 As shown, in each layer of the circuit, corresponding temporary storage areas are set for the receiving end and each of the transmitting ends. The transmitting end receives the data transmitted by the receiving end and stores it in the corresponding temporary storage area on its circuit. When M source ports simultaneously send multicast data to the transmitting end of a single port through the M-layer circuit, the transmitting end of the port on the M-layer circuit simultaneously and separately receives the multicast data and stores it in the corresponding temporary storage area. This method increases the cost to some extent, but it enables multiple source ports to transmit multicast data to a single target port simultaneously, and it also greatly improves data transmission efficiency and reduces data transmission latency.

[0091] like Figure 7 As shown (the second and third layer circuits are not shown), for a 4-port switch, the receiving end of port 1 in the first layer circuit has a corresponding buffer 11, the transmitting end of port 2 has a corresponding buffer 12, the transmitting end of port 3 has a corresponding buffer 13, and the transmitting end of port 4 has a corresponding buffer 14; the transmitting end of port 1 in the fourth layer circuit has a corresponding buffer 41, the transmitting end of port 2 has a corresponding buffer 42, the transmitting end of port 3 has a corresponding buffer 43, and the receiving end of port 4 has a corresponding buffer 44; the buffers in the second and third layer circuits are set up similarly, and will not be described again. 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 competitive situation may occur where the transmitting end of port 3 needs to receive multicast data from ports 1 and 4 simultaneously. In this case, the transmitting end of port 3 in the first layer circuit receives the multicast data from port 1 and stores it in the corresponding buffer 13, and the transmitting end of port 3 in the fourth layer circuit receives the multicast data from port 4 and stores it in the corresponding buffer 43. This enables a data transmission method where multiple ports can simultaneously multicast data to a single port without any conflicts.

[0092] The multicast data transmission method for switches proposed in the above embodiments enables precise control of multicast transmission through the multicast bit field. Unlike traditional multicast methods, it eliminates the need to detect packet header addresses, significantly reducing data transmission latency, improving efficiency, and lowering hardware costs. Combined with the multicast indicator field, the multicast function can be flexibly adjusted according to port requirements. Both unicast and multicast transmission modes can be freely switched based on actual needs, meeting data transmission requirements in different scenarios. Furthermore, utilizing the MCU for target port matching and comparison avoids security vulnerabilities inherent in traditional multicast technologies, improving system stability and reliability. The technical solution proposed in this invention is particularly suitable for large-scale data synchronization scenarios such as AI model training, meeting the rapidly evolving needs of AI and providing crucial technical support for building efficient and reliable AI infrastructure.

[0093] In one embodiment of the present invention, a switch capable of implementing multicast data transmission is provided, the switch performing multicast data transmission based on the multicast data transmission method applicable to switches as described in any of the above embodiments.

[0094] In one embodiment of the present invention, a data transmission system is provided, including the multicast data transmission method for switches as described in any of the above embodiments.

[0095] It should be noted that the switch and data transmission system embodiments capable of multicast data transmission provided by the present invention have the same inventive concept as the above-described multicast data transmission method embodiments applicable to switches. The entire contents of the multicast data transmission method embodiments applicable to switches are incorporated into the switch and data transmission system embodiments capable of multicast data transmission by means of introduction.

[0096] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0097] The above description is only a specific embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A multicast data transmission method suitable for switches, characterized in that, The switch includes an MCU electrically connected to each port, and includes the following steps: For a multicast data to be transmitted, a multicast request is initiated. In the multicast request, a multicast bit field is set. The multicast bit field includes multiple multicast bits. The multicast bits correspond to other ports besides the source port. The multicast bit corresponding to the target port is set to a first preset value, and the multicast bit corresponding to non-target ports is set to a non-first preset value. The source port is one of the ports included in the switch, and the other ports include the target port and the non-target ports. A multicast port status register is pre-configured within the switch. The multicast port status register is configured to store a multicast indication field that indicates whether each port supports multicast transmission. The multicast indication field includes an indication bit, which corresponds to 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 source port transmits the multicast request to other ports and the MCU. If the port determines that it receives multicast data based on the multicast bit field and the multicast indication field, it returns a first signal to the MCU; otherwise, it does not send the first signal. The MCU determines whether the port that returned the first signal matches the target port determined based on the multicast bit field and the multicast indication 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. Each other port determines whether to receive the multicast data in the following manner: it checks whether the multicast bit corresponding to the port in the multicast bit field is a first preset value; if so, it receives the multicast data; if not, it does not receive the multicast data. The multicast indication field also includes one or more reserved bits, which are set to a value other than the second preset value. If a new port is added to the switch, the corresponding reserved bit is determined as the indication bit corresponding to the new port. If the new port supports multicast transmission, its corresponding indication bit is configured to the second preset value; otherwise, its corresponding indication bit is configured to a value other than the second preset value.

2. The multicast data transmission method for switches according to claim 1, characterized in that, The second preset value is the same as the first preset value, or the second preset value is different from the first preset value.

3. The multicast data transmission method for switches according to claim 2, 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.

4. The multicast data transmission method for switches according to claim 2, characterized in that, The multicast indication field includes 32 indication bits or 64 indication bits.

5. The multicast data transmission method applicable to switches according to claim 1, characterized in that, It also includes the following steps: Initiate a communication request, and set a multicast identifier field in the communication request. If the communication request is a multicast request, set the multicast identifier field to the target sequence; otherwise, set the multicast identifier 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 identifier field. If the multicast identifier field is a target sequence, the switch determines that the communication request is a multicast request; otherwise, the switch determines that the communication request is not a multicast request.

6. The multicast data transmission method for switches according to claim 5, characterized in that, Set the multicast bit field after the multicast identifier field.

7. The multicast data transmission method applicable to switches 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.

8. The multicast data transmission method for switches according to claim 1, characterized in that, It also includes the following steps: Each port of the pre-configured switch includes a receiver and a transmitter. The receiver is configured to receive data transmitted to the switch from the outside and transmit it to the transmitter of other ports. The transmitter is configured to receive data sent by the receiver of other ports and send it to the outside of the switch. An N-layer circuit is set up inside the switch, and the N ports of the switch are set on the N-layer circuit. Each layer of the circuit includes a receiving end of one port and a transmitting end of other ports, and the receiving end of one port is electrically connected to the transmitting end of other ports respectively. Each transmitter on each layer of the circuit determines whether to receive multicast data based on the multicast bit field.

9. The multicast data transmission method for switches according to claim 8, characterized in that, The receiving terminals on different layers of the circuit are different; and / or, The receiving end and the transmitting end on each layer of the circuit independently perform multicast data transmission.

10. The multicast data transmission method for switches according to claim 8, characterized in that, It also includes the following steps: On each layer of the circuit, a corresponding temporary storage area is set for the receiving end and each of the transmitting ends. The transmitting end receives the data transmitted by the receiving end and stores it in the corresponding temporary storage area on its circuit. When M source ports simultaneously send multicast data to the transmitting end of a port through the M layer circuit, the transmitting end of the port on the M layer circuit simultaneously and separately receives the multicast data and stores it in the corresponding temporary storage area. or, For the same port, the receiving end of the port on the multi-layer circuit shares a common temporary storage area, and the transmitting end of the port on the multi-layer circuit shares a common temporary storage area. When M source ports simultaneously send multicast data to the transmitting end of a port through the M-layer circuit, the transmitting end of the port on the M-layer circuit receives the multicast data transmitted by each source port based on the first-in-first-out principle or according to the principle of high priority to low priority and stores it in the corresponding temporary storage area.

11. 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 switches as described in any one of claims 1 to 10.

12. A data transmission system, characterized in that, This includes the switch as described in claim 11 that is capable of multicast data transmission.

Citation Information

Patent Citations

  • Data transmission device and method

    CN114079627A

  • Switch for reducing data exchange delay and data transmission method and system

    CN118972349A