WO2023280170A1 - 报文转发方法、线卡、主控卡、框式设备、电子设备及计算机可读存储介质 - Google Patents
报文转发方法、线卡、主控卡、框式设备、电子设备及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2023280170A1 WO2023280170A1 PCT/CN2022/103964 CN2022103964W WO2023280170A1 WO 2023280170 A1 WO2023280170 A1 WO 2023280170A1 CN 2022103964 W CN2022103964 W CN 2022103964W WO 2023280170 A1 WO2023280170 A1 WO 2023280170A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- routing
- forwarding
- port
- line card
- quality evaluation
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000003860 storage Methods 0.000 title claims abstract description 16
- 238000013441 quality evaluation Methods 0.000 claims abstract description 209
- 238000001303 quality assessment method Methods 0.000 claims description 67
- 238000012545 processing Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 12
- 238000011144 upstream manufacturing Methods 0.000 claims description 6
- 230000002776 aggregation Effects 0.000 claims description 4
- 238000004220 aggregation Methods 0.000 claims description 4
- 238000005516 engineering process Methods 0.000 description 10
- 238000007726 management method Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 230000003068 static effect Effects 0.000 description 7
- 230000008859 change Effects 0.000 description 5
- 238000011156 evaluation Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 241000406668 Loxodonta cyclotis Species 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 102100021984 C-C motif chemokine 4-like Human genes 0.000 description 1
- 101000777471 Homo sapiens C-C motif chemokine 4 Proteins 0.000 description 1
- 101000737602 Homo sapiens Ceramide synthase 1 Proteins 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000004744 fabric Substances 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/14—Routing performance; Theoretical aspects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/25—Routing or path finding in a switch fabric
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
Definitions
- the present disclosure relates to the technical field of communication, and in particular to a message forwarding method, a line card, a main control card, a frame device, an electronic device, and a computer-readable storage medium.
- LAG Link Aggregation, Link Aggregation
- ECMP Equal-cost Multipath Routing, Equal-cost Multipath Routing
- load sharing related technologies generally use static hash (hash) route selection technology, that is, according to the configured hash factor (such as selecting five tuples: source address, destination address, source port, destination port and protocol) Perform hash and remainder calculations.
- hash factor such as selecting five tuples: source address, destination address, source port, destination port and protocol
- the above-mentioned static hash route selection has an obvious defect, that is, for flows with the same hash result, the same member port or equal-cost path member is finally selected for forwarding.
- This method will have obvious problems in the scene where the hash distribution of the network data flow is uneven, especially in the scene where there are multiple elephant flows and mouse flows at the same time (for example, in the data center network). For example, if multiple elephant flow hashes select the same port link for forwarding, it is easy to cause congestion or even packet loss at the egress of the member link of the LAG group or ECMP group.
- DLB Dynamic Load Balance, dynamic load balancing
- the main principle of DLB is to select light-loaded members according to the load conditions of LAG/ECMP member links to forward the current message.
- DLB Dynamic Load Balance, dynamic load balancing
- Large, low election performance of routing members that meet forwarding requirements leads to poor load sharing effects, etc., resulting in the current DLB technology of some chip and equipment manufacturers limited to centralized equipment.
- distributed frame equipment because the implementation technology The above difficulty is not yet able to support the DLB function well.
- the embodiment of the present disclosure provides a message forwarding method, including at least one forwarding cycle, each forwarding cycle includes:
- the routing structure being related to the routing members of the current line card
- the main control card Sending the quality evaluation information to the main control card, so that the main control card can determine the routing members in the current line card that meet the forwarding requirements according to the quality evaluation information; and forward through the routing members that meet the forwarding requirements message.
- each forwarding cycle includes:
- each of the quality evaluation information determine routing members in each of the line cards that meet the forwarding requirements, so that each of the line cards forwards the message through the corresponding routing members that meet the forwarding requirements.
- an embodiment of the present disclosure provides a line card, including:
- a processing module configured to determine quality evaluation information of a routing structure of a current line card based on load data of the routing structure, the routing structure being related to routing members of the current line card;
- a sending module configured to send the quality assessment information to the main control card, so that the main control card can determine the routing members in the current line card that meet the forwarding requirements according to the quality assessment information;
- the forwarding module is configured to forward the message through the routing member meeting the forwarding requirement.
- an embodiment of the present disclosure provides a main control card, including:
- a receiving module configured to receive the quality evaluation information of the corresponding routing structure sent by each line card
- the processing module is configured to determine routing members in each of the line cards that meet the forwarding requirements according to the quality assessment information, so that each of the line cards can forward packets through the corresponding routing members that meet the forwarding requirements.
- an embodiment of the present disclosure provides a frame device, including the main control card described in the fourth aspect and at least one line card described in the third aspect.
- an electronic device includes:
- the one or more processors When the one or more computer programs are executed by the one or more processors, the one or more processors are made to implement the aforementioned message forwarding method.
- the embodiment of the present disclosure is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the message forwarding method as described above is implemented.
- FIG. 1 is a schematic structural diagram of a message forwarding system provided by an embodiment of the present disclosure
- FIG. 2 is a schematic flowchart of a method for forwarding a message on the line card side provided by an embodiment of the present disclosure
- Fig. 3 is a schematic flowchart of determining quality evaluation information according to load data provided by an embodiment of the present disclosure
- FIG. 4 is a schematic diagram of a message format provided by an embodiment of the present disclosure.
- FIG. 5 is a schematic diagram of a message format provided by an embodiment of the present disclosure.
- FIG. 6 is a schematic flowchart of a method for forwarding messages on the main control card side provided by an embodiment of the present disclosure
- FIG. 7 is a schematic flow diagram of determining routing members that meet forwarding requirements according to quality evaluation information provided by an embodiment of the present disclosure
- FIG. 8 is a schematic flowchart of a method for forwarding messages on the main control card side provided by an embodiment of the present disclosure
- FIG. 9 is a schematic flow diagram of determining routing members that meet forwarding requirements according to quality evaluation information provided by an embodiment of the present disclosure.
- FIG. 10 is a schematic diagram of modules of a line card provided by an embodiment of the present disclosure.
- Fig. 11 is a schematic diagram of modules of a main control card provided by an embodiment of the present disclosure.
- Embodiments described herein may be described with reference to plan views and/or cross-sectional views by way of idealized schematic illustrations of the present disclosure. Accordingly, the example illustrations may be modified according to manufacturing techniques and/or tolerances. Therefore, the embodiments are not limited to the ones shown in the drawings but include modifications of configurations formed based on manufacturing processes. Therefore, the regions illustrated in the drawings have schematic properties, and the shapes of the regions shown in the figures illustrate the specific shapes of the regions of the elements, but are not restrictive.
- the message forwarding method provided by the embodiments of the present disclosure can be applied to a message forwarding system including a main control card and multiple line cards as shown in FIG. 1 , and multiple line cards can perform data interaction with the main control card.
- Each line card includes at least a forwarding chip.
- an embodiment of the present disclosure provides a packet forwarding method, including at least one forwarding cycle.
- each forwarding cycle may include steps S11 to S13.
- step S11 the quality evaluation information of the routing structure is determined according to the load data of the routing structure of the current line card, and the routing structure is related to the routing members of the current line card.
- step S12 the quality evaluation information is sent to the main control card, so that the main control card can determine the routing member meeting the forwarding requirement in the current line card according to the quality evaluation information.
- step S13 the message is forwarded through the routing member meeting the forwarding requirement.
- the forwarding period can be preset, and its duration can be set to several seconds, several milliseconds, several microseconds, several nanoseconds, and so on.
- the routing structure can include the routing structure that has been configured with Dynamic Load Balance (DLB) on the current line card, and can also include the routing structure that has not yet been configured with DLB on the current line card; the routing structure can be the same as that of the current line card It may also be related to the routing members of other line cards in the packet forwarding system where the current line card is located.
- the load data may include configuration information of the corresponding routing structure and data characterizing the load performance of the corresponding routing structure.
- the quality evaluation information can be used to characterize the quality (or it can be called idle degree, etc.) of the corresponding routing structure.
- the routing member that meets the forwarding requirement may be the routing member that currently has no congestion or the lowest degree of congestion.
- the line card may actively send the quality assessment information to the main control card, or may send the quality assessment information to the main control card in response to receiving an acquisition request sent by the main control card.
- the main control card can directly determine the routing members that meet the forwarding requirements for the current line card based on the quality evaluation information. It is not necessary for the main control card to first collect the load data of different line cards and then determine the routing that meets the forwarding requirements for each line card based on the load data. Members make reasonable and balanced use of the data processing resources and network resources of the line card and the main control card, improve the efficiency of selecting routing members that meet the forwarding requirements, and save network resources.
- the main control card can actively notify the current line card of the routing members that meet the forwarding requirements, or can respond to receiving the acquisition information sent by the current line card. request to notify the current line card of the routing member that meets the forwarding requirements.
- the current line card can update the routing members that meet the forwarding requirements notified by the main control card to the local target routing member entries.
- the line card can directly query the local target routing membership entries to determine the current The routing member that meets the forwarding requirement forwards the message through the routing member that meets the forwarding requirement.
- the line card can ensure that the packet flow is not disordered. In the case of the sequence, continue to forward the message through the updated routing members that meet the forwarding requirements.
- the line card determines the quality evaluation information of the routing structure according to the load data of the routing structure.
- the main control card determines the routing members in the current line card that meet the forwarding requirements according to the quality evaluation information of the routing structure sent by the line card.
- the routing members that meet the forwarding requirements will also change.
- the line card forwards packets through the routing members determined by the main control card that meet the forwarding requirements, which can ensure that all packets are forwarded through the current routing members that meet the forwarding requirements, realizing dynamic
- the routing members that meet the forwarding requirements are selected to forward the message, and the load balancing is dynamically and efficiently realized among the routing members of the line card.
- the line card forwards the message through the routing members determined by the main control card that meet the forwarding requirements, instead of selecting routing members from the routing members through the static hash (hash) method to forward the message, effectively avoiding
- the problem of routing member congestion and packet loss caused by selecting the same routing member for different messages with the same hash result to forward, reduces the frequency of routing member congestion and packet loss, and improves message forwarding efficiency.
- the line card directly determines the quality evaluation information of the routing structure according to the load data of the routing structure of the current line card, and the The above quality evaluation information is sent to the main control card, so that the main control card can directly determine the routing members in the current line card that meet the forwarding requirements according to the quality evaluation information, and the line card directly forwards the message through the routing members that meet the forwarding requirements. Can.
- the main control card collects the load data of different line cards first, and then determine the routing members that meet the forwarding requirements for each line card according to the load data, which makes reasonable and balanced use of the data processing resources and network resources of the line cards and the main control card, and improves It improves the efficiency of selecting routing members that meet the forwarding requirements and saves network resources; realizes the dynamic selection of routing members for packet forwarding according to the load conditions of the routing structure, and dynamically and efficiently realizes load balancing among routing members of the line card ; There is no need to select routing members from each routing member for message forwarding through the static hash method, which effectively avoids routing member congestion and packet loss caused by selecting the same routing member for forwarding different messages with the same hash result This reduces the frequency of packet loss due to congestion among routing members and improves packet forwarding efficiency.
- the load data can include the configuration information of the corresponding routing structure and the data representing the load performance of the corresponding routing structure, then the main control card can comprehensively evaluate and calculate the quality of the routing structure according to the load data of the routing structure, so as to obtain the data that can characterize the routing structure. Quality of quality assessment information.
- the load data may include rated load data and actual load data, the rated load data may be the configuration information of the corresponding routing structure, and the actual load data may be used to characterize the load performance of the corresponding routing structure.
- the above step S11 may include steps S111 to S113.
- step S111 an initial average load index of the routing structure in the current forwarding period is determined according to the rated load data of the routing structure and the actual load data of the routing structure in the current forwarding period.
- step S112 the final average load index of the routing structure in the current forwarding cycle is determined according to the final average load index of the routing structure in the previous forwarding cycle and the initial average load index in the current forwarding cycle.
- step S113 the quality evaluation information of the routing structure in the current forwarding period is determined according to the final average load index and the rated load data of the routing structure in the current forwarding period.
- the initial average load index can already characterize the quality of the routing structure in the current forwarding cycle, but because the routing structure is usually in a continuous working state, the load of the routing structure is constantly changing during the specific work process, and the load of the current forwarding cycle is related to The load conditions of the historical forwarding cycle have a certain correlation. If only the rated load data of the routing structure and the actual load data of the routing structure in the current forwarding cycle are used to determine the quality evaluation information of the routing structure in the current forwarding cycle, there are certain limitations, and The influence of the load condition of the previous forwarding period on the load condition of the current forwarding period is not considered, which may affect the accuracy of the quality evaluation information.
- the line card can consider the impact of the load condition of the previous forwarding period on the load condition of the current forwarding period, according to the final average load index of the routing structure in the previous forwarding period and the The initial load average index determines the final average load index of the routing structure in the current forwarding cycle.
- the final average load index can also represent the quality of the routing structure in the current forwarding cycle.
- the higher the final average load index the lower the remaining load capacity of the routing structure and the lower the quality of the routing structure. But in the case of the same final average load index, the availability of the routing structure with relatively high load capacity is obviously higher than that of the routing structure with relatively low load capacity. If only the final average load index is used as the quality evaluation information, the influence of the load capacity of the routing structure on the quality of the routing structure is not considered, which may affect the accuracy of the quality evaluation information. In order to further improve the accuracy of the quality evaluation information, when evaluating and calculating the quality of the routing structure, the line card may also consider the load capacity of the routing structure.
- the load capacity of the routing structure can be reflected from the configuration information of the routing structure (that is, the rated load data).
- the line card can calculate the routing structure in the current forwarding cycle according to the final average load index and rated load data of the routing structure in the current forwarding cycle. Quality Assessment Information.
- the operation of determining the quality evaluation information of the routing structure is based on the rated load data of the routing structure and the actual load data of the routing structure in the current forwarding cycle and the final average load index of the routing structure in the previous forwarding cycle to determine the quality evaluation information of the routing structure in the current forwarding cycle.
- the above operations will also improve the accuracy of selecting routing members.
- the routing structure includes ports, the rated load data of the ports includes port bandwidth, and the actual load data of the ports includes the number of packets sent by the port.
- the following formula is used to calculate the Initial load average index for the current forwarding cycle:
- Lp is the initial average load index of the port in the current forwarding cycle
- Sp (N, t) is the port sending rate of the port in the current forwarding cycle
- N is the number of packets sent by the port in the current forwarding cycle
- t is the duration of the forwarding cycle
- Bwp is the port bandwidth of the port.
- a port is a physical egress port on a line card.
- the port bandwidth is the configuration information of the port.
- the line card can use proportional values to represent the port bandwidth.
- the port bandwidth of 10G, 40G, and 100G can be expressed as 10, 40, and 100 respectively. Of course, they can also be expressed as 1, 4, 10 or 0.1, 0.4, 1, etc. respectively.
- the port packet sending rate Sp(N, t) of the port in the current forwarding cycle is a function of the number N of packets sent by the port in the current forwarding cycle and the duration t of the forwarding cycle. There are no specific restrictions on the number N of packets sent by the port and the time period t to calculate the packet sending rate of the port. Take the port packet sending rate of the port in the current forwarding cycle as 8G and the port bandwidth of the port as 10G as an example, at this time, the initial average load index of the port in the current forwarding cycle is 0.8.
- the routing members that meet the forwarding requirements are selected for packet forwarding.
- the static hash method for selecting routing members for packet forwarding it can effectively avoid the problem of selecting the same packet for different packets with the same hash result.
- Route member congestion and packet loss problems caused by routing members forwarding thereby reducing the frequency of congestion packet loss of routing members and improving packet forwarding efficiency.
- the upstream TM (Traffic Management, traffic management) of the forwarding chip completes the QoS (Quality of Service, quality of service)
- the selected routing members are not sensitive to burst traffic, and the selection is only based on the quality of the port. Routing members that meet forwarding requirements cannot be applied to traffic burst scenarios. Therefore, in addition to selecting routing members that meet forwarding requirements based on port quality, you can also select routing members that meet forwarding requirements based on port quality and queue quality.
- the routing structure further includes a queue
- the rated load data of the queue includes the packet loss threshold of the queue
- the actual load data of the queue includes the queue depth.
- Lq is the initial average load index of the queue in the current forwarding cycle
- Dq is the queue depth of the queue in the current forwarding cycle
- Mq is the queue packet loss threshold of the queue.
- the queue is the output queue configured on the local line card for the ports of the local line card or all the ports in the packet forwarding system (including ports on the local line card and ports on other line cards).
- the queue packet loss threshold is the configuration information of the queue, which refers to the maximum packet length that can enter the queue.
- Line cards can use proportional values to represent the packet loss thresholds of queues.
- the packet loss thresholds of 10K bytes, 40K bytes, and 100K bytes can be represented as 10, 40, and 100 respectively. Of course, they can also be represented as 1 , 4, 10, or 0.1, 0.4, 1, etc., respectively.
- the initial average load index of the queue in the current forwarding cycle is 0.8.
- the message forwarding method provided by the embodiments of the present disclosure selects routing members that meet the forwarding requirements in combination with the quality of ports and queues, which is applicable to traffic burst scenarios and further improves the efficiency and accuracy of routing member selection in DLB technology.
- the queues may include: ETM (Egress Traffic Management, downstream traffic management) queues, or FTM (Fabric Traffic Management, upstream traffic management) queues.
- the ETM queue may include a downlink ETM queue configured by the ETM of the forwarding chip of the current line card for the port of the current line card.
- the FTM queue can include the uplink FTM queue configured by the FTM of the forwarding chip of the current line card for the port of the current line card, and can also include the FTM of the forwarding chip of the current line card configured for the ports of other line cards in the message forwarding system
- the FTM queue is the queue used by the upstream TM of the forwarding chip to buffer outgoing packets.
- the FTM of the forwarding chip of each line card is allocated with outgoing queues for all ports of the system.
- the line card can reasonably and comprehensively evaluate the quality of the TM queue, and select routing members that meet the forwarding requirements according to the quality of the port and the quality of the TM queue, which is applicable In traffic burst scenarios, the accuracy of routing member selection is improved.
- QoS Quality of Service, quality of service
- step S112 the following formula is used to calculate the final average load index of the routing structure in the current forwarding cycle:
- T can be used to identify the current forwarding period
- T-1 can be used to identify the previous forwarding period.
- the line card can determine the final average load index of the port in the current forwarding cycle according to the final average load index of the port in the previous forwarding cycle and the initial average load index in the current forwarding cycle.
- the line card may also determine the final average load index of the queue in the current forwarding cycle according to the final average load index of the queue in the previous forwarding cycle and the initial average load index in the current forwarding cycle.
- the line card can use the initial average load index of the routing structure in the current forwarding cycle as the routing structure in the current forwarding cycle.
- the final load average index for the period since there is no final average load index of the routing structure in the previous forwarding cycle, the line card can use the initial average load index of the routing structure in the current forwarding cycle as the routing structure in the current forwarding cycle. The final load average index for the period.
- the routing members of the current line card include ports in the LAG group and/or paths in the ECMP group. Each path in an ECMP group has a port.
- the quality evaluation information includes a correspondence between a port identifier corresponding to the routing structure and a quality evaluation value of the routing structure.
- the line card can determine the quality evaluation information of the routing structure according to the load data of the routing structure.
- the line card can first determine the The final average load index and rated load data of the routing structure in the current forwarding cycle determine the quality evaluation value of the routing structure in the current forwarding cycle, and then generate the corresponding relationship between the port identifier corresponding to the routing structure and the quality evaluation value.
- the corresponding relationship between the port identifier corresponding to the routing structure and the quality evaluation value of the routing structure may include a first corresponding relationship between the port identifier corresponding to the port and the port quality evaluation value
- the line card may First determine the port quality evaluation value of the port in the current forwarding cycle according to the final average load index and rated load data of the port in the current forwarding cycle, and then generate the first link between the port ID corresponding to the port and the port quality evaluation value of the port. Correspondence.
- the line card may use the following formula to calculate the port quality evaluation value of the port in the current forwarding cycle:
- Qp is the port quality evaluation value of the port in the current forwarding cycle
- Bwp is the port bandwidth of the port (ie rated load data).
- We(Bwp) is the weight determined according to the port bandwidth.
- the corresponding relationship between the port identifier corresponding to the routing structure and the quality evaluation value of the routing structure may also include a second corresponding relationship between the port identifier corresponding to the ETM queue and the ETM queue quality evaluation value
- the line card can first determine the ETM queue quality evaluation value of the ETM queue in the current forwarding cycle according to the final average load index and rated load data of the ETM queue in the current forwarding cycle, and then generate the port ID corresponding to the ETM queue and the ETM queue's Second correspondence between ETM cohort quality assessment values.
- the line card may use the following formula to calculate the ETM queue quality evaluation value of the ETM queue in the current forwarding cycle:
- Qeq is the ETM queue quality evaluation value of the ETM queue in the current forwarding cycle
- Meq is the queue packet loss threshold (i.e. rated load data) of the ETM queue.
- We(Meq) is the weight determined according to the packet loss threshold of the ETM queue.
- the correspondence between the port identification corresponding to the routing structure and the quality evaluation value of the routing structure may also include a third correspondence between the port identification corresponding to the FTM queue and the FTM queue quality evaluation value
- the line card can first determine the FTM queue quality evaluation value of the FTM queue in the current forwarding cycle according to the final average load index and rated load data of the FTM queue in the current forwarding cycle, and then generate the port ID corresponding to the FTM queue and the FTM queue A third correspondence between FTM cohort quality assessment values.
- the line card may use the following formula to calculate the FTM queue quality evaluation value of the FTM queue in the current forwarding cycle:
- Qfq is the FTM queue quality evaluation value of the FTM queue in the current forwarding cycle
- Mfq is the queue packet loss threshold (i.e. rated load data) of the FTM queue.
- We(Mfq) is the weight determined according to the packet loss threshold of the FTM queue.
- the above step S12 may include: the line card actively sends the quality evaluation information to the main control card, or the line card sends the quality evaluation information to the main control card in response to the acquisition request of the main control card. That is to say, the line card may actively send the quality assessment information of the routing structure to the main control card, or the main control card may actively obtain the quality assessment information of the routing structure from the line card.
- the line card may send the quality evaluation information to the main control card through an Ethernet channel or a PCI-E channel, and the message forwarding method provided in the embodiment of the present disclosure does not specifically limit this.
- the line card can send the quality assessment information in the message format shown in Figure 4, which includes a message header, slot number, chip number, and quality assessment information.
- the line card can send the quality assessment information in the message format shown in Figure 5, which includes slot number, chip number and quality assessment information.
- the message header in the message format as shown in Figure 4 can include a message type field, a message subtype field and a message length field, the message type field is used to indicate that this message is a quality evaluation information notification message, and the message subtype field is used for Indicates that the information notified by this message is any of the following: port quality assessment information, port quality assessment information and ETM queue quality assessment information, port quality assessment information and FTM queue quality assessment information.
- the quality assessment information of the port may include the first correspondence between the port identifier and the port quality assessment value
- the quality assessment information of the ETM queue may include the second correspondence between the port identifier and the ETM queue quality assessment value
- the quality assessment information of the FTM queue The evaluation information may include a third correspondence between the port identifier and the FTM queue quality evaluation value.
- an embodiment of the present disclosure provides a message forwarding method, including at least one forwarding cycle.
- each forwarding cycle may include steps S21 and S22.
- step S21 the quality evaluation information of the corresponding routing structure sent by each line card is received.
- step S22 according to each of the quality evaluation information, determine routing members in each of the line cards that meet the forwarding requirements, so that each of the line cards forwards the message through the corresponding routing members that meet the forwarding requirements.
- the line card directly determines the quality evaluation information of the routing structure according to the load data of the routing structure of the current line card, and the The above quality evaluation information is sent to the main control card, so that the main control card can directly determine the routing members in the current line card that meet the forwarding requirements according to the quality evaluation information, and the line card directly forwards the message through the routing members that meet the forwarding requirements. Can.
- the main control card collects the load data of different line cards first, and then determine the routing members that meet the forwarding requirements for each line card according to the load data, which makes reasonable and balanced use of the data processing resources and network resources of the line cards and the main control card, and improves It improves the efficiency of selecting routing members that meet the forwarding requirements and saves network resources; realizes the dynamic selection of routing members for packet forwarding according to the load conditions of the routing structure, and dynamically and efficiently realizes load balancing among routing members of the line card ; There is no need to select routing members from each routing member for message forwarding through the static hash method, which effectively avoids routing member congestion and packet loss caused by selecting the same routing member for forwarding different messages with the same hash result This reduces the frequency of packet loss due to congestion among routing members and improves packet forwarding efficiency.
- the quality evaluation information includes the correspondence between the port identifier corresponding to the routing structure and the quality evaluation value of the routing structure.
- the step S22 may include steps S221 and S222.
- step S221 according to the correspondence sent by the line card to be calculated, determine the quality evaluation value corresponding to the port identifier of each routing member of the line card to be calculated.
- step S222 according to each of the quality evaluation values, the routing members meeting the forwarding requirement in the line card to be calculated are determined.
- Routing members may include ports in a LAG group, or paths in an ECMP group, with each path in the ECMP group having a port.
- the main control card can determine the port identifier of each routing member of the line card to be calculated, and for any LAG group of the line card to be calculated, the main control card can obtain the locally saved Port identifiers of all ports in the LAG group.
- LAG1 group has three ports, and the port identifiers are port1, port2, and port100.
- the main control card can obtain and record the port identifiers of the ports of all paths in the ECMP group.
- the main control card may query the correspondence between the port identifier sent by the line card to be calculated and the quality evaluation value according to the port identifiers of the routing members of the line card to be calculated, so as to respectively determine The quality evaluation value corresponding to each routing member of the line card to be calculated.
- the number of quality evaluation values corresponding to each routing member of the line card to be calculated can be one, and the main control card can determine the highest value among the quality evaluation values corresponding to each routing member, and the corresponding quality evaluation value of the highest value
- the routing member is determined as the routing member that meets the forwarding requirements in the line card to be calculated;
- the number of quality evaluation values corresponding to each routing member of the line card to be calculated can also be multiple, and for each routing member, the master
- the control card can determine the comprehensive quality evaluation value corresponding to each routing member according to the multiple quality evaluation values corresponding to each routing member, and then determine the highest value among the comprehensive quality evaluation values corresponding to each routing member, and the highest value
- the routing member corresponding to the value is determined as the routing member meeting the forwarding requirement in the line card to be calculated.
- the routing structure includes a port
- the correspondence between the port identifier corresponding to the routing structure and the quality evaluation value of the routing structure includes: the port identifier corresponding to the port and the port ID of the port The first correspondence between quality assessment values.
- step S221 may include: determining the line to be calculated according to the first correspondence between the port identifier corresponding to the port sent by the line card to be calculated and the port quality evaluation value of the port.
- Step S222 may include: determining the routing members in the line card to be calculated that meet the forwarding requirements according to the port quality evaluation values.
- the routing structure further includes an ETM queue
- the correspondence between the port identifier corresponding to the routing structure and the quality evaluation value of the routing structure further includes: the port identifier corresponding to the ETM queue and the The second corresponding relationship between the ETM queue quality assessment values of the above ETM queues.
- the ETM queue may include a downlink ETM queue configured by the ETM of the forwarding chip of the current line card for the port of the current line card.
- the quality assessment information sent by the line card is the correspondence between the port identifier and the quality assessment value, except for the port identifier corresponding to the port and the port quality assessment value of the port In addition to the first corresponding relationship, it also includes a second corresponding relationship between the port identifier corresponding to the ETM queue and the ETM queue quality evaluation value of the ETM queue.
- step S221 may include: according to the first corresponding relationship between the port identifier corresponding to the port sent by the line card to be calculated and the port quality evaluation value of the port and the ETM queue
- the second corresponding relationship between the corresponding port identifier and the ETM queue quality evaluation value of the ETM queue is to determine the port quality evaluation value corresponding to the port identifier of each routing member of the line card to be calculated and the ETM queue ETM of the ETM queue.
- Cohort quality assessment value may include: determining, according to each of the port quality evaluation values and each of the ETM queue quality evaluation values, the routing members in the line card to be calculated that meet the forwarding requirements.
- the main control card can determine the comprehensive quality evaluation value corresponding to each routing member according to the port quality evaluation value and the ETM queue quality evaluation value corresponding to each routing member , for example, in some implementation manners, the line card may use the following formula to calculate the comprehensive quality assessment value:
- Qp is the port quality evaluation value
- Qeq is the ETM cohort quality assessment value
- the main control card can determine the highest value among the comprehensive quality evaluation values corresponding to each routing member, and determine the routing member corresponding to the highest value as the routing member that meets the forwarding requirements.
- each line card may be configured with FTM queues for each routing member (including port) of the line card to be calculated. Therefore, in order to comprehensively evaluate the line card to be calculated The availability of each routing member in the card also needs to be combined with the quality evaluation information sent by other line cards in each line card to select a routing member that meets the forwarding requirements for the line card to be calculated.
- the step S22 may include step S22'.
- step S22' according to the quality assessment information sent by the line card to be calculated and the quality assessment information sent by other line cards in each line card, it is determined that the forwarding requirement is met in the line card to be calculated routing members.
- the routing structure includes a port and an FTM queue
- the quality evaluation information includes a first correspondence between a port identifier corresponding to the port and a port quality evaluation value of the port and the FTM
- the FTM queue can include the uplink FTM queue configured by the FTM of the forwarding chip of the current line card for the port of the current line card, and can also include the FTM of the forwarding chip of the current line card configured for the ports of other line cards in the message forwarding system
- the FTM queue is the queue used by the upstream TM of the forwarding chip to buffer outgoing packets.
- the FTM of the forwarding chip of each line card is allocated with outgoing queues for all ports of the system.
- the step S22' may include steps S221' to S223'.
- step S221' according to the first correspondence sent by the line card to be calculated, determine the port quality evaluation value corresponding to the port identifier of each routing member of the line card to be calculated.
- step S222' according to the third correspondence sent by the line card to be calculated and the third correspondence sent by the other line cards, determine the routing members of the line card to be calculated Each FTM queue quality evaluation value corresponding to the port ID.
- step S223' according to the port quality evaluation value corresponding to the port identifier of each routing member of the line card to be calculated and the quality evaluation value of each FTM queue, determine the route that meets the forwarding requirements in the line card to be calculated member.
- the main control card can determine the port ID of each routing member in any LAG group or any ECMP group, and query the port sent by the line card to be calculated according to the port ID of each routing member
- the first corresponding relationship between the identifier and the port quality evaluation value is used to respectively determine the port quality evaluation value corresponding to each routing member.
- the main control card can query the relationship between the port identification sent by the line card to be calculated and the port identification sent by other line cards in each line card and the FTM queue quality evaluation value according to the port identification of each routing member.
- the third correspondence is used to respectively determine the quality evaluation values of the FTM queues corresponding to the routing members.
- Qp is the port quality evaluation value
- Qfq is the comprehensive quality assessment value of the FTM cohort.
- the main control card may determine the highest value among the comprehensive quality evaluation values corresponding to each routing member, and determine the routing member corresponding to the highest value as the routing member meeting the forwarding requirement.
- the line card includes a processing module 101, a sending module 102, and a forwarding module 103.
- the processing module 101 is configured to determine the quality evaluation information of the routing structure according to the load data of the routing structure of the current line card, and the routing structure is related to the routing members of the current line card.
- the sending module 102 is configured to send the quality assessment information to the main control card, so that the main control card can determine the routing members meeting the forwarding requirements in the current line card according to the quality assessment information.
- the forwarding module 103 is configured to forward the message through the routing member meeting the forwarding requirement.
- the load data includes rated load data and actual load data
- the processing module 101 is configured to:
- the quality evaluation information of the routing structure in the current forwarding cycle is determined according to the final average load index and the rated load data of the routing structure in the current forwarding cycle.
- the routing structure includes ports
- the rated load data of the ports includes port bandwidth
- the actual load data of the ports includes the number of packets sent by the port
- the processing module 101 uses the following formula to calculate the current The initial load average index for the forwarding cycle:
- Lp is the initial average load index of the port in the current forwarding cycle
- Sp (N, t) is the port sending rate of the port in the current forwarding cycle
- N is the number of packets sent by the port in the current forwarding cycle
- t is the duration of the forwarding cycle
- Bwp is the port bandwidth of the port.
- the routing structure further includes a queue
- the rated load data of the queue includes the packet loss threshold of the queue
- the actual load data of the queue includes the queue depth
- the processing module 101 calculates the queue by using the following formula The initial load average index in the current forwarding cycle:
- Lq is the initial average load index of the queue in the current forwarding cycle
- Dq is the queue depth of the queue in the current forwarding cycle
- Mq is the queue packet loss threshold of the queue.
- the queues include: downlink traffic management ETM queues, or uplink traffic management FTM queues.
- the processing module 101 uses the following formula to calculate the final average load index of the routing structure in the current forwarding cycle:
- the routing members of the current line card include ports in the link aggregation LAG group, and/or paths in the Equal Cost Multipath Routing ECMP group.
- the quality evaluation information includes a correspondence between a port identifier corresponding to the routing structure and a quality evaluation value of the routing structure.
- an embodiment of the present disclosure provides a main control card.
- the main control card includes a receiving module 201 and a processing module 202 .
- the receiving module 201 is configured to receive the quality evaluation information of the corresponding routing structure sent by each line card.
- the processing module 202 is configured to determine routing members in each of the line cards that meet the forwarding requirements according to the quality evaluation information, so that each of the line cards forwards packets through the corresponding routing members that meet the forwarding requirements.
- the quality evaluation information includes the correspondence between the port identifier corresponding to the routing structure and the quality evaluation value of the routing structure, and for any line card to be calculated, the processing module 202 configures for:
- the routing structure includes a port
- the correspondence between the port identifier corresponding to the routing structure and the quality evaluation value of the routing structure includes: the port identifier corresponding to the port and the port ID of the port The first correspondence between quality assessment values.
- the routing structure further includes an ETM queue
- the correspondence between the port identifier corresponding to the routing structure and the quality evaluation value of the routing structure further includes: the port identifier corresponding to the ETM queue and the The second corresponding relationship between the ETM queue quality assessment values of the above ETM queues.
- the processing module 202 is configured to, according to the quality evaluation information sent by the line card to be calculated and the information sent by other line cards in each line card The quality evaluation information of the to-be-calculated line card is determined to meet the forwarding requirements of the routing members.
- the routing structure includes a port and an FTM queue
- the quality evaluation information includes a first correspondence between a port identifier corresponding to the port and a port quality evaluation value of the port and the FTM
- the processing module 202 is configured to
- the third corresponding relationship sent by the line card to be calculated and the third corresponding relationship sent by the other line cards determine each corresponding to the port identifier of each routing member of the line card to be calculated. FTM cohort quality assessment values;
- the port quality evaluation value corresponding to the port identifier of each routing member of the line card to be calculated and the quality evaluation value of each FTM queue determine the routing member in the line card to be calculated that meets the forwarding requirement.
- an embodiment of the present disclosure further provides a frame-type device, where the frame-type device includes the foregoing main control card and at least one foregoing line card.
- Example 1 Select routing members based on port load data.
- the line card obtains the load data of all ports on the line card, and the load data includes the port bandwidth and the number of packets sent by the port. Specifically, the line card collects the number of packets sent by each port, and obtains the pre-configured port bandwidth of each port.
- the line card calculates the port packet sending rate according to the number of port packets sent by the port, and calculates the initial average load index of the port in the current forwarding cycle according to the port packet sending rate and port bandwidth; Calculate the final average load index of the port in the current forwarding cycle based on the average load index and the final average load index of the port in the previous forwarding cycle; calculate the port quality of the port based on the final average load index and port bandwidth of the port in the current forwarding cycle evaluation value, and generate a first correspondence between the port identifier of the port and the port quality evaluation value (that is, the port quality evaluation information).
- the line card sends the quality evaluation information to the main control card in the message format shown in Figure 4.
- the message header includes a message type field, a message subtype field, and a message length field.
- the message type field is used to indicate that the message is a quality evaluation Information notification message
- the message subtype field is used to indicate that the message notified is the quality evaluation information of the port.
- the main control card After the main control card receives each quality evaluation information sent by each line card, for any line card to be calculated, the main control card determines one by one the LAG groups or the routing members in each ECMP group of the line card to be calculated. Routing members that meet forwarding requirements. Specifically, the main control card determines the port identification of each routing member in the current LAG group or the current ECMP group, and queries the relationship between the port identification sent by the line card to be calculated and the port quality evaluation value according to the port identification of each routing member. The first corresponding relationship is used to respectively determine the port quality evaluation value corresponding to each routing member. The main control card determines the highest value among the port quality evaluation values corresponding to each routing member, and determines the routing member corresponding to the highest value as the routing member meeting the forwarding requirement.
- the main control card notifies each line card of routing members in each LAG group or each ECMP group that meet the forwarding requirements.
- Each line card updates the target routing member table entry of the local forwarding chip according to the routing members of each LAG group or each ECMP group notified by the main control card that meets the forwarding requirements.
- the forwarding chip of the line card queries the target routing member entry to determine the current routing member that meets the forwarding requirements. Routing members forward packets. It should be noted that if there is a packet flow that has not been forwarded completely, and the change of the target routing member table entry changes the routing member that meets the forwarding requirements queried by the line card, the line card can ensure that the packet flow is not disordered. In the case of the sequence, continue to forward the message through the updated routing members that meet the forwarding requirements.
- Example 2 Routing members are selected based on the load data of the port and the load data of the ETM queue.
- the line card obtains the load data of all ports on the line card and the load data of the ETM queue.
- the load data of the port includes the port bandwidth and the number of packets sent by the port.
- the load data of the ETM queue includes the packet loss threshold of the ETM queue and the depth of the ETM queue. Specifically, the line card collects the number of packets sent by each port and the queue depth of the ETM queue of each port, and obtains the pre-configured port bandwidth of each port and the ETM queue packet loss threshold of the ETM queue configured for each port.
- the line card calculates the port packet sending rate according to the number of port packets sent by the port, and calculates the initial average load index of the port in the current forwarding cycle according to the port packet sending rate and port bandwidth; Calculate the final average load index of the port in the current forwarding cycle based on the average load index and the final average load index of the port in the previous forwarding cycle; calculate the port quality of the port based on the final average load index and port bandwidth of the port in the current forwarding cycle evaluation value, and generate a first correspondence between the port identifier of the port and the port quality evaluation value (that is, the port quality evaluation information).
- the line card calculates the initial average load index of the ETM queue in the current forwarding cycle according to the ETM queue packet loss threshold and the ETM queue depth of the ETM queue; Calculate the final average load index of the ETM queue in the current forwarding cycle based on the average load index and the final average load index of the ETM queue in the previous forwarding cycle; according to the final average load index of the ETM queue in the current forwarding cycle and the queue loss of the ETM queue
- the packet threshold calculates the ETM queue quality assessment value of the ETM queue, and generates a second corresponding relationship between the port identifier of the ETM queue and the ETM queue quality assessment value (ie, the quality assessment information of the ETM queue).
- the line card sends the quality evaluation information to the main control card in the message format shown in Figure 4.
- the message header includes a message type field, a message subtype field, and a message length field.
- the message type field is used to indicate that the message is a quality evaluation Information notification message
- the message subtype field is used to indicate that this message notifies the quality assessment information of the port and the quality assessment information of the ETM queue.
- the main control card determines one by one that meets the forwarding requirements in each LAG group or each routing member in each ECMP group of the line card to be calculated routing members. Specifically, the main control card determines the port identification of each routing member in the current LAG group or the current ECMP group, and queries the relationship between the port identification sent by the line card to be calculated and the port quality evaluation value according to the port identification of each routing member. The first corresponding relationship and the second corresponding relationship between the port identifier and the ETM queue quality evaluation value are used to respectively determine the port quality evaluation value and the ETM queue quality evaluation value corresponding to each routing member.
- comprehensive quality Evaluation value port quality evaluation value * port weight + ETM queue quality evaluation value * queue weight.
- the main control card notifies each line card of routing members in each LAG group or each ECMP group that meet the forwarding requirements.
- Each line card updates the target routing member table entry of the local forwarding chip according to the routing members of each LAG group or each ECMP group notified by the main control card that meets the forwarding requirements.
- the forwarding chip of the line card queries the target routing member entry to determine the current routing member that meets the forwarding requirements. Routing members forward packets. It should be noted that if there is a packet flow that has not been forwarded completely, and the change of the target routing member table entry changes the routing member that meets the forwarding requirements queried by the line card, the line card can ensure that the packet flow is not disordered. In the case of the sequence, continue to forward the message through the updated routing members that meet the forwarding requirements.
- Example 3 Select routing members based on the load data of the port and the load data of the FTM queue.
- the line card obtains the load data of all ports on the line card and the load data of the FTM queue.
- the load data of the port includes the port bandwidth and the number of packets sent by the port.
- the load data of the FTM queue includes the packet loss threshold of the FTM queue and the depth of the FTM queue. Specifically, the line card collects the number of packets sent by each port and the queue depth of the FTM queue of each port, and obtains the pre-configured port bandwidth of each port and the FTM queue packet loss threshold of the FTM queue configured for each port.
- the line card calculates the port packet sending rate according to the number of port packets sent by the port, and calculates the initial average load index of the port in the current forwarding cycle according to the port packet sending rate and port bandwidth; Calculate the final average load index of the port in the current forwarding cycle based on the average load index and the final average load index of the port in the previous forwarding cycle; calculate the port quality of the port based on the final average load index and port bandwidth of the port in the current forwarding cycle evaluation value, and generate a first correspondence between the port identifier of the port and the port quality evaluation value (that is, the port quality evaluation information).
- the line card calculates the initial average load index of the FTM queue in the current forwarding cycle according to the FTM queue packet loss threshold and the FTM queue depth of the FTM queue;
- the average load index and the final average load index of the FTM queue in the last forwarding cycle calculate the final average load index of the FTM queue in the current forwarding cycle; according to the final average load index of the FTM queue in the current forwarding cycle and the queue loss of the FTM queue
- the packet threshold calculates the FTM queue quality assessment value of the FTM queue, and generates a third correspondence between the port identifier of the FTM queue and the FTM queue quality assessment value (ie, the quality assessment information of the FTM queue).
- the line card sends the quality evaluation information to the main control card in the message format shown in Figure 4.
- the message header includes a message type field, a message subtype field, and a message length field.
- the message type field is used to indicate that the message is a quality evaluation
- the message subtype field is used to indicate that the quality evaluation information of the port and the quality evaluation information of the FTM queue notified by this message.
- the main control card determines one by one that meets the forwarding requirements in each LAG group or each routing member in each ECMP group of the line card to be calculated routing members. Specifically, the main control card determines the port identification of each routing member in the current LAG group or the current ECMP group, and queries the relationship between the port identification sent by the line card to be calculated and the port quality evaluation value according to the port identification of each routing member.
- the first correspondence is to respectively determine the port quality evaluation value corresponding to each routing member, and query the third correspondence between the port identification sent by the line card to be calculated and sent by other line cards and the FTM queue quality evaluation value relationship, so as to respectively determine the quality evaluation value of each FTM queue corresponding to each routing member.
- the main control card can first determine the FTM queue comprehensive quality evaluation value corresponding to the routing member according to the multiple FTM queue quality evaluation values corresponding to the routing member:
- FTM queue Comprehensive quality evaluation value port1FTM queue quality evaluation value sent by line card 1 + port1FTM queue quality evaluation value sent by line card 2 + ... + port1FTM queue quality evaluation value sent by line card n, port1 is the port identifier of the current routing member.
- comprehensive quality assessment value port quality assessment value * port weight + FTM queue comprehensive quality assessment value * Queue weight.
- the main control card determines the routing member with the highest comprehensive quality evaluation value in each LAG group or each ECMP group as the routing member meeting the forwarding requirement.
- the main control card notifies each line card of routing members in each LAG group or each ECMP group that meet the forwarding requirements.
- Each line card updates the target routing member table entry of the local forwarding chip according to the routing members of each LAG group or each ECMP group notified by the main control card that meets the forwarding requirements.
- the forwarding chip of the line card queries the target routing member entry to determine the current routing member that meets the forwarding requirements. Routing members forward packets. It should be noted that if there is a packet flow that has not been forwarded completely, and the change of the target routing member table entry changes the routing member that meets the forwarding requirements queried by the line card, the line card can ensure that the packet flow is not disordered. In the case of the sequence, continue to forward the message through the updated routing members that meet the forwarding requirements.
- An embodiment of the present disclosure also provides an electronic device, including:
- the one or more processors When the one or more computer programs are executed by the one or more processors, the one or more processors are made to implement the aforementioned message forwarding method.
- An embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the message forwarding method as described above is implemented.
- the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components. Components cooperate to execute.
- Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit circuit.
- Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
- computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media.
- Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer.
- communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本公开提供一种报文转发方法,包括至少一个转发周期,每个转发周期都包括:根据当前线卡的路由结构的负载数据确定所述路由结构的质量评估信息,所述路由结构与所述当前线卡的路由成员相关;将所述质量评估信息发送至主控卡,以供所述主控卡根据所述质量评估信息确定所述当前线卡中符合转发需求的路由成员;以及通过所述符合转发需求的路由成员转发报文。本公开还提供一种线卡、一种主控卡、一种框式设备、一种电子设备及一种计算机可读存储介质。
Description
相关申请的交叉引用
本申请要求于2021年7月7日提交的中国专利申请NO.202110766119.X的优先权,该中国专利申请的内容通过引用的方式整体合并于此。
本公开涉及通信技术领域,具体涉及报文转发方法、线卡、主控卡、框式设备、电子设备及计算机可读存储介质。
随着网络规模的不断扩大以及对网络业务的可靠性要求越来越高,LAG(Link Aggregation,链路聚合)和ECMP(Equal-cost Multipath Routing,等价多径路由)负载均衡技术已经在网络设备上广泛应用。当LAG和ECMP实现负载分担时,相关技术一般采用静态哈希(hash)选路技术,即根据配置的hash因子(比如选取五元组:源地址、目的地址、源端口、目的端口和协议)进行hash及求余计算。对于同一个LAG组或同一个ECMP组,hash计算求余值不同的数据流,会选择不同的成员端口或不同的等价路径成员进行转发,从而实现负载分担。上述的静态hash选路有一个较为明显的缺陷,就是对于hash结果相同的流,最后都选择了相同的成员端口或等价路径成员转发。该方法在网络数据流hash分布不均匀的场景中,尤其是在同时存在多个大象流和老鼠流的场景中(例如在数据中心网络中)会存在比较明显的问题。举个例子,如果多个大象流hash选择了同一条端口链路上进行转发,就很容易造成LAG组或ECMP组的该条成员链路出口拥塞甚至丢包。
DLB(Dynamic Load Balance,动态负载均衡)技术是解决上述静态hash选路缺陷的一种新的技术。DLB的主要原理是根据LAG/ECMP成员链路的负载情况来选取负载轻的成员,以进行当前报文的转发。然而,DLB在分布式设备上实施时还存在一些技术难点,例如实时采集分布在不同线卡的LAG/ECMP成员端口的负载数据的难度较大、大量实时负载数据消息对带外带宽的消耗较大、符合转发需求的路由成员的选举性能低导致负载分担效果不好等等,导致当前一些芯片及设备厂家的DLB技术局限在集中式设备中实现,在分布式框式设备中,因为实现技术上的难度尚无法很好地支持DLB功能。
公开内容
第一方面,本公开实施例提供一种报文转发方法,包括至少一个转发周期,每个转发周期都包括:
根据当前线卡的路由结构的负载数据确定所述路由结构的质量评估信息,所述路由结构与所述当前线卡的路由成员相关;
将所述质量评估信息发送至主控卡,以供所述主控卡根据所述质量评估信息确定所述当前线卡中符合转发需求的路由成员;以及通过所述符合转发需求的路由成员转发报文。
第二方面,本公开实施例提供一种报文转发方法,包括至少一个转发周期,每个转发周期都包括:
接收各个线卡发送的相应路由结构的质量评估信息;以及
根据各所述质量评估信息确定各个所述线卡中符合转发需求的路由成员,以供各个所述线卡通过相应的所述符合转发需求的路由成员转发报文。
第三方面,本公开实施例提供一种线卡,包括:
处理模块,配置为根据当前线卡的路由结构的负载数据确定所述路由结构的质量评估信息,所述路由结构与所述当前线卡的路由成员相关;
发送模块,配置为将所述质量评估信息发送至主控卡,以供所述主控卡根据所述质量评估信息确定所述当前线卡中符合转发需求 的路由成员;以及
转发模块,配置为通过所述符合转发需求的路由成员转发报文。
第四方面,本公开实施例提供一种主控卡,包括:
接收模块,配置为接收各个线卡发送的相应路由结构的质量评估信息;以及
处理模块,配置为根据各所述质量评估信息确定各个所述线卡中符合转发需求的路由成员,以供各个所述线卡通过相应的所述符合转发需求的路由成员转发报文。
第五方面,本公开实施例提供一种框式设备,包括如第四方面所述的主控卡和至少一个如第三方面所述的线卡。
第六方面,本公开实施例一种电子设备,包括:
一个或多个处理器;以及
存储装置,其上存储有一个或多个计算机程序;
当所述一个或多个计算机程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如前所述的报文转发方法。
第七方面,本公开实施例一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如前所述的报文转发方法。
图1是本公开实施例提供的报文转发系统的结构示意图;
图2是本公开实施例提供的线卡侧报文转发方法的流程示意图;
图3是本公开实施例提供的根据负载数据确定质量评估信息的流程示意图;
图4是本公开实施例提供的一种报文格式示意图;
图5是本公开实施例提供的一种报文格式示意图;
图6是本公开实施例提供的一种主控卡侧报文转发方法的流程示意图;
图7是本公开实施例提供的一种根据质量评估信息确定符合转发需求的路由成员的流程示意图;
图8是本公开实施例提供的一种主控卡侧报文转发方法的流程示意图;
图9是本公开实施例提供的一种根据质量评估信息确定符合转发需求的路由成员的流程示意图;
图10是本公开实施例提供的线卡的模块示意图;以及
图11是本公开实施例提供的主控卡的模块示意图。
在下文中将参考附图更充分地描述示例实施例,但是所述示例实施例可以以不同形式来体现,且本公开不应当被解释为限于本文阐述的实施例。提供这些实施例的目的在于使本公开更加透彻和完整,并使本领域技术人员充分理解本公开的范围。
如本文所使用的,术语“和/或”包括一个或多个相关列举条目的任何和所有组合。
本文所使用的术语仅用于描述特定实施例,且不意欲限制本公开。如本文所使用的,单数形式“一个”和“该”也意欲包括复数形式,除非上下文另外清楚指出。还将理解的是,当本说明书中使用术语“包括”和/或“由……制成”时,指定存在特定特征、整体、步骤、操作、元件和/或组件,但不排除存在或可添加一个或多个其他特征、整体、步骤、操作、元件、组件和/或其群组。
本文所述实施例可借助本公开的理想示意图而参考平面图和/或截面图进行描述。因此,可根据制造技术和/或容限来修改示例图示。因此,实施例不限于附图中所示的实施例,而是包括基于制造工艺而形成的配置的修改。因此,附图中例示的区具有示意性属性,并且图中所示区的形状例示了元件的区的具体形状,但并不是限制性的。
除非另外限定,否则本文所用的所有术语(包括技术术语和科学术语)的含义与本领域普通技术人员通常理解的含义相同。还将理解,诸如在常用字典中限定的那些术语应当被解释为具有与其在相关技术以及本公开的背景下的含义一致的含义,且将不解释为具有理想化或过度形式上的含义,除非本文明确如此限定。
本公开实施例所提供的报文转发方法,可以应用于如图1所示的包括主控卡及多张线卡的报文转发系统,多张线卡均可以与主控卡进行数据交互,每张线卡至少包括转发芯片。
如图2所示,本公开实施例提供一种报文转发方法,包括至少一个转发周期,当所述报文转发方法应用于线卡时,每个转发周期都可以包括步骤S11至S13。
在步骤S11中,根据当前线卡的路由结构的负载数据确定所述路由结构的质量评估信息,所述路由结构与所述当前线卡的路由成员相关。
在步骤S12中,将所述质量评估信息发送至主控卡,以供所述主控卡根据所述质量评估信息确定所述当前线卡中符合转发需求的路由成员。
在步骤S13中,通过所述符合转发需求的路由成员转发报文。
转发周期可以预先设定,其时长可以被设定为数秒、数毫秒、数微秒、数纳秒等等。路由结构可以包括当前线卡上已进行过动态负载均衡(Dynamic Load Balance,DLB)配置的路由结构,还可以包括当前线卡上还未进行过DLB配置的路由结构;路由结构可以与当前线卡的路由成员相关,还可以与当前线卡所在的报文转发系统中的其他线卡的路由成员相关。负载数据可以包括相应路由结构的配置信息以及表征相应路由结构的负载性能的数据。质量评估信息可用以表征相应路由结构的质量(或可称空闲程度等等)。符合转发需求的路由成员可以是当前不存在拥塞或拥塞程度最低的路由成员。
线卡可以主动将质量评估信息发送至主控卡,也可以响应于接收到主控卡发送的获取请求而将质量评估信息发送至主控卡。主控卡则可以直接根据质量评估信息为当前线卡确定出符合转发需求的路由成员,无需主控卡先分别采集不同线卡的负载数据再根据负载数据为各个线卡确定符合转发需求的路由成员,合理并均衡地利用了线卡及主控卡的数据处理资源和网络资源,提高了选择符合转发需求的路由成员的效率,节省了网络资源。
在根据质量评估信息确定出当前线卡中符合转发需求的路由成 员之后,主控卡可以主动将该符合转发需求的路由成员通知给当前线卡,也可以响应于接收到当前线卡发送的获取请求而将该符合转发需求的路由成员通知给当前线卡。当前线卡可以将主控卡通知的符合转发需求的路由成员更新至本地的目标路由成员表项,当需要进行报文转发时,线卡可以直接查询本地的目标路由成员表项,以确定当前符合转发需求的路由成员,通过该符合转发需求的路由成员转发报文。需要说明的是,若存在报文流还未被转发完毕,且目标路由成员表项发生变化导致线卡查询到的符合转发需求的路由成员发生变化,则线卡可以在保证报文流不乱序的情况下,通过更新后的符合转发需求的路由成员继续转发报文。
线卡根据路由结构的负载数据确定路由结构的质量评估信息,主控卡根据线卡发送的路由结构的质量评估信息确定当前线卡中符合转发需求的路由成员,当路由结构的负载数据发生变化时,符合转发需求的路由成员也将发生变化。在每个转发周期中,线卡均通过主控卡确定出的符合转发需求的路由成员转发报文,能够确保所有的报文均是通过当前的符合转发需求的路由成员转发的,实现了动态地根据路由结构的负载情况来选取符合转发需求的路由成员进行报文转发,在线卡的各路由成员之间动态高效地实现了负载均衡。并且,线卡是通过主控卡确定出的符合转发需求的路由成员转发报文,而不是通过静态哈希(hash)的方法从各路由成员中选取路由成员进行报文转发,有效地避免了由于为hash结果相同的不同报文选择相同的路由成员进行转发而导致的路由成员拥塞、丢包的问题,减小了路由成员的拥塞丢包频率,提高了报文转发效率。
通过上述步骤S11至S13可以看出,在本公开实施例所提供的报文转发方法中,线卡直接根据当前线卡的路由结构的负载数据确定所述路由结构的质量评估信息,并将所述质量评估信息发送至主控卡,以供主控卡直接根据所述质量评估信息确定当前线卡中符合转发需求的路由成员,线卡直接通过所述符合转发需求的路由成员转发报文即可。无需主控卡先分别采集不同线卡的负载数据再根据负载数据为各个线卡确定符合转发需求的路由成员,合理并均衡地利用了线卡及 主控卡的数据处理资源和网络资源,提高了选择符合转发需求的路由成员的效率,节省了网络资源;实现了动态地根据路由结构的负载情况来选取路由成员进行报文转发,在线卡的各路由成员之间动态高效地实现了负载均衡;也无需通过静态hash的方法从各路由成员中选取路由成员进行报文转发,有效地避免了由于为hash结果相同的不同报文选择相同的路由成员进行转发而导致的路由成员拥塞、丢包的问题,减小了路由成员的拥塞丢包频率,提高了报文转发效率。
为路由结构所配置的负载上限越大、路由结构本身的负载性能越高,则与路由结构相关的路由成员的可用性程度也将越高。负载数据可以包括相应路由结构的配置信息以及表征相应路由结构的负载性能的数据,则主控卡可以根据路由结构的负载数据来对路由结构的质量进行综合评估计算,以得到可以表征路由结构的质量的质量评估信息。相应的,在一些实施方式中,所述负载数据可以包括额定负载数据和实际负载数据,额定负载数据可以为相应路由结构的配置信息,实际负载数据可以用以表征相应路由结构的负载性能。
如图3所示,在一些实施方式中,上述步骤S11可以包括步骤S111至S113。
在步骤S111中,根据所述路由结构的额定负载数据和所述路由结构在当前转发周期的实际负载数据确定所述路由结构在当前转发周期的初始平均负载指数。
在步骤S112中,根据所述路由结构在上一转发周期的最终平均负载指数和在当前转发周期的所述初始平均负载指数确定所述路由结构在当前转发周期的最终平均负载指数。
在步骤S113中,根据所述路由结构在当前转发周期的所述最终平均负载指数和所述额定负载数据确定所述路由结构在当前转发周期的质量评估信息。
初始平均负载指数已经能够表征路由结构在当前转发周期的质量,但由于路由结构通常处于持续工作的状态,路由结构的负载情况在具体工作过程中是不断发生变化的,当前转发周期的负载情况与历史转发周期的负载情况具有一定的关联,若仅根据路由结构的额定负 载数据和路由结构在当前转发周期的实际负载数据确定路由结构在当前转发周期的质量评估信息,具有一定的局限性,并且不考虑上一转发周期的负载情况对当前转发周期的负载情况的影响,可能会影响质量评估信息的准确性。为了进一步提高质量评估信息的准确性,线卡可以考虑上一转发周期的负载情况对当前转发周期的负载情况的影响,根据路由结构在上一转发周期的最终平均负载指数和在当前转发周期的初始平均负载指数确定路由结构在当前转发周期的最终平均负载指数。
最终平均负载指数也已经能够表征路由结构在当前转发周期的质量,最终平均负载指数越高,说明路由结构的剩余负载容量越低,路由结构的质量也越低。但在最终平均负载指数相同的情况下,负载能力相对较高的路由结构,其可用性明显高于负载能力相对较低的路由结构的可用性。若仅将最终平均负载指数作为质量评估信息,未考虑到路由结构的负载能力对于路由结构质量的影响,可能会影响质量评估信息的准确性。为了更进一步提高质量评估信息的准确性,在评估计算路由结构的质量时,线卡还可以考虑路由结构的负载能力。路由结构的负载能力可以从路由结构的配置信息(即额定负载数据)上体现出来,线卡可以根据路由结构在当前转发周期的最终平均负载指数和额定负载数据来计算路由结构在当前转发周期的质量评估信息。
通过上述步骤S111至S113可以看出,本公开实施例提供的报文转发方法中,确定路由结构的质量评估信息的操作,根据路由结构的额定负载数据、路由结构在当前转发周期的实际负载数据以及路由结构在上一转发周期的最终平均负载指数来确定路由结构在当前转发周期的质量评估信息,综合考虑了路由结构的当前负载情况、历史负载情况和额定负载能力,能够得到较为准确客观的质量评估信息,由于主控卡根据质量评估信息为线卡确定符合转发需求的路由成员,上述操作也将提高选择路由成员的准确性。
在一些实施方式中,所述路由结构包括端口,所述端口的额定负载数据包括端口带宽,所述端口的实际负载数据包括端口发包数量,在上述步骤S111中,利用以下公式计算所述端口在当前转发周期的 初始平均负载指数:
Lp=Sp(N,t)/Bwp;
Lp为所述端口在当前转发周期的初始平均负载指数;
Sp(N,t)为所述端口在当前转发周期的端口发包速率;
N为所述端口在当前转发周期的端口发包数量;
t为所述转发周期的时长;以及
Bwp为所述端口的端口带宽。
端口即为线卡上的物理出端口。端口带宽即为端口的配置信息,线卡可以使用等比数值来表示端口带宽,例如,10G、40G、100G的端口带宽可以分别表示为10、40、100,当然,也可以分别表示为1、4、10或分别表示为0.1、0.4、1等等。端口在当前转发周期的端口发包速率Sp(N,t)是关于端口在当前转发周期的端口发包数量N和转发周期的时长t的函数,本公开实施例提供的报文转发方法对具体如何根据端口发包数量N和时长t计算端口发包速率并不做具体限定。以端口在当前转发周期的端口发包速率是8G而端口的端口带宽是10G为例,此时端口在当前转发周期的初始平均负载指数为0.8。
根据端口的质量评估信息来选取符合转发需求的路由成员进行报文转发,相较于通过静态hash的方法来选取路由成员进行报文转发,能够有效避免由于为hash结果相同的不同报文选择相同的路由成员进行转发而导致的路由成员拥塞、丢包的问题,从而减小路由成员的拥塞丢包频率以及提高报文转发效率。但考虑到当在转发芯片上行TM(Traffic Manage,流量管理)完成QoS(Quality of Service,服务质量)时,可能存在选取的路由成员对突发流量不敏感的问题,仅根据端口的质量来选取符合转发需求的路由成员无法适用于流量突发场景,因此,除可以根据端口的质量选取符合转发需求的路由成员之外,还可以结合端口的质量以及队列的质量选取符合转发需求的路由成员。
相应的,在一些实施方式中,所述路由结构还包括队列,所述队列的额定负载数据包括队列丢包门限,所述队列的实际负载数据包括队列深度,在上述步骤S111中,利用以下公式计算所述队列在当 前转发周期的初始平均负载指数:
Lq=Dq/Mq,
Lq为所述队列在当前转发周期的初始平均负载指数;
Dq为所述队列在当前转发周期的队列深度;以及
Mq为所述队列的队列丢包门限。
队列即为在本线卡上为本线卡的端口或者报文转发系统中的所有端口(既包括本线卡上的端口,也包括其他线卡上的端口)所配置的出队列。队列丢包门限即为队列的配置信息,指的是能够进入队列的最大报文长度。线卡可以使用等比数值来表示队列丢包门限,例如,10K字节、40K字节、100K字节的队列丢包门限可以分别表示为10、40、100,当然,也可以分别表示为1、4、10或分别表示为0.1、0.4、1等等。以队列在当前转发周期的队列深度是8K字节而队列丢包门限是10K字节为例,此时队列在当前转发周期的初始平均负载指数为0.8。
本公开实施例提供的报文转发方法,结合端口的质量以及队列的质量来选取符合转发需求的路由成员,能够适用于流量突发场景,进一步提高DLB技术的选取路由成员的效率和准确性。
在一些实施方式中,所述队列可以包括:ETM(Egress Traffic Manage,下行流量管理)队列,或,FTM(Fabric Traffic Manage,上行流量管理)队列。
ETM队列可以包括当前线卡的转发芯片的ETM为当前线卡的端口所配置的下行ETM队列。FTM队列可以包括当前线卡的转发芯片的FTM为当前线卡的端口所配置的上行FTM队列,还可以包括当前线卡的转发芯片的FTM为报文转发系统中的其他线卡的端口所配置的上行FTM队列。FTM队列是在转发芯片上行的TM用于缓存出口报文的队列,每个线卡的转发芯片的FTM均为系统所有端口分配有出队列。
在转发芯片上行TM完成QoS(Quality of Service,服务质量)的场景下,线卡能够合理全面地评估TM队列质量,根据端口的质量以及TM队列的质量来选取符合转发需求的路由成员,能够适用于流量突发场景,提高选取路由成员的准确性。
在一些实施方式中,在上述步骤S112中,利用以下公式计算所述路由结构在当前转发周期的最终平均负载指数:
We为预设的权重。
T可用以标识当前转发周期,T-1可用以标识上一转发周期。当路由结构为端口时,线卡可以根据端口在上一转发周期的最终平均负载指数和在当前转发周期的初始平均负载指数确定端口在当前转发周期的最终平均负载指数。当路由结构包括队列时,线卡还可以根据队列在上一转发周期的最终平均负载指数和在当前转发周期的初始平均负载指数确定队列在当前转发周期的最终平均负载指数。
需要说明的是,在第一个转发周期中,由于不存在路由结构在上一转发周期的最终平均负载指数,线卡可以将路由结构在当前转发周期的初始平均负载指数作为路由结构在当前转发周期的最终平均负载指数。
在一些实施方式中,所述当前线卡的路由成员包括LAG组中的端口,和/或,ECMP组中的路径。ECMP组中的每一路径均具有端口。
在一些实施方式中,所述质量评估信息包括所述路由结构对应的端口标识与所述路由结构的质量评估值之间的对应关系。线卡的路由结构通常情况下为多个,对于任一路由结构,线卡可以根据该路由结构的负载数据来确定该路由结构的质量评估信息,在上述步骤S113中,线卡可以先根据该路由结构在当前转发周期的最终平均负载指数和额定负载数据确定该路由结构在当前转发周期的质量评估值,再生成该路由结构对应的端口标识与质量评估值之间的对应关系。
当路由结构为端口时,路由结构对应的端口标识与所述路由结构的质量评估值之间的对应关系可以包括端口对应的端口标识与端口质量评估值之间的第一对应关系,线卡可以先根据端口在当前转发 周期的最终平均负载指数和额定负载数据确定该端口在当前转发周期的端口质量评估值,再生成该端口对应的端口标识与该端口的端口质量评估值之间的第一对应关系。
在一些实施方式中,线卡可以利用以下公式计算端口在当前转发周期的端口质量评估值:
Qp为端口在当前转发周期的端口质量评估值;
Bwp为端口的端口带宽(即额定负载数据);以及
We(Bwp)为根据端口带宽确定的权重。
当路由结构为ETM队列时,路由结构对应的端口标识与所述路由结构的质量评估值之间的对应关系还可以包括ETM队列对应的端口标识与ETM队列质量评估值之间的第二对应关系,线卡可以先根据ETM队列在当前转发周期的最终平均负载指数和额定负载数据确定该ETM队列在当前转发周期的ETM队列质量评估值,再生成该ETM队列对应的端口标识与该ETM队列的ETM队列质量评估值之间的第二对应关系。
在一些实施方式中,线卡可以利用以下公式计算ETM队列在当前转发周期的ETM队列质量评估值:
Qeq为ETM队列在当前转发周期的ETM队列质量评估值;
Meq为ETM队列的队列丢包门限(即额定负载数据);以及
We(Meq)为根据ETM队列的队列丢包门限确定的权重。
当路由结构为FTM队列时,路由结构对应的端口标识与所述路由结构的质量评估值之间的对应关系还可以包括FTM队列对应的端口标识与FTM队列质量评估值之间的第三对应关系,线卡可以先根据FTM队列在当前转发周期的最终平均负载指数和额定负载数据确定该FTM队列在当前转发周期的FTM队列质量评估值,再生成该FTM队列对应的端口标识与该FTM队列的FTM队列质量评估值之间的第三 对应关系。
在一些实施方式中,线卡可以利用以下公式计算FTM队列在当前转发周期的FTM队列质量评估值:
Qfq为FTM队列在当前转发周期的FTM队列质量评估值;
Mfq为FTM队列的队列丢包门限(即额定负载数据);以及
We(Mfq)为根据FTM队列的队列丢包门限确定的权重。
在一些实施方式中,上述步骤S12可以包括:线卡主动将质量评估信息发送至主控卡,或者,线卡响应于主控卡的获取请求而将质量评估信息发送至主控卡。也就是说,可以由线卡主动向主控卡发送路由结构的质量评估信息,也可以由主控卡主动向线卡获取路由结构的质量评估信息。
线卡可以通过以太网通道或PCI-E通道等将质量评估信息发送至主控卡,本公开实施例提供的报文转发方法对此并不做具体限定。在线卡主动发送质量评估信息的情况下,线卡可以采用如图4所示的报文格式发送质量评估信息,该格式包括消息头、槽位号、芯片号和质量评估信息。在主控卡主动向线卡获取质量评估信息的情况下,线卡可以采用如图5所示的报文格式发送质量评估信息,该格式包括槽位号、芯片号和质量评估信息。
如图4所示的报文格式中的消息头可以包括消息类型字段、消息子类型字段和消息长度字段,消息类型字段用于指示本报文为质量评估信息通知消息,消息子类型字段用于指示本报文通知的信息为以下任一项:端口的质量评估信息、端口的质量评估信息及ETM队列的质量评估信息、端口的质量评估信息及FTM队列的质量评估信息。端口的质量评估信息可以包括端口标识与端口质量评估值之间的第一对应关系,ETM队列的质量评估信息可以包括端口标识与ETM队列质量评估值之间的第二对应关系,FTM队列的质量评估信息可以包括端口标识与FTM队列质量评估值之间的第三对应关系。
如图6所示,本公开实施例提供一种报文转发方法,包括至少 一个转发周期,当所述报文转发方法应用于主控卡时,每个转发周期都可以包括步骤S21和S22。
在步骤S21中,接收各个线卡发送的相应路由结构的质量评估信息。
在步骤S22中,根据各所述质量评估信息确定各个所述线卡中符合转发需求的路由成员,以供各个所述线卡通过相应的所述符合转发需求的路由成员转发报文。
通过上述步骤S21至S22可以看出,在本公开实施例所提供的报文转发方法中,线卡直接根据当前线卡的路由结构的负载数据确定所述路由结构的质量评估信息,并将所述质量评估信息发送至主控卡,以供主控卡直接根据所述质量评估信息确定当前线卡中符合转发需求的路由成员,线卡直接通过所述符合转发需求的路由成员转发报文即可。无需主控卡先分别采集不同线卡的负载数据再根据负载数据为各个线卡确定符合转发需求的路由成员,合理并均衡地利用了线卡及主控卡的数据处理资源和网络资源,提高了选择符合转发需求的路由成员的效率,节省了网络资源;实现了动态地根据路由结构的负载情况来选取路由成员进行报文转发,在线卡的各路由成员之间动态高效地实现了负载均衡;也无需通过静态hash的方法从各路由成员中选取路由成员进行报文转发,有效地避免了由于为hash结果相同的不同报文选择相同的路由成员进行转发而导致的路由成员拥塞、丢包的问题,减小了路由成员的拥塞丢包频率,提高了报文转发效率。
如图7所示,在一些实施方式中,所述质量评估信息包括所述路由结构对应的端口标识与所述路由结构的质量评估值之间的对应关系,针对任一待计算的线卡,所述步骤S22可以包括步骤S221和S222。
在步骤S221中,根据所述待计算的线卡所发送的所述对应关系,确定所述待计算的线卡的各路由成员的端口标识所对应的质量评估值。
在步骤S222中,根据各所述质量评估值确定所述待计算的线卡中符合转发需求的路由成员。
路由成员可以包括:LAG组中的端口、或、ECMP组中的路径,而ECMP组中的每一路径均具有端口。针对任一待计算的线卡,主控卡可以确定该待计算的线卡的各路由成员的端口标识,对于该待计算的线卡的任一LAG组,主控卡可以获取本地保存的该LAG组的所有端口的端口标识,例如LAG1组共有三个端口,端口标识分别为port1、port2、port100。对于该待计算的线卡的某一ECMP组,主控卡可以获取并记录该ECMP组的所有路径的端口的端口标识,若多条路径的端口相同,则该端口的端口标识只记录一次,最终记录该ECMP组的所有路径的端口的端口标识。例如最终记录该ECMP1组共有三个端口,端口标识分别为port1、port2、port100。在一些实施方式中,主控卡可以根据该待计算的线卡的各路由成员的端口标识,查询该待计算的线卡所发送的端口标识与质量评估值之间的对应关系,以分别确定该待计算的线卡的各路由成员所对应的质量评估值。
该待计算的线卡的每一路由成员所对应的质量评估值的数量可以为一个,主控卡可以确定在各路由成员所对应的质量评估值中的最高值,将该最高值所对应的路由成员确定为该待计算的线卡中符合转发需求的路由成员;该待计算的线卡的每一路由成员所对应的质量评估值的数量也可以为多个,对于每一路由成员,主控卡可以根据每一路由成员所对应的多个质量评估值确定每一路由成员所对应的综合质量评估值,然后确定在各路由成员所对应的综合质量评估值中的最高值,将该最高值所对应的路由成员确定为该待计算的线卡中符合转发需求的路由成员。
在一些实施方式中,所述路由结构包括端口,所述路由结构对应的端口标识与所述路由结构的质量评估值之间的对应关系包括:所述端口对应的端口标识与所述端口的端口质量评估值之间的第一对应关系。
相应的,步骤S221可以包括:根据所述待计算的线卡所发送的所述端口对应的端口标识与所述端口的端口质量评估值之间的第一对应关系,确定所述待计算的线卡的各路由成员的端口标识所对应的端口质量评估值。步骤S222可以包括:根据各所述端口质量评估值 确定所述待计算的线卡中符合转发需求的路由成员。
在一些实施方式中,所述路由结构还包括ETM队列,所述路由结构对应的端口标识与所述路由结构的质量评估值之间的对应关系还包括:所述ETM队列对应的端口标识与所述ETM队列的ETM队列质量评估值之间的第二对应关系。
ETM队列可以包括当前线卡的转发芯片的ETM为当前线卡的端口所配置的下行ETM队列。当路由结构同时包括端口和ETM队列时,相应的,线卡发送的质量评估信息即端口标识与质量评估值之间的对应关系,除包括端口对应的端口标识与所述端口的端口质量评估值之间的第一对应关系之外,还包括ETM队列对应的端口标识与所述ETM队列的ETM队列质量评估值之间的第二对应关系。
在一些实施方式中,步骤S221可以包括:根据所述待计算的线卡所发送的所述端口对应的端口标识与所述端口的端口质量评估值之间的第一对应关系和所述ETM队列对应的端口标识与所述ETM队列的ETM队列质量评估值之间的第二对应关系,确定所述待计算的线卡的各路由成员的端口标识所对应的端口质量评估值和ETM队列的ETM队列质量评估值。步骤S222可以包括:根据各所述端口质量评估值和各所述ETM队列质量评估值确定所述待计算的线卡中符合转发需求的路由成员。
对于待计算的线卡的每一路由成员,主控卡可以根据所述每一路由成员所对应的端口质量评估值和ETM队列质量评估值确定所述每一路由成员所对应的综合质量评估值,例如,在一些实施方式中,线卡可以利用以下公式计算综合质量评估值:
Q=Qp*We(p)+Qeq*We(eq);
Q为综合质量评估值;
Qp为端口质量评估值;
We(p)为预设的端口权重;
Qeq为ETM队列质量评估值;以及
We(eq)为预设的ETM队列权重。
最后,主控卡可以确定在各路由成员对应的综合质量评估值中 的最高值,将该最高值所对应的路由成员确定为符合转发需求的路由成员。
对于任一待计算的线卡,各个线卡中的其他线卡上可能为该待计算的线卡的各路由成员(包括端口)配置有FTM队列,因此,为了全面地评估该待计算的线卡中各路由成员的可用性程度,还需结合各个线卡中其他线卡发送的质量评估信息,以为该待计算的线卡选取符合转发需求的路由成员。
相应的,如图8所示,在一些实施方式中,针对任一待计算的线卡,所述步骤S22可以包括步骤S22’。
在步骤S22’中,根据所述待计算的线卡所发送的质量评估信息以及所述各个线卡中的其他线卡所发送的质量评估信息,确定所述待计算的线卡中符合转发需求的路由成员。
在一些实施方式中,所述路由结构包括端口和FTM队列,所述质量评估信息包括所述端口所对应的端口标识与所述端口的端口质量评估值之间的第一对应关系以及所述FTM队列所对应的端口标识与所述FTM队列的FTM队列质量评估值之间的第三对应关系。
FTM队列可以包括当前线卡的转发芯片的FTM为当前线卡的端口所配置的上行FTM队列,还可以包括当前线卡的转发芯片的FTM为报文转发系统中的其他线卡的端口所配置的上行FTM队列。FTM队列是在转发芯片上行的TM用于缓存出口报文的队列,每个线卡的转发芯片的FTM均为系统所有端口分配有出队列。
相应的,如图9所示,在一些实施方式中,所述步骤S22’可以包括步骤S221’至S223’。
在步骤S221’中,根据所述待计算的线卡发送的所述第一对应关系,确定所述待计算的线卡的各路由成员的端口标识所对应的端口质量评估值。
在步骤S222’中,根据所述待计算的线卡发送的所述第三对应关系以及所述其他线卡发送的所述第三对应关系,确定所述待计算的线卡的各路由成员的端口标识所对应的各FTM队列质量评估值。
在步骤S223’中,根据所述待计算的线卡的各路由成员的端口 标识所对应的端口质量评估值和各FTM队列质量评估值,确定所述待计算的线卡中符合转发需求的路由成员。
针对任一待计算的线卡,主控卡可以确定任一LAG组或任一ECMP组中各路由成员的端口标识,根据各路由成员的端口标识,查询该待计算的线卡所发送的端口标识与端口质量评估值之间的第一对应关系,以分别确定各路由成员所对应的端口质量评估值。在一些实施方式中,主控卡可以根据各路由成员的端口标识,查询该待计算的线卡所发送的以及各个线卡中其他线卡所发送的端口标识与FTM队列质量评估值之间的第三对应关系,以分别确定各路由成员所对应的各FTM队列质量评估值。
对于每一路由成员,主控卡可以根据每一路由成员所对应的各FTM队列质量评估值确定每一路由成员所对应的FTM队列综合质量评估值。例如,在一些实施方式中,主控卡可以根据如下公式确定FTM队列综合质量评估值:FTM队列综合质量评估值=线卡1发送的port1FTM队列质量评估值+线卡2发送的port1FTM队列质量评估值+……+线卡n发送的port1FTM队列质量评估值,port1为当前路由成员的端口标识。进一步的,主控卡可以根据每一路由成员所对应的端口质量评估值和FTM队列综合质量评估值确定每一路由成员所对应的综合质量评估值,例如,在一些实施方式中,线卡可以利用以下公式计算综合质量评估值:
Q=Qp*We(p)+Qfq*We(fq);
Q为综合质量评估值;
Qp为端口质量评估值;
We(p)为预设的端口权重;
Qfq为FTM队列综合质量评估值;以及
We(fq)为预设的FTM队列权重。
最后,主控卡可以确定在各路由成员对应的综合质量评估值中的最高值,将该最高值所对应的路由成员确定为符合转发需求的路由成员。
基于相同的技术构思,本公开实施例提供一种线卡,如图10所 示,所述线卡包括处理模块101、发送模块102和转发模块103。
处理模块101配置为根据当前线卡的路由结构的负载数据确定所述路由结构的质量评估信息,所述路由结构与所述当前线卡的路由成员相关。
发送模块102配置为将所述质量评估信息发送至主控卡,以供所述主控卡根据所述质量评估信息确定所述当前线卡中符合转发需求的路由成员。
转发模块103配置为通过所述符合转发需求的路由成员转发报文。
在一些实施方式中,所述负载数据包括额定负载数据和实际负载数据,所述处理模块101配置为:
根据所述路由结构的额定负载数据和所述路由结构在当前转发周期的实际负载数据确定所述路由结构在当前转发周期的初始平均负载指数;
根据所述路由结构在上一转发周期的最终平均负载指数和在当前转发周期的所述初始平均负载指数确定所述路由结构在当前转发周期的最终平均负载指数;以及
根据所述路由结构在当前转发周期的所述最终平均负载指数和所述额定负载数据确定所述路由结构在当前转发周期的质量评估信息。
在一些实施方式中,所述路由结构包括端口,所述端口的额定负载数据包括端口带宽,所述端口的实际负载数据包括端口发包数量,所述处理模块101利用以下公式计算所述端口在当前转发周期的初始平均负载指数:
Lp=Sp(N,t)/Bwp;
Lp为所述端口在当前转发周期的初始平均负载指数;
Sp(N,t)为所述端口在当前转发周期的端口发包速率;
N为所述端口在当前转发周期的端口发包数量;
t为所述转发周期的时长;以及
Bwp为所述端口的端口带宽。
在一些实施方式中,所述路由结构还包括队列,所述队列的额定负载数据包括队列丢包门限,所述队列的实际负载数据包括队列深度,所述处理模块101利用以下公式计算所述队列在当前转发周期的初始平均负载指数:
Lq=Dq/Mq,
Lq为所述队列在当前转发周期的初始平均负载指数;
Dq为所述队列在当前转发周期的队列深度;以及
Mq为所述队列的队列丢包门限。
在一些实施方式中,所述队列包括:下行流量管理ETM队列,或,上行流量管理FTM队列。
在一些实施方式中,所述处理模块101利用以下公式计算所述路由结构在当前转发周期的最终平均负载指数:
We为预设的权重。
在一些实施方式中,所述当前线卡的路由成员包括链路聚合LAG组中的端口,和/或,等价多径路由ECMP组中的路径。
在一些实施方式中,所述质量评估信息包括所述路由结构对应的端口标识与所述路由结构的质量评估值之间的对应关系。
基于相同的技术构思,本公开实施例提供一种主控卡,如图11所示,所述主控卡包括接收模块201和处理模块202。
接收模块201配置为接收各个线卡发送的相应路由结构的质量评估信息。
处理模块202配置为根据各所述质量评估信息确定各个所述线卡中符合转发需求的路由成员,以供各个所述线卡通过相应的所述符合转发需求的路由成员转发报文。
在一些实施方式中,所述质量评估信息包括所述路由结构对应 的端口标识与所述路由结构的质量评估值之间的对应关系,针对任一待计算的线卡,所述处理模块202配置为:
根据所述待计算的线卡所发送的所述对应关系,确定所述待计算的线卡的各路由成员的端口标识所对应的质量评估值;以及
根据各所述质量评估值确定所述待计算的线卡中符合转发需求的路由成员。
在一些实施方式中,所述路由结构包括端口,所述路由结构对应的端口标识与所述路由结构的质量评估值之间的对应关系包括:所述端口对应的端口标识与所述端口的端口质量评估值之间的第一对应关系。
在一些实施方式中,所述路由结构还包括ETM队列,所述路由结构对应的端口标识与所述路由结构的质量评估值之间的对应关系还包括:所述ETM队列对应的端口标识与所述ETM队列的ETM队列质量评估值之间的第二对应关系。
在一些实施例方式中,针对任一待计算的线卡,所述处理模块202配置为根据所述待计算的线卡所发送的质量评估信息以及所述各个线卡中的其他线卡所发送的质量评估信息,确定所述待计算的线卡中符合转发需求的路由成员。
在一些实施方式中,所述路由结构包括端口和FTM队列,所述质量评估信息包括所述端口所对应的端口标识与所述端口的端口质量评估值之间的第一对应关系以及所述FTM队列所对应的端口标识与所述FTM队列的FTM队列质量评估值之间的第三对应关系。
在一些实施方式中,所述处理模块202配置为
根据所述待计算的线卡发送的所述第一对应关系,确定所述待计算的线卡的各路由成员的端口标识所对应的端口质量评估值;
根据所述待计算的线卡发送的所述第三对应关系以及所述其他线卡发送的所述第三对应关系,确定所述待计算的线卡的各路由成员的端口标识所对应的各FTM队列质量评估值;以及
根据所述待计算的线卡的各路由成员的端口标识所对应的端口质量评估值和各FTM队列质量评估值,确定所述待计算的线卡中符合 转发需求的路由成员。
基于相同的技术构思,本公开实施例还提供了一种框式设备,所述框式设备包括如前所述的主控卡和至少一个如前所述的线卡。
以下结合三个具体实例来对本公开提供的报文转发方法进行详细说明。
实例一:基于端口的负载数据选择路由成员。
在每个转发周期中:
线卡获取本线卡上所有端口的负载数据,该负载数据包括端口带宽和端口发包数量。具体的,线卡采集各端口的端口发包数量,获取预先配置的各端口的端口带宽。
对于每一端口,线卡根据该端口的端口发包数量计算端口发包速率,根据端口发包速率和端口带宽计算该端口在当前转发周期的初始平均负载指数;根据该端口在当前转发周期的所述初始平均负载指数以及该端口在上一转发周期的最终平均负载指数计算该端口在当前转发周期的最终平均负载指数;根据该端口在当前转发周期的最终平均负载指数和端口带宽计算该端口的端口质量评估值,并生成该端口的端口标识与端口质量评估值之间的第一对应关系(即端口的质量评估信息)。
线卡将质量评估信息采用如图4所示的报文格式发送至主控卡,消息头包括消息类型字段、消息子类型字段和消息长度字段,消息类型字段用于指示本报文为质量评估信息通知消息,消息子类型字段用于指示本报文通知的为端口的质量评估信息。
主控卡接收到各个线卡发送的各质量评估信息后,针对任一待计算的线卡,主控卡逐一确定该待计算的线卡的各LAG组或各ECMP组中各路由成员中的符合转发需求的路由成员。具体的,主控卡确定当前LAG组或当前ECMP组中各路由成员的端口标识,根据各路由成员的端口标识,查询该待计算的线卡所发送的端口标识与端口质量评估值之间的第一对应关系,以分别确定各路由成员所对应的端口质量评估值。主控卡确定在各路由成员所对应的端口质量评估值中的最高值,将该最高值所对应的路由成员确定为符合转发需求的路由成员。
主控卡分别向各个线卡通知各LAG组或各ECMP组中的符合转发需求的路由成员。
各个线卡根据主控卡通知的各LAG组或各ECMP组的符合转发需求的路由成员,更新本地转发芯片的目标路由成员表项。
当需要通过某一LAG组或某一ECMP组中的路由成员进行报文转发时,线卡的转发芯片查询目标路由成员表项以确定当前的符合转发需求的路由成员,通过该符合转发需求的路由成员转发报文。需要说明的是,若存在报文流还未被转发完毕,且目标路由成员表项发生变化导致线卡查询到的符合转发需求的路由成员发生变化,则线卡可以在保证报文流不乱序的情况下,通过更新后的符合转发需求的路由成员继续转发报文。
实例二:基于端口的负载数据和ETM队列的负载数据选择路由成员。
在每个转发周期中:
线卡获取本线卡上所有端口的负载数据和ETM队列的负载数据,端口的负载数据包括端口带宽和端口发包数量,ETM队列的负载数据包括ETM队列丢包门限和ETM队列深度。具体的,线卡采集各端口的端口发包数量以及各端口的ETM队列的队列深度,获取预先配置的各端口的端口带宽和各端口配置的ETM队列的ETM队列丢包门限。
对于每一端口,线卡根据该端口的端口发包数量计算端口发包速率,根据端口发包速率和端口带宽计算该端口在当前转发周期的初始平均负载指数;根据该端口在当前转发周期的所述初始平均负载指数以及该端口在上一转发周期的最终平均负载指数计算该端口在当前转发周期的最终平均负载指数;根据该端口在当前转发周期的最终平均负载指数和端口带宽计算该端口的端口质量评估值,并生成该端口的端口标识与端口质量评估值之间的第一对应关系(即端口的质量评估信息)。
对于每一端口的ETM队列,线卡根据该ETM队列的ETM队列丢包门限和ETM队列深度计算该ETM队列在当前转发周期的初始平均负载指数;根据该ETM队列在当前转发周期的所述初始平均负载指数以 及该ETM队列在上一转发周期的最终平均负载指数计算该ETM队列在当前转发周期的最终平均负载指数;根据该ETM队列在当前转发周期的最终平均负载指数和ETM队列的队列丢包门限计算该ETM队列的ETM队列质量评估值,并生成该ETM队列的端口标识与ETM队列质量评估值之间的第二对应关系(即ETM队列的质量评估信息)。
线卡将质量评估信息采用如图4所示的报文格式发送至主控卡,消息头包括消息类型字段、消息子类型字段和消息长度字段,消息类型字段用于指示本报文为质量评估信息通知消息,消息子类型字段用于指示本报文通知的为端口的质量评估信息以及ETM队列的质量评估信息。
针对任一待计算的线卡,主控卡接收到各个线卡发送的各质量评估信息后,逐一确定该待计算的线卡的各LAG组或各ECMP组中各路由成员中的符合转发需求的路由成员。具体的,主控卡确定当前LAG组或当前ECMP组中各路由成员的端口标识,根据各路由成员的端口标识,查询该待计算的线卡所发送的端口标识与端口质量评估值之间的第一对应关系以及端口标识与ETM队列质量评估值之间的第二对应关系,以分别确定各路由成员所对应的端口质量评估值和ETM队列质量评估值。对于该任一待计算的线卡的任一路由成员,主控卡可以根据当前路由成员所对应的端口质量评估值和ETM队列质量评估值确定该路由成员所对应的综合质量评估值:综合质量评估值=端口质量评估值*端口权重+ETM队列质量评估值*队列权重。主控卡将各LAG组或各ECMP组中具有最高的综合质量评估值的路由成员确定为符合转发需求的路由成员。
主控卡分别向各个线卡通知各LAG组或各ECMP组中的符合转发需求的路由成员。
各个线卡根据主控卡通知的各LAG组或各ECMP组的符合转发需求的路由成员,更新本地转发芯片的目标路由成员表项。
当需要通过某一LAG组或某一ECMP组中的路由成员进行报文转发时,线卡的转发芯片查询目标路由成员表项以确定当前的符合转发需求的路由成员,通过该符合转发需求的路由成员转发报文。需要说 明的是,若存在报文流还未被转发完毕,且目标路由成员表项发生变化导致线卡查询到的符合转发需求的路由成员发生变化,则线卡可以在保证报文流不乱序的情况下,通过更新后的符合转发需求的路由成员继续转发报文。
实例三:基于端口的负载数据和FTM队列的负载数据选择路由成员。
在每个转发周期中:
线卡获取本线卡上所有端口的负载数据和FTM队列的负载数据,端口的负载数据包括端口带宽和端口发包数量,FTM队列的负载数据包括FTM队列丢包门限和FTM队列深度。具体的,线卡采集各端口的端口发包数量以及各端口的FTM队列的队列深度,获取预先配置的各端口的端口带宽和各端口配置的FTM队列的FTM队列丢包门限。
对于每一端口,线卡根据该端口的端口发包数量计算端口发包速率,根据端口发包速率和端口带宽计算该端口在当前转发周期的初始平均负载指数;根据该端口在当前转发周期的所述初始平均负载指数以及该端口在上一转发周期的最终平均负载指数计算该端口在当前转发周期的最终平均负载指数;根据该端口在当前转发周期的最终平均负载指数和端口带宽计算该端口的端口质量评估值,并生成该端口的端口标识与端口质量评估值之间的第一对应关系(即端口的质量评估信息)。
对于每一端口的FTM队列,线卡根据该FTM队列的FTM队列丢包门限和FTM队列深度计算该FTM队列在当前转发周期的初始平均负载指数;根据该FTM队列在当前转发周期的所述初始平均负载指数以及该FTM队列在上一转发周期的最终平均负载指数计算该FTM队列在当前转发周期的最终平均负载指数;根据该FTM队列在当前转发周期的最终平均负载指数和FTM队列的队列丢包门限计算该FTM队列的FTM队列质量评估值,并生成该FTM队列的端口标识与FTM队列质量评估值之间的第三对应关系(即FTM队列的质量评估信息)。
线卡将质量评估信息采用如图4所示的报文格式发送至主控卡,消息头包括消息类型字段、消息子类型字段和消息长度字段,消息类 型字段用于指示本报文为质量评估信息通知消息,消息子类型字段用于指示本报文通知的为端口的质量评估信息以及FTM队列的质量评估信息。
针对任一待计算的线卡,主控卡接收到各个线卡发送的各质量评估信息后,逐一确定该待计算的线卡的各LAG组或各ECMP组中各路由成员中的符合转发需求的路由成员。具体的,主控卡确定当前LAG组或当前ECMP组中各路由成员的端口标识,根据各路由成员的端口标识,查询该待计算的线卡所发送的端口标识与端口质量评估值之间的第一对应关系,以分别确定各路由成员所对应的端口质量评估值,查询该待计算的线卡所发送的以及其他线卡所发送的端口标识与FTM队列质量评估值之间的第三对应关系,以分别确定各路由成员所对应的各FTM队列质量评估值。对于该任一待计算的线卡的任一路由成员,主控卡可以先根据该路由成员所对应的多个FTM队列质量评估值确定该路由成员所对应的FTM队列综合质量评估值:FTM队列综合质量评估值=线卡1发送的port1FTM队列质量评估值+线卡2发送的port1FTM队列质量评估值+……+线卡n发送的port1FTM队列质量评估值,port1为当前路由成员的端口标识。再根据该路由成员所对应的端口质量评估值和FTM队列综合质量评估值确定该路由成员所对应的综合质量评估值:综合质量评估值=端口质量评估值*端口权重+FTM队列综合质量评估值*队列权重。主控卡将各LAG组或各ECMP组中具有最高的综合质量评估值的路由成员确定为符合转发需求的路由成员。
主控卡分别向各个线卡通知各LAG组或各ECMP组中的符合转发需求的路由成员。
各个线卡根据主控卡通知的各LAG组或各ECMP组的符合转发需求的路由成员,更新本地转发芯片的目标路由成员表项。
当需要通过某一LAG组或某一ECMP组中的路由成员进行报文转发时,线卡的转发芯片查询目标路由成员表项以确定当前的符合转发需求的路由成员,通过该符合转发需求的路由成员转发报文。需要说明的是,若存在报文流还未被转发完毕,且目标路由成员表项发生变 化导致线卡查询到的符合转发需求的路由成员发生变化,则线卡可以在保证报文流不乱序的情况下,通过更新后的符合转发需求的路由成员继续转发报文。
本公开实施例还提供一种电子设备,包括:
一个或多个处理器;以及
存储装置,其上存储有一个或多个计算机程序;
当所述一个或多个计算机程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如前所述的报文转发方法。
本公开实施例还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如前所述的报文转发方法。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器(如中央处理器、数字信号处理器或微处理器)执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送 介质。
本文已经公开了示例实施例,并且虽然采用了具体术语,但它们仅用于并仅应当被解释为一般说明性含义,并且不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出,否则与特定实施例相结合描述的特征、特性和/或元素可单独使用,或可与结合其他实施例描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。
Claims (20)
- 一种报文转发方法,包括至少一个转发周期,每个转发周期都包括:根据当前线卡的路由结构的负载数据确定所述路由结构的质量评估信息,所述路由结构与所述当前线卡的路由成员相关;将所述质量评估信息发送至主控卡,以供所述主控卡根据所述质量评估信息确定所述当前线卡中符合转发需求的路由成员;以及通过所述符合转发需求的路由成员转发报文。
- 根据权利要求1所述的方法,其中,所述负载数据包括额定负载数据和实际负载数据,所述根据当前线卡的路由结构的负载数据确定所述路由结构的质量评估信息包括:根据所述路由结构的额定负载数据和所述路由结构在当前转发周期的实际负载数据确定所述路由结构在当前转发周期的初始平均负载指数;根据所述路由结构在上一转发周期的最终平均负载指数和在当前转发周期的所述初始平均负载指数确定所述路由结构在当前转发周期的最终平均负载指数;以及根据所述路由结构在当前转发周期的所述最终平均负载指数和所述额定负载数据确定所述路由结构在当前转发周期的质量评估信息。
- 根据权利要求2所述的方法,其中,所述路由结构包括端口,所述端口的额定负载数据包括端口带宽,所述端口的实际负载数据包括端口发包数量,在所述根据所述路由结构的额定负载数据和所述路由结构在当前转发周期的实际负载数据确定所述路由结构在当前转发周期的初始平均负载指数中,利用以下公式计算所述端口在当前转发周期的初始平均负载指数:Lp=Sp(N,t)/Bwp;其中,Lp为所述端口在当前转发周期的初始平均负载指数;Sp(N,t)为所述端口在当前转发周期的端口发包速率;N为所述端口在当前转发周期的端口发包数量;t为所述转发周期的时长;以及Bwp为所述端口的端口带宽。
- 根据权利要求3所述的方法,其中,所述路由结构还包括队列,所述队列的额定负载数据包括队列丢包门限,所述队列的实际负载数据包括队列深度,在所述根据所述路由结构的额定负载数据和所述路由结构在当前转发周期的实际负载数据确定所述路由结构在当前转发周期的初始平均负载指数中,利用以下公式计算所述队列在当前转发周期的初始平均负载指数:Lq=Dq/Mq,其中,Lq为所述队列在当前转发周期的初始平均负载指数;Dq为所述队列在当前转发周期的队列深度;以及Mq为所述队列的队列丢包门限。
- 根据权利要求4所述的方法,其中,所述队列包括:下行流量管理(ETM)队列、或上行流量管理(FTM)队列。
- 根据权利要求1至6中任一项所述的方法,其中,所述当前线卡的路由成员包括以下至少一者:链路聚合(LAG)组中的端口、等价多径路由(ECMP)组中的路径。
- 根据权利要求1至6中任一项所述的方法,其中,所述质量评估信息包括所述路由结构对应的端口标识与所述路由结构的质量评估值之间的对应关系。
- 一种报文转发方法,包括至少一个转发周期,每个转发周期都包括:接收各个线卡发送的相应路由结构的质量评估信息;以及根据各所述质量评估信息确定各个所述线卡中符合转发需求的路由成员,以供各个所述线卡通过相应的所述符合转发需求的路由成员转发报文。
- 根据权利要求9所述的方法,其中,所述质量评估信息包括所述路由结构对应的端口标识与所述路由结构的质量评估值之间的对应关系,针对任一待计算的线卡,所述根据各所述质量评估信息确定各个所述线卡中符合转发需求的路由成员包括:根据所述待计算的线卡所发送的所述对应关系,确定所述待计算的线卡的各路由成员的端口标识所对应的质量评估值;以及根据各所述质量评估值确定所述待计算的线卡中符合转发需求的路由成员。
- 根据权利要求10所述的方法,其中,所述路由结构包括端口,所述路由结构对应的端口标识与所述路由结构的质量评估值之间的对应关系包括:所述端口对应的端口标识与所述端口的端口质量评估值之间的第一对应关系。
- 根据权利要求11所述的方法,其中,所述路由结构还包括ETM队列,所述路由结构对应的端口标识与所述路由结构的质量评估值之间的对应关系还包括:所述ETM队列对应的端口标识与所述ETM队列的ETM队列质量评估值之间的第二对应关系。
- 根据权利要求9所述的方法,其中,针对任一待计算的线卡,所述根据各所述质量评估信息确定各个所述线卡中符合转发需求的路由成员包括:根据所述待计算的线卡所发送的质量评估信息以及所述各个线卡中的其他线卡所发送的质量评估信息,确定所述待计算的线卡中符合转发需求的路由成员。
- 根据权利要求13所述的方法,其中,所述路由结构包括端口和FTM队列,所述质量评估信息包括所述端口所对应的端口标识与所述端口的端口质量评估值之间的第一对应关系以及所述FTM队列所对应的端口标识与所述FTM队列的FTM队列质量评估值之间的第三对应关系。
- 根据权利要求14所述的方法,其中,所述根据所述待计算的线卡所发送的质量评估信息以及所述各个线卡中的其他线卡所发送的质量评估信息,确定所述待计算的线卡中符合转发需求的路由成员包括:根据所述待计算的线卡发送的所述第一对应关系,确定所述待计算的线卡的各路由成员的端口标识所对应的端口质量评估值;根据所述待计算的线卡发送的所述第三对应关系以及所述其他线卡发送的所述第三对应关系,确定所述待计算的线卡的各路由成员的端口标识所对应的各FTM队列质量评估值;以及根据所述待计算的线卡的各路由成员的端口标识所对应的端口质量评估值和各FTM队列质量评估值,确定所述待计算的线卡中符合 转发需求的路由成员。
- 一种线卡,包括:处理模块,配置为根据当前线卡的路由结构的负载数据确定所述路由结构的质量评估信息,所述路由结构与所述当前线卡的路由成员相关;发送模块,配置为将所述质量评估信息发送至主控卡,以供所述主控卡根据所述质量评估信息确定所述当前线卡中符合转发需求的路由成员;以及转发模块,配置为通过所述符合转发需求的路由成员转发报文。
- 一种主控卡,包括:接收模块,配置为接收各个线卡发送的相应路由结构的质量评估信息;以及处理模块,配置为根据各所述质量评估信息确定各个所述线卡中符合转发需求的路由成员,以供各个所述线卡通过相应的所述符合转发需求的路由成员转发报文。
- 一种框式设备,包括如权利要求17所述的主控卡和至少一个如权利要求16所述的线卡。
- 一种电子设备,包括:至少一个处理器;以及存储装置,其上存储有至少一个计算机程序;当所述至少一个计算机程序被所述至少一个处理器执行时,使得所述至少一个处理器实现如权利要求1至15中任一项所述的报文转发方法。
- 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至15中任一项所述的 报文转发方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110766119.X | 2021-07-07 | ||
CN202110766119.XA CN115604169A (zh) | 2021-07-07 | 2021-07-07 | 报文转发方法、线卡、主控卡、设备及计算机存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023280170A1 true WO2023280170A1 (zh) | 2023-01-12 |
Family
ID=84801287
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/103964 WO2023280170A1 (zh) | 2021-07-07 | 2022-07-05 | 报文转发方法、线卡、主控卡、框式设备、电子设备及计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115604169A (zh) |
WO (1) | WO2023280170A1 (zh) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101110768A (zh) * | 2007-06-20 | 2008-01-23 | 杭州华三通信技术有限公司 | 数据通信方法、系统、主控卡及线卡 |
US20130089094A1 (en) * | 2010-07-01 | 2013-04-11 | Telefonaktiebolaget L M Ericsson (Publ) | Method and Apparatus for Dissemination of Information Between Routers |
CN105162712A (zh) * | 2015-10-20 | 2015-12-16 | 烽火通信科技股份有限公司 | 一种路由器中分布式协议的实现方法及系统 |
CN113014502A (zh) * | 2021-02-08 | 2021-06-22 | 北京星网锐捷网络技术有限公司 | 基于线卡的负载均衡方法及装置 |
-
2021
- 2021-07-07 CN CN202110766119.XA patent/CN115604169A/zh active Pending
-
2022
- 2022-07-05 WO PCT/CN2022/103964 patent/WO2023280170A1/zh unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101110768A (zh) * | 2007-06-20 | 2008-01-23 | 杭州华三通信技术有限公司 | 数据通信方法、系统、主控卡及线卡 |
US20130089094A1 (en) * | 2010-07-01 | 2013-04-11 | Telefonaktiebolaget L M Ericsson (Publ) | Method and Apparatus for Dissemination of Information Between Routers |
CN105162712A (zh) * | 2015-10-20 | 2015-12-16 | 烽火通信科技股份有限公司 | 一种路由器中分布式协议的实现方法及系统 |
CN113014502A (zh) * | 2021-02-08 | 2021-06-22 | 北京星网锐捷网络技术有限公司 | 基于线卡的负载均衡方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN115604169A (zh) | 2023-01-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8995277B2 (en) | Method for dynamic load balancing of network flows on LAG interfaces | |
WO2019196630A1 (zh) | 负载均衡的方法、设备及系统 | |
US20170048144A1 (en) | Congestion Avoidance Traffic Steering (CATS) in Datacenter Networks | |
Prabhavat et al. | Effective delay-controlled load distribution over multipath networks | |
US10715446B2 (en) | Methods and systems for data center load balancing | |
Fang et al. | A loss-free multipathing solution for data center network using software-defined networking approach | |
US11411882B2 (en) | Generating automatic bandwidth adjustment policies per label-switched path | |
US20110273988A1 (en) | Distributing decision making in a centralized flow routing system | |
US9559989B2 (en) | Link problem handling | |
US9350631B2 (en) | Identifying flows causing undesirable network events | |
US8848529B2 (en) | WRR scheduler configuration for optimized latency, buffer utilization | |
WO2008125030A1 (fr) | Procédé de répartition de charge et appareil associé | |
US11962505B1 (en) | Distributed dynamic load balancing in network systems | |
CN111585911B (zh) | 数据中心网络流量负载的均衡方法 | |
CN111726299B (zh) | 流量均衡方法及装置 | |
US10305787B2 (en) | Dropping cells of a same packet sent among multiple paths within a packet switching device | |
WO2016177190A1 (zh) | 自协商lacp协议参考系统和参考端口的方法及装置 | |
WO2023280170A1 (zh) | 报文转发方法、线卡、主控卡、框式设备、电子设备及计算机可读存储介质 | |
US20210029060A1 (en) | Data Communication Method And Apparatus | |
CN116668374A (zh) | 通信方法及装置 | |
CN109347761B (zh) | 一种流量转发控制方法及装置 | |
WO2023071324A1 (zh) | 报文转发方法及装置 | |
CN109450814A (zh) | 分片报文的转发方法及装置 | |
US11824792B2 (en) | Method and system for dynamic quota-based congestion management | |
US11012378B2 (en) | Methods and apparatus for shared buffer allocation in a transport node |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22836919 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |