A multicast replication method, device and chip function module

By determining the starting address of the target linked list in the multicast start table and reading the multicast replication information of multiple linked lists in the multicast replication table, the problem of long return time of multicast table review is solved, and the multicast replication time of realizing the Stable linear speed replication performance.

CN115460178BActive Publication Date: 2025-02-21NEW H3C SEMICON TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211063032.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2025-02-21
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

In multicast replication technology, the multicast table lookup return time is long, resulting in low multicast replication performance and inability to achieve the effect of line speed replication.

Method used

By determining the starting address of the target linked list in the multicast start table and reading the multicast replication information of multiple linked lists in the multicast replication table, the lookup table of the multicast replication table is covered up, thereby achieving stability line speed copy.

Benefits of technology

Through this method, the table lookup delay of the multicast replication table can be effectively masked, stable line speed replication performance can be achieved, and the efficiency of multicast replication is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115460178B_ABST
    Figure CN115460178B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a multicast replication method, device and chip functional module, the method includes: determining the multicast identifier of the multicast group to which the multicast message belongs as the target multicast identifier; determining the starting address of each linked list corresponding to the target multicast identifier in the multicast start table as the target linked list starting address, wherein the multicast start table is used to record the correspondence between the multicast group identifier and the linked list starting address of each linked list; reading the multicast replication information recorded in the linked list starting with the target linked list starting address in the multicast replication table, wherein the multicast replication table includes multiple linked lists, each of which stores multicast replication information; according to the read multicast replication information, the multicast message is copied to each node of the multicast group. By obtaining the target linked list starting address in the multicast start table, cyclically reading multiple linked lists starting with the target linked list starting address in the multicast replication table, and covering the table lookup return delay, a stable line speed replication can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of digital communication technology, and in particular to a multicast replication method, device and chip function module. Background Art

[0002] In recent years, with the development of network technology, the application of multicast replication technology has become more and more extensive. With the increase of user groups, the number of nodes that need to be replicated in a multicast group has become more and more, and the performance requirements for multicast replication have also become higher. The performance of multicast replication is measured by the number of cycles required to replicate a multicast node, which is limited by the return time of the multicast table lookup. Multicast replication that achieves a replication rate of one multicast node in one cycle is called line-speed replication.

[0003] The return time of multicast table lookup is affected by the size of the multicast table and the chip process, and generally requires several cycles. As the size of the multicast table increases and there is no breakthrough in chip technology, how to improve the performance of multicast replication and achieve line-speed replication becomes an important issue that needs to be solved. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a multicast replication method, device and chip functional module to achieve stable line-speed replication. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present application provides a multicast replication method, the method comprising:

[0006] Determine the multicast identifier of the multicast group to which the multicast message belongs as the target multicast identifier;

[0007] Determine the starting address of each linked list corresponding to the target multicast identifier in the multicast starting table as the starting address of the target linked list, wherein the multicast starting table is used to record the corresponding relationship between the multicast group identifier and the linked list starting address of each linked list;

[0008] Reading the multicast replication information recorded in the linked list starting with the starting address of the target linked list in the multicast replication table, wherein the multicast replication table includes a plurality of linked lists, each of which stores the multicast replication information;

[0009] The multicast message is copied to each node of the multicast group according to the read multicast copy information.

[0010] In a possible implementation manner, the starting addresses of the linked lists in the multicast replication table for recording the multicast replication information of the same multicast group are continuous, and the multicast start table is specifically used to record the correspondence between the multicast group identifier and the multicast basic address and the number of replication nodes;

[0011] The step of determining the starting address of each of the linked lists corresponding to the target multicast identifier in the multicast start table as the starting address of the target linked list includes:

[0012] Determine the multicast base address and the number of replication nodes corresponding to the target multicast identifier in the multicast start table;

[0013] A number of addresses of the replication nodes starting from the multicast base address are determined as the starting address of the target linked list.

[0014] In a possible implementation manner, reading, in the multicast replication table, the multicast replication information recorded in the linked list starting with the target linked list start address includes:

[0015] If the number of replication nodes is equal to the number of return cycles, the next hop address and multicast replication information of each current linked list address record are read in the multicast replication table, wherein the number of return cycles is the number of cycles required to search the multicast replication table and return the search result, wherein the cycle is the clock cycle of the chip performing multicast replication, and each current linked list position is initially the starting address of each target linked list;

[0016] Taking each of the next hop addresses read as a new current linked list address, returning to the step of reading the next hop address and multicast replication information recorded in each current linked list address in the multicast replication table until all the linked lists are read.

[0017] In a possible implementation, the method further includes:

[0018] If the number of replication nodes is not equal to the number of return cycles, the multicast replication information recorded in the starting address of each target linked list is read from the multicast replication table.

[0019] In a possible implementation manner, the multicast replication information stored in each linked list in the multicast replication table belongs to the same multicast group, and the multicast replication information of each multicast group is stored in a number of linked lists of return cycles;

[0020] In the multicast start table, the multicast identifier corresponding to the start address of each linked list is: the multicast identifier of the multicast group to which the multicast replication information stored in the linked list belongs.

[0021] In a possible implementation manner, the multicast replication information of each multicast group is evenly stored in a number of linked lists in the return cycle.

[0022] In a second aspect, an embodiment of the present application provides a multicast replication device, the device comprising:

[0023] An identifier determination module, used to determine the multicast identifier of the multicast group to which the multicast message belongs, as a target multicast identifier;

[0024] A starting address determination module, used to determine the starting address of each of the linked lists corresponding to the target multicast identifier in the multicast starting table as the starting address of the target linked list, wherein the multicast starting table is used to record the corresponding relationship between the multicast group identifier and the linked list starting address of each of the linked lists;

[0025] a reading module, configured to read, in the multicast replication table, the multicast replication information recorded in the linked list starting with the starting address of the target linked list, wherein the multicast replication table includes a plurality of linked lists, each of which stores the multicast replication information;

[0026] The replication module is used to replicate the multicast message to each node of the multicast group according to the read multicast replication information.

[0027] In a possible implementation manner, the starting addresses of the linked lists in the multicast replication table for recording the multicast replication information of the same multicast group are continuous, and the multicast start table is specifically used to record the correspondence between the multicast group identifier and the multicast basic address and the number of replication nodes;

[0028] The starting address determination module is specifically used to: determine the multicast base address and the number of replication nodes corresponding to the target multicast identifier in the multicast start table; and determine the number of replication nodes consecutively starting from the multicast base address as the starting address of the target linked list.

[0029] In a possible implementation, the reading module is specifically used to: if the number of replication nodes is equal to the number of return cycles, read the next hop address and multicast replication information of each current linked list address record in the multicast replication table, wherein the number of return cycles is the number of cycles required to search the multicast replication table and return the search result, wherein the cycle is the clock cycle of the chip performing multicast replication, and each current linked list position is initially the starting address of each target linked list; using each next hop address read as a new current linked list address, return to execute the step of reading the next hop address and multicast replication information of each current linked list address record in the multicast replication table until all the linked lists are read.

[0030] In a possible implementation manner, the reading module is specifically configured to: if the number of replication nodes is not equal to the number of return cycles, read the multicast replication information recorded in the start address of each target linked list in the multicast replication table.

[0031] In a possible implementation manner, the multicast replication information stored in each linked list in the multicast replication table belongs to the same multicast group, and the multicast replication information of each multicast group is stored in a number of linked lists of return cycles;

[0032] In the multicast start table, the multicast identifier corresponding to the start address of each linked list is: the multicast identifier of the multicast group to which the multicast replication information stored in the linked list belongs.

[0033] In a possible implementation manner, the multicast replication information of each multicast group is evenly stored in a number of linked lists in the return cycle.

[0034] In a third aspect, an embodiment of the present application provides a chip function module, including a processing unit and a storage unit;

[0035] A storage unit, used for storing multicast related entries;

[0036] The processing unit is used to complete the multicast replication function logic and implement any multicast replication method described in the present application.

[0037] Beneficial effects of the embodiments of the present application:

[0038] The embodiment of the present application provides a multicast replication method, device and chip functional module, the method comprising: determining the multicast identifier of the multicast group to which the multicast message belongs as the target multicast identifier; determining the starting address of each linked list corresponding to the target multicast identifier in the multicast start table as the target linked list starting address, wherein the multicast start table is used to record the correspondence between the multicast group identifier and the linked list starting address of each linked list; reading the multicast replication information recorded in the linked list starting with the target linked list starting address in the multicast replication table, wherein the multicast replication table includes multiple linked lists, each of which stores multicast replication information; according to the read multicast replication information, copying the multicast message to each node of the multicast group. By obtaining the starting address of each linked list in the multicast start table as the target linked list starting address, cyclically reading multiple linked lists starting with the target linked list starting address in the multicast replication table, the table lookup return delay of the multicast replication table is covered, and stable line-speed replication can be achieved.

[0039] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present application 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. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0041] Figure 1 A schematic diagram of a multicast replication method according to an embodiment of the present application;

[0042] Figure 2 A schematic diagram of a network in a multicast replication method in an embodiment of the present application;

[0043] Figure 3 A schematic diagram of the internal storage of a multicast start table and a multicast replication table in the multicast replication method of an embodiment of the present application;

[0044] Figure 4 A schematic diagram of a method for querying a multicast start table and a multicast replication table in a multicast replication method according to an embodiment of the present application;

[0045] Figure 5 A schematic diagram of a possible implementation of step S12 in the multicast replication method of an embodiment of the present application;

[0046] Figure 6 A first schematic diagram of the relationship between the multicast start table and the multicast replication table in the multicast replication method of an embodiment of the present application;

[0047] Figure 7 A second schematic diagram of the relationship between the multicast start table and the multicast replication table in the multicast replication method in an embodiment of the present application;

[0048] Figure 8 A query flow diagram of the multicast replication method according to an embodiment of the present application;

[0049] Fig. 9 A schematic diagram of a multicast replication device according to an embodiment of the present application;

[0050] Fig.10 A schematic diagram of a chip functional module according to an embodiment of the present application. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0052] Compared with unicast or broadcast, multicast can effectively solve the problem of single-node sending and multi-node receiving. Multicast replication refers to querying the address to which the multicast message needs to be sent in the multicast replication table and replicating the multicast message. In the related art, one multicast replication scheme is to wait for the query result of the multicast replication table to be returned before initiating the next query of the multicast replication table. The multicast replication rate of this multicast replication scheme depends on the return delay of the query result of the multicast replication table. For example, multicast replication needs to wait for the query result of the multicast replication table to be returned before replication. The longer the return delay of the query result of the multicast replication table, the slower the multicast replication rate. The shorter the return delay of the query result of the multicast replication table, the faster the multicast replication rate. The delay in returning the query result of the multicast replication table is related to the clock cycle of the chip. The clock cycle of the chip is referred to as the cycle below. Under normal circumstances, after a query of the multicast replication table, it is necessary to wait for 3 to 4 cycles before the query result is returned. After obtaining the query result, multicast replication is performed, that is, it takes 3 to 4 cycles to replicate a multicast node, and the replication rate of replicating one multicast node in one cycle cannot be achieved. Usually, multicast replication that achieves the replication rate of replicating one multicast node in one cycle is called line-speed replication, that is, it cannot achieve the effect of line-speed replication; the other is multi-engine replication technology, which distributes multicast messages that need to be replicated to multiple replication engines, and multiple replication engines alternately search the multicast replication table. By having multiple replication engines alternately query the multicast replication table at intervals of one cycle, the delay in returning the query result of the multicast replication table can be concealed. In an example, suppose that after a query of a multicast replication table is performed, it is necessary to wait for three cycles before the query result is returned. In the first cycle, the multicast replication table is queried using the first replication engine, in the second cycle, the multicast replication table is queried using the second replication engine, in the third cycle, the multicast replication table is queried using the third replication engine, and in the fourth cycle, the multicast replication table is queried using the fourth replication engine. At this time, three cycles have been waited since the query of the multicast replication table in the first cycle, and the query result of the first replication engine will be returned. In the fifth cycle, the multicast replication table is queried using the fifth replication engine, and the query result of the second replication engine will be returned. And so on. Since multiple replication engines are used to query the multicast table alternately, there is no need to wait for the return result, so the query result return delay of the multicast replication table can be covered. The query result return delay is the table query return delay, which refers to the number of cycles required from querying the multicast replication table to returning the search result. When multiple replication engines have messages to be replicated, the multiple replication engines query the multicast replication table alternately, which can cover up the lookup return delay of the multicast replication table and achieve line-speed replication. However, when only one replication engine has messages to be replicated, it is necessary to wait for the query result of the multicast table, which cannot cover up the lookup return delay of the multicast table. At this time, line-speed replication cannot be achieved.

[0053] To achieve stable line-speed replication, see Figure 1 , an embodiment of the present application provides a multicast replication method, the multicast replication method comprising:

[0054] S11, determining the multicast identifier of the multicast group to which the multicast message belongs as the target multicast identifier.

[0055] The embodiment of the present application provides a multicast replication method, which can be applied to any chip with a multicast replication function, such as a network chip. Figure 2 , the multicast message is copied to each node in the multicast group through a chip (chip function module) with a multicast replication function. This method uses a multicast start table and a multicast replication table. The multicast start table and the multicast replication table are stored in a chip with a multicast replication function.

[0056] The multicast message carries a multicast identifier (MC_ID) required for multicast replication. In one example, the multicast identifier can be the ID of the multicast group. The multicast message is obtained, and the multicast identifier carried by the multicast message is used as the target multicast identifier to determine the multicast group to which the multicast message belongs. Each multicast group has multiple nodes that need to replicate the multicast message, and all nodes in the multicast group can receive the multicast message.

[0057] S12, determining the starting addresses of the linked lists corresponding to the target multicast identifier in the multicast start table as the starting addresses of the target linked list, wherein the multicast start table is used to record the corresponding relationship between the multicast group identifier and the linked list starting addresses of the linked lists.

[0058] The multicast replication method in this application uses a multicast start table and a multicast replication table, wherein the multicast start table uses MC_ID as an index and stores the start address of each linked table in the multicast replication table. The multicast replication table includes multiple linked tables, and the table entries of each linked table store the address of the next hop and multicast replication information. Figure 3 In one example, the multicast replication table includes N linked lists (link list 1, link list 2, ..., link list N), each linked list entry stores the address of the next hop node (Link0_next, Link1_next) and the multicast replication information (info) corresponding to the node, and the multicast start table stores the linked list start addresses (MC_BASE, MC_BASE+1, ..., MC_BASE+N-1) of the N linked lists in the multicast replication table. That is, the target linked list start address is MC_BASE, MC_BASE+1, ..., MC_BASE+N-1.

[0059] S13, reading the multicast replication information recorded in the linked list starting with the target linked list start address in the multicast replication table, wherein the multicast replication table includes a plurality of linked lists, each of which stores the multicast replication information.

[0060] Each linked list corresponds to multiple nodes in the multicast group. Multiple linked lists can correspond to all nodes in the multicast group. Starting from the starting address of the target linked list, according to the address of the next hop node stored in the table item in each linked list, all nodes in the multicast group can be found and the multicast replication information of the node recorded in the linked list can be read.

[0061] S14, copying the multicast message to each node of the multicast group according to the read multicast replication information.

[0062] The multicast replication information is information required for multicast replication, and includes forwarding path information of the multicast message, number information of the multicast message, etc. The multicast message can be replicated to each node of the multicast group according to the read multicast replication information.

[0063] In one example, see Figure 4Assume that the multicast group includes 9 nodes, namely node 1, node 2...node 9, and the multicast replication table includes 3 linked lists, namely linked list 1, linked list 2, and linked list 3. Each linked list corresponds to 3 nodes. The nodes corresponding to linked list 1 are node 1, node 4, and node 7. The nodes corresponding to linked list 2 are node 2, node 5, and node 8. The nodes corresponding to linked list 3 are node 3, node 6, and node 9. The starting addresses of the three linked lists are recorded in the multicast start table, namely MC_BASE, MC_BASE+1, and MC_BASE+2. The specific multicast replication method process is as follows: the starting addresses MC_BASE, MC_BASE+1, and MC_BASE+2 are the starting addresses of linked lists 1, linked lists 2, and linked lists 3, corresponding to nodes 1, node 2, and node 3. According to the multicast replication information (info) corresponding to the node stored in the table entry, the multicast message is copied to nodes 1, node 2, and node 3; according to the address of the next hop node (Link0_next) stored in the table entry in linked list 1 read, it points to node 4, the address of the next hop node (Link1_next) stored in the table entry in linked list 2 points to node 5, and the address of the next hop node (Link2_next) stored in the table entry in linked list 3 points to node 6. According to the multicast replication information (info) corresponding to the node stored in the table entry, the multicast message is copied to nodes 4, node 5, and node 6; according to the address of the next hop node (Link0_next) stored in the table entry in linked list 1 read, it points to node 4, node 5, and node 6. The address of the next hop node stored in the table entry (Link0_next) points to node 7, the address of the next hop node stored in the table entry in linked list 2 (Link1_next) points to node 8, and the address of the next hop node stored in the table entry in linked list 3 (Link2_next) points to node 9. According to the multicast replication information (info) corresponding to the node stored in the table entry, the multicast message is copied to node 7, node 8, and node 9. The addresses of the first hops of the three linked lists form the first hop block (MC_BASE, MC_BASE+1, MC_BASE+2), corresponding to node 1, node 2, and node 3. The second hop block corresponds to node 4, node 5, and node 6. The third hop block corresponds to node 7, node 8, and node 9. Through the three linked lists and three hops, the multicast replication of the 9 nodes in the multicast group is completed, and the multicast message is copied to the 9 nodes in the multicast group.

[0064] In an embodiment of the present application, the starting address of each linked list is obtained in the multicast start table as the starting address of the target linked list, and multiple linked lists starting with the starting address of the target linked list are cyclically read in the multicast replication table. The multicast replication table is reconstructed by the starting address of the target linked list and multiple linked lists, thereby masking the lookup return delay of the multicast replication table and achieving stable line-speed replication performance.

[0065] In a possible implementation, the starting addresses of the linked lists in the multicast replication table for recording the multicast replication information of the same multicast group are continuous. For example, assuming that the multicast replication information of a multicast group is recorded in three linked lists, respectively recorded as linked lists 1-3, if the starting address of linked list 1 is MC_BASE, the starting address of linked list 2 is MC_BASE+1, and the starting address of linked list 3 is MC_BASE+2, then the starting addresses of linked lists 1-3 are continuous, and if the starting address of linked list 1 is MC_BASE, the starting address of linked list 2 is MC_BASE+1, and the starting address of linked list 3 is MC_BASE+3, then the starting addresses of linked lists 1-2 are continuous, and the starting address of linked list 3 is not continuous with the starting address of linked list 1-2. Moreover, in this implementation, the multicast start table is specifically used to record the correspondence between the multicast group identifier and the multicast base address and the number of replication nodes; see Figure 5 , the above S12, including:

[0066] S12a, determining the multicast basic address and the number of replication nodes corresponding to the target multicast identifier in the multicast start table.

[0067] See also Figure 6 In the multicast start table, MC_ID is used as the index to store the multicast base address (MC_BASE) and the number of replication nodes (num). MC_BASE refers to the starting position of the multicast message in the multicast replication table, and num refers to the number of nodes that the multicast message needs to replicate from the multicast group at the first hop. The continuous start addresses of the linked lists used to record the multicast replication information of the same multicast group in the multicast replication table refer to the continuous start addresses of the linked lists. Specifically, Figure 4 For example, the multicast start table records the starting position of the multicast message in the multicast replication table, which points to the starting address of linked list 1. The starting addresses of linked list 1, linked list 2, and linked list 3 are continuous. The multicast group includes 9 nodes. num refers to the number of nodes that the multicast message needs to be replicated from the multicast group in the first hop. Figure 4 The nodes that need to be copied from the multicast group in the first hop of the multicast message are node 1, node 2, and node 3, that is, num is equal to 3, and num is part of the nodes in the multicast group. In order to achieve line-speed replication, one node needs to be copied in one cycle. In this application, the maximum number of copied nodes in the first hop is the number of lookup return cycles of the multicast replication table. That is, num is the maximum number of lookup return cycles of the multicast replication table.

[0068] The multicast replication table uses MC_BASE or the multicast next hop node address as an index to read Link_next and info in the linked list entry, where Link_next refers to the address of the multicast next hop node (hereinafter referred to as the next hop address), and info refers to the multicast replication information.

[0069] S12b, starting from the multicast base address, a number of consecutive replication node addresses are determined as the starting address of the target linked list.

[0070] Starting from MC_BASE, num consecutive addresses are determined as the starting address of the target linked list. Figure 6 , the multicast message carries MC_ID, and MC_BASE and num are obtained by querying the multicast start table through MC_ID. In this application, num is at most the lookup return delay N of the multicast replication table. The lookup result of the multicast start table is used to trigger the continuous reading of MC_BASE, MC_BASE+1, ..., MC_BASE+N-1 addresses (the starting address of the target linked list or the first hop block) in the multicast replication table to obtain the table entry contents Link_next and info of each linked list in the multicast replication. In order to cover the lookup delay N of the multicast replication table through the multi-linked list loop reading method, the first hop block of the multicast replication table is set to N consecutive addresses, namely MC_BASE, MC_BASE+1, ..., MC_BASE+N-1.

[0071] Without considering resource cost, the starting addresses of N multicast replication tables can also be stored in the multicast start table, see Figure 7 , and then use the multi-linked list loop reading method to cover up the lookup delay of the multicast replication table.

[0072] In the embodiment of the present application, by reconstructing the multicast replication table through the target linked list start address and multiple linked lists, the lookup return delay of the multicast replication table is concealed, and stable line-speed replication performance can be achieved.

[0073] In a possible implementation, the above S13 includes: if the number of replication nodes is equal to the number of return cycles, reading the next hop address and multicast replication information of each current linked list address record in the multicast replication table, wherein the number of return cycles is the number of cycles required to search the multicast replication table and return the search result, wherein the cycle is the clock cycle of the chip performing multicast replication, and each current linked list position is initially the starting address of each target linked list;

[0074] The read next hop addresses are used as new current linked list addresses, and the step of reading the next hop addresses and multicast replication information recorded in the multicast replication table of each current linked list address is returned to execution until all linked lists are read.

[0075] The number of replication nodes is the number of nodes that need to be replicated from the multicast group in the first hop. The number of return cycles is the number of cycles required to search the multicast replication table and return the search result, that is, the multicast replication table query return delay, denoted as N. The initial position of each current linked list is the starting address of each target linked list. In an example, when the number of target linked lists is the query return delay N, the starting address of each target linked list is MC_BASE, MC_BASE+1, ..., MC_BASE+N-1.

[0076] When reading each target linked list in the multicast replication table starting from the starting address of each target linked list, when the next hop address recorded in the current linked list is read to indicate that the linked list has not ended, the next hop address is used as the new current linked list address, and the execution returns to the step of reading the next hop address and multicast replication information of each current linked list address record in the multicast replication table until all the linked lists are read.

[0077] The method of determining whether the next hop address is used to indicate the end of the linked list may vary depending on the application scenario. For example, in one possible embodiment, one or more addresses will be reserved in the multicast replication table as end addresses. These end addresses are not used to store the next hop address and multicast replication information, and the last next hop address stored in each linked list in the multicast replication table points to an arbitrary end address. When reading the next hop address from the multicast replication table, if the read next hop address points to the end address, it is determined that the next hop address is used to indicate the end of the linked list.

[0078] In the embodiment of the present application, if the number of replication nodes is equal to the number of return cycles, the starting address of each target linked list is used as the starting position of each current linked list, and each linked list in the multicast replication table is read. When the next hop address recorded in the current linked list indicates that the linked list has not ended, the execution returns to the step of reading the next hop address and multicast replication information of each current linked list address record in the multicast replication table until all linked lists are read. By reconstructing the multicast replication table through the target linked list starting address and multiple linked lists, each linked list is read cyclically, and the return delay of the multicast replication table is covered, so as to achieve stable line-speed replication performance.

[0079] In a possible implementation manner, the above S13 further includes: if the number of replication nodes is not equal to the number of return cycles, reading the multicast replication information recorded in the start address of each target linked list in the multicast replication table.

[0080] Since the maximum number of replication nodes in this application is the return cycle number N, when the number of replication nodes is not equal to the return cycle number, it means that the number of replication nodes is less than the return cycle number N, and the number of consecutive replication nodes starting from the group start address is determined as the target linked list start address. At this time, the target linked list start address is less than the return cycle number N, and the multicast replication information recorded in each target linked list start address is read in the multicast replication table. After the node replication in the multicast group to which the current multicast message belongs is completed, continue to obtain the next multicast message, and complete the multicast replication according to the multicast replication method of this application.

[0081] In an embodiment of the present application, if the number of replication nodes is not equal to the number of return cycles, the multicast replication information recorded at the starting address of each target linked list is read in the multicast replication table. After the replication of the nodes in the multicast group to which the current multicast message belongs is completed, the next multicast message is obtained, and the multicast replication method of the present application is used to complete the multicast replication. During the replication of the next multicast message, the lookup result of the multicast replication table of the previous multicast message will be returned. Since the lookup results of the multicast replication table between the two messages do not affect each other, the lookup return delay of the multicast replication table can still be covered up to achieve stable line-speed replication performance.

[0082] In one example, see Figure 8 , according to whether the number of replication nodes is equal to the number of return cycles, the process of reading the multicast replication information recorded in the linked list starting with the target linked list starting address in the multicast replication table in this application is described in detail as follows:

[0083] Step 101: Start;

[0084] Step 102: Using MC_ID as an index, query the multicast start table;

[0085] MC_ID is the multicast identifier of the multicast group to which the multicast message belongs. Therefore, the multicast start table can be queried with MC_ID as the target multicast identifier, thereby obtaining the start addresses of each linked list corresponding to MC_ID.

[0086] Step 103: Obtain MC_BASE and num from the query result of the multicast start table;

[0087] MC_BASE is equivalent to the multicast base address in the aforementioned S12a and S12b, and num is equivalent to the number of replication nodes in the aforementioned S12a and S12b. Refer to the relevant instructions of the aforementioned S12a and S12b. The starting address of each linked list can be determined according to MC_BASE and num. Therefore, MC_BASE and num can be used to represent the starting address of each linked list. Therefore, this step can be regarded as determining the starting address of each linked list corresponding to the target multicast identifier in the multicast replication table, that is, the aforementioned S12.

[0088] Step 104: Determine whether num is equal to N. If num is not equal to N, jump to step 105. If num is equal to N, jump to step 109.

[0089] The multicast replication information recorded in the linked list starting with the starting address of the target linked list is read in the multicast replication table, including two cases: the number of replication nodes is equal to the number of return cycles and the number of replication nodes is not equal to the number of return cycles. Different reading processes are required depending on whether the number of replication nodes is equal to the number of return cycles.

[0090] Step 105: Cur_cnt is cleared, and Cur_cnt represents the number of the currently copied linked list;

[0091] When the number of replication nodes is not equal to the number of return cycles, it means that the number of replication nodes is less than the number of return cycles, and the multicast replication information recorded in the starting address of each target linked list is read from the multicast replication table. Since Cur_cnt represents the number of the currently replicated linked list, when Cur_cnt is cleared, the number of the currently replicated linked list is 0, that is, the linked list read at this time is the first linked list.

[0092] Step 106: Using MC_BASE as the index, query the multicast replication table;

[0093] MC_BASE indicates the starting address of the first linked list in the multicast replication table. Starting from the starting address of the first linked list, the multicast replication table is queried to obtain the multicast replication information recorded in the table entry in the first linked list.

[0094] Step 107: MC_BASE increases by 1, and Cur_cnt increases by 1;

[0095] After the first linked list is read, MC_BASE is incremented by 1, so that when step 106 is executed for the second time, the multicast replication table is queried with the starting address of the second linked list, that is, the multicast replication information recorded in the table items in the second linked list is read. When step 106 is executed for the third time, the starting address of the third linked list is read, that is, the multicast amplitude information recorded in the table items in the third linked list is read, and so on. And Cur_cnt is incremented by 1, and the current linked list number is increased by 1 to record the linked list number that has been read.

[0096] Therefore, this step can be regarded as reading the multicast replication information recorded in the starting address of each target linked list in the multicast replication table if the number of replication nodes is not equal to the number of return cycles, which is equivalent to the aforementioned S13.

[0097] Step 108: Determine whether Cur_cnt is equal to num. If Cur_cnt is equal to num, jump to step 130. If Cur_cnt is not equal to num, jump to step 106 and repeat the process from step 106 to step 108.

[0098] Since Cur_cnt can record the linked list number of the linked list that has been read, and as analyzed above, in this embodiment, a total of num linked lists need to be used to read the multicast replication information. Therefore, when the linked list number of the read linked list is num, it indicates that all linked lists in the multicast group to which the multicast message belongs have been read, and the multicast message replication of all nodes in the multicast group has been completed, and the process jumps to the end step.

[0099] If Cur_cnt is not equal to num, it means that the linked list in the multicast group to which the multicast message belongs has not been read completely, and the process from step 106 to step 108 is repeated until all the linked lists in the multicast group to which the multicast message belongs have been read completely, and the multicast message replication of all nodes in the multicast group has been completed, and then jump to the end step.

[0100] The above steps 105-108 correspond to the step: if the number of replication nodes is not equal to the number of return cycles, then reading the multicast replication information recorded in the starting address of each target linked list in the multicast replication table.

[0101] When the number of replication nodes is equal to the number of return cycles, execution starts from step 109:

[0102] Step 109: Cur_cnt is cleared, and Cur_cnt represents the number of the currently copied linked list;

[0103] Since Cur_cnt represents the number of the currently copied linked list, when Cur_cnt is cleared, the number of the currently copied linked list is 0, that is, the linked list read at this time is the first linked list.

[0104] Step 110: Using MC_BASE as the index, query the multicast replication table;

[0105] MC_BASE indicates the starting address of the first linked list in the multicast replication table. Starting from the starting address of the first linked list, the multicast replication table is queried to obtain the next hop address and multicast replication information recorded in the table entry in the first linked list.

[0106] Step 111: Determine whether the next hop address indicates the end of the linked list. If the next hop address is empty, indicating the end of the linked list, jump to step 112; if it does not indicate the end of the linked list, jump to step 114;

[0107] According to the next hop address recorded in the table item in the linked list, each linked list is read in turn. When the read next hop address is empty, it indicates the end of the linked list. At this time, it means that a linked list has been copied. It is necessary to increase the number of linked lists that have been copied by 1. When the read next hop address does not indicate the end of the linked list, the next hop address is used as the new current linked list address.

[0108] Step 112: End_cnt is incremented by 1, and End_cnt indicates the number of linked lists that have finished copying;

[0109] End_cnt indicates the number of linked lists that have finished copying. As analyzed above, when executing step 112, it is considered that a linked list has been copied, so it is necessary to increase the number of linked lists that have finished copying by 1.

[0110] Step 113: MC_BASE increases by 1, and Cur_cnt increases by 1;

[0111] After the first linked list is read, MC_BASE is incremented by 1, so that when step 110 is executed for the second time, the multicast replication table is queried with the starting address of the second linked list, that is, the multicast replication information recorded in the table items in the second linked list is read. When step 110 is executed for the third time, the starting address of the third linked list is read, that is, the multicast amplitude information recorded in the table items in the third linked list is read, and so on. And Cur_cnt is incremented by 1, and the current linked list number is increased by 1 to record the linked list number that has been read.

[0112] Step 114: Update next_index[Cur_cnt] with the next hop address as the new current linked list address, where next_index[Cur_cnt] represents the address of the next read of the linked list represented by Cur_cnt;

[0113] When the next hop address read does not indicate the end of the linked list, the next hop address is used as the starting address of the new linked list. Then MC_BASE is incremented by 1 and Cur_cnt is incremented by 1 to determine the starting address of each linked list as the starting address of the target linked list.

[0114] Step 115: Determine whether Cur_cnt is equal to N. If Cur_cnt is not equal to N, jump to step 110 and repeat the process from step 110 to step 115. If Cur_cnt is equal to N, jump to step 120.

[0115] By judging whether Cur_cnt is equal to N, it is determined whether the target linked list start address has been read. When Cur_cnt is not equal to N, the process from step 110 to step 115 is repeated until Cur_cnt is equal to N, and the target linked list start address is determined.

[0116] Step 120: Cur_cnt is cleared;

[0117] When Cur_cnt is equal to N, the starting address of the target linked list is determined, that is, the starting address of the N linked lists. Therefore, at this time, it is considered that the starting address of each linked list has been determined, and then the multicast replication information in each linked list needs to be read in sequence starting from the first linked list, so Cur_cnt is cleared to make Cur_cnt indicate reading the first linked list.

[0118] Step 121: Use next_index[Cur_cnt] as the index to query the multicast replication table;

[0119] Starting from the first linked list, the next hop address read is used as the new current linked list address. That is, when step 121 is executed for the first time, next_index[0] is used as the index, when step 121 is executed for the second time, next_index[1] is used as the index, ..., when step 121 is executed for the numth time, next_index[num-1] is used as the index, when step 121 is executed for the num+1th time, next_index[0] is used as the index, and so on.

[0120] Step 122: Determine whether the next hop address indicates the end of the linked list. If so, jump to step 123. If not, jump to step 125.

[0121] If the next hop address read indicates the end of the linked list, it means that a linked list has been copied, and the number of linked lists that have been copied needs to be increased by 1. If the next hop address read does not indicate the end of the linked list, the next hop address is used as the new current linked list address.

[0122] Step 123: End_cnt is incremented by 1, and End_cnt indicates the number of linked lists that have finished copying;

[0123] The next hop address read indicates the end of the linked list, which means that a linked list has been copied and the number of linked lists that have been copied needs to be increased by 1.

[0124] Step 124: Determine whether End_cnt is equal to N. If End_cnt is not equal to N, jump to step 126 and repeat the process from step 120 to step 127. If End_cnt is equal to N, jump to step 130.

[0125] Repeat the process from step 120 to step 127, use each next hop address read as a new current linked list address, and return to the step of reading the next hop address and multicast replication information of each current linked list address record in the multicast replication table until all linked lists are read;

[0126] Step 125: Update next_index[Cur_cnt] with the next hop address as the new current linked list address. Next_index[Cur_cnt] indicates the address of the next read of the linked list represented by Cur_cnt.

[0127] The read next hop addresses are used as the new current linked list addresses.

[0128] Step 126: Cur_cnt is incremented by 1;

[0129] If the number of linked lists that have been copied is not equal to the number of returned cycles, it means that all linked lists have not been read completely. By adding 1 to the current number of linked lists, the linked lists continue to be read until all linked lists are read.

[0130] Step 127: Determine whether Cur_cnt is equal to N. If Cur_cnt is equal to N, jump to step 120; if Cur_cnt is not equal to N, jump to step 121;

[0131] Add 1 to the current linked list number and continue reading the linked list until Cur_cnt is equal to N. After all linked lists are read, the process ends.

[0132] Step 130: End.

[0133] In a possible implementation, the multicast replication information stored in each linked list in the multicast replication table belongs to the same multicast group, and the multicast replication information of each multicast group is stored in a number of linked lists of return cycles;

[0134] In the multicast start table, the multicast identifier corresponding to the start address of each linked list is: the multicast identifier of the multicast group to which the multicast replication information stored in the linked list belongs.

[0135] The multicast message carries the number of nodes to which the multicast message needs to be replicated and the addresses of each node, and each node belongs to the same multicast group. Each linked list stores multicast replication information, and the multicast replication information of each multicast group is stored in the linked lists of the return cycle number.

[0136] The multicast start table contains the start addresses of the linked lists of the return cycle number in the multicast replication table. The start address of each linked list points to the multicast identifier of the same multicast group. In an example, see Figure 6 , the number of returned cycles is N, the starting addresses MC_BASE, MC_BASE+1, ..., MC_BASE+N-1 are placed in the multicast start table, and the multicast identifier corresponding to each starting address MC_BASE, MC_BASE+1, ..., MC_BASE+N-1 is MC_ID.

[0137] In an embodiment of the present application, a pre-maintained multicast start table and a multicast replication table are used to store replication information of the same multicast group in each linked list. The multicast start table is queried through MC_ID to obtain the starting address of each linked list. The multicast replication table is queried using the starting address of each linked list. The next hop address is continuously read in a multi-linked table loop, which can cover up the lookup return delay of the multicast replication table.

[0138] In a possible implementation, the multicast replication information of each multicast group is evenly stored in a number of linked lists in the return cycle.

[0139] In order to cover the lookup return delay N of the multicast replication table by using a multi-linked list loop, the following requirements are made for the multicast replication table:

[0140] First: the first hop block of the multicast replication table is N consecutive addresses;

[0141] Second: When the number of replication nodes in the multicast is % N = 0 (when the modulus of the number of replication nodes is N is equal to 0), the N linked lists need to be of equal length, that is, each linked list stores the multicast replication information of the same number of replication nodes;

[0142] Third: When the number of replication nodes in the multicast group % N = 1 (when the number of replication nodes modulo N is equal to 1), the multicast replication information of the redundant replication nodes in the multicast group is placed on the linked list 0 after being read from the linked list 0 in the multicast replication table;

[0143] Fourth: when the number of replication nodes in the multicast group % N = 2 (when the number of replication nodes modulo N is equal to 2), the multicast replication information of the replication nodes in the redundant two multicast groups is placed on the linked list 0 and the linked list 1 in the multicast replication table after being read;

[0144] Fifth: By analogy, when the number of replication nodes in the multicast group % N = N-1 (when the number of replication nodes modulo N is equal to N-1), the multicast replication information of the replication nodes in the redundant N-1 multicast groups is read from the linked list 0 to the linked list N-2 in the multicast replication table and placed on the linked list 0 to the linked list N-2 respectively;

[0145] Sixth: Reserve one or more addresses as the end address to determine whether the linked list ends.

[0146] In the embodiment of the present application, N linked lists are used to place the replication information of several replication nodes in the multicast. By limiting the multicast replication table as required above, the length of each linked list can be balanced.

[0147] The present application also provides a multicast replication device. Fig. 9 , the device comprises:

[0148] An identifier determination module 901 is used to determine the multicast identifier of the multicast group to which the multicast message belongs, as a target multicast identifier;

[0149] A starting address determination module 902 is used to determine the starting address of each of the linked lists corresponding to the target multicast identifier in the multicast starting table as the starting address of the target linked list, wherein the multicast starting table is used to record the corresponding relationship between the multicast group identifier and the linked list starting address of each of the linked lists;

[0150] A reading module 903 is used to read the multicast replication information recorded in the linked list starting with the starting address of the target linked list in the multicast replication table, wherein the multicast replication table includes a plurality of linked lists, each of which stores the multicast replication information;

[0151] The replication module 904 is configured to replicate the multicast message to each node of the multicast group according to the read multicast replication information.

[0152] In a possible implementation manner, the starting addresses of the linked lists in the multicast replication table for recording the multicast replication information of the same multicast group are continuous, and the multicast start table is specifically used to record the correspondence between the multicast group identifier and the multicast basic address and the number of replication nodes;

[0153] The starting address determination module is specifically used to: determine the multicast base address and the number of replication nodes corresponding to the target multicast identifier in the multicast start table; and determine the number of replication nodes consecutively starting from the multicast base address as the starting address of the target linked list.

[0154] In a possible implementation, the reading module is specifically used to: if the number of replication nodes is equal to the number of return cycles, read the next hop address and multicast replication information of each current linked list address record in the multicast replication table, wherein the number of return cycles is the number of cycles required to search the multicast replication table and return the search result, wherein the cycle is the clock cycle of the chip performing multicast replication, and each current linked list position is initially the starting address of each target linked list; using each next hop address read as a new current linked list address, return to execute the step of reading the next hop address and multicast replication information of each current linked list address record in the multicast replication table until all the linked lists are read.

[0155] In a possible implementation manner, the reading module is specifically configured to: if the number of replication nodes is not equal to the number of return cycles, read the multicast replication information recorded in the start address of each target linked list in the multicast replication table.

[0156] In a possible implementation manner, the multicast replication information stored in each linked list in the multicast replication table belongs to the same multicast group, and the multicast replication information of each multicast group is stored in a number of linked lists of return cycles;

[0157] In the multicast start table, the multicast identifier corresponding to the start address of each linked list is: the multicast identifier of the multicast group to which the multicast replication information stored in the linked list belongs.

[0158] In a possible implementation manner, the multicast replication information of each multicast group is evenly stored in a number of linked lists in the return cycle.

[0159] The present application also provides a chip function module, such as Fig.10 As shown, including:

[0160] Storage unit 1001, used to store multicast related entries;

[0161] The processing unit 1002 is used to complete the multicast replication function logic and implement any multicast replication method described in the present application.

[0162] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0163] Each embodiment in this specification is described in a related manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referenced to each other.

[0164] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A multicast replication method, characterized in that: The method comprises: Determine the multicast identifier of the multicast group to which the multicast message belongs as the target multicast identifier; Determine the starting address of each linked list corresponding to the target multicast identifier in the multicast start table as the starting address of the target linked list, wherein the multicast start table is used to record the correspondence between the multicast group identifier and the linked list starting address of each linked list, and record the correspondence between the multicast group identifier and the multicast basic address and the number of replication nodes; wherein the multicast basic address is the starting position of the multicast message in the multicast replication table, and the number of replication nodes is the number of nodes that the multicast message needs to be replicated from the multicast group at the first hop; wherein the step of determining the starting address of the target linked list in the multicast start table includes: determining the multicast basic address and the number of replication nodes corresponding to the target multicast identifier in the multicast start table; determining the number of replication nodes that are continuous starting from the multicast basic address as the starting address of the target linked list; The multicast replication information recorded in the linked list starting with the target linked list start address is read in the multicast replication table, including: if the number of replication nodes is equal to the number of return cycles, then the next hop address and multicast replication information recorded in each current linked list address are read in the multicast replication table, wherein the number of return cycles is the number of cycles required to search the multicast replication table and return the search result, wherein the cycle is the clock cycle of the chip performing multicast replication, and each current linked list position is initially the start address of each target linked list; taking each next hop address read as a new current linked list address, returning to execute the step of reading the next hop address and multicast replication information recorded in each current linked list address in the multicast replication table until all the linked lists are read, wherein the multicast replication table includes a plurality of linked lists, each of which stores multicast replication information; the start addresses of the linked lists in the multicast replication table that record the multicast replication information of the same multicast group are continuous; The multicast message is copied to each node of the multicast group according to the read multicast copy information.

2. The method according to claim 1, characterized in that: The method further comprises: If the number of replication nodes is not equal to the number of return cycles, the multicast replication information recorded in the starting address of each target linked list is read from the multicast replication table.

3. The method according to claim 1, characterized in that The multicast replication information stored in each linked list in the multicast replication table belongs to the same multicast group, and the multicast replication information of each multicast group is stored in a number of linked lists of return cycles; In the multicast start table, the multicast identifier corresponding to the start address of each linked list is: the multicast identifier of the multicast group to which the multicast replication information stored in the linked list belongs.

4. The method according to claim 3, characterized in that The multicast replication information of each multicast group is evenly stored in the return cycle number of linked lists.

5. A multicast replication device, characterized in that: The device comprises: An identifier determination module, used to determine the multicast identifier of the multicast group to which the multicast message belongs, as a target multicast identifier; A starting address determination module, used to determine the starting address of each linked list corresponding to the target multicast identifier in the multicast starting table as the starting address of the target linked list, wherein the multicast starting table is used to record the corresponding relationship between the multicast group identifier and the linked list starting address of each linked list, and record the corresponding relationship between the multicast group identifier and the multicast basic address and the number of replication nodes; wherein the multicast basic address is the starting position of the multicast message in the multicast replication table, and the number of replication nodes is the number of nodes that the multicast message needs to replicate from the multicast group in the first hop; a reading module, configured to read the multicast replication information recorded in the linked list starting with the starting address of the target linked list in the multicast replication table, wherein the multicast replication table includes a plurality of linked lists, each of which stores multicast replication information; and the starting addresses of the linked lists in the multicast replication table that record the multicast replication information of the same multicast group are continuous; A replication module, used for replicating the multicast message to each node of the multicast group according to the read multicast replication information; The starting address determination module is specifically used to: determine the multicast base address and the number of replication nodes corresponding to the target multicast identifier in the multicast start table; determine the number of replication nodes that are continuous starting from the multicast base address as the starting address of the target linked list; The reading module is specifically used for: if the number of replication nodes is equal to the number of return cycles, then reading the next hop address and multicast replication information of each current linked list address record in the multicast replication table, wherein the number of return cycles is the number of cycles required for searching the multicast replication table to returning the search result, wherein the cycle is the clock cycle of the chip performing multicast replication, and each current linked list position is initially the starting address of each target linked list; taking each next hop address read as a new current linked list address, returning to execute the step of reading the next hop address and multicast replication information of each current linked list address record in the multicast replication table until all the linked lists are read.

6. The device according to claim 5, characterized in that The reading module is specifically used to: if the number of replication nodes is not equal to the number of return cycles, read the multicast replication information recorded in the starting address of each target linked list in the multicast replication table.

7. The device according to claim 5, characterized in that The multicast replication information stored in each linked list in the multicast replication table belongs to the same multicast group, and the multicast replication information of each multicast group is stored in a number of linked lists of return cycles; In the multicast start table, the multicast identifier corresponding to the start address of each linked list is: the multicast identifier of the multicast group to which the multicast replication information stored in the linked list belongs.

8. The device according to claim 7, characterized in that The multicast replication information of each multicast group is evenly stored in the return cycle number of linked lists.

9. A chip functional module, characterized in that: including a processing unit and a storage unit; A storage unit, used for storing multicast related entries; The processing unit is used to complete the multicast replication function logic and implement the multicast replication method described in any one of claims 1-4.

Citation Information

Patent Citations

  • Multicast message transmission method and device

    CN104618247A