Method and device for quickly updating multicast table, electronic device and storage medium
By using BitMap in the multicast member control table to determine the destination port status of the multicast member, the problem of low table brushing efficiency of multicast tables is solved, and the precise replication of multicast traffic is achieved and network performance is improved.
Patent Information
- Application Number
- CN202111300095.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-04
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-11-04
AI Technical Summary
When multicast member changes, the prior art is difficult to effectively improve the table flushing efficiency of multicast tables, resulting in multicast traffic being copied to undesired destination ports, affecting network performance.
By setting BitMap in the multicast member control table, the destination port status of the multicast member is determined, the destination port of the copy message is determined, and the auxiliary multicast table is used to achieve quick flashing and control the multicast member path.
Improve the table flushing efficiency of multicast tables, ensure that packets are copied to the correct destination port, reduce undesired traffic replication, and improve network performance.
Smart Images

Figure CN116074234B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a method and device for quickly updating a multicast table, an electronic device and a storage medium. Background Art
[0002] Multicast is a point-to-multipoint information transmission method, that is, a multicast source can send data to multiple receivers at the same time. Multiple receivers constitute a specific set of nodes, called a group or group. Multicast technology has the advantages of high network utilization, reduced backbone network congestion, resource saving, and strong scalability. It has played a great role in new network applications such as video conferencing, file distribution, real-time information release, and Internet TV.
[0003] In certain scenarios, the number of multicast entries is required to be more than several hundred thousand, and the need to change multicast members often occurs. In extreme cases, a large number of multicast tables need to be updated at the same time. For example, the destination port of a multicast member exists in every multicast group. At this time, if a multicast member changes, the software needs to refresh a large number of multicast table entries, which takes a long time to complete. During this period, multicast traffic will be copied to the undesired destination port. Therefore, the problem of separating multicast member filling and forwarding control needs to be solved urgently.
[0004] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention
[0005] The object of the present invention is to provide a method and device, an electronic device and a storage medium for quickly updating a multicast table, which can make the chip follow the BitMap corresponding to the multicast member when searching when the multicast member changes, so as to determine the destination port of the multicast member of the copied message. The multicast member control table can assist the multicast table to achieve fast refresh, control the specific multicast member path, and effectively improve the refresh efficiency of the multicast table. As the multicast entries increase, the refresh efficiency will also be further increased.
[0006] To achieve the above objective, an embodiment of the present invention provides a method for quickly updating a multicast table.
[0007] In one or more embodiments of the present invention, a BitMap corresponding to the multicast group to be updated is obtained according to a multicast member control table; based on the BitMap and the destination port status of the multicast member, it is determined whether the destination port of the member in the multicast group copies the message; if so, the message is copied to the destination port of the member in the multicast group.
[0008] In one or more embodiments of the present invention, the method further includes: obtaining the destination port number of the members in the multicast group and marking the destination port number status as valid; and configuring a corresponding BitMap for each multicast group in the multicast member control table.
[0009] In one or more embodiments of the present invention, judging whether the destination port of the member in the multicast group copies the message according to the BitMap and the destination port number status of the multicast member includes: judging whether the final destination port of the member in the multicast group is valid according to the BitMap and the destination port number status of the multicast member; if so, the destination port of the member in the multicast group copies the message.
[0010] In one or more embodiments of the present invention, whether the final destination port of the member in the multicast group is valid is judged according to the BitMap and the destination port number status of the multicast member, including: if the destination port number status of the member is marked as valid or the BitMap corresponding to the member is valid, then the final destination port of the member is marked as valid; or, if the destination port number status of the member is marked as valid and the BitMap corresponding to the member is valid, then the final destination port of the member is marked as valid.
[0011] In one or more embodiments of the present invention, the method further includes: if the final destination port of at least one member in the multicast group is marked as valid, then the final destination port of the multicast group is valid.
[0012] In one or more embodiments of the present invention, copying the message to the destination port of the member in the multicast group includes: copying the message to the destination port of the multicast group marked as valid.
[0013] In one or more embodiments of the present invention, the method includes: determining whether a destination port of a member in the multicast group is a link aggregation destination port; if so, obtaining a BitMap corresponding to the multicast group to be updated according to a multicast member control table.
[0014] In another aspect of the present invention, a device for rapidly updating a multicast table is provided, which includes an acquisition module, a determination module, and a copy module.
[0015] The acquisition module is used to acquire the BitMap corresponding to the multicast group to be updated according to the multicast member control table.
[0016] The judging module is used to judge whether the destination port of the member in the multicast group duplicates the message according to the BitMap and the destination port status of the multicast member.
[0017] The copy module is used to copy the message to the destination port of the member in the multicast group.
[0018] In one or more embodiments of the present invention, the acquisition module is further used to: acquire the destination port number of the members in the multicast group and mark the destination port number status as valid; and configure a corresponding BitMap for each multicast group in the multicast member control table.
[0019] In one or more embodiments of the present invention, the judgment module is also used to: judge whether the final destination port of the member in the multicast group is valid according to the BitMap and the destination port number status of the multicast member; if so, the destination port of the member in the multicast group copies the message.
[0020] In one or more embodiments of the present invention, the judgment module is also used to: if the destination port number status of the member is marked as valid or the BitMap corresponding to the member is valid, then mark the final destination port of the member as valid; or, if the destination port number status of the member is marked as valid and the BitMap corresponding to the member is valid, then mark the final destination port of the member as valid.
[0021] In one or more embodiments of the present invention, the judgment module is further configured to: if the final destination port of at least one member in the multicast group is marked as valid, then the final destination port of the multicast group is valid.
[0022] In one or more embodiments of the present invention, the copy module is further configured to: copy the message to a destination port of the multicast group marked as valid.
[0023] In one or more embodiments of the present invention, the judgment module is further used to: judge whether the destination port of the member in the multicast group is a link aggregation destination port; if so, obtain the BitMap corresponding to the multicast group to be updated according to the multicast member control table.
[0024] In another aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory, wherein the memory stores instructions, and when the instructions are executed by the at least one processor, the at least one processor executes the method for quickly updating a multicast table as described above.
[0025] In another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for quickly updating a multicast table are implemented.
[0026] Compared with the prior art, the method and device, electronic device and storage medium for quickly updating the multicast table according to the embodiments of the present invention can set a BitMap in the multicast member control table so that the chip follows the BitMap corresponding to the multicast member in combination with the BitMap of the forwarding control when searching, thereby determining the destination port of the multicast member of the copied message. The multicast member control table can assist the multicast table in realizing fast refresh, control the specific multicast member path, and effectively improve the refresh efficiency of the multicast table. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a flow chart of a method for quickly updating a multicast table according to an embodiment of the present invention;
[0028] Figure 2 is a specific flow chart of a method for quickly updating a multicast table according to an embodiment of the present invention;
[0029] Figure 3 A multicast table of a method for quickly updating a multicast table according to an embodiment of the present invention;
[0030] Figure 4 A multicast member control table of a method for rapidly updating a multicast table according to an embodiment of the present invention;
[0031] Figure 5 is a structural diagram of a device for rapidly updating a multicast table according to an embodiment of the present invention;
[0032] Figure 6 4 is a hardware structure diagram of a computing device for rapidly updating a multicast table according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific implementation modes.
[0034] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.
[0035] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0036] Example 1
[0037] like Figure 1 As shown, a method for quickly updating a multicast table in an embodiment of the present invention is introduced. The method includes the following steps.
[0038] In step S101, a BitMap corresponding to the multicast group to be updated is obtained according to the multicast member control table.
[0039] The multicast member control table in a conventional switch can be in two forms: BitMap and LinkList. In the BitMap form, each bit represents the destination port of a multicast member. When the corresponding bit is set to 1, a message is copied to the corresponding destination port. The LinkList form connects the multicast tables in the form of a linked list, with one member in each multicast table. Whether the multicast member control table is presented in the BitMap form or the LinkList form, the multicast member control table records the information of all multicast members.
[0040] In this embodiment, the multicast member control table is presented in the form of BitMap, and the corresponding BitMap is pre-set for the multicast members to form the multicast member control table. The BitMap here is used to obtain the BitMap corresponding to the multicast group to be updated according to the multicast member control table when the multicast table is updated, and forward the message to the specified destination port according to the BitMap.
[0041] In step S102, it is determined whether the destination port of a member in the multicast group duplicates the message according to the BitMap and the destination port status of the multicast member.
[0042] The BitMap in the multicast member control table plays the role of switching control on the multicast members. If the destination port number status of the multicast member is marked as valid or the BitMap corresponding to the member is valid, the final destination port of the multicast member is marked as valid; or, if the destination port number status of the multicast member is marked as valid and the BitMap corresponding to the multicast member is valid, the final destination port of the multicast member is marked as valid.
[0043] In step S103, the message is copied to the destination port of the members in the multicast group.
[0044] The multicast message is copied to the destination port where the final destination port mark of the multicast group is valid. Finally, the multicast message is forwarded from the desired destination port.
[0045] Example 2
[0046] like Figures 2 to 4 As shown, a method for quickly updating a multicast table in an embodiment of the present invention is introduced. The method includes the following steps.
[0047] In step S201, the destination port number of the members in the multicast group is obtained, and the destination port number status is marked as valid.
[0048] The multicast member table stores information of all multicast members, including the destination port number (dest-Id). The port identifier (validVec) is used to identify the validity of the information of the multicast members in the multicast member table.
[0049] like Figure 2 As shown, taking 64 multicast entries as a group for centralized control and placing 6 members in each multicast as an example, the multicast member table is indexed through groupidpointer[19:0] to obtain the destination port numbers dest0~dest5 of the members in the multicast group, where dest0~dest5 represent the destination port numbers of the 6 multicast members; the destination port number status is marked as valid, and validVec[5:0] marks the destination port numbers dest0~dest5 of the multicast members in this multicast group as valid values.
[0050] In step S202, a corresponding BitMap is configured for each multicast group in the multicast member control table.
[0051] The multicast member control table stores BitMap information for controlling which multicast members in the multicast have valid destination port numbers. Before the multicast table is updated, a corresponding BitMap is configured for each multicast group in the multicast member control table.
[0052] In step S203, it is determined whether the destination port of the member in the multicast group is a link aggregation destination port.
[0053] The multicast member table also includes a link aggregation identifier (isLinkAggregation), which is used to mark whether the destination port number of the multicast member is a link aggregation destination port.
[0054] Link aggregation is to aggregate multiple physical ports together to form a logical port to achieve load sharing of inbound / outbound traffic throughput at the destination ports of each multicast member. The switch determines from which member port the message is sent to the switch at the other end according to the destination port load sharing policy configured by the user. When the switch detects that the link of one of the member ports fails, it stops sending messages on this port and recalculates the sending port of the message in the remaining links according to the load sharing policy. After the failed port is restored, it serves as a sending and receiving port again.
[0055] In this embodiment, if the destination port of a member in the multicast group is a link aggregation destination port, the BitMap corresponding to the multicast group to be updated is obtained according to the multicast member control table.
[0056] Specifically, groupidpointer[19:6] is used to index the multicast member control table, in which the control BitMaps corresponding to 64 multicast groups are placed, and the BitMap[5:0] corresponding to the multicast member whose message needs to be copied for this multicast table update is obtained through groupid pointer[5:0].
[0057] In step S204, it is determined whether the final destination port of the members in the multicast group is valid according to the BitMap and the destination port number status of the multicast member.
[0058] If the destination port number status of the multicast member is marked as valid or the BitMap corresponding to the member is valid, then the final destination port of the multicast member is marked as valid; or, if the destination port number status of the multicast member is marked as valid and the BitMap corresponding to the multicast member is valid, then the final destination port of the multicast member is marked as valid.
[0059] In this embodiment, the switch supports 512 ports, and the final destination ports of the multicast members are PortBitmap0[511:0], PortBitmap1[511:0], PortBitmap2[511:0], PortBitmap3[511:0], PortBitmap4[511:0], and PortBitmap5[511:0]. According to the destination port number status of the multicast member and the BitMap corresponding to the multicast member, it is determined whether the final destination port of the multicast member is valid. Specifically, PortBitmap0[destId0]=validVec[0]|bitmap[0] or PortBitmap0[destId0]=validVec[0]&bitmap[0]. The determination method of whether the final destination ports of the other five multicast members are valid is the same, which will not be described in detail here.
[0060] In step S205, if the final destination port of at least one member in the multicast group is marked as valid, the final destination port of the multicast group is valid.
[0061] In this embodiment, the final destination port of the multicast group is PortBitmapFinal[511:0]. Whether the final destination port of the multicast group is valid can be known according to the state of the final destination port of the multicast member in the multicast group.
[0062] Specifically, PortBitmapFinal[511:0]=PortBitmap0[511:0]|PortBitmap1[511:0]|PortBitmap2[511:0]|PortBitmap3[511:0]|PortBitmap4[511:0]|PortBitmap5[511:0]. At this time, if the final destination port of at least one member in the multicast group is marked as valid, the BitMap of the multicast group in the multicast member control table is set to 1, and the final destination port of the multicast group is valid.
[0063] In step S206, the message is copied to the final destination port of the multicast group marked as valid.
[0064] The multicast message is copied to the destination port with the final destination port mark of the multicast group valid (PortBitmapFinal is set to 1). Finally, the multicast message is forwarded from the desired destination port.
[0065] like Figure 5 As shown, a device for quickly updating a multicast table according to a specific embodiment of the present invention is introduced.
[0066] In the embodiment of the present invention, the device for rapidly updating the multicast table includes an acquisition module 501 , a determination module 502 and a copy module 503 .
[0067] The acquisition module 501 is used to acquire the BitMap corresponding to the multicast group to be updated according to the multicast member control table.
[0068] The judgment module 502 is used to judge whether the destination port of a member in the multicast group duplicates the message according to the BitMap and the destination port status of the multicast member.
[0069] The copy module 503 is used to copy the message to the destination port of the members in the multicast group.
[0070] The acquisition module 501 is further used to: acquire the destination port number of the members in the multicast group and mark the destination port number status as valid; and configure a corresponding BitMap for each multicast group in the multicast member control table.
[0071] The judging module 502 is further used to judge whether the final destination port of the member in the multicast group is valid according to the BitMap and the destination port number status of the multicast member; if so, the destination port of the member in the multicast group replicates the message.
[0072] The judgment module 502 is also used to: if the destination port number status of the member is marked as valid or the BitMap corresponding to the member is valid, then the final destination port of the member is marked as valid; or, if the destination port number status of the member is marked as valid and the BitMap corresponding to the member is valid, then the final destination port of the member is marked as valid.
[0073] The judging module 502 is further configured to: if the final destination port of at least one member in the multicast group is marked as valid, then the final destination port of the multicast group is valid.
[0074] The copy module 503 is further used to copy the message to the destination port of the multicast group marked as valid.
[0075] The judging module 502 is further used to: judge whether the destination port of a member in the multicast group is a link aggregation destination port; if so, obtain the BitMap corresponding to the multicast group to be updated according to the multicast member control table.
[0076] Figure 6 FIG. 4 shows a hardware structure diagram of a computing device 60 for quickly updating a multicast table according to an embodiment of the present specification. Figure 6 As shown, the computing device 60 may include at least one processor 601, a memory 602 (e.g., a non-volatile memory), a memory 603, and a communication interface 604, and the at least one processor 601, the memory 602, the memory 603, and the communication interface 604 are connected together via a bus 605. The at least one processor 601 executes at least one computer-readable instruction stored or encoded in the memory 602.
[0077] It should be understood that the computer executable instructions stored in the memory 602, when executed, cause at least one processor 601 to perform the above combined operations in various embodiments of this specification. Figure 1-6 Describes the various operations and functions.
[0078] In the embodiments of the present specification, the computing device 60 may include, but is not limited to, a personal computer, a server computer, a workstation, a desktop computer, a laptop computer, a notebook computer, a mobile computing device, a smart phone, a tablet computer, a cellular phone, a personal digital assistant (PDA), a handheld device, a messaging device, a wearable computing device, a consumer electronic device, and the like.
[0079] According to one embodiment, a program product such as a machine-readable medium is provided. The machine-readable medium may have instructions (i.e., the above-mentioned elements implemented in the form of software), which, when executed by a machine, causes the machine to perform the above-mentioned combination of various embodiments of this specification. Figure 1-6Specifically, a system or device equipped with a readable storage medium may be provided, on which a software program code implementing the functions of any of the above-mentioned embodiments is stored, and a computer or processor of the system or device reads and executes the instructions stored in the readable storage medium.
[0080] According to the method and device, electronic device and storage medium for quickly updating the multicast table in the embodiment of the present invention, BitMap can be set in the multicast member control table so that the chip follows the BitMap corresponding to the multicast member in combination with the BitMap of the forwarding control when searching, thereby determining the destination port of the multicast member of the duplicate message. The multicast member control table can assist the multicast table in realizing fast refresh, control the specific multicast member path, and effectively improve the refresh efficiency of the multicast table.
[0081] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0082] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0083] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0084] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0085] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.
Claims
1. A method for quickly updating a multicast table, characterized in that: The method comprises: Obtain the destination port number of the member in the multicast group, and mark the destination port number status as valid; and configure a corresponding BitMap for each multicast group in the multicast member control table; Obtain the BitMap corresponding to the multicast group to be updated according to the multicast member control table; Determine whether the destination port of the member in the multicast group duplicates the message according to the BitMap and the destination port status of the multicast member; if so, Copying the message to the destination port of the member in the multicast group; Judging whether the destination port of the member in the multicast group copies the message according to the BitMap and the destination port number status of the multicast member, including: judging whether the final destination port of the member in the multicast group is valid according to the BitMap and the destination port number status of the multicast member; if so, the destination port of the member in the multicast group copies the message; Judging whether the final destination port of the member in the multicast group is valid according to the BitMap and the destination port number status of the multicast member, including: if the destination port number status of the member is marked as valid or the BitMap corresponding to the member is valid, marking the final destination port of the member as valid; or if the destination port number status of the member is marked as valid and the BitMap corresponding to the member is valid, marking the final destination port of the member as valid.
2. The method for quickly updating a multicast table according to claim 1, characterized in that: The method further comprises: If the final destination port of at least one member in the multicast group is marked as valid, the final destination port of the multicast group is valid.
3. The method for quickly updating a multicast table according to claim 1, characterized in that: The copying of the message to the destination port of the member in the multicast group includes: The message is copied to the destination port of the multicast group marked as valid.
4. The method for quickly updating a multicast table according to claim 1, wherein: The method further comprises: Determine whether the destination port of the member in the multicast group is a link aggregation destination port; if so, The BitMap corresponding to the multicast group to be updated is obtained according to the multicast member control table.
5. A device for quickly updating a multicast table, characterized in that: The device comprises: The acquisition module is used to obtain the destination port number of the member in the multicast group and mark the destination port number status as valid; and configure the corresponding BitMap for each multicast group in the multicast member control table; and obtain the BitMap corresponding to the multicast group to be updated according to the multicast member control table; A judging module, used for judging whether the destination port of a member in the multicast group duplicates the message according to the BitMap and the destination port status of the multicast member; Judging whether the destination port of the member in the multicast group copies the message according to the BitMap and the destination port number status of the multicast member, including: judging whether the final destination port of the member in the multicast group is valid according to the BitMap and the destination port number status of the multicast member; if so, the destination port of the member in the multicast group copies the message; Judging whether the final destination port of the member in the multicast group is valid according to the BitMap and the destination port number status of the multicast member, including: if the destination port number status of the member is marked as valid or the BitMap corresponding to the member is valid, marking the final destination port of the member as valid; or if the destination port number status of the member is marked as valid and the BitMap corresponding to the member is valid, marking the final destination port of the member as valid; The copy module is used to copy the message to the destination port of the member in the multicast group.
6. An electronic device, characterized in that: include: at least one processor; as well as A memory storing instructions, wherein when the instructions are executed by the at least one processor, the at least one processor executes the method for quickly updating the multicast table according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for quickly updating a multicast table according to any one of claims 1 to 4 are implemented.
