DMA (Direct Memory Access) controller supporting multicast, PCIe (Peripheral Component Interface Express) switch and communication method thereof

By building a multicast management module in the DMA controller, multicast data transmission of PCIe switches is realized, which solves the problem of not supporting multicast packet transmission in the existing technology, and improves data transmission efficiency and bandwidth utilization.

CN120358109APending Publication Date: 2025-07-22QINGXIN SEMICON TECH (SHANGHAI) CO LTD

Patent Information

Application Number
CN202510695660.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

Existing PCIe switches do not support sending multicast packets through DMA, limiting data transmission efficiency and bandwidth utilization.

Method used

A multicast management module is built in the DMA controller. It determines whether multicast transmission is performed by judging the packet address, and applies the controller to the PCIe switch to realize the transmission of multicast packets.

Benefits of technology

Through the multicast management module of the DMA controller, CPU resources are released, data transmission efficiency is improved, transmission operations are reduced, and bandwidth utilization is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358109A_ABST
    Figure CN120358109A_ABST
Patent Text Reader

Abstract

The invention discloses a DMA (Direct Memory Access) controller supporting multicast, which comprises a multicast management module for determining whether multicast is carried out or not according to the address of a data packet to be sent and carrying out data transmission. When the DMA controller is applied to the PCIe switch, CPU resources can be released, the transmission efficiency can be improved, meanwhile, the transmission operation can be reduced, the bandwidth can be efficiently utilized, and the utilization rate of the bandwidth can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer communication technologies, and particularly to a DMA controller supporting multicast, a PCIe switch, and a communication method thereof. Background Art

[0002] Peripheral Component Interconnect Express (PCIe) is a local bus technology and interface standard. PCIe devices use independent address spaces, that is, the address space of the PCIe bus, also known as the PCIe bus domain. The PCIe protocol defines three types of devices, including a Root Complex (RC), a Switch, and an End Point (EP). Among them, the PCIe switch can expand PCIe interfaces to interconnect different devices with PCIe interfaces for information exchange and processing. The Direct Memory Access (DMA) technology can also be used in the PCIe switch to improve data transmission efficiency. The direct memory access is an important technology for data transmission in a computer system. It performs packet assembly and disassembly based on the PCIe protocol through a dedicated DMA controller built in the PCIe switch, and then directly performs data transmission between external PCIe devices, thereby releasing the resources of the central processing unit CPU and improving data transmission efficiency.

[0003] Multicast is a data transmission mode in the PCIe switch. It allows a port device in the PCIe switch to send data to devices connected to multiple PCIe switch ports simultaneously through data replication. Compared with the traditional unicast mode of one-to-one communication, the multicast mode can reduce transmission operations, efficiently utilize bandwidth, and thus greatly improve transmission efficiency. However, existing PCIe switches usually do not support sending multicast packets through DMA, thus limiting some applications. Summary of the Invention

[0004] In view of some or all of the problems in the prior art, a first aspect of the present invention provides a DMA controller supporting multicast, which includes:

[0005] A multicast management module, which is used to determine whether it is multicast according to the address of the data packet to be sent and perform data transmission.

[0006] Further, the multicast management module is used for:

[0007] Determine whether the address of the data packet to be sent belongs to the multicast address range. If it belongs, copy the data packet for multicast transmission. If it does not belong, perform unicast operation.

[0008] Further, define the multicast address range through a capability register.

[0009] Further, the DMA controller further includes:

[0010] A control module, which is used to read data from the source address, reorganize the data, and form a memory write packet to be sent to the multicast management module.

[0011] Based on the DMA controller as described above, a second aspect of the present invention provides a PCIe switch, which includes the DMA controller as described above, and the DMA controller is communicatively connected to a root complex connected to the PCIe switch.

[0012] Further, the DMA controller is communicatively connected to a root complex in the same PCIe bus domain through an upstream port (USP).

[0013] Further, the DMA controller is communicatively connected to a root complex connected to the PCIe switch through a non-transparent bridging (NTB) port.

[0014] A third aspect of the present invention provides a communication method for a PCIe switch as described above, including:

[0015] Read data from the source address through the DMA controller and reorganize the data into a memory write packet; and

[0016] Determine whether the destination address of the memory write packet belongs to the multicast address range. If it belongs, copy the data packet for multicast. If it does not belong, perform unicast according to the destination address.

[0017] Further, the communication method further includes:

[0018] Configure the function register to determine the multicast parameters; and

[0019] Configure the DMA parameters.

[0020] A DMA controller supporting multicast, a PCIe switch, and a communication method thereof provided by the present invention have a multicast management module built into the DMA controller. Therefore, it can send multicast data packets through the DMA, thereby taking advantage of both the DMA and multicast at the same time. It can not only release CPU resources, improve transmission efficiency, but also reduce transmission operations, efficiently utilize bandwidth, and enhance the utilization rate of bandwidth. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] To further clarify the above and other advantages and features of the embodiments of the present invention, a more specific description of the embodiments of the present invention will be presented with reference to the accompanying drawings. It can be understood that these drawings only depict typical embodiments of the present invention and thus will not be considered as limiting its scope. In the drawings, for clarity, the same or corresponding components will be denoted by the same or similar reference numerals.

[0022] Figure 1 A schematic structural diagram of a DMA controller supporting multicast according to an embodiment of the present invention is shown;

[0023] Figure 2 A schematic structural diagram of a PCIe switch according to an embodiment of the present invention is shown; and

[0024] Figure 3 A schematic flowchart of a communication method of a PCIe switch according to an embodiment of the present invention is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0025] In the following description, the present invention is described with reference to the embodiments. However, those skilled in the art will recognize that the embodiments can be implemented without one or more specific details or in combination with other alternative and / or additional methods or components. In other cases, well-known structures or operations are not shown or described in detail to avoid obscuring the inventive points of the present invention. Similarly, for purposes of explanation, specific numbers and configurations are set forth to provide a thorough understanding of the embodiments of the present invention. However, the present invention is not limited to these specific details. In addition, it should be understood that the embodiments shown in the drawings are illustrative representations and not necessarily drawn to scale.

[0026] In this specification, the reference to "an embodiment" or "the embodiment" means that the specific features, structures, or characteristics described in connection with the embodiment are included in at least one embodiment of the present invention. The phrase "in an embodiment" appearing throughout this specification does not necessarily refer to the same embodiment.

[0027] It should be noted that the embodiments of the present invention describe the method steps in a specific order. However, this is only for the purpose of illustrating the specific embodiment and does not limit the order of the steps. On the contrary, in different embodiments of the present invention, the order of the steps can be adjusted according to the actual requirements.

[0028] In order to perform multicast operations through DMA, the present invention provides a DMA controller supporting multicast, which incorporates multicast management logic and can thus perform data replication and send multicast data packets to multiple ports.

[0029] The technical solution of the present invention will be further described below with reference to the accompanying drawings of the embodiments.

[0030] Figure 1 The structural schematic diagram of a DMA controller supporting multicast according to an embodiment of the present invention is shown. As Figure 1 shown, a DMA controller supporting multicast includes a control module 101 and a multicast management module 102. The control module 101 is used to read data from the source address, reorganize the data, and form a memory write packet to be sent to the multicast management module 102. The multicast management module 102 determines whether to perform multicast based on the address of the data packet to be sent and performs data transmission. In an embodiment of the present invention, the multicast management module 102 determines whether to perform multicast or unicast by judging whether the address of the data packet to be sent belongs to the multicast address range, where the multicast address range is defined by a capability register. In an embodiment of the present invention, if the address of the data packet to be sent belongs to the multicast address range, the data packet is copied and multicast is performed; if not, unicast is performed according to the address of the data packet to be sent.

[0031] The DMA controller can be applied to PCIe devices such as PCIe switches and terminal EPs, so as to achieve multicast data transmission between external PCIe devices.

[0032] Figure 2 The structural schematic diagram of a PCIe switch according to an embodiment of the present invention is shown. As Figure 2As described above, a PCIe switch includes the DMA controller 100 as described above. In an embodiment of the present invention, the PCIe switch further includes an upstream port (USP) 201 and a downstream port (DSP) 202. The upstream port 201 is used to communicate with a root complex in the same PCIe bus domain. The control module 101 of the DMA controller 100 is communicatively connected to the upstream port 201 to read data through the upstream port 201. The downstream port 202 is communicatively connected to the upstream port 202 and the multicast management module 102 of the DMA controller 100, and is used to communicate with a downstream PCIe device to forward data packets to an external PCIe device. In an embodiment of the present invention, the PCIe switch may further include an NTB port (not shown in the figure). The control module 101 of the DMA controller 100 may also be communicatively connected to the NTB port, and then multicast or unicast the data packets after NT conversion through the DMA method.

[0033] Figure 3 The flowchart shows a communication method of a PCIe switch according to an embodiment of the present invention. As Figure 3 shown, the communication method of the PCIe switch includes:

[0034] First, in step 301, data reorganization. The control module 101 reads data from the source address and reorganizes the received data into a memory write packet and sends it to the multicast management module 102. If the DMA controller communicates with the RC through the upstream port, the control module 101 reorganizes the data according to the original target address. If the DMA controller communicates with the RC through the NTB port, the control module 101 reorganizes the data according to the address after NT conversion;

[0035] Next, in step 302, determine whether the target address belongs to the multicast address range. The multicast management module 102 determines whether the target address in the reorganized memory write packet belongs to a preset multicast address range. If it belongs, go to step 331 for data packet multicast. If it does not belong, go to step 332 for data packet unicast. In an embodiment of the present invention, the multicast management module 102 checks and manages the reorganized memory write packet. The operations of checking and managing comply with the standard PCIe protocol. At the same time, the address of the data packet is judged. If the address of the data packet falls within the address range defined by the multicast function register, go to step 331 to perform the copy and transmission operations of the data packet. Otherwise, go to step 332 to perform the unicast operation;

[0036] In step 331, the data packet is multicast. If the destination address of the memory write packet obtained by recombination belongs to the multicast address range, the data packet is copied for multicast. In an embodiment of the present invention, after confirming that multicast is required, the multicast management module 102 looks up the multicast group table according to the destination address to determine the corresponding member device connection port information, and then determines which ports the data packet needs to be copied to. Then, the multicast management module 102 uses its internal copying mechanism to physically copy the data packet. After the copying is completed, the multicast management module 102 sends each copied data packet through the corresponding downstream port 202, and these data packets will eventually reach each target PCIe device in the multicast group; and

[0037] In step 332, the data packet is unicast. If the destination address of the memory write packet obtained by recombination does not belong to the multicast address range, unicast is performed according to the converted address.

[0038] As mentioned above, the multicast address range is defined by the multicast function register. Therefore, in an embodiment of the present invention, before data transmission, the function register also needs to be configured to define various parameters of the multicast function, such as the multicast window size, group number, etc. In an embodiment of the present invention, the configuration of the function register mainly includes determining the multicast group address to be used, writing the corresponding bits in the multicast enable register to enable the multicast function, writing the determined multicast group address into the multicast group address register of the PCIe device, configuring the transmission path of the multicast data, and configuring the registers related to flow control and buffering. For example, set the size of the receive buffer, the water level mark of the transmit buffer, etc. to avoid data congestion and loss. In addition, the interrupt enable register can also be configured to generate an interrupt notification to the host when multicast-related events such as data transmission completion and receive error occur. At the same time, the status register can also be configured to monitor the current state of the multicast operation, such as the number of data packets being transmitted, error count, etc.

[0039] In an embodiment of the present invention, before data transmission, it is also necessary to configure the start of DMA. The DMA can work in direct mode or scatter-gather mode. If it works in direct mode, the DMA configuration includes configuring the source address, destination address, and length, etc. If it works in scatter-gather mode, the linked list address, etc. needs to be configured.

[0040] A DMA controller supporting multicast, a PCIe switch and a communication method thereof provided by the present invention have a built-in multicast management module in the DMA controller, so that it can send multicast data packets through the DMA, and further utilize the advantages of both the DMA and multicast. It can not only release CPU resources, improve the transmission efficiency, but also reduce the transmission operations, efficiently utilize the bandwidth, and improve the utilization rate of the bandwidth.

[0041] Although the embodiments of the present invention have been described above, it should be understood that they are presented only as examples and not as limitations. It will be apparent to those skilled in the relevant art that various combinations, modifications and changes can be made thereto without departing from the spirit and scope of the present invention. Therefore, the breadth and scope of the present invention disclosed herein should not be limited by the exemplary embodiments disclosed above, but should be defined only by the appended claims and their equivalents.

Claims

1. A DMA controller supporting multicast, characterized in that, Comprising: A multicast management module, which is configured to determine whether to perform multicast according to the address of the data packet to be sent and perform data transmission.

2. The DMA controller according to claim 1, wherein The multicast management module is configured to execute: Judge whether the address of the data packet to be sent belongs to the multicast address range. If it belongs, copy the data packet for multicast transmission. If it does not belong, perform unicast operation.

3. The DMA controller according to claim 2, wherein Define the multicast address range through a function register.

4. The DMA controller according to claim 1, characterized in that Further comprising: A control module, which is communicatively connected to the multicast management module and is configured to read data from the source address, reorganize the data, and form a memory write packet to be sent to the multicast management module.

5. A PCIe switch, characterized in that, Comprising the DMA controller according to any one of claims 1 to 4, wherein the DMA controller is communicatively connected to the root complex connected to the PCIe switch.

6. The PCIe switch according to claim 5, characterized in that, The DMA controller is communicatively connected to the root complex in the same PCIe bus domain through an upstream port.

7. The PCIe switch according to claim 5, characterized in that The DMA controller is communicatively connected to the root complex connected to the PCIe switch through a non-transparent bridge port.

8. A communication method of the PCIe switch as described in claim 5, characterized in that, Comprising: Read data from the source address through the DMA controller and reorganize the data into a memory write packet; And Judge whether the destination address of the memory write packet belongs to the multicast address range. If it belongs, copy the data packet for multicast. If it does not belong, perform unicast according to the destination address.

9. The communication method according to claim 8, wherein Further comprising: Configure the function register to determine the multicast parameters; and Configure the DMA parameters.

Citation Information

Patent Citations

  • Storage system with multicast dma and unified address space

    CN104272257A

  • Data multicast method, device and system, electronic equipment and storage medium

    CN119520184A

Cited By

  • Switch, method and system for realizing collective communication based on multicast replication engine

    CN120614327A

  • PCIe (Peripheral Component Interconnect Express) switch and multi-RC (Remote Controller) parallel multicast data packet sending method thereof

    CN120812007A