A PCIe switch multicast processing method and apparatus

By using a weighted polling arbiter in the PCIe switch to process multicast requests, parallel multicast transmission and resource release are realized, which solves the problem of multicast affecting unicast efficiency, improves data transmission efficiency and resource utilization, and reduces power consumption. consumption and design complexity.

CN117749706BActive Publication Date: 2024-10-29WUXI STARS MICRO SYSTEM TECHNOLOGIES CO LTD

Patent Information

Application Number
CN202311746951.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-18
Publication Date
2024-10-29
Estimated Expiration
2043-12-18

AI Technical Summary

Technical Problem

The PCIe switch needs to stop all unicast transmission during multicast, which affects efficiency, and the transmission is serial, resulting in large delays and affecting user experience.

Method used

A weighted polling arbiter is used to process multicast requests, determine the destination group and stop other arbitration requests and transmissions, realize parallel transmission of multicast, start multicast transmission when all destination groups are ready, and release resources after completion.

Benefits of technology

Deliver multicast requests to multiple destinations through one DMA transmission, shortening data transmission time, reducing the mutual impact of unicast and multicast, improving cache resource utilization, reducing the number of DMA starts, reducing power consumption, and increasing module reuse nature and design complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117749706B_ABST
    Figure CN117749706B_ABST
Patent Text Reader

Abstract

The present invention provides a PCIe switch multicast processing method and device, the method comprising: when a source port receives a multicast request, initiating a first arbitration to a port weighted polling arbitrator in the current group where the source port is located, initiating a second arbitration to a multicast weighted polling arbitrator between multiple groups according to the first arbitration result; according to the second arbitration result, determining the destination group of the multicast request, stopping other arbitration requests and multicast transmissions associated with the current group and all destination groups; when all destination groups are ready, starting the multicast transmission corresponding to the multicast request to simultaneously transmit the multicast of the source port to all destination groups, and releasing the resources of the destination group that has completed the multicast transmission. The technical solution of the present invention improves the multicast transmission efficiency of the PCIe switch.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of network transmission, and in particular relates to a PCIe switch multicast processing method and device. Background Art

[0002] Multicast technology enables single-point transmission and multiple-point reception, which can save a lot of network bandwidth and reduce network load. However, when multicast occurs in the current PCIe switch, it is necessary to stop all unicasts first, and then transmit data to each destination in turn, which will seriously affect the transmission efficiency and have a greater impact on unicast, resulting in an unsmooth user experience. In addition, the traditional multicast transmission method is still serial data transmission one by one, without parallel transmission, and has a large delay. Summary of the invention

[0003] The purpose of the present invention is to provide a PCIe switch multicast processing method and device, aiming to reduce the mutual influence between unicast and multicast.

[0004] According to a first aspect of the present invention, a PCIe sWitch multicast processing method is provided, comprising:

[0005] When the source port receives a multicast request, a first arbitration is initiated to a port weighted polling arbitrator in the current group where the source port is located, and a second arbitration is initiated to a multicast weighted polling arbitrator between multiple groups according to the first arbitration result;

[0006] Determine the destination group of the multicast request according to the second arbitration result, and stop other arbitration requests and multicast transmissions associated with the current group and all destination groups;

[0007] When all destination groups are ready, the multicast transmission corresponding to the multicast request is started to transmit the multicast of the source port to all destination groups at the same time, and the resources of the destination groups that have completed the multicast transmission are released.

[0008] Preferably, before the source port receives the multicast request, the method further comprises:

[0009] Parse the descriptor in the current transmission request and obtain the host unicast flag to determine whether the current transmission request is a multicast request or a unicast request.

[0010] Preferably, the initiating a second arbitration to a multicast weighted polling arbitrator among a plurality of groups according to the first arbitration result further comprises:

[0011] If the port weighted polling arbitrator arbitrates the source port, initiating a second arbitration to the multicast weighted polling arbitrators among the multiple groups for the multicast request;

[0012] If the source port is not arbitrated, the first arbitration is initiated repeatedly.

[0013] Preferably, stopping other arbitration requests and multicast transmissions associated with the current group and all destination groups further comprises:

[0014] Stop arbitration requests sent by other ports of the current group of the current multicast, and stop multicast requests and multicast transmissions in other groups whose destination ports are the current group or the destination group.

[0015] Preferably, before initiating the multicast transmission corresponding to the multicast request, the method further includes:

[0016] If there are unready destination groups, wait until all destination groups are in a state where they can receive data.

[0017] According to a second aspect of the present invention, a PCIe switch multicast processing device is provided, comprising:

[0018] An arbitration unit, configured to initiate a first arbitration to a port weighted polling arbitrator in a current group where the source port is located when the source port receives a multicast request, and initiate a second arbitration to a multicast weighted polling arbitrator between multiple groups according to a result of the first arbitration;

[0019] a connecting unit, configured to determine a destination group of the multicast request according to the second arbitration result, and to stop other arbitration requests and multicast transmissions associated with the current group and all destination groups;

[0020] The transmission unit is used to start the multicast transmission corresponding to the multicast request when all the destination groups are ready to transmit the multicast of the source port to all the destination groups at the same time, and release the resources of the destination groups that have completed the multicast transmission.

[0021] Compared with the prior art, the technical solution of the present invention has the following advantages:

[0022] By delivering multicast requests to multiple destinations through a single DMA transfer, multiple copies of data can be quickly moved, shortening the total data transmission time. If the destination ports do not conflict, multiple multicasts can be performed simultaneously. When multicast is completed, the cache is released in advance without relying on the multicast of other groups, improving the utilization of cache resources, minimizing the mutual impact of unicast and multicast, and reducing the number of DMA startups and power consumption. The transmission of multicast data can reuse the unicast transmission path, improving module reusability and reducing design complexity.

[0023] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures and processes indicated in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. It is obvious that the drawings described below are certain embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0025] Figure 1 It is an overall flow chart of PCIe switch multicast processing according to the present invention.

[0026] Figure 2 It is a flow chart of PCIe switch multicast processing according to a specific embodiment of the present invention.

[0027] Figure 3 is a schematic diagram of a descriptor control path according to the present invention.

[0028] Figure 4 is a schematic diagram of a data path according to the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 described embodiments are 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 creative work are within the scope of protection of the present invention.

[0030] Based on the above analysis, the present invention proposes a PCIe switch multicast processing method and device. During the data transmission process, according to the multicast flag in the data descriptor, the multicast request of each group is first passed to the multicast weighted polling arbiter M_WRR for polling. After obtaining the polling result, the group where the multicast destination is located is determined according to the descriptor in the current multicast request. According to the destination, the requests of other groups to the group where the destination is located are stopped, and the requests of other ports of the group where the multicast is located are stopped at the same time. After waiting for the group where the destination corresponding to the current multicast request is located to receive data, start transmitting data. If the data transmission of a certain group is completed, the bus occupancy is released, and other requests are responded to. The unfinished multicast request continues to process the current multicast transaction.

[0031] See also Figure 1 The PCIe switch multicast processing method provided by the present invention includes:

[0032] Step 101: When a source port receives a multicast request, a first arbitration is initiated to a port weighted polling arbitrator in the current group where the source port is located, and a second arbitration is initiated to multicast weighted polling arbitrators between multiple groups according to the first arbitration result.

[0033] Figure 2 The PCIe switch multicast processing flow is shown. Within each group, after a port receives a transmission request, an arbitration application is initiated to the port weighted polling arbiter port_WRR within the group. This port is called the source port. If the source port is arbitrated, the transmission request of the source port is accepted, and the current arbitrated transmission request is determined to be a multicast request or a unicast request based on the host unicast flag of the descriptor in the current transmission request. Figure 3 A schematic diagram of the descriptor control path is shown.

[0034] Otherwise, if the current source port is not arbitrated, the arbitration application is initiated again.

[0035] Step 102: According to the second arbitration result, determine the destination group of the multicast request, and stop other arbitration requests and multicast transmissions associated with the current group and all destination groups.

[0036] If the transmission request received by the current port is a multicast request, an arbitration application is initiated to the multicast weighted polling arbiter M_WRR between all groups. If it is a unicast request, the unicast process is executed.

[0037] In the case of multicast request, wait for arbitration of multicast weighted polling arbiter M_WRR to get the arbitration result. When the arbitration reaches the current group, calculate the group where the destination port of the current multicast request is located according to the destination port flag bitmap in the descriptor, and calculate the number of requests to each group. After obtaining the maximum number of requests for each group, the maximum number of times to initiate multicast, max_req_cnt, is obtained.

[0038] Step 103: When all destination groups are ready, start the multicast transmission corresponding to the multicast request to transmit the multicast of the source port to all destination groups at the same time, and release the resources of the destination groups that have completed the multicast transmission.

[0039] Then, the arbitration requests sent by other ports of the current group of the current multicast are stopped, and the multicast requests and multicast transmissions in other groups whose destination ports are the current group or the destination group are stopped.

[0040] Optionally, if arbitration fails to be performed to the current group, continue to initiate arbitration application.

[0041] Determine whether all destination groups of the current multicast destination port can receive data. If so, start a DMA transfer and pass the transfer to multiple groups, for example Figure 4 In the example, the source memory I_memory 0 can be transferred to the destination memory E_memory 0 / 1 / 2 at one time, and max_req_cnt is reduced by 1. If not, wait until all destination groups of the current multicast destination port are in a state where data can be received.

[0042] Determine whether the destination group of the current multicast destination port has completed all data transmission. If completed, the bus occupation can be released to respond to other multicast requests, otherwise wait for the request to complete the current multicast transaction. Figure 4 For example, if the request transmission to the corresponding port of memory 1 is completed, when the subsequent data transmission is started, the data is transferred from memory 0 to memory 0 / 2, and does not need to be transferred to memory 1.

[0043] The above steps are iterated until max_req_cnt is 0. After the multicast transmission is completed, the resources of the source memory I_memory are released.

[0044] It can be seen that the PCIe switch multicast processing method proposed in the present invention has the following advantages compared with the prior art: by transmitting the multicast request to multiple destinations through one DMA transmission, the movement of multiple copies of data can be completed quickly, the total data transmission time can be shortened, and if the destination ports do not conflict, multiple multicasts can be performed at the same time. When the multicast is completed, the cache is released in advance without relying on the multicast of other groups, the cache resource utilization rate is improved, the mutual influence of unicast and multicast is minimized, and the number of DMA startups can be reduced, reducing power consumption. The transmission of multicast data can reuse the unicast transmission path, improve module reusability, and reduce the complexity of the design.

[0045] Accordingly, the present invention provides a PCIe switch multicast processing device in a second aspect, comprising:

[0046] An arbitration unit, configured to initiate a first arbitration to a port weighted polling arbitrator in a current group where the source port is located when the source port receives a multicast request, and initiate a second arbitration to a multicast weighted polling arbitrator between multiple groups according to a result of the first arbitration;

[0047] a connecting unit, configured to determine a destination group of the multicast request according to the second arbitration result, and to stop other arbitration requests and multicast transmissions associated with the current group and all destination groups;

[0048] The transmission unit is used to start the multicast transmission corresponding to the multicast request when all the destination groups are ready to transmit the multicast of the source port to all the destination groups at the same time, and release the resources of the destination groups that have completed the multicast transmission.

[0049] The above-mentioned device can be implemented by the PCIe switch multicast processing method provided by the embodiment of the first aspect above. The specific implementation method can be found in the description of the embodiment of the first aspect, which will not be repeated here.

[0050] It is to be understood that the steps and structures, names and parameters described in the above embodiments are only examples. Those skilled in the art can also make easy-to-think combinations and adjustments to the structural features of the above multiple embodiments according to use needs, and should not limit the concept of the present invention to the specific details of the above examples. For example, the descriptor of the above embodiment can only characterize a single destination port. In an optional embodiment, the structure of the descriptor can be changed, and one descriptor can characterize multiple destination ports, so the number of data moves from I_Memory to E_memory can be reduced to 1 time.

[0051] Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A PCIe switch multicast processing method, characterized in that: include: When the source port receives a multicast request, a first arbitration is initiated to a port weighted polling arbitrator in the current group where the source port is located, and a second arbitration is initiated to a multicast weighted polling arbitrator between multiple groups according to the first arbitration result; Determine the destination group of the multicast request according to the second arbitration result, and stop other arbitration requests and multicast transmissions associated with the current group and all destination groups; When all destination groups are ready, start the multicast transmission corresponding to the multicast request to simultaneously transmit the multicast of the source port to all destination groups, and release the resources of the destination group that has completed the multicast transmission; The initiating a second arbitration to the multicast weighted polling arbitrator among the multiple groups according to the first arbitration result further includes: If the port weighted polling arbitrator arbitrates the source port, initiating a second arbitration to the multicast weighted polling arbitrators among the multiple groups for the multicast request; If the source port is not arbitrated, repeatedly initiating the first arbitration; The initiating the multicast transmission corresponding to the multicast request to simultaneously transmit the multicast of the source port to all destination groups further includes: Determine whether all destination groups of the current multicast destination port can receive data. If so, start a DMA transfer and pass the transfer to multiple groups; if not, wait until all destination groups of the current multicast destination port are in a state where they can receive data.

2. The PCIe switch multicast processing method according to claim 1, characterized in that: Before the source port receives the multicast request, the method further includes: Parse the descriptor in the current transmission request and obtain the host unicast flag to determine whether the current transmission request is a multicast request or a unicast request.

3. The PCIe switch multicast processing method according to claim 1, characterized in that: The stopping of other arbitration requests and multicast transmissions associated with the current group and all destination groups further comprises: Stop arbitration requests sent by other ports of the current group of the current multicast, and stop multicast requests and multicast transmissions in other groups whose destination ports are the current group or the destination group.

4. The PCIe switch multicast processing method according to claim 1, characterized in that: Before starting the multicast transmission corresponding to the multicast request, the method further includes: If there are unready destination groups, wait until all destination groups are in a state where they can receive data.

5. A PCIe switch multicast processing device, characterized in that: include: An arbitration unit, configured to initiate a first arbitration to a port weighted polling arbitrator in a current group where the source port is located when the source port receives a multicast request, and initiate a second arbitration to a multicast weighted polling arbitrator between multiple groups according to a result of the first arbitration; a connecting unit, configured to determine a destination group of the multicast request according to the second arbitration result, and to stop other arbitration requests and multicast transmissions associated with the current group and all destination groups; A transmission unit, configured to start the multicast transmission corresponding to the multicast request when all destination groups are ready, so as to transmit the multicast of the source port to all destination groups at the same time, and release the resources of the destination group that has completed the multicast transmission; The arbitration unit is further configured to: If the port weighted polling arbitrator arbitrates the source port, initiating a second arbitration to the multicast weighted polling arbitrators among the multiple groups for the multicast request; If the source port is not arbitrated, repeatedly initiating the first arbitration; The transmission unit is further used for: Determine whether all destination groups of the current multicast destination port can receive data. If so, start a DMA transfer and pass the transfer to multiple groups; If not, wait until all destination groups of the current multicast destination port are in a state where they can receive data.

6. The PCIe switch multicast processing device according to claim 5, characterized in that: The arbitration unit is further configured to: Before the source port receives a multicast request, the descriptor in the current transmission request is parsed to obtain a host unicast flag to determine whether the current transmission request is a multicast request or a unicast request.

7. The PCIe switch multicast processing device according to claim 5, characterized in that: The connecting unit is further used for: Stop arbitration requests sent by other ports of the current group of the current multicast, and stop multicast requests and multicast transmissions in other groups whose destination ports are the current group or the destination group.

8. The PCIe switch multicast processing device according to claim 5, characterized in that: The transmission unit is further used for: If there are unready destination groups, wait until all destination groups are in a state where they can receive data.

Citation Information

Patent Citations

  • Method and apparatus for load balancing in network processing device

    US20020048280A1

Cited By

  • PCIe switch multicast processing system and method giving consideration to efficiency and resources

    CN120034508A

  • A PCIe switch multicast processing system and method considering efficiency and resources

    CN120034508B

  • Processing device and method for multicast communication in switch

    CN122204804A

  • A processing device and method for multicast communication within a switch.

    CN122204804B

  • Switch multicast hybrid scheduling device and method based on queue load awareness

    CN122226701A