CN115484233A - Method, device, equipment and medium for forwarding link aggregation message in digital communication chip - Google Patents

Method, device, equipment and medium for forwarding link aggregation message in digital communication chip Download PDF

Info

Publication number
CN115484233A
CN115484233A CN202211166462.1A CN202211166462A CN115484233A CN 115484233 A CN115484233 A CN 115484233A CN 202211166462 A CN202211166462 A CN 202211166462A CN 115484233 A CN115484233 A CN 115484233A
Authority
CN
China
Prior art keywords
port
link aggregation
target
ports
physical port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211166462.1A
Other languages
Chinese (zh)
Other versions
CN115484233B (en
Inventor
杨荟奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Wuxin Technology Co ltd
Original Assignee
Beijing Wuxin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Wuxin Technology Co ltd filed Critical Beijing Wuxin Technology Co ltd
Priority to CN202211166462.1A priority Critical patent/CN115484233B/en
Publication of CN115484233A publication Critical patent/CN115484233A/en
Application granted granted Critical
Publication of CN115484233B publication Critical patent/CN115484233B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/253Routing or path finding in a switch fabric using establishment or release of connections between ports

Abstract

The invention discloses a method, a device, equipment and a medium for forwarding a link aggregation message in a digital communication chip. The method comprises the following steps: acquiring multicast group information matched with the target message, and identifying at least one alternative physical port matched with the multicast group information in the digital communication chip; according to the query result of the link aggregation port identification bit of each alternative physical port, identifying the alternative physical port as a common physical port or a link aggregation port member port; and forwarding the copied message of the target message through a common physical port or a target member port in a link aggregation port to which a member port of the link aggregation port belongs. By adopting the technical scheme, the storage space occupied by the configuration information of the link aggregation port in the digital communication chip can be greatly reduced, and the chip area, the power consumption and the cost are saved.

Description

Method, device, equipment and medium for forwarding link aggregation message in digital communication chip
Technical Field
The present invention relates to the field of digital communication technologies, and in particular, to a method, an apparatus, a device, and a medium for forwarding a link aggregation packet in a digital communication chip.
Background
When the digital chip forwards a message for multiple physical ports, a target physical port to be forwarded needs to be selected according to multicast group member information in the current virtual local area network, and the target physical port may be a common physical port or a link aggregation port.
In the prior art, multicast group information may be represented in a bitmap form, and when a multicast group includes a link aggregation port, a multi-bit storage space needs to be added to each multicast group to indicate the allocation of the link aggregation port, and when a packet is forwarded, the multicast group information and the allocation information of the link aggregation port need to be read.
If the link aggregation port allocation information required in the message forwarding process is stored by adopting the prior art, a large amount of storage space is required to be occupied, and the power consumption and the use cost of the digital communication chip can be increased.
Disclosure of Invention
The invention provides a method, a device, equipment and a medium for forwarding a link aggregation message in a digital communication chip, which can greatly reduce the storage space occupied by configuration information of a link aggregation port in the digital communication chip and realize multiple savings of chip area, power consumption and cost.
According to an aspect of the present invention, a method for forwarding a link aggregation packet in a traffic chip is provided, where the method includes:
acquiring multicast group information matched with the target message, and identifying at least one alternative physical port matched with the multicast group information in the digital communication chip;
according to the query result of the link aggregation port identification bit of each alternative physical port, identifying the alternative physical port as a common physical port or a link aggregation port member port;
and forwarding the copied message of the target message through a common physical port or a target member port in a link aggregation port to which a member port of the link aggregation port belongs.
According to another aspect of the present invention, there is provided a forwarding apparatus for a link aggregation packet in a traffic chip, including:
the multicast group information acquisition module is used for acquiring multicast group information matched with the target message and identifying at least one alternative physical port matched with the multicast group information in the digital communication chip;
the alternative physical port identification module is used for respectively identifying the alternative physical ports as common physical ports or member ports of the link aggregation port according to the query result of the link aggregation port identification bits of the alternative physical ports;
and the duplicate message forwarding module is used for forwarding the duplicate message of the target message through a common physical port or a target member port in a link aggregation port to which the member port of the link aggregation port belongs.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the method for forwarding a link aggregation packet in a digital communication chip according to any embodiment of the present invention.
According to another aspect of the present invention, a computer-readable storage medium is provided, where computer instructions are stored, and the computer instructions are configured to enable a processor to implement a method for forwarding a link aggregation packet in a digital communication chip according to any embodiment of the present invention when the processor executes the method.
According to the technical scheme of the embodiment of the invention, each alternative physical port matched with the multicast group information is identified in the digital communication chip according to the multicast group information matched with the target message, and each alternative physical port belongs to a common physical port or a link aggregation port member port, so that the storage space occupied by the physical port information configured in the digital communication chip and the link aggregation port information can be reduced by a mode that the target member port in the link aggregation port to which the common physical port or the link aggregation port member port belongs forwards the duplicate message, thereby reducing the power consumption of the digital communication chip and improving the performance of the digital communication chip in the process of forwarding the link aggregation message.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present invention, nor are they intended to limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for forwarding a link aggregation packet in a digital communication chip according to an embodiment of the present invention;
fig. 2 is a flowchart of another method for forwarding a link aggregation packet in a digital communication chip according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a forwarding apparatus for a link aggregation packet in a digital communication chip according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing the method for forwarding a link aggregation packet in a digital communication chip according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a method for forwarding a link aggregation packet in a digital communication chip according to an embodiment of the present invention, where this embodiment is applicable to efficiently implement a case of forwarding a packet of a multicast group including a link aggregation port based on a small amount of configuration information of the link aggregation port, the method may be implemented by a forwarding device of the link aggregation packet in the digital communication chip, the forwarding device of the link aggregation packet in the digital communication chip may be implemented in a hardware and/or software manner, and the forwarding device of the link aggregation packet in the digital communication chip may be configured in the digital communication chip with a data transmission function. As shown in fig. 1, the method includes:
s110, acquiring multicast group information matched with the target message, and identifying at least one alternative physical port matched with the multicast group information in the digital communication chip.
The digital communication chip can be used for data transmission between devices, and one digital communication chip can comprise a plurality of common physical ports, so that when messages are forwarded through the digital communication chip, the messages can be forwarded through the common physical ports, or a plurality of common physical ports can be combined into a link aggregation port with high bandwidth, and the messages are forwarded through the link aggregation port.
In the embodiment of the present invention, the alternative physical port may refer to a physical port capable of being used for forwarding a target packet, the alternative physical port may be a common physical port or a link aggregation port, and each physical port in the link aggregation port may be used as a link aggregation port member port.
The multicast group information matched with the messages with different local area network addresses may be different, and the alternative physical port information for forwarding the target message can be obtained through the multicast group information.
In a specific embodiment, the multicast group information may be represented in a bitmap form, in a bitmap representing the multicast group information, each bitmap position has a mapping relationship with each physical port in the digital communication chip, whether a physical port mapped to each bitmap position is an alternative physical port may be represented by a bit, if a bit in a bitmap position is 1, it may be determined that a physical port in the digital communication chip mapped to the bitmap position is an alternative physical port, and if a bit in a bitmap position is 0, it may be determined that a physical port in the digital communication chip mapped to the bitmap position is not an alternative physical port.
And S120, respectively identifying the alternative physical ports as common physical ports or member ports of the link aggregation ports according to the query result of the link aggregation port identification bits of the alternative physical ports.
Preferably, in order to save the storage space of the link aggregation port identification bit in the digital communication chip, a storage space of 1 bit may be allocated to each physical port in the digital communication chip as the link aggregation port identification bit, and the physical port may be determined to be a common physical port or a member port of the link aggregation port by the identification value of the link aggregation port identification bit of each physical port.
In a specific embodiment, 0 and 1 may be used as an identification value of the link aggregation port identification bit, if the identification value is 0, the physical port belongs to a common physical port, and if the identification value is 1, the physical port belongs to a link aggregation port member port, and the configuration method of the link aggregation port identification bit is not limited to the configuration method used for illustration in this embodiment, and only needs to ensure that a storage space of a small digital-to-analog chip is occupied.
In an actual digital communication chip, there is usually a large amount of multicast group information, and if a link aggregation port identification method in the prior art is used, that is, a multi-bit storage space is allocated to each piece of multicast group information to identify the allocation condition of a link aggregation port, where the storage space of each bit is used to indicate an Identifier (ID) of an aggregation port, for example, 8 link aggregation ports exist in the digital communication chip, it is necessary to use an extra 8-bit storage space to indicate whether a link aggregation port exists in any multicast group, and each bit represents an aggregation port. A large amount of memory space of the digital chip is occupied, which may result in a reduction in communication performance of the digital chip.
The invention creatively provides that each physical port of the digital communication chip is configured with a link aggregation port identification bit for identifying whether each physical port belongs to a link aggregation port member port, and because the number of the physical ports in the digital communication chip is limited and each link aggregation port identification bit can only occupy a storage space of 1 bit, the link aggregation port identification method provided by the embodiment of the invention can effectively save the storage space in the digital communication chip.
S130, forwarding the copied message of the target message through a common physical port or a target member port in a link aggregation port to which a member port of the link aggregation port belongs.
It should be noted that, because the multicast group information matched with the target packet may include a plurality of common physical ports or target member ports in the link aggregation port to which the member ports of the link aggregation port belong, the target packet needs to be replicated, and each common physical port or target member port in the link aggregation port to which the member port of the link aggregation port belongs may forward the replicated packet.
Preferably, if the packet is forwarded through the link aggregation port, only any one member port in the link aggregation port needs to be forwarded, and in order to ensure the flow balance of each member port in the link aggregation port as much as possible, a target member port can be randomly selected from each member port in the link aggregation port to forward the packet.
Therefore, if a certain candidate physical port is identified as a link aggregation port member port, all effective member ports in the link aggregation port to which the physical port belongs can be further acquired, and one member port is randomly selected from all effective member ports in the link aggregation port for forwarding the duplicate packet.
Specifically, for the candidate physical port identified as the member port belonging to the link aggregation port, the link aggregation port information of the candidate physical port may be obtained through the configuration information of the candidate physical port. After the information of the link aggregation port is obtained, the number of effective member ports in the link aggregation port, which can be used for forwarding a message, and all the alternative member ports in the link aggregation port can be obtained through the configuration information of the link aggregation port. Further, the number of the effective member ports can be determined according to the number of the effective member ports, and one member port is randomly selected from the effective member ports to forward the duplicate packet.
In a specific embodiment, if the multicast group information includes a plurality of link aggregation ports, and physical port 1, physical port 2, and physical port 3 belong to one of the link aggregation ports, and only bit of bitmap position where physical port 2 is located is 1, and bit of bitmap position where the other two ports are located is 0, it may be identified that physical port 2 is an alternative physical port. Further, since the physical port 2 belongs to the link aggregation port member port, the identification value of the link aggregation port identification bit of the physical port 2 is 1, and it can be determined that the physical port 2 belongs to the link aggregation port member port by identifying the identification value of the link aggregation port identification bit of the physical port 2. Further, it may be identified from the configuration information of the physical port 2 that the physical port 2 specifically belongs to a specific link aggregation port in the multicast group information. Further, it can be obtained through the configuration information of the link aggregation port that the link aggregation port includes three valid member ports, and all the candidate member ports matched with the link aggregation port are physical port 1, physical port 2, and physical port 3. Further, one of the physical port 1, the physical port 2, and the physical port 3 may be randomly selected to forward the duplicate packet.
The advantages of such an arrangement are: by adopting the selection mode of the message forwarding port in the message forwarding method provided by the embodiment of the invention, when the information of each link aggregation port in the digital communication chip is configured, only each physical port and each link aggregation port are configured, and only a small storage space in the digital communication chip is occupied, thereby solving the problem that the storage space is large because the information of each multicast group needs to be configured with the information of the link aggregation port in the prior art.
According to the technical scheme of the embodiment of the invention, each alternative physical port matched with the multicast group information is identified in the digital communication chip according to the multicast group information matched with the target message, and each alternative physical port belongs to a common physical port or a member port of a link aggregation port, so that the storage space occupied by the physical port information configured in the digital communication chip and the link aggregation port information can be reduced in a mode of forwarding the duplicate message through the target member port in the link aggregation port to which the common physical port or the member port of the link aggregation port belongs, the power consumption of the digital communication chip is reduced, and the performance of the digital communication chip in the process of forwarding the link aggregation message is improved.
Example two
Fig. 2 is a flowchart of another method for forwarding a link aggregation packet in a digital communication chip according to a second embodiment of the present invention, and this embodiment further specifically describes a method for forwarding a link aggregation packet in a digital communication chip on the basis of the foregoing embodiment. As shown in fig. 2, the method includes:
s210, setting a data structure.
Preferably, before acquiring the multicast group information matched with the target packet, the method may specifically include:
setting a first data structure for storing a multicast group set supported by the digital communication chip;
setting a second data structure corresponding to each physical port respectively, and storing a link aggregation port identification bit of the physical port;
setting a third data structure corresponding to each physical port respectively, and storing the link aggregation port to which the physical port belongs;
setting a fourth data structure corresponding to each link aggregation port respectively, and storing the number of effective member ports matched with the link aggregation ports;
and setting a fifth data structure corresponding to each link aggregation port respectively, and storing all the standby member ports matched with the link aggregation ports.
In a specific embodiment, if all the candidate member ports in a certain link aggregation port are physical port 1, physical port 2, physical port 3, and physical port 4 is an invalid member port, the number of valid member ports stored in the fourth data structure corresponding to the link aggregation port is 3, and all the candidate member ports stored in the fifth data structure corresponding to the link aggregation port are physical port 1, physical port 2, physical port 3, and physical port 4. When a target member port is required to be selected from the link aggregation port to forward a packet, since the number of the effective member ports is 3, only the target member port is selected from the physical port 1, the physical port 2 and the physical port 3.
The advantages of such an arrangement are: when the state of the member port in the link aggregation port is changed, the message forwarding work can be continued only by changing a few data structures, and the maintenance time of the digital communication chip is effectively saved.
In the previous example, if all the candidate member ports in a certain link aggregation port are the physical port 1, the physical port 2, the physical port 3, and the physical port 4 is switched from the valid member port to the invalid member port, at this time, in addition to the need to perform corresponding correction on the fourth data structure corresponding to the link aggregation port, it is also necessary to traverse through all the multicast groups to obtain the target multicast group using the link aggregation port, and correspondingly refresh the multicast group information related to the target multicast group, that is, if the bitmap position corresponding to the port 4 in the target multicast group information is 1, it is necessary to adjust the bitmap position to 0, and select any one of the port 1, the port 2, and the port 3, and adjust the bitmap position of the selected port to 1.
In a specific embodiment, a 1-bit storage space may be allocated to each physical port in the digital communication chip, and is used for storing a link aggregation port identification bit of the physical port; a 3-bit storage space can be allocated to each physical port in the digital communication chip, and link aggregation port information of each physical port is stored for each physical port belonging to a link aggregation port; a 2-bit storage space can be allocated to each link aggregation port in the digital communication chip, and is used for storing the number of effective member ports matched with the link aggregation ports; the storage space with 20 bits can be allocated to each link aggregation port in the digital communication chip for storing all the alternative member ports matched with the link aggregation ports, and by adopting the storage mode and the storage space allocation mode, the storage space occupied by the link aggregation port information stored in the digital communication chip can be effectively reduced.
Further, after the data structure is set, the method may further include: and updating the data value of at least one of the first data structure, the second data structure, the third data structure, the fourth data structure and the fifth data structure according to the link aggregation port configuration update file.
Specifically, when the state of the physical port in the universal chip is changed correspondingly, an update file may be configured for the link aggregation port, and the data value of at least one of the first data structure, the second data structure, the third data structure, the fourth data structure, and the fifth data structure may be updated according to the update file.
S220, obtaining the target bitmap position of each target bit in the multicast group information in the bitmap form.
In a specific embodiment, if the digital-to-analog chip includes 32 physical ports, the multicast group information in the form of a bitmap may include 32 bitmap positions, and each bitmap position includes a bit represented as 0 or 1.
And S230, identifying at least one alternative physical port matched with each target bitmap position in the digital communication chip according to the mapping relation between the bitmap position and each physical port in the digital communication chip.
In a specific embodiment, in the multicast group information in the form of a bitmap, each bitmap position has a mapping relationship with one physical port in the digital-to-analog chip, and when bit information in at least one bitmap position is 1, at least one physical port having a mapping relationship with a bitmap position whose bit information is 1 is an alternative physical port.
S240, according to the query result of the link aggregation port identification bit of each alternative physical port, identifying the alternative physical port as a common physical port or a link aggregation port member port.
Specifically, if the link aggregation port identification bit of the currently queried target alternative physical port is the first identification value, the target alternative physical port is identified as the common physical port;
and if the link aggregation port identification bit of the currently inquired target alternative physical port is the second identification value, identifying the target alternative physical port as a link aggregation port member port.
S250, acquiring the currently processed member port of the target link aggregation port, and acquiring the target link aggregation port to which the member port of the target link aggregation port belongs.
S260, inquiring the number of the effective member ports matched with the target link aggregation port and all the optional member ports matched with the target link aggregation port.
S270, determining target member ports in all the alternative member ports according to the number of the effective member ports, and forwarding the copied message of the target message through the target member ports.
Wherein, according to the number of the valid member ports, determining the target member port among all the candidate member ports may specifically include:
generating a random number matched with the target message according to the message description information of the target message;
and calculating a remainder obtained by dividing the random number by the number of the effective member ports, and determining a target member port in all the candidate member ports which are sequentially arranged according to the offset of the remainder.
Optionally, the random number matched with the target packet may be generated according to the local area network address information of the target packet and according to a preset random number generation rule, and the range of the random number may be a positive integer greater than 0, but the generation method of the random number and the range of the random number are not specifically limited.
Optionally, if an invalid member port exists in all the candidate member ports and the target member port determined according to the remainder offset is an invalid member port, a new random number may be generated again to determine a new target member port until the determined target member port is a valid member port.
According to the technical scheme of the embodiment of the invention, the storage space occupied by the link aggregation port information in a digital communication chip can be reduced by arranging a plurality of data structures at the physical port and the link aggregation port to store the link aggregation port information, the link aggregation port information can be quickly modified when the state of the physical port is changed, and the flow balance among all member ports in the link aggregation port can be ensured to a greater extent by generating random numbers to select the target member port.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a forwarding device for a link aggregation packet in a digital communication chip according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: a multicast group information obtaining module 310, an alternative physical port identification module 320, and a duplicate packet forwarding module 330.
The multicast group information obtaining module 310 is configured to obtain multicast group information matched with the target packet, and identify at least one alternative physical port matched with the multicast group information in the digital communication chip.
The candidate physical port identification module 320 is configured to identify, according to a query result of the link aggregation port identification bit of each candidate physical port, the candidate physical port as a common physical port or a member port of the link aggregation port.
The duplicate message forwarding module 330 is configured to forward a duplicate message of the target message through a common physical port or a target member port in a link aggregation port to which a member port of the link aggregation port belongs.
According to the technical scheme of the embodiment of the invention, each alternative physical port matched with the multicast group information is identified in the digital communication chip according to the multicast group information matched with the target message, and each alternative physical port belongs to a common physical port or a member port of a link aggregation port, so that the storage space occupied by the physical port information configured in the digital communication chip and the link aggregation port information can be reduced in a mode of forwarding the duplicate message through the target member port in the link aggregation port to which the common physical port or the member port of the link aggregation port belongs, the power consumption of the digital communication chip is reduced, and the performance of the digital communication chip in the process of forwarding the link aggregation message is improved.
On the basis of the foregoing embodiments, the multicast group information obtaining module 310 may be specifically configured to:
in the multicast group information in the form of a bitmap, acquiring the target bitmap position of each target bit;
and identifying at least one alternative physical port matched with each target bitmap position in the digital communication chip according to the mapping relation between the bitmap position and each physical port in the digital communication chip.
On the basis of the foregoing embodiments, the alternative physical port identification module 320 may be specifically configured to:
if the link aggregation port identification bit of the currently inquired target alternative physical port is a first identification value, identifying the target alternative physical port as a common physical port;
and if the link aggregation port identification bit of the currently inquired target alternative physical port is the second identification value, identifying the target alternative physical port as a link aggregation port member port.
On the basis of the foregoing embodiments, the copy packet forwarding module 330 may include:
a target link aggregation port member port obtaining unit, configured to obtain a currently processed target link aggregation port member port, and obtain a target link aggregation port to which the target link aggregation port member port belongs;
the system comprises an effective member port number query unit, a target link aggregation port number query unit and a target link aggregation port number query unit, wherein the effective member port number query unit is used for querying the effective member port number matched with a target link aggregation port and all standby member ports matched with the target link aggregation port;
and the target member port determining unit is used for determining a target member port in all the standby member ports according to the number of the effective member ports and forwarding the copied message of the target message through the target member port.
On the basis of the foregoing embodiments, the target member port determining unit may be specifically configured to:
generating a random number matched with the target message according to the message description information of the target message;
and calculating a remainder obtained by dividing the random number by the number of the effective member ports, and determining a target member port in all the candidate member ports which are sequentially arranged according to the offset of the remainder.
On the basis of the foregoing embodiments, the system may further include a data structure setting module, which is specifically configured to:
setting a first data structure for storing the multicast group set supported by the digital communication chip;
setting a second data structure corresponding to each physical port respectively, and storing a link aggregation port identification bit of the physical port;
setting a third data structure corresponding to each physical port respectively, and storing the link aggregation port to which the physical port belongs;
setting a fourth data structure corresponding to each link aggregation port respectively, and storing the number of effective member ports matched with the link aggregation ports;
and setting a fifth data structure corresponding to each link aggregation port respectively, and storing all the standby member ports matched with the link aggregation ports.
On the basis of the foregoing embodiments, the data value updating module may further include a data value updating module, configured to update a data value of at least one of the first data structure, the second data structure, the third data structure, the fourth data structure, and the fifth data structure according to the link aggregation interface configuration update file.
The forwarding device of the link aggregation message in the digital communication chip provided by the embodiment of the invention can execute the forwarding method of the link aggregation message in the digital communication chip provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
FIG. 4 shows a schematic block diagram of an electronic device 40 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 40 includes at least one processor 41, and a memory communicatively connected to the at least one processor 41, such as a Read Only Memory (ROM) 42, a Random Access Memory (RAM) 43, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 41 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 42 or the computer program loaded from the storage unit 48 into the Random Access Memory (RAM) 43. In the RAM 43, various programs and data necessary for the operation of the electronic apparatus 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other via a bus 44. An input/output (I/O) interface 45 is also connected to bus 44.
A number of components in the electronic device 10 are connected to the I/O interface 45, including: an input unit 46 such as a keyboard, a mouse, etc.; an output unit 47 such as various types of displays, speakers, and the like; a storage unit 48 such as a magnetic disk, an optical disk, or the like; and a communication unit 49 such as a network card, modem, wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Processor 41 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. Processor 41 performs the various methods and processes described above, such as the method for forwarding link aggregation packets in a digital communication chip according to an embodiment of the present invention. Namely:
acquiring multicast group information matched with the target message, and identifying at least one alternative physical port matched with the multicast group information in the digital communication chip;
according to the query result of the link aggregation port identification bit of each alternative physical port, identifying the alternative physical port as a common physical port or a link aggregation port member port;
and forwarding the copied message of the target message through a common physical port or a target member port in a link aggregation port to which a member port of the link aggregation port belongs.
In some embodiments, the method for forwarding a link aggregation packet in a digital on chip may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 40 via the ROM 42 and/or the communication unit 49. When loaded into RAM 43 and executed by processor 41, the computer program may perform one or more of the steps of the above-described method for forwarding link aggregation messages in a digital on chip. Alternatively, in other embodiments, processor 41 may be configured to perform the forwarding method of the link aggregation packet in the digital chip by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for forwarding a link aggregation message in a communication chip is characterized by comprising the following steps:
acquiring multicast group information matched with the target message, and identifying at least one alternative physical port matched with the multicast group information in the digital communication chip;
according to the query result of the link aggregation port identification bit of each alternative physical port, identifying the alternative physical port as a common physical port or a link aggregation port member port;
and forwarding the copied message of the target message through a common physical port or a target member port in a link aggregation port to which a member port of the link aggregation port belongs.
2. The method of claim 1, wherein identifying in the digital communication chip at least one alternative physical port matching the multicast group information comprises:
in the multicast group information in the form of a bitmap, acquiring the target bitmap position of each target bit;
and identifying at least one alternative physical port matched with each target bitmap position in the digital communication chip according to the mapping relation between the bitmap position and each physical port in the digital communication chip.
3. The method according to claim 1, wherein identifying the alternative physical ports as normal physical ports or member ports of the link aggregation port according to the query result of the link aggregation port identification bits of the alternative physical ports comprises:
if the link aggregation port identification bit of the currently inquired target alternative physical port is a first identification value, identifying the target alternative physical port as a common physical port;
and if the link aggregation port identification bit of the currently inquired target alternative physical port is the second identification value, identifying the target alternative physical port as a link aggregation port member port.
4. The method of claim 1, wherein forwarding the duplicate packet of the target packet through the target member port in the link aggregation port to which the member port of the link aggregation port belongs comprises:
acquiring a currently processed target link aggregation port member port, and acquiring a target link aggregation port to which the target link aggregation port member port belongs;
inquiring the number of effective member ports matched with a target link aggregation port and all alternative member ports matched with the target link aggregation port;
and determining target member ports in all the alternative member ports according to the number of the effective member ports, and forwarding the copied message of the target message through the target member ports.
5. The method of claim 4, wherein determining the target member port among all candidate member ports based on the number of active member ports comprises:
generating a random number matched with the target message according to the message description information of the target message;
and calculating a remainder obtained by dividing the random number by the number of the effective member ports, and determining a target member port in all the candidate member ports which are sequentially arranged according to the offset of the remainder.
6. The method of claim 4, further comprising, before obtaining the multicast group information matching the target packet:
setting a first data structure for storing the multicast group set supported by the digital communication chip;
setting a second data structure corresponding to each physical port respectively, and storing a link aggregation port identification bit of the physical port;
setting a third data structure corresponding to each physical port respectively, and storing the link aggregation port to which the physical port belongs;
setting a fourth data structure corresponding to each link aggregation port respectively, and storing the number of effective member ports matched with the link aggregation ports;
and setting a fifth data structure corresponding to each link aggregation port respectively, and storing all the standby member ports matched with the link aggregation ports.
7. The method of claim 6, further comprising: and updating the data value of at least one of the first data structure, the second data structure, the third data structure, the fourth data structure and the fifth data structure according to the link aggregation port configuration update file.
8. A forwarding apparatus for a link aggregation packet in a digital communication chip, comprising:
the multicast group information acquisition module is used for acquiring multicast group information matched with the target message and identifying at least one alternative physical port matched with the multicast group information in the digital communication chip;
the alternative physical port identification module is used for respectively identifying the alternative physical ports as common physical ports or member ports of the link aggregation port according to the query result of the link aggregation port identification bits of the alternative physical ports;
and the duplicate message forwarding module is used for forwarding the duplicate message of the target message through a common physical port or a target member port in a link aggregation port to which the member port of the link aggregation port belongs.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the method of forwarding link aggregation messages in a digital chip according to any of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a processor to execute the method for forwarding the link aggregation packet in the digital communication chip according to any one of claims 1 to 7.
CN202211166462.1A 2022-09-23 2022-09-23 Method, device, equipment and medium for forwarding link aggregation message in digital communication chip Active CN115484233B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211166462.1A CN115484233B (en) 2022-09-23 2022-09-23 Method, device, equipment and medium for forwarding link aggregation message in digital communication chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211166462.1A CN115484233B (en) 2022-09-23 2022-09-23 Method, device, equipment and medium for forwarding link aggregation message in digital communication chip

Publications (2)

Publication Number Publication Date
CN115484233A true CN115484233A (en) 2022-12-16
CN115484233B CN115484233B (en) 2024-04-12

Family

ID=84394651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211166462.1A Active CN115484233B (en) 2022-09-23 2022-09-23 Method, device, equipment and medium for forwarding link aggregation message in digital communication chip

Country Status (1)

Country Link
CN (1) CN115484233B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116055426A (en) * 2023-03-06 2023-05-02 珠海星云智联科技有限公司 Method, equipment and medium for traffic offload forwarding in multi-binding mode

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103905326A (en) * 2012-12-28 2014-07-02 迈普通信技术股份有限公司 Ethernet link aggregation packet forwarding control method and network equipment
CN106685820A (en) * 2017-01-11 2017-05-17 盛科网络(苏州)有限公司 Chip implementing method for link aggregation forward domain in stack system
WO2017215390A1 (en) * 2016-06-13 2017-12-21 中兴通讯股份有限公司 Method and device for selecting data forwarding port of longitudinal stack system
CN109088820A (en) * 2018-09-21 2018-12-25 锐捷网络股份有限公司 A kind of striding equipment link aggregation method, device, computing device and storage medium
CN112202674A (en) * 2020-09-27 2021-01-08 北京物芯科技有限责任公司 Method, device, equipment and storage medium for forwarding multicast message
CN113556345A (en) * 2021-07-22 2021-10-26 锐捷网络股份有限公司 Message processing method, device, equipment and medium
CN115037565A (en) * 2022-06-02 2022-09-09 北京东土军悦科技有限公司 Multicast data forwarding method, device, network equipment, storage medium and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103905326A (en) * 2012-12-28 2014-07-02 迈普通信技术股份有限公司 Ethernet link aggregation packet forwarding control method and network equipment
WO2017215390A1 (en) * 2016-06-13 2017-12-21 中兴通讯股份有限公司 Method and device for selecting data forwarding port of longitudinal stack system
CN106685820A (en) * 2017-01-11 2017-05-17 盛科网络(苏州)有限公司 Chip implementing method for link aggregation forward domain in stack system
CN109088820A (en) * 2018-09-21 2018-12-25 锐捷网络股份有限公司 A kind of striding equipment link aggregation method, device, computing device and storage medium
CN112202674A (en) * 2020-09-27 2021-01-08 北京物芯科技有限责任公司 Method, device, equipment and storage medium for forwarding multicast message
CN113556345A (en) * 2021-07-22 2021-10-26 锐捷网络股份有限公司 Message processing method, device, equipment and medium
CN115037565A (en) * 2022-06-02 2022-09-09 北京东土军悦科技有限公司 Multicast data forwarding method, device, network equipment, storage medium and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116055426A (en) * 2023-03-06 2023-05-02 珠海星云智联科技有限公司 Method, equipment and medium for traffic offload forwarding in multi-binding mode
CN116055426B (en) * 2023-03-06 2023-06-23 珠海星云智联科技有限公司 Method, equipment and medium for traffic offload forwarding in multi-binding mode

Also Published As

Publication number Publication date
CN115484233B (en) 2024-04-12

Similar Documents

Publication Publication Date Title
CN114253979B (en) Message processing method and device and electronic equipment
CN111338806A (en) Service control method and device
CN115484233B (en) Method, device, equipment and medium for forwarding link aggregation message in digital communication chip
CN111459650B (en) Method, apparatus and medium for managing memory of dedicated processing resource
CN113778645A (en) Task scheduling method, device and equipment based on edge calculation and storage medium
CN114143196A (en) Instance configuration update method, device, apparatus, storage medium, and program product
CN114579311A (en) Method, apparatus, device and storage medium for executing distributed computing task
CN113961641A (en) Database synchronization method, device, equipment and storage medium
CN113691403A (en) Topological node configuration method, related device and computer program product
CN113468140A (en) Data migration processing method, electronic device and computer-readable storage medium
CN113438301B (en) Network load balancer, request message distribution method, program product and system
CN113285833B (en) Method and device for acquiring information
CN114615273B (en) Data transmission method, device and equipment based on load balancing system
CN116467235B (en) DMA-based data processing method and device, electronic equipment and medium
CN114827159B (en) Network request path optimization method, device, equipment and storage medium
CN115242733B (en) Message multicast method, multicast gateway, electronic device and storage medium
CN115665821A (en) Routing node hierarchy determining method, device, equipment and storage medium
CN117743467A (en) Agent node replacement method, device, equipment and storage medium
CN116954922A (en) Distributed storage method, device, equipment and medium
CN113220233A (en) Data reading method, device and system
CN116915868A (en) Network monitoring task issuing method, device, equipment and storage medium
CN116886775A (en) External exposure method and device, cluster deployment system and storage medium
CN115460201A (en) Database access method, device, equipment and medium
CN116567116A (en) Message processing method, device, programmable switch, system, equipment and medium
CN117917882A (en) Message processing method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant