WO2017219847A1 - Message sending method and device - Google Patents

Message sending method and device Download PDF

Info

Publication number
WO2017219847A1
WO2017219847A1 PCT/CN2017/087095 CN2017087095W WO2017219847A1 WO 2017219847 A1 WO2017219847 A1 WO 2017219847A1 CN 2017087095 W CN2017087095 W CN 2017087095W WO 2017219847 A1 WO2017219847 A1 WO 2017219847A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
flow control
traffic information
level flow
sending
Prior art date
Application number
PCT/CN2017/087095
Other languages
French (fr)
Chinese (zh)
Inventor
毕杰
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017219847A1 publication Critical patent/WO2017219847A1/en

Links

Images

Definitions

  • the present disclosure relates to the field of communications technologies, and in particular, to a message sending method and apparatus.
  • SONET Serial Optical Network
  • SDH Serial Digital Hierarchy
  • CCITT now ITU-T
  • CPOS Channelized POS
  • the channelized POS interface the POS interface is the packet transmitted in SONET/SDH, ie Packet Over SONET/SDH), which makes full use of the characteristics of the SDH system and has the ability to finely divide the bandwidth. It can reduce the number of low-speed physical ports on the network, enhance the low-speed port aggregation capability of the device, and improve the dedicated line access capability of the device.
  • the CPOS interface is mainly used to improve the aggregation capability of devices for low-speed access.
  • the interface rates of mainstream applications include STM-1 (155.52 Mbit/s), STM-4 (622 M bit/s), and STM-16 (2.5 Gbit/s). Wait.
  • the POS/CPOS interface module is still widely used as the interface of the UNI side (user unit interface) and part of the NNI side (network element interface). And a large number of new commercial needs.
  • the packet processing chip of the network access traffic in FIG. 1 is on the line card of the router, and the front plug-in POS/CPOS interface module generally includes a link mapper module, a framer module and a physical interface.
  • the packet is encapsulated in the VC (virtual container) container of the corresponding rate class by the link map module in the downlink direction, and then sent through the STM port according to the SDH transmission frame structure layer encapsulation by the subsequent production module.
  • VC virtual container
  • the forwarding speed of the packet processing chip of the line card is high (currently, the packet forwarding capability of the mainstream packet processing chip is above 40 Gbit/s), while the outgoing port rate of the POS and CPOS interface modules is low (the STM-1 port has only 155M).
  • the STM-4 port is 622M), which often requires flow control on the packet processing chip or interface module of the online card.
  • the flow control of the line card is often implemented by a packet processing chip built-in TM module (Traffic Management, Traffic Management Module) or a dedicated TM chip for port or channel-level speed limit (ie, GTS function at the port or channel level).
  • TM module Traffic Management, Traffic Management Module
  • TM chip dedicated TM chip for port or channel-level speed limit
  • the link rate of the POS/CPOS interface module is only 2 Mbit/s.
  • the channel-level rate limit function of the line card module is generally large. It cannot be accurately limited according to the low rate of 2 Mbit/s.
  • the channel-level speed limit has higher cost requirements for the TM module or the TM chip. When multiple CPOS/POS interface modules are configured, the hardware cost of the router is greatly increased.
  • the line card and POS/CPOS interface module are generally used as shown in Figure 1.
  • SPI4.2 interface supports channelization level flow control, it cannot support the total bandwidth flow control of the entire port between the line card and the interface module, and there are many SPI4.2 buses, which is not conducive to hardware implementation and cost control.
  • the Interlaken interface also does not support port-level traffic control, and since the baud rate of the single channel of the interface has reached 12.5 Gbps, for POS/CPOS 2 Mbit/s low-rate channelized applications, the flow control is very sensitive and not stable. control.
  • the purpose of the disclosure is to provide a message sending method and device, which can implement different levels of flow control.
  • an embodiment of the present disclosure provides a method for sending a message, including:
  • the packet with the third-level flow control is sent to the sending port corresponding to the packet for transmission.
  • the step of obtaining the first traffic information of the packet delivered by the line card includes:
  • the step of performing the first-level flow control on the packet according to the first traffic information, and obtaining the second traffic information of the packet received after the first-level flow control is performed includes:
  • the second traffic information of the packet after the first-level flow control is obtained.
  • the method further includes:
  • the packet is classified to obtain an output port corresponding to the channel corresponding to the packet, where the packet has a custom label carrying a channel number.
  • the step of performing the second-level flow control on the packet according to the second traffic information, and obtaining the third traffic information of the packet after the second-level flow control is performed includes:
  • the traffic indicated by the second traffic information is greater than the bandwidth of the output port corresponding to the channel corresponding to the packet, outputting the second backpressure packet through the backpressure channel to perform second-level flow control on the packet;
  • the third traffic information of the received message after the second-level flow control is obtained.
  • the step of performing third-level flow control on the packets in the channelized queue according to the third traffic information includes:
  • the step of sending the packet with the second-level flow control to the channelized queue corresponding to the packet includes:
  • the processed packet is smoothly sent to the channelized queue corresponding to the channel number.
  • the step of sending the packet after the third-level flow control is sent to the sending port corresponding to the packet includes:
  • Packets that are subjected to the third-level flow control are encapsulated according to their respective channel numbers, and are cross-mapped into the corresponding sending port and sent out at the rate of the sending port.
  • An embodiment of the present disclosure further provides a message sending apparatus, including:
  • the obtaining module is configured to obtain the first traffic information of the packet delivered by the line card;
  • the first control module is configured to perform first-level flow control on the packet according to the first traffic information, and obtain second traffic information of the received packet after performing the first-level flow control;
  • the second control module is configured to perform second-level flow control on the packet according to the second traffic information, and obtain third traffic information of the packet received after performing the second-level flow control;
  • the forwarding module is configured to send the packet with the second-level flow control to the channelized queue corresponding to the packet;
  • the third control module is configured to perform third-level flow control on the packets in the channelized queue according to the third traffic information
  • the sending module is configured to send the packet with the third-level flow control to the sending port corresponding to the packet for sending.
  • the obtaining module includes:
  • a receiving unit configured to receive a message sent by the line card
  • a cache unit configured to cache the message
  • Obtaining a subunit configured to obtain the first traffic information of the packet.
  • the first control module is configured to: if the traffic indicated by the first traffic information is greater than the first threshold, send a first backpressure packet to the line card, where the first backpressure packet is used
  • the line card performs the first-level flow control on the packet, and obtains the second traffic information of the packet after the first-level flow control is performed.
  • the message sending device further includes:
  • the identification module is configured to classify the packet to obtain an output port corresponding to the channel corresponding to the packet, where the packet has a custom label carrying a channel number.
  • the second control module is configured to:
  • the traffic indicated by the second traffic information is greater than the bandwidth of the output port corresponding to the channel corresponding to the packet, outputting the second backpressure packet through the backpressure channel to perform second-level flow control on the packet;
  • the third traffic information of the packet after the second-level flow control is obtained.
  • the third control module is configured to:
  • the third backflow packet is output through the backpressure channel to perform third-level flow control on the packet.
  • the forwarding module is configured to: perform shaping processing on the packet that is controlled by the second-level flow control, and obtain a processed packet; and smoothly process the processed packet according to the channel number of the processed packet.
  • the packet is sent to the channelized queue corresponding to the channel number.
  • the sending module is configured to: encapsulate the packets after the third-level flow control, encapsulate the packets according to the channel numbers, and cross-map them into the corresponding sending ports, and send them according to the rate of the sending port.
  • the method for sending a packet in the embodiment of the present disclosure obtains the first traffic information of the packet delivered by the line card, and performs the first-level flow control on the packet according to the first traffic information, and obtains the first
  • the second traffic information of the received packet after the traffic control is performed; the second traffic control is performed on the packet according to the second traffic information, and the packet received after the second-level traffic control is obtained.
  • the traffic information is sent to the channelized queue corresponding to the packet, and the third-level packet is sent to the channelized queue according to the third traffic information.
  • the flow control is performed.
  • the packets sent by the third-level flow control are sent to the corresponding sending port of the packet for transmission.
  • Figure 1 shows the implementation of a traditional POS/CPOS interface module.
  • FIG. 2 is a flow chart of a method of transmitting a message of the present disclosure.
  • FIG. 3 is a block diagram of a transmitting apparatus of a message of the present disclosure.
  • FIG. 4 is a block diagram of a specific implementation module of a transmitting apparatus of a message according to the present disclosure.
  • FIG. 5 is a block diagram of a flow control implementation of a POS interface module of the present disclosure.
  • FIG. 6 is a flow chart of the flow control implementation of the rear POS interface module of the present disclosure.
  • FIG. 7 is a block diagram of a flow control implementation of the CPOS interface module of the present disclosure.
  • FIG. 8 is a flow chart of a flow control implementation of the CPOS interface module of the present disclosure.
  • an embodiment of the present disclosure provides a packet sending method, including:
  • Step 21 Obtain first traffic information of the packet delivered by the line card.
  • Step 22 Perform first-level flow control on the packet according to the first traffic information, and obtain second traffic information of the received packet after performing the first-level flow control.
  • Step 23 Perform second-level flow control on the packet according to the second traffic information, and obtain third traffic information of the received packet after performing the second-level flow control.
  • Step 24 Send the packet with the second-level flow control to the channelized queue corresponding to the packet.
  • Step 25 Perform third-level flow control on the packets in the channelized queue according to the third traffic information.
  • Step 26 The third-level flow control packet is sent to the sending port corresponding to the packet for transmission.
  • the packet sending method of the embodiment of the present disclosure obtains the first traffic information of the packet delivered by the line card, performs the first-level flow control on the packet according to the first traffic information, and obtains the first-level flow control.
  • the second traffic information of the received packet is controlled by the second traffic control according to the second traffic information, and the third traffic information of the received packet after the second-level traffic control is obtained;
  • the traffic control packet is sent to the channelized queue corresponding to the packet, and the third-level traffic control is performed on the packet in the channelized queue according to the third traffic information.
  • the sending port corresponding to the packet is sent for transmission.
  • an embodiment of the present disclosure further provides a packet sending apparatus 30, including:
  • the obtaining module 31 is configured to obtain first traffic information of the packet delivered by the line card.
  • the first control module 32 is configured to perform first-level flow control on the packet according to the first traffic information, and obtain second traffic information of the received packet after performing the first-level flow control;
  • the second control module 33 is configured to perform second-level flow control on the packet according to the second traffic information, and obtain third traffic information of the received packet after performing the second-level flow control;
  • the forwarding module 34 is configured to send the packet with the second-level flow control to the channelized queue corresponding to the packet;
  • the third control module 35 is configured to perform third-level flow control on the packets in the channelized queue according to the third traffic information
  • the sending module 36 is configured to send the packet with the third-level flow control to the sending port corresponding to the packet for transmission.
  • the flow control device for the downstream traffic direction of the POS/CPOS interface module mainly includes the following modules:
  • An input module a traffic management module (corresponding to a first control module, a second control module, a third control module, and a forwarding module in the transmitting device of the foregoing message), a cache module, and an output module (corresponding to a transmitting device of the above message) In the sending module);
  • the port between the input module and the line card is connected, and the downlink packet of the line card is received and cached in the downlink direction.
  • the specific port can be selected according to the type of the access side interface of the line card processing chip.
  • the module includes: an Ethernet interface (GE/10G MAC) and a first cache; the Ethernet interface receives the packet sent by the line card, and the packet is sent to the first cache for buffering.
  • the traffic management module mainly implements the downlink input port level (the first-level flow control) of the packet sent by the line card, the output SDH port (the second-level flow control described above), and the channelization level (the third-level flow control described above). Flow control function.
  • the traffic management module After the traffic management module identifies and classifies the packets in the first buffer of the input module, it sends the packets to the corresponding channelized queue according to the channel number of each packet.
  • the three-level flow control function is managed and triggered by the module.
  • the cache module stores the downlink packets in the corresponding channelized queues according to the classification result of the traffic management module.
  • the channelized queues are configured according to different POS/CPOS services, and can be reconstituted into a link channel, a bundle group, and a link channel+channel combination.
  • the output module encapsulates and maps the packets of each channel in the cache module to each output SDH port.
  • Step 211 Receive and cache a message delivered by the line card.
  • Step 212 Acquire first traffic information of the packet.
  • step 22 can include:
  • Step 213 If the traffic indicated by the first traffic information is greater than the first threshold, send a first backpressure packet to the line card, and the line card performs first-level flow control on the packet according to the first backpressure; for example, the first The back pressure packet carries a switch (ie, a back pressure flag) for continuing to send a message.
  • the line card determines whether to continue sending the message according to the switch in the first back pressure message. If it is on, it will continue to send. If it is off, it can wait for a time interval and then send it again, so as to control the flow of the message sent by the line card;
  • Step 214 Obtain second traffic information of the packet after the first-level flow control is performed.
  • the method further comprises:
  • Step 215 The packet is classified to obtain an output port corresponding to the channel corresponding to the packet, where the packet has a custom label carrying a channel number.
  • step 23 includes:
  • Step 216 If the traffic indicated by the second traffic information is greater than the bandwidth of the output port corresponding to the channel corresponding to the packet, outputting the second backpressure packet through the backpressure channel to perform second-level flow control on the packet; The third traffic information of the packet after the second-level flow control is carried; the second backpressure packet carries the channel number corresponding to the packet that needs to be controlled by the flow control, to indicate that the line card matches the designated channel in the backpressure packet. Packets are subjected to flow control, so that the total bandwidth of all channel packets destined for the same output STM port does not exceed the standard bandwidth requirement of the STM port; optionally, the channel number in the second backpressure packet can be used. Traffic control on the packets of the channel, such as the traffic control of the packets of the specified channel in the backpressure packet, ensures that the total bandwidth of all tunnel packets destined for the same output STM port does not exceed the standard bandwidth requirement of the STM port.
  • Step 217 The packet that is subjected to the second-level flow control is sent to the channelized queue corresponding to the packet. Specifically, the packet that is subjected to the second-level flow control is shaped and processed to obtain the processed packet. According to the channel number of the processed packet, the processed packet is smoothly sent to the channelized queue corresponding to the channel number.
  • the above step 25 may include:
  • Step 218 If the traffic volume indicated by the third traffic information is greater than the second threshold, the third backpressure packet is outputted through the backpressure channel to perform third-level flow control on the packet; the third backpressure packet carries traffic required to be performed.
  • the channel number corresponding to the control packet still needs to be controlled by the line card to control the transmission of the specified channel message.
  • the channel of the channel can be controlled according to the channel number in the second backpressure packet. Ensure that each channel buffer or bundle cache does not exceed the respective threshold. If the individual channel buffer exceeds the limit, the backpressure packet carries the cache channel number that exceeds the limit. If the bundle cache exceeds the limit, the backpressure packet carries all the channel numbers in the bundle group.
  • step 26 can include:
  • Step 219 The third-level flow control packet is encapsulated according to the channel number, and is cross-mapped into the corresponding sending port, and sent according to the rate of the sending port.
  • FIG. 4 it is a schematic diagram of a device for transmitting a message corresponding to a specific implementation process of the foregoing method:
  • the flow management module implements the downstream traffic flow control process as follows:
  • the input port controller in the input module such as the GE/10G MAC receiving line card, sends the downlink packet and buffers it by the first buffer, and reports the buffer status of the packet in the first buffer to the traffic management. Module.
  • the traffic management module first determines whether to trigger the input port level flow control according to the empty state of the input buffer in the input module;
  • the flow control engine module in the traffic management module triggers the Ethernet controller to generate the flow control at the input port level.
  • Back pressure message For the Ethernet port, the flow control at the input port level can be directly implemented using the flow control method defined in 802.3x.
  • the downlink packet continues to enter the traffic management module for traffic monitoring and control at the next level.
  • This process can implement the SDH output port and traffic policing function according to actual needs.
  • the traffic policing function of the module is implemented, the downlink packet needs to be added with a custom label header. That is, the downlink packet sent by the line card packet processing module needs to add a custom label header that can be recognized by the module.
  • the format of the message with a custom tag header is as follows:
  • the TPID1, User tag1, TPID2, and User tag2 are part of the custom tag header.
  • the TPID is a custom tag header type.
  • the length is 2 bytes.
  • the value is a custom value and needs to be different from the Ethernet packet type id defined in 802.3.
  • the user tag is a custom tag with a length of 2 bytes, which contains the link channel number corresponding to the downlink packet.
  • the traffic monitoring function is as follows:
  • the classification of the message stream is performed. Determine the output STM port corresponding to the link (link) or the bundle group corresponding to the packet according to the channel number lookup table in the custom tag.
  • the traffic metering module (the traffic monitoring module) is used to monitor the overall bandwidth of an STM port. If the total bandwidth exceeds the output port rate, the traffic control engine module triggers the report.
  • the dedicated back pressure channel outputs a back pressure message for flow control of the STM output port level, and the back pressure message includes a channel number requiring flow control;
  • the flow-controlled packet is sent to each link channel or bundle group queue for smoothing after traffic shaping, and is prevented from being input to the subsequent link buffer (link cache) or bundle.
  • the burst traffic of the buffer (channel group buffer) is too large.
  • the traffic management module determines whether to trigger a back channel message at the link channel level or the bundle group level according to the state of each link buffer or bundle buffer, and the back pressure message has a link channel number that needs to be controlled by the flow.
  • the third-level channelized flow control of the packet on the interface module is implemented.
  • the packets waiting to be sent in each link buffer and bundle buffer are encapsulated in the output module and cross-mapped into the corresponding SDH output port according to the result of the lookup table, and finally sent according to the STM-n standard rate.
  • FIG. 5 and FIG. 6 are flowcharts of the flow control implementation of the post-POS interface module of the present disclosure.
  • the packet flow control process is as follows:
  • Step S101 The input port receives and buffers the downlink packet, and reports the empty buffer status of the input buffer to the traffic management module;
  • Step S102 determining whether the input buffer of the input port exceeds the set high water line, if the entry exceeds S103, otherwise proceeds to S104;
  • Step S103 triggering the Ethernet controller to generate a first-level input port-level flow control backpressure message
  • Step S104 The downlink packet continues to enter the traffic management module to identify the packet, identify the link channel corresponding to each packet, and check the packet to determine the STM outgoing port, and implement traffic supervision of the corresponding STM port.
  • Step S105 Determine whether the SDH port traffic corresponding to the packet exceeds the SDH port bandwidth. If yes, execute S106, otherwise execute S107;
  • Step S106 Send a backpressure packet of the STM port level through a dedicated backpressure channel or an in-band backpressure packet;
  • Step S107 The smoothing of the downlink message is sent to the corresponding link buffer for buffering
  • Step S108 determining the buffer buffer state, such as exceeding the high watermark of each buffer, executing S109, otherwise executing S110;
  • Step S109 triggering an in-band or dedicated out-of-band backpressure channel to send a link-level backpressure message.
  • Step S110 The packet in each link buffer is encapsulated by the output module and cross-mapped into the corresponding SDH egress port, and sent according to the STM-n standard rate.
  • FIG. 7 and FIG. 8 are flowcharts showing the flow control implementation of the post-CPOS interface module of the present disclosure.
  • the packet flow control process is as follows:
  • Step S201 The input port receives and buffers the downlink packet, and reports the empty buffer status of the input buffer to the traffic management module;
  • Step S202 determining whether the input buffer of the input port exceeds the set high water line, if it exceeds the entry S203, otherwise proceeds to S204;
  • Step S203 triggering the Ethernet controller to generate a first-level ingress-level flow control backpressure message
  • Step S204 The downlink packet continues to enter the traffic management module to identify the packet, identify the link channel corresponding to each packet, and check the packet to determine the STM outgoing port, and implement traffic supervision of the corresponding STM port.
  • Step S205 determining whether the SDH port traffic corresponding to the packet exceeds the SDH port bandwidth, if yes, executing S206, otherwise executing S207;
  • Step S206 Send a backpressure packet of the STM port level through a dedicated backpressure channel or an in-band backpressure packet;
  • Step S207 The downlink packet is smoothly sent to the corresponding bundle buffer for buffering
  • Step S208 determining the buffer buffer state, if the high water line set by the bundle buffer is exceeded, executing S209, otherwise executing S210;
  • Step S209 The triggering in-band or dedicated out-of-band backpressure channel sends a backpressure message, and the channel number in the packet includes all the link channels in the bundle buffer group.
  • Step S210 The packets in each bundle buffer are encapsulated by the output module according to the respective link channel numbers and cross-mapped into the corresponding SDH egress port, and sent according to the STM-n standard rate.
  • the POS/CPOS interface module flow control device and the implementation method provided by the disclosure can implement an input port level. Outputs SDH port level, logical channel to bundle group level and other levels of flow control, so that flow control can be accurate to different channel or port level according to actual needs, greatly reducing the line card packet processing chip TM function or dedicated TM chip downlink Flow control requirements reduce the difficulty and cost of implementing the entire line card.
  • the flow control modules of the various levels in the disclosure have reconfigurable features, that is, different configurations can be loaded according to specific service requirements, thereby implementing different levels of flow control, including cache size, number of flow control channels, and flow control granularity.
  • the hardware interface module type is greatly simplified and its implementation cost is reduced.
  • the embodiment of the present disclosure further provides a message sending apparatus 30, including:
  • the obtaining module 31 is configured to obtain first traffic information of the packet delivered by the line card.
  • the first control module 32 is configured to perform first-level flow control on the packet according to the first traffic information, and obtain second traffic information of the received packet after performing the first-level flow control;
  • the second control module 33 is configured to perform second-level flow control on the packet according to the second traffic information, and obtain third traffic information of the received packet after performing the second-level flow control;
  • the forwarding module 34 is configured to send the packet with the second-level flow control to the channelized queue corresponding to the packet;
  • the third control module 35 is configured to perform third-level flow control on the packets in the channelized queue according to the third traffic information
  • the sending module 36 is configured to send the packet with the third-level flow control to the sending port corresponding to the packet for transmission.
  • the obtaining module 31 includes:
  • a receiving unit configured to receive a message sent by the line card
  • Cache unit set to cache messages
  • the sub-unit is obtained, and is configured to obtain the first traffic information of the packet.
  • the first control module 32 is configured to: if the traffic indicated by the first traffic information is greater than the first threshold, send a first backpressure packet to the line card, where the first backpressure packet is used by the line card to perform the packet The first level flow control; and obtains the second flow information of the message after the first level flow control.
  • the sending device of the foregoing message further includes:
  • the identification module is configured to classify the packet, and obtain an output port corresponding to the channel corresponding to the packet, where the packet has a custom label carrying a channel number.
  • the second control module 33 is configured to:
  • the second backpressure packet is output through the backpressure channel to perform second-level flow control on the packet, and the second flow control is performed.
  • the third traffic information of the packet after the traffic control.
  • the third control module 35 is configured to:
  • the third backpressure packet is output through the backpressure channel to perform third-level flow control on the packet.
  • the forwarding module 34 is configured to: perform processing on the packet after the second-level flow control is performed, and obtain the processing. After the packet is received, the processed packet is sent to the channelized queue corresponding to the channel number according to the channel number of the processed packet.
  • the sending module 36 is configured to: encapsulate the packets that are subjected to the third-level flow control, encapsulate the packets according to the respective channel numbers, and cross-map them into the corresponding sending ports, and send them according to the rate of the sending port.
  • the modules may be implemented in software for execution by various types of processors.
  • an identified executable code module can comprise one or more physical or logical blocks of computer instructions, which can be constructed, for example, as an object, procedure, or function. Nonetheless, the executable code of the identified modules need not be physically located together, but may include different instructions stored in different bits that, when logically combined, constitute a module and implement the provisions of the module. purpose.
  • the executable code module can be a single instruction or a plurality of instructions, and can even be distributed across multiple different code segments, distributed among different programs, and distributed across multiple memory devices.
  • operational data may be identified within the modules and may be implemented in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed over different locations (including on different storage devices), and may at least partially exist as an electronic signal on a system or network.
  • the module can be implemented by software, considering the level of the existing hardware process, the module can be implemented in software, and the technician can construct a corresponding hardware circuit to implement the corresponding function without considering the cost.
  • the hardware circuitry includes conventional Very Large Scale Integration (VLSI) circuits or gate arrays as well as existing semiconductors such as logic chips, transistors, or other discrete components.
  • VLSI Very Large Scale Integration
  • the modules can also be implemented with programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices, and the like.

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention relates to the technical field of communications and provides a message sending method and device. The method comprises: acquiring first traffic information of a message issued by a line card; performing first-stage traffic control on the message according to the first traffic information, and obtaining second traffic information of the message received after the first-stage traffic control; performing second-stage traffic control on the message according to the second traffic information, and obtaining third traffic information of the message received after the second-stage traffic control; sending the message subjected to the second-stage traffic control to a channelized queue corresponding to the message, and performing third-stage traffic control on the message in the channelized queue according to the third traffic information; and sending the message subjected to the third-stage traffic control to a sending port corresponding to the message for sending. The solution of the present invention can achieve different stages of traffic control during message forwarding.

Description

报文发送方法及装置Message sending method and device 技术领域Technical field
本公开涉及通信技术领域,特别是一种报文发送方法及装置。The present disclosure relates to the field of communications technologies, and in particular, to a message sending method and apparatus.
背景技术Background technique
SONET(Synchronous Optical Network,同步光网络)是ANSI定义的同步传输体制,是一种全球化的标准传输协议,采用光传输。SONET (Synchronous Optical Network) is an ANSI-defined synchronous transmission system. It is a global standard transmission protocol that uses optical transmission.
SDH(Synchronous Digital Hierarchy,同步数字系列)是CCITT(现在的ITU-T)定义的,采用同步复用方式和灵活的映射结构,可以从SDH信号中直接分插出低速的支路信号,而不需要使用大量的复接/分接设备,从而能够减少信号损耗和设备投资。SDH (Synchronous Digital Hierarchy) is defined by CCITT (now ITU-T). It uses synchronous multiplexing and flexible mapping structure to directly insert and insert low-speed tributary signals from SDH signals without A large number of multiplex/tap devices are required to reduce signal loss and equipment investment.
当把SDH信号看成由低速信号复用而成时,这些低速支路信号就称为通道。CPOS(Channelized POS,即通道化的POS接口,POS接口为在SONET/SDH传输的数据包,即Packet Over SONET/SDH),它充分利用了SDH体制的特点,具有对带宽精细划分的能力,既可减少组网中对设备低速物理端口的数量要求,增强设备的低速端口汇聚能力,又提高设备的专线接入能力。CPOS接口主要用于提高设备对低速接入的汇聚能力,主流应用的接口速率包括STM-1(155.52Mbit/s),STM-4(622M bit/s),STM-16(2.5Gbit/s)等。When the SDH signal is considered to be multiplexed by low-speed signals, these low-speed tributary signals are called channels. CPOS (Channelized POS, the channelized POS interface, the POS interface is the packet transmitted in SONET/SDH, ie Packet Over SONET/SDH), which makes full use of the characteristics of the SDH system and has the ability to finely divide the bandwidth. It can reduce the number of low-speed physical ports on the network, enhance the low-speed port aggregation capability of the device, and improve the dedicated line access capability of the device. The CPOS interface is mainly used to improve the aggregation capability of devices for low-speed access. The interface rates of mainstream applications include STM-1 (155.52 Mbit/s), STM-4 (622 M bit/s), and STM-16 (2.5 Gbit/s). Wait.
在目前的移动承载网PTN、IPRAN接入侧,以及大量企业网接入侧,POS/CPOS接口模块作为UNI侧(用户单元接口)以及部分NNI侧(网络单元接口)的接口仍有着广泛的应用及大量新的商用需求。On the current mobile bearer network PTN, IPRAN access side, and a large number of enterprise network access sides, the POS/CPOS interface module is still widely used as the interface of the UNI side (user unit interface) and part of the NNI side (network element interface). And a large number of new commercial needs.
目前大部分接入/汇聚路由器都支持POS/CPOS接口,对于支持前插式POS/CPOS接口模块在路由器上大多采用如图1所示的方案实现。图1中网络接入流量的包处理芯片在路由器的线卡上,而前插POS/CPOS接口模块一般包括链路映射(link mapper)模块,封装(framer)模块和物理接口几部分。报文下行方向上先经链路地图模块进行适配封装后填入相应速率等级的VC(虚拟容器)容器中,经后续的制作模块按照SDH传输帧结构层层封装后通过STM端口发送出去。Currently, most access/aggregation routers support POS/CPOS interfaces. For the front-plug-in POS/CPOS interface modules, most of the routers are implemented as shown in Figure 1. The packet processing chip of the network access traffic in FIG. 1 is on the line card of the router, and the front plug-in POS/CPOS interface module generally includes a link mapper module, a framer module and a physical interface. The packet is encapsulated in the VC (virtual container) container of the corresponding rate class by the link map module in the downlink direction, and then sent through the STM port according to the SDH transmission frame structure layer encapsulation by the subsequent production module.
流量下行方向上由于线卡的包处理芯片转发速度较高(目前主流的包处理芯片转发能力都在40Gbit/s以上),而POS、CPOS接口模块出端口速率较低(STM-1端口只有155M,STM-4端口为622M),往往需要在线卡的包处理芯片或者接口模块上进行流量控制。In the downstream direction of the traffic, the forwarding speed of the packet processing chip of the line card is high (currently, the packet forwarding capability of the mainstream packet processing chip is above 40 Gbit/s), while the outgoing port rate of the POS and CPOS interface modules is low (the STM-1 port has only 155M). The STM-4 port is 622M), which often requires flow control on the packet processing chip or interface module of the online card.
线卡的流量控制往往由包处理芯片内置TM模块(Traffic Management,流量管理模块)或者专用TM芯片进行端口或通道级限速实现(即端口或通道级的GTS功能)。而POS/CPOS接口模块的通道化后每条链路速率只有2Mbit/s,线卡TM模块的通道级限速功能一般粒度较大,无法精确按照2Mbit/s的低速率进行限制,且精确的通道级限速对TM模块或TM芯片的成本要求较高,当配置多块CPOS/POS接口模块时,路由器的硬件成本会大大增加。The flow control of the line card is often implemented by a packet processing chip built-in TM module (Traffic Management, Traffic Management Module) or a dedicated TM chip for port or channel-level speed limit (ie, GTS function at the port or channel level). On the other hand, the link rate of the POS/CPOS interface module is only 2 Mbit/s. The channel-level rate limit function of the line card module is generally large. It cannot be accurately limited according to the low rate of 2 Mbit/s. The channel-level speed limit has higher cost requirements for the TM module or the TM chip. When multiple CPOS/POS interface modules are configured, the hardware cost of the router is greatly increased.
对于接口模块上的传统流量控制方案,线卡和POS/CPOS接口模块间一般采用如图1所 示支持通道化的SPI4.2或者interlaken接口。SPI4.2接口虽然支持通道化级别的流控,但无法支持线卡和接口模块之间整个端口总带宽流量控制,且SPI4.2总线较多,不利于硬件实现和成本控制。Interlaken接口同样也不支持端口级别的流量控制,且由于该接口单通道的波特率已达到12.5Gbps,对于POS/CPOS 2Mbit/s的低速率通道化应用,流量控制则显得非常灵敏而不易稳定控制。For the traditional flow control scheme on the interface module, the line card and POS/CPOS interface module are generally used as shown in Figure 1. Shows SPI4.2 or interlaken interfaces that support channelization. Although the SPI4.2 interface supports channelization level flow control, it cannot support the total bandwidth flow control of the entire port between the line card and the interface module, and there are many SPI4.2 buses, which is not conducive to hardware implementation and cost control. The Interlaken interface also does not support port-level traffic control, and since the baud rate of the single channel of the interface has reached 12.5 Gbps, for POS/CPOS 2 Mbit/s low-rate channelized applications, the flow control is very sensitive and not stable. control.
发明内容Summary of the invention
本公开的目的是提供一种报文发送方法及装置,可以实现不同级别的流量控制。The purpose of the disclosure is to provide a message sending method and device, which can implement different levels of flow control.
为达到上述目的,本公开的实施例提供一种报文的发送方法,包括:To achieve the above objective, an embodiment of the present disclosure provides a method for sending a message, including:
获取线卡下发的报文的第一流量信息;Obtaining the first traffic information of the packet delivered by the line card;
根据所述第一流量信息对所述报文进行第一级流量控制,并得到进行第一级流量控制后接收到的报文的第二流量信息;Performing, according to the first traffic information, performing first-level flow control on the packet, and obtaining second traffic information of the packet received after performing the first-level flow control;
根据所述第二流量信息对所述报文进行第二级流量控制,并得到进行第二级流量控制后接收到的报文的第三流量信息;And performing second-level flow control on the packet according to the second flow information, and obtaining third traffic information of the received packet after performing the second-level flow control;
将所述进行第二级流量控制后的报文送入该报文对应的通道化队列,并根据所述第三流量信息对所述通道化队列中的报文进行第三级流量控制;Transmitting the packet with the second-level flow control to the channelized queue corresponding to the packet, and performing third-level flow control on the packet in the channelized queue according to the third traffic information;
将进行第三级流量控制后的报文送入该报文对应的发送端口进行发送。The packet with the third-level flow control is sent to the sending port corresponding to the packet for transmission.
其中,获取线卡下发的报文的第一流量信息的步骤包括:The step of obtaining the first traffic information of the packet delivered by the line card includes:
接收并缓存线卡下发的报文;Receiving and buffering the message delivered by the line card;
获取所述报文的所述第一流量信息。Obtaining the first traffic information of the packet.
其中,根据所述第一流量信息对所述报文进行第一级流量控制,并得到进行第一级流量控制后接收到的报文的第二流量信息的步骤包括:The step of performing the first-level flow control on the packet according to the first traffic information, and obtaining the second traffic information of the packet received after the first-level flow control is performed includes:
若所述第一流量信息表示的流量大于第一门限,则向线卡发送第一反压报文,其中,所述第一反压报文用于所述线卡对所述报文进行第一级流量控制;And sending, by the line card, the first back pressure message to the line card, if the traffic indicated by the first traffic information is greater than the first threshold, where the first backpressure message is used by the line card to perform the first Primary flow control;
获得第一级流量控制后的报文的第二流量信息。The second traffic information of the packet after the first-level flow control is obtained.
其中,对报文进行第一级流量控制后还包括:After performing the first-level flow control on the packet, the method further includes:
对所述报文进行分类,得到该报文对应的通道所对应的输出端口,其中,所述报文中具有携带有通道号的自定义标签。The packet is classified to obtain an output port corresponding to the channel corresponding to the packet, where the packet has a custom label carrying a channel number.
其中,根据所述第二流量信息对所述报文进行第二级流量控制,并得到进行第二级流量控制后的报文的第三流量信息的步骤包括:The step of performing the second-level flow control on the packet according to the second traffic information, and obtaining the third traffic information of the packet after the second-level flow control is performed includes:
若所述第二流量信息表示的流量大于该报文对应的通道所对应的输出端口的带宽,则通过反压通道输出第二反压报文对所述报文进行第二级流量控制;If the traffic indicated by the second traffic information is greater than the bandwidth of the output port corresponding to the channel corresponding to the packet, outputting the second backpressure packet through the backpressure channel to perform second-level flow control on the packet;
获得进行第二级流量控制后接收到的报文的第三流量信息。The third traffic information of the received message after the second-level flow control is obtained.
其中,根据所述第三流量信息对所述通道化队列中的报文进行第三级流量控制的步骤包括:The step of performing third-level flow control on the packets in the channelized queue according to the third traffic information includes:
若所述第三流量信息表示的流量大于第二门限,则通过反压通道输出第三反压报文对所 述报文进行第三级流量控制。If the flow rate indicated by the third flow information is greater than the second threshold, outputting a third back pressure message through the back pressure channel The message performs third-level flow control.
其中,将所述进行第二级流量控制后的报文送入该报文对应的通道化队列的步骤包括:The step of sending the packet with the second-level flow control to the channelized queue corresponding to the packet includes:
将所述进行第二级流量控制后的报文进行整形处理,得到处理后的报文;And performing the shaping processing on the packet after the second-level flow control is performed to obtain the processed packet;
按照处理后的报文的通道号,平滑的将处理后的报文送入该通道号对应的通道化队列。According to the channel number of the processed packet, the processed packet is smoothly sent to the channelized queue corresponding to the channel number.
其中,将进行第三级流量控制后的报文送入该报文对应的发送端口进行发送的步骤包括:The step of sending the packet after the third-level flow control is sent to the sending port corresponding to the packet includes:
将进行第三级流量控制后的报文,按照各自的通道号进行封装,并交叉映射入对应的发送端口,按照发送端口的速率发送出去。Packets that are subjected to the third-level flow control are encapsulated according to their respective channel numbers, and are cross-mapped into the corresponding sending port and sent out at the rate of the sending port.
本公开的实施例还提供一种报文发送装置,包括:An embodiment of the present disclosure further provides a message sending apparatus, including:
获取模块,设置为获取线卡下发的报文的第一流量信息;The obtaining module is configured to obtain the first traffic information of the packet delivered by the line card;
第一控制模块,设置为根据所述第一流量信息对所述报文进行第一级流量控制,并得到进行第一级流量控制后接收到的报文的第二流量信息;The first control module is configured to perform first-level flow control on the packet according to the first traffic information, and obtain second traffic information of the received packet after performing the first-level flow control;
第二控制模块,设置为根据所述第二流量信息对所述报文进行第二级流量控制,并得到进行第二级流量控制后接收到的报文的第三流量信息;The second control module is configured to perform second-level flow control on the packet according to the second traffic information, and obtain third traffic information of the packet received after performing the second-level flow control;
转发模块,设置为将所述进行第二级流量控制后的报文送入该报文对应的通道化队列;The forwarding module is configured to send the packet with the second-level flow control to the channelized queue corresponding to the packet;
第三控制模块,设置为根据所述第三流量信息对所述通道化队列中的报文进行第三级流量控制;The third control module is configured to perform third-level flow control on the packets in the channelized queue according to the third traffic information;
发送模块,设置为将进行第三级流量控制后的报文送入该报文对应的发送端口进行发送。The sending module is configured to send the packet with the third-level flow control to the sending port corresponding to the packet for sending.
其中,所述获取模块包括:The obtaining module includes:
接收单元,设置为接收线卡下发的报文;a receiving unit, configured to receive a message sent by the line card;
缓存单元,设置为缓存所述报文;a cache unit, configured to cache the message;
获取子单元,设置为获取所述报文的所述第一流量信息。Obtaining a subunit, configured to obtain the first traffic information of the packet.
其中,所述第一控制模块设置为:若所述第一流量信息表示的流量大于第一门限,则向线卡发送第一反压报文,其中,所述第一反压报文用于所述线卡对所述报文进行第一级流量控制;并获得进行第一级流量控制后的报文的第二流量信息。The first control module is configured to: if the traffic indicated by the first traffic information is greater than the first threshold, send a first backpressure packet to the line card, where the first backpressure packet is used The line card performs the first-level flow control on the packet, and obtains the second traffic information of the packet after the first-level flow control is performed.
其中,上述报文发送装置还包括:The message sending device further includes:
识别模块,设置为对所述报文进行分类,得到该报文对应的通道所对应的输出端口,其中,所述报文中具有携带有通道号的自定义标签。The identification module is configured to classify the packet to obtain an output port corresponding to the channel corresponding to the packet, where the packet has a custom label carrying a channel number.
其中,所述第二控制模块设置为:The second control module is configured to:
若所述第二流量信息表示的流量大于该报文对应的通道所对应的输出端口的带宽,则通过反压通道输出第二反压报文对所述报文进行第二级流量控制;并获得进行第二级流量控制后的报文的第三流量信息。If the traffic indicated by the second traffic information is greater than the bandwidth of the output port corresponding to the channel corresponding to the packet, outputting the second backpressure packet through the backpressure channel to perform second-level flow control on the packet; The third traffic information of the packet after the second-level flow control is obtained.
其中,所述第三控制模块设置为:The third control module is configured to:
若所述第三流量信息表示的流量大于第二门限,则通过反压通道输出第三反压报文对所述报文进行第三级流量控制。 And if the traffic indicated by the third traffic information is greater than the second threshold, the third backflow packet is output through the backpressure channel to perform third-level flow control on the packet.
其中,所述转发模块设置为:将所述进行第二级流量控制后的报文进行整形处理,得到处理后的报文;并按照处理后的报文的通道号,平滑的将处理后的报文送入该通道号对应的通道化队列。The forwarding module is configured to: perform shaping processing on the packet that is controlled by the second-level flow control, and obtain a processed packet; and smoothly process the processed packet according to the channel number of the processed packet. The packet is sent to the channelized queue corresponding to the channel number.
其中,所述发送模块设置为:将进行第三级流量控制后的报文,按照各自的通道号进行封装,并交叉映射入对应的发送端口,按照发送端口的速率发送出去。The sending module is configured to: encapsulate the packets after the third-level flow control, encapsulate the packets according to the channel numbers, and cross-map them into the corresponding sending ports, and send them according to the rate of the sending port.
本公开实施例的报文的发送方法,通过获取线卡下发的报文的第一流量信息;根据所述第一流量信息对所述报文进行第一级流量控制,并得到进行第一级流量控制后接收到的报文的第二流量信息;根据所述第二流量信息对所述报文进行第二级流量控制,并得到进行第二级流量控制后接收到的报文的第三流量信息;将所述进行第二级流量控制后的报文送入该报文对应的通道化队列,并根据所述第三流量信息对所述通道化队列中的报文进行第三级流量控制;将进行第三级流量控制后的报文送入该报文对应的发送端口进行发送。从而实现不同级别的流量控制,包括缓存大小,流控通道数目及流控粒度等,相比传统固定做POS或CPOS的接口模块极大简化了硬件接口模块种类并降低了其实现成本。The method for sending a packet in the embodiment of the present disclosure obtains the first traffic information of the packet delivered by the line card, and performs the first-level flow control on the packet according to the first traffic information, and obtains the first The second traffic information of the received packet after the traffic control is performed; the second traffic control is performed on the packet according to the second traffic information, and the packet received after the second-level traffic control is obtained. The traffic information is sent to the channelized queue corresponding to the packet, and the third-level packet is sent to the channelized queue according to the third traffic information. The flow control is performed. The packets sent by the third-level flow control are sent to the corresponding sending port of the packet for transmission. Thus, different levels of flow control, including cache size, number of flow control channels, and flow control granularity, are greatly simplified, and the interface module of the conventional fixed POS or CPOS greatly simplifies the hardware interface module type and reduces the implementation cost.
附图说明DRAWINGS
图1是传统POS/CPOS接口模块实现方案。Figure 1 shows the implementation of a traditional POS/CPOS interface module.
图2是本公开的报文的发送方法的流程图。2 is a flow chart of a method of transmitting a message of the present disclosure.
图3是本公开的报文的发送装置的模块示意图。3 is a block diagram of a transmitting apparatus of a message of the present disclosure.
图4是本公开的报文的发送装置的一具体实现模块框图。4 is a block diagram of a specific implementation module of a transmitting apparatus of a message according to the present disclosure.
图5是本公开的POS接口模块流量控制实现的模块框图。5 is a block diagram of a flow control implementation of a POS interface module of the present disclosure.
图6是本公开的后POS接口模块流量控制实现的流程图。6 is a flow chart of the flow control implementation of the rear POS interface module of the present disclosure.
图7是本公开的CPOS接口模块流量控制实现的模块框图。7 is a block diagram of a flow control implementation of the CPOS interface module of the present disclosure.
图8是本公开的CPOS接口模块流量控制实现的流程图。8 is a flow chart of a flow control implementation of the CPOS interface module of the present disclosure.
具体实施方式detailed description
为使本公开要解决的技术问题、技术方案和优点更加清楚,下面将结合附图及具体实施例进行详细描述。The technical problems, the technical solutions, and the advantages of the present invention will be more clearly described in conjunction with the accompanying drawings and specific embodiments.
如图2所示,本公开的实施例提供一种报文发送方法,包括:As shown in FIG. 2, an embodiment of the present disclosure provides a packet sending method, including:
步骤21,获取线卡下发的报文的第一流量信息;Step 21: Obtain first traffic information of the packet delivered by the line card.
步骤22,根据第一流量信息对报文进行第一级流量控制,并得到进行第一级流量控制后接收到的报文的第二流量信息;Step 22: Perform first-level flow control on the packet according to the first traffic information, and obtain second traffic information of the received packet after performing the first-level flow control.
步骤23,根据第二流量信息对报文进行第二级流量控制,并得到进行第二级流量控制后接收到的报文的第三流量信息;Step 23: Perform second-level flow control on the packet according to the second traffic information, and obtain third traffic information of the received packet after performing the second-level flow control.
步骤24,将进行第二级流量控制后的报文送入该报文对应的通道化队列;Step 24: Send the packet with the second-level flow control to the channelized queue corresponding to the packet.
步骤25,根据第三流量信息对通道化队列中的报文进行第三级流量控制;Step 25: Perform third-level flow control on the packets in the channelized queue according to the third traffic information.
步骤26,将进行第三级流量控制后的报文送入该报文对应的发送端口进行发送。 Step 26: The third-level flow control packet is sent to the sending port corresponding to the packet for transmission.
本公开的实施例的报文发送方法,通过获取线卡下发的报文的第一流量信息;根据第一流量信息对报文进行第一级流量控制,并得到进行第一级流量控制后接收到的报文的第二流量信息;根据第二流量信息对报文进行第二级流量控制,并得到进行第二级流量控制后接收到的报文的第三流量信息;将进行第二级流量控制后的报文送入该报文对应的通道化队列,并根据第三流量信息对通道化队列中的报文进行第三级流量控制;将进行第三级流量控制后的报文送入该报文对应的发送端口进行发送。从而实现不同级别的流量控制,包括缓存大小,流控通道数目及流控粒度等,相比传统固定做POS或CPOS的接口模块极大简化了硬件接口模块种类并降低了其实现成本。The packet sending method of the embodiment of the present disclosure obtains the first traffic information of the packet delivered by the line card, performs the first-level flow control on the packet according to the first traffic information, and obtains the first-level flow control. The second traffic information of the received packet is controlled by the second traffic control according to the second traffic information, and the third traffic information of the received packet after the second-level traffic control is obtained; The traffic control packet is sent to the channelized queue corresponding to the packet, and the third-level traffic control is performed on the packet in the channelized queue according to the third traffic information. The sending port corresponding to the packet is sent for transmission. Thus, different levels of flow control, including cache size, number of flow control channels, and flow control granularity, are greatly simplified, and the interface module of the conventional fixed POS or CPOS greatly simplifies the hardware interface module type and reduces the implementation cost.
如图3所示,本公开的实施例还提供一种报文的发送装置30,包括:As shown in FIG. 3, an embodiment of the present disclosure further provides a packet sending apparatus 30, including:
获取模块31,设置为获取线卡下发的报文的第一流量信息;The obtaining module 31 is configured to obtain first traffic information of the packet delivered by the line card.
第一控制模块32,设置为根据第一流量信息对报文进行第一级流量控制,并得到进行第一级流量控制后接收到的报文的第二流量信息;The first control module 32 is configured to perform first-level flow control on the packet according to the first traffic information, and obtain second traffic information of the received packet after performing the first-level flow control;
第二控制模块33,设置为根据第二流量信息对报文进行第二级流量控制,并得到进行第二级流量控制后接收到的报文的第三流量信息;The second control module 33 is configured to perform second-level flow control on the packet according to the second traffic information, and obtain third traffic information of the received packet after performing the second-level flow control;
转发模块34,设置为将进行第二级流量控制后的报文送入该报文对应的通道化队列;The forwarding module 34 is configured to send the packet with the second-level flow control to the channelized queue corresponding to the packet;
第三控制模块35,设置为根据第三流量信息对通道化队列中的报文进行第三级流量控制;The third control module 35 is configured to perform third-level flow control on the packets in the channelized queue according to the third traffic information;
发送模块36,设置为将进行第三级流量控制后的报文送入该报文对应的发送端口进行发送。The sending module 36 is configured to send the packet with the third-level flow control to the sending port corresponding to the packet for transmission.
该装置的具体实现如图4所示:针对POS/CPOS接口模块下行流量方向的流量控制装置,主要包括以下模块:The specific implementation of the device is shown in Figure 4: The flow control device for the downstream traffic direction of the POS/CPOS interface module mainly includes the following modules:
输入模块、流量管理模块(相当于上述报文的发送装置中的第一控制模块、第二控制模块、第三控制模块以及转发模块)、缓存模块和输出模块(相当于上述报文的发送装置中的发送模块);An input module, a traffic management module (corresponding to a first control module, a second control module, a third control module, and a forwarding module in the transmitting device of the foregoing message), a cache module, and an output module (corresponding to a transmitting device of the above message) In the sending module);
其中,输入模块和线卡之间端口对接,下行方向接收并缓存线卡的下行报文,具体端口可以根据线卡包处理芯片的接入侧接口类型选择,这里以以太网接口为例,输入模块包括:以太网接口(GE/10G MAC)以及第一缓存;以太网接口接收线卡发送的报文,报文送入第一缓存中进行缓存。The port between the input module and the line card is connected, and the downlink packet of the line card is received and cached in the downlink direction. The specific port can be selected according to the type of the access side interface of the line card processing chip. The module includes: an Ethernet interface (GE/10G MAC) and a first cache; the Ethernet interface receives the packet sent by the line card, and the packet is sent to the first cache for buffering.
流量管理模块主要实现线卡发送的报文的下行输入端口级(上述第一级流量控制),输出SDH端口(上述第二级流量控制)以及通道化级(上述第三级流量控制)三级流量控制功能。The traffic management module mainly implements the downlink input port level (the first-level flow control) of the packet sent by the line card, the output SDH port (the second-level flow control described above), and the channelization level (the third-level flow control described above). Flow control function.
流量管理模块将输入模块的第一缓存中的报文进行识别和分类后,按各报文的通道号,将其送入对应的通道化队列。三级流量控制功能由该模块统一管理并触发。After the traffic management module identifies and classifies the packets in the first buffer of the input module, it sends the packets to the corresponding channelized queue according to the channel number of each packet. The three-level flow control function is managed and triggered by the module.
缓存模块主要是按照流量管理模块的分类结果,将下行方向报文分别存入对应的通道化队列。通道化队列依据POS/CPOS业务不同配置,可以分别重构成链路(Link)通道,通道(bundle)组以及链路通道+通道组合的形式; The cache module stores the downlink packets in the corresponding channelized queues according to the classification result of the traffic management module. The channelized queues are configured according to different POS/CPOS services, and can be reconstituted into a link channel, a bundle group, and a link channel+channel combination.
输出模块则将缓存模块中的各通道的报文分别封装并映射至各输出SDH端口。The output module encapsulates and maps the packets of each channel in the cache module to each output SDH port.
上述图2所示的方法的具体实现流程包括:The specific implementation process of the method shown in Figure 2 above includes:
步骤211,接收并缓存线卡下发的报文;Step 211: Receive and cache a message delivered by the line card.
步骤212,获取报文的第一流量信息。Step 212: Acquire first traffic information of the packet.
任选地,步骤22可以包括:Optionally, step 22 can include:
步骤213,若第一流量信息表示的流量大于第一门限,则向线卡发送第一反压报文,由线卡根据第一反压对报文进行第一级流量控制;如,第一反压报文中携带了是否继续发送报文的开关(即反压标志),线卡收到第一反压报文后,根据该第一反压报文中的开关决定是否继续发送报文,若是开,则继续发,若是关,则可以等待一时间间隔后再发,从而起到对线卡发送的报文的流量控制;Step 213: If the traffic indicated by the first traffic information is greater than the first threshold, send a first backpressure packet to the line card, and the line card performs first-level flow control on the packet according to the first backpressure; for example, the first The back pressure packet carries a switch (ie, a back pressure flag) for continuing to send a message. After receiving the first back pressure message, the line card determines whether to continue sending the message according to the switch in the first back pressure message. If it is on, it will continue to send. If it is off, it can wait for a time interval and then send it again, so as to control the flow of the message sent by the line card;
步骤214,获得进行第一级流量控制后的报文的第二流量信息。Step 214: Obtain second traffic information of the packet after the first-level flow control is performed.
任选地,方法还包括:Optionally, the method further comprises:
步骤215,对报文进行分类,得到该报文对应的通道所对应的输出端口,其中,报文中具有携带有通道号的自定义标签。Step 215: The packet is classified to obtain an output port corresponding to the channel corresponding to the packet, where the packet has a custom label carrying a channel number.
任选地,上述步骤23包括:Optionally, the above step 23 includes:
步骤216,若第二流量信息表示的流量大于该报文对应的通道所对应的输出端口的带宽,则通过反压通道输出第二反压报文对报文进行第二级流量控制;获得进行第二级流量控制后的报文的第三流量信息;该第二反压报文中携带有需要进行流量控制的报文对应的通道号,以指示线卡对反压报文中指定通道的报文进行流量控制,从而保证最终去往同一输出STM端口的所有通道报文总带宽不超过STM端口标准带宽要求;任选地,可以根据该第二反压报文中的通道号,对该通道的报文进行流量控制,如对反压报文中指定通道的报文进行流量控制,从而保证最终去往同一输出STM端口的所有通道报文总带宽不超过STM端口标准带宽要求。Step 216: If the traffic indicated by the second traffic information is greater than the bandwidth of the output port corresponding to the channel corresponding to the packet, outputting the second backpressure packet through the backpressure channel to perform second-level flow control on the packet; The third traffic information of the packet after the second-level flow control is carried; the second backpressure packet carries the channel number corresponding to the packet that needs to be controlled by the flow control, to indicate that the line card matches the designated channel in the backpressure packet. Packets are subjected to flow control, so that the total bandwidth of all channel packets destined for the same output STM port does not exceed the standard bandwidth requirement of the STM port; optionally, the channel number in the second backpressure packet can be used. Traffic control on the packets of the channel, such as the traffic control of the packets of the specified channel in the backpressure packet, ensures that the total bandwidth of all tunnel packets destined for the same output STM port does not exceed the standard bandwidth requirement of the STM port.
步骤217,将进行第二级流量控制后的报文送入该报文对应的通道化队列;具体的,可以将进行第二级流量控制后的报文进行整形处理,得到处理后的报文;按照处理后的报文的通道号,平滑的将处理后报文送入该通道号对应的通道化队列。Step 217: The packet that is subjected to the second-level flow control is sent to the channelized queue corresponding to the packet. Specifically, the packet that is subjected to the second-level flow control is shaped and processed to obtain the processed packet. According to the channel number of the processed packet, the processed packet is smoothly sent to the channelized queue corresponding to the channel number.
任选地,上述步骤25可以包括:Optionally, the above step 25 may include:
步骤218,若第三流量信息表示的流量大于第二门限,则通过反压通道输出第三反压报文对报文进行第三级流量控制;第三反压报文中携带有需要进行流量控制的报文对应的通道号,仍需要通过线卡控制指定通道报文的发送;任选地,可以根据该第二反压报文中的通道号,对该通道的报文进行流量控制。保证各通道缓存或bundle缓存不超过各自门限值。如个别通道缓存超限,则反压报文中携带超限的缓存通道号;如bundle组缓存超限,则反压报文中携带该bundle组内所有的通道号。Step 218: If the traffic volume indicated by the third traffic information is greater than the second threshold, the third backpressure packet is outputted through the backpressure channel to perform third-level flow control on the packet; the third backpressure packet carries traffic required to be performed. The channel number corresponding to the control packet still needs to be controlled by the line card to control the transmission of the specified channel message. Optionally, the channel of the channel can be controlled according to the channel number in the second backpressure packet. Ensure that each channel buffer or bundle cache does not exceed the respective threshold. If the individual channel buffer exceeds the limit, the backpressure packet carries the cache channel number that exceeds the limit. If the bundle cache exceeds the limit, the backpressure packet carries all the channel numbers in the bundle group.
任选地,步骤26可以包括:Optionally, step 26 can include:
步骤219,将进行第三级流量控制后的报文,按照各自的通道号进行封装,并交叉映射入对应的发送端口,按照发送端口的速率发送出去。 Step 219: The third-level flow control packet is encapsulated according to the channel number, and is cross-mapped into the corresponding sending port, and sent according to the rate of the sending port.
如图4所示,为上述方法的具体实现流程对应的报文的发送装置的示意图:As shown in FIG. 4, it is a schematic diagram of a device for transmitting a message corresponding to a specific implementation process of the foregoing method:
其中,流量管理模块实现下行流量流控过程如下:The flow management module implements the downstream traffic flow control process as follows:
1、输入模块中的输入端口控制器如GE/10G MAC接收线卡发送的下行报文并由第一缓存进行缓存,并将第一缓存(input buffer)中报文的缓存状态上报给流量管理模块。1. The input port controller in the input module, such as the GE/10G MAC receiving line card, sends the downlink packet and buffers it by the first buffer, and reports the buffer status of the packet in the first buffer to the traffic management. Module.
流量管理模块首先根据输入模块中input buffer空满状态决定是否触发输入端口级流量控制;The traffic management module first determines whether to trigger the input port level flow control according to the empty state of the input buffer in the input module;
当下行流量突发过大,超过input buffer的反压门限(如上述第一门限)时,由流量管理模块中的流量控制引擎(flow control engine)模块触发以太控制器产生输入端口级的流控反压报文。对于以太网口来说,输入端口级的流控可直接使用802.3x已定义的流控方式实现。When the downlink traffic burst is too large and exceeds the back pressure threshold of the input buffer (such as the first threshold mentioned above), the flow control engine module in the traffic management module triggers the Ethernet controller to generate the flow control at the input port level. Back pressure message. For the Ethernet port, the flow control at the input port level can be directly implemented using the flow control method defined in 802.3x.
2、经过第一缓存后,下行报文继续进入流量管理模块进行下一级的流量监管与控制。此过程可以根据实际需求实现SDH输出端口及的流量监管功能。该模块流量监管功能的实现时,下行报文需要增加自定义标签头,即线卡包处理模块发出的下行报文需要增加可以被本模块识别的自定义标签头。带自定义标签头的报文格式如下:2. After the first buffer, the downlink packet continues to enter the traffic management module for traffic monitoring and control at the next level. This process can implement the SDH output port and traffic policing function according to actual needs. When the traffic policing function of the module is implemented, the downlink packet needs to be added with a custom label header. That is, the downlink packet sent by the line card packet processing module needs to add a custom label header that can be recognized by the module. The format of the message with a custom tag header is as follows:
DMACDMAC SMACSMAC TPID1TPID1 User tag1User tag1 TPID2TPID2 User tag2User tag2 Payload+CRC32Payload+CRC32
其中,TPID1,User tag1,TPID2和User tag2部分为自定义标签头部分,TPID为自定义的标签头类型,长度为2byte,采用自定义的值且需要与802.3定义的以太报文type id区别。The TPID1, User tag1, TPID2, and User tag2 are part of the custom tag header. The TPID is a custom tag header type. The length is 2 bytes. The value is a custom value and needs to be different from the Ethernet packet type id defined in 802.3.
User tag为自定义标签,长度为2字节,其中包含了下行报文所对应的链路(Link)通道号。The user tag is a custom tag with a length of 2 bytes, which contains the link channel number corresponding to the downlink packet.
报文进入流量管理模块后按如下方式步骤流量监功能:After the packet enters the traffic management module, the traffic monitoring function is as follows:
首先进行报文流的分类。根据自定义标签中的通道号查表判断报文对应的链路(Link)或通道(bundle)组所对应的输出STM端口;First, the classification of the message stream is performed. Determine the output STM port corresponding to the link (link) or the bundle group corresponding to the packet according to the channel number lookup table in the custom tag.
其次,在SDH port policing模块(SDH端口控监控模块)中,利用traffic metering模块(流量监测模块)监测去往某个STM端口的整体带宽,如总带宽超过输出端口速率则上报流量控制引擎模块触发专用反压通道输出反压报文进行STM输出端口级的流量控制,反压报文包含需要流量控制的通道号;Secondly, in the SDH port policing module (SDH port control module), the traffic metering module (the traffic monitoring module) is used to monitor the overall bandwidth of an STM port. If the total bandwidth exceeds the output port rate, the traffic control engine module triggers the report. The dedicated back pressure channel outputs a back pressure message for flow control of the STM output port level, and the back pressure message includes a channel number requiring flow control;
然后,经流量控制后的报文通过整形(Shaper)处理模块,经流量整形后平滑的送入各link通道或bundle组队列进行缓存,防止输入给后级link buffer(链路缓存)或bundle buffer(通道组缓存)的突发流量过大。Then, the flow-controlled packet is sent to each link channel or bundle group queue for smoothing after traffic shaping, and is prevented from being input to the subsequent link buffer (link cache) or bundle. The burst traffic of the buffer (channel group buffer) is too large.
最后,流量管理模块根据各个link buffer或bundle buffer的状态决定是否触发link通道级或bundle组级的反压报文,反压报文中带有需要进行流量控制的link通道号。此时实现了报文在接口模块上第三级通道化流控。Finally, the traffic management module determines whether to trigger a back channel message at the link channel level or the bundle group level according to the state of each link buffer or bundle buffer, and the back pressure message has a link channel number that needs to be controlled by the flow. At this time, the third-level channelized flow control of the packet on the interface module is implemented.
3、各link buffer及bundle buffer中等待发送的报文在输出模块中被适配封装并根据查表结果交叉映射入对应的SDH输出端口,最后按照STM-n标准速率发送出去。3. The packets waiting to be sent in each link buffer and bundle buffer are encapsulated in the output module and cross-mapped into the corresponding SDH output port according to the result of the lookup table, and finally sent according to the STM-n standard rate.
图5、图6为本公开的后POS接口模块流量控制实现的流程图,当接口模块配置成POS接口时报文流量控制过程如下: FIG. 5 and FIG. 6 are flowcharts of the flow control implementation of the post-POS interface module of the present disclosure. When the interface module is configured as a POS interface, the packet flow control process is as follows:
步骤S101:输入端口接收并缓存下行报文,并将input buffer的空满缓存状态上报给流量管理模块;;Step S101: The input port receives and buffers the downlink packet, and reports the empty buffer status of the input buffer to the traffic management module;
步骤S102:判断输入端口的input buffer是否超过设置的高水线,如超过进入S103,否则进入S104;Step S102: determining whether the input buffer of the input port exceeds the set high water line, if the entry exceeds S103, otherwise proceeds to S104;
步骤S103:触发以太控制器产生第一级输入端口级流控反压报文;Step S103: triggering the Ethernet controller to generate a first-level input port-level flow control backpressure message;
步骤S104:下行报文继续进入流量管理模块进行报文识别,识别出各报文所对应的link通道并查表判断报文对应STM出端口,并实现对应STM端口的流量监管;Step S104: The downlink packet continues to enter the traffic management module to identify the packet, identify the link channel corresponding to each packet, and check the packet to determine the STM outgoing port, and implement traffic supervision of the corresponding STM port.
步骤S105:判断报文所对应SDH端口流量是否超过SDH端口带宽?是则执行S106,否则执行S107;Step S105: Determine whether the SDH port traffic corresponding to the packet exceeds the SDH port bandwidth. If yes, execute S106, otherwise execute S107;
步骤S106:通过专用反压通道或带内反压报文发送STM端口级的反压报文;Step S106: Send a backpressure packet of the STM port level through a dedicated backpressure channel or an in-band backpressure packet;
步骤S107:下行报文平滑的送入对应link buffer进行缓存;Step S107: The smoothing of the downlink message is sent to the corresponding link buffer for buffering;
步骤S108:判断各link buffer缓存状态,如超过各buffer的高水线则执行S109,否则执行S110;Step S108: determining the buffer buffer state, such as exceeding the high watermark of each buffer, executing S109, otherwise executing S110;
步骤S109:触发带内或专用带外反压通道发送link级的反压报文。Step S109: triggering an in-band or dedicated out-of-band backpressure channel to send a link-level backpressure message.
步骤S110:各link buffer中的报文被输出模块封装并交叉映射入对应的SDH出端口,按照STM-n标准速率发送出去。Step S110: The packet in each link buffer is encapsulated by the output module and cross-mapped into the corresponding SDH egress port, and sent according to the STM-n standard rate.
如图7和图8,为本公开的后CPOS接口模块流量控制实现的流程图,当接口模块配置成CPOS接口时报文流量控制过程如下:FIG. 7 and FIG. 8 are flowcharts showing the flow control implementation of the post-CPOS interface module of the present disclosure. When the interface module is configured as a CPOS interface, the packet flow control process is as follows:
步骤S201:输入端口接收并缓存下行报文,并将input buffer的空满缓存状态上报给流量管理模块;;Step S201: The input port receives and buffers the downlink packet, and reports the empty buffer status of the input buffer to the traffic management module;
步骤S202:判断输入端口的input buffer是否超过设置的高水线,如超过进入S203,否则进入S204;Step S202: determining whether the input buffer of the input port exceeds the set high water line, if it exceeds the entry S203, otherwise proceeds to S204;
步骤S203:触发以太控制器产生第一级入端口级流控反压报文;Step S203: triggering the Ethernet controller to generate a first-level ingress-level flow control backpressure message;
步骤S204:下行报文继续进入流量管理模块进行报文识别,识别出各报文所对应的link通道并查表判断报文对应STM出端口,并实现对应STM端口的流量监管;Step S204: The downlink packet continues to enter the traffic management module to identify the packet, identify the link channel corresponding to each packet, and check the packet to determine the STM outgoing port, and implement traffic supervision of the corresponding STM port.
步骤S205:判断报文所对应SDH端口流量是否超过SDH端口带宽,是则执行S206,否则执行S207;Step S205: determining whether the SDH port traffic corresponding to the packet exceeds the SDH port bandwidth, if yes, executing S206, otherwise executing S207;
步骤S206:通过专用反压通道或带内反压报文发送STM端口级的反压报文;Step S206: Send a backpressure packet of the STM port level through a dedicated backpressure channel or an in-band backpressure packet;
步骤S207:下行报文平滑的送入对应bundle buffer进行缓存;Step S207: The downlink packet is smoothly sent to the corresponding bundle buffer for buffering;
步骤S208:判断bundle buffer缓存状态,如超过bundle buffer所设置的高水线则执行S209,否则执行S210;Step S208: determining the buffer buffer state, if the high water line set by the bundle buffer is exceeded, executing S209, otherwise executing S210;
步骤S209:触发带内或专用带外反压通道发送反压报文,报文中的通道号包括该bundle buffer组内所有link通道。Step S209: The triggering in-band or dedicated out-of-band backpressure channel sends a backpressure message, and the channel number in the packet includes all the link channels in the bundle buffer group.
步骤S210:各bundle buffer中的报文按照各自link通道号被输出模块封装并交叉映射入对应的SDH出端口,按照STM-n标准速率发送出去。Step S210: The packets in each bundle buffer are encapsulated by the output module according to the respective link channel numbers and cross-mapped into the corresponding SDH egress port, and sent according to the STM-n standard rate.
本公开提供的POS/CPOS接口模块流量控制装置及实现方法中,可以实现输入端口级, 输出SDH端口级,逻辑通道至bundle组级等各级别的流量控制,使得流量控制可以根据实际需求精确到不同的通道或端口级别,大大减轻了对线卡包处理芯片TM功能或专用TM芯片下行流量控制要求,降低了整个线卡的实现难度和成本。The POS/CPOS interface module flow control device and the implementation method provided by the disclosure can implement an input port level. Outputs SDH port level, logical channel to bundle group level and other levels of flow control, so that flow control can be accurate to different channel or port level according to actual needs, greatly reducing the line card packet processing chip TM function or dedicated TM chip downlink Flow control requirements reduce the difficulty and cost of implementing the entire line card.
另外本公开中各个级别的流量控制模块都具备可重构特性,即可以根据具体业务需求加载不同的配置,从而实现不同级别的流量控制,包括缓存大小,流控通道数目及流控粒度等,相比传统固定做POS或CPOS的接口模块极大简化了硬件接口模块种类并降低了其实现成本。In addition, the flow control modules of the various levels in the disclosure have reconfigurable features, that is, different configurations can be loaded according to specific service requirements, thereby implementing different levels of flow control, including cache size, number of flow control channels, and flow control granularity. Compared with the traditional fixed POS or CPOS interface module, the hardware interface module type is greatly simplified and its implementation cost is reduced.
再如图3所示,与上述方法对应的,本公开的实施例还提供一种报文发送装置30,包括:As shown in FIG. 3, corresponding to the foregoing method, the embodiment of the present disclosure further provides a message sending apparatus 30, including:
获取模块31,设置为获取线卡下发的报文的第一流量信息;The obtaining module 31 is configured to obtain first traffic information of the packet delivered by the line card.
第一控制模块32,设置为根据第一流量信息对报文进行第一级流量控制,并得到进行第一级流量控制后接收到的报文的第二流量信息;The first control module 32 is configured to perform first-level flow control on the packet according to the first traffic information, and obtain second traffic information of the received packet after performing the first-level flow control;
第二控制模块33,设置为根据第二流量信息对报文进行第二级流量控制,并得到进行第二级流量控制后接收到的报文的第三流量信息;The second control module 33 is configured to perform second-level flow control on the packet according to the second traffic information, and obtain third traffic information of the received packet after performing the second-level flow control;
转发模块34,设置为将进行第二级流量控制后的报文送入该报文对应的通道化队列;The forwarding module 34 is configured to send the packet with the second-level flow control to the channelized queue corresponding to the packet;
第三控制模块35,设置为根据第三流量信息对通道化队列中的报文进行第三级流量控制;The third control module 35 is configured to perform third-level flow control on the packets in the channelized queue according to the third traffic information;
发送模块36,设置为将进行第三级流量控制后的报文送入该报文对应的发送端口进行发送。The sending module 36 is configured to send the packet with the third-level flow control to the sending port corresponding to the packet for transmission.
其中,获取模块31包括:The obtaining module 31 includes:
接收单元,设置为接收线卡下发的报文;a receiving unit, configured to receive a message sent by the line card;
缓存单元,设置为缓存报文;Cache unit, set to cache messages;
获取子单元,设置为获取报文的第一流量信息。The sub-unit is obtained, and is configured to obtain the first traffic information of the packet.
其中,第一控制模块32设置为:若第一流量信息表示的流量大于第一门限,则向线卡发送第一反压报文,第一反压报文用于由线卡对报文进行第一级流量控制;并获得进行第一级流量控制后的报文的第二流量信息。The first control module 32 is configured to: if the traffic indicated by the first traffic information is greater than the first threshold, send a first backpressure packet to the line card, where the first backpressure packet is used by the line card to perform the packet The first level flow control; and obtains the second flow information of the message after the first level flow control.
其中,上述报文的发送装置还包括:The sending device of the foregoing message further includes:
识别模块,设置为对报文进行分类,得到该报文对应的通道所对应的输出端口,其中,报文中具有携带有通道号的自定义标签。The identification module is configured to classify the packet, and obtain an output port corresponding to the channel corresponding to the packet, where the packet has a custom label carrying a channel number.
其中,第二控制模块33设置为:The second control module 33 is configured to:
若第二流量信息表示的流量大于该报文对应的通道所对应的输出端口的带宽,则通过反压通道输出第二反压报文对报文进行第二级流量控制,并得到进行第二级流量控制后的报文的第三流量信息。If the traffic indicated by the second traffic information is greater than the bandwidth of the output port corresponding to the channel corresponding to the packet, the second backpressure packet is output through the backpressure channel to perform second-level flow control on the packet, and the second flow control is performed. The third traffic information of the packet after the traffic control.
其中,第三控制模块35设置为:The third control module 35 is configured to:
若第三流量信息表示的流量大于第二门限,则通过反压通道输出第三反压报文对报文进行第三级流量控制。If the traffic indicated by the third traffic information is greater than the second threshold, the third backpressure packet is output through the backpressure channel to perform third-level flow control on the packet.
其中,转发模块34设置为:将进行第二级流量控制后的报文进行整形处理,得到处理 后的报文;并按照处理后的报文的通道号,平滑的将处理后的报文送入该通道号对应的通道化队列。The forwarding module 34 is configured to: perform processing on the packet after the second-level flow control is performed, and obtain the processing. After the packet is received, the processed packet is sent to the channelized queue corresponding to the channel number according to the channel number of the processed packet.
其中,发送模块36设置为:将进行第三级流量控制后的报文,按照各自的通道号进行封装,并交叉映射入对应的发送端口,按照发送端口的速率发送出去。The sending module 36 is configured to: encapsulate the packets that are subjected to the third-level flow control, encapsulate the packets according to the respective channel numbers, and cross-map them into the corresponding sending ports, and send them according to the rate of the sending port.
以上所述仅为本公开的较佳实施例,并非用于本公开的限定范围。本领域的技术人员应该明白上述的各模块和各步骤可以使用fpga通过加载不同的fpga版本来实现上述各模块以及各步骤的硬件重构。此外也可以使用通用的计算装置来实现,可选的可以用计算装置能够执行的软件代码来实现。The above description is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Those skilled in the art will appreciate that the various modules and steps described above can implement hardware reconstruction of the various modules and steps described above by loading different fpga versions using fpga. It can also be implemented using a general purpose computing device, optionally in software code that can be executed by the computing device.
另外,需要说明的是,此说明书中所描述的电子设备包括但不限于智能手机、平板电脑等,且所描述的许多功能部件都被称为模块,以便更加特别地强调其实现方式的独立性。In addition, it should be noted that the electronic devices described in this specification include, but are not limited to, smartphones, tablets, etc., and many of the functional components described are referred to as modules to more particularly emphasize the independence of their implementation. .
此说明书中所描述的许多功能部件都被称为模块,以便更加特别地强调其实现方式的独立性。Many of the functional components described in this specification are referred to as modules to more particularly emphasize the independence of their implementation.
本公开的实施例中,模块可以用软件实现,以便由各种类型的处理器执行。举例来说,一个标识的可执行代码模块可以包括计算机指令的一个或多个物理或者逻辑块,举例来说,其可以被构建为对象、过程或函数。尽管如此,所标识模块的可执行代码无需物理地位于一起,而是可以包括存储在不同位里上的不同的指令,当这些指令逻辑上结合在一起时,其构成模块并且实现该模块的规定目的。In an embodiment of the present disclosure, the modules may be implemented in software for execution by various types of processors. For example, an identified executable code module can comprise one or more physical or logical blocks of computer instructions, which can be constructed, for example, as an object, procedure, or function. Nonetheless, the executable code of the identified modules need not be physically located together, but may include different instructions stored in different bits that, when logically combined, constitute a module and implement the provisions of the module. purpose.
实际上,可执行代码模块可以是单条指令或者是许多条指令,并且甚至可以分布在多个不同的代码段上,分布在不同程序当中,以及跨越多个存储器设备分布。同样地,操作数据可以在模块内被识别,并且可以依照任何适当的形式实现并且被组织在任何适当类型的数据结构内。操作数据可以作为单个数据集被收集,或者可以分布在不同位置上(包括在不同存储设备上),并且至少部分地可以仅作为电子信号存在于系统或网络上。In practice, the executable code module can be a single instruction or a plurality of instructions, and can even be distributed across multiple different code segments, distributed among different programs, and distributed across multiple memory devices. As such, operational data may be identified within the modules and may be implemented in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed over different locations (including on different storage devices), and may at least partially exist as an electronic signal on a system or network.
在模块可以利用软件实现时,考虑到现有硬件工艺的水平,所以可以以软件实现的模块,在不考虑成本的情况下,本领域技术人员都可以搭建对应的硬件电路来实现对应的功能,硬件电路包括常规的超大规模集成(VLSI)电路或者门阵列以及诸如逻辑芯片、晶体管之类的现有半导体或者是其它分立的元件。模块还可以用可编程硬件设备,诸如现场可编程门阵列、可编程阵列逻辑、可编程逻辑设备等实现。When the module can be implemented by software, considering the level of the existing hardware process, the module can be implemented in software, and the technician can construct a corresponding hardware circuit to implement the corresponding function without considering the cost. The hardware circuitry includes conventional Very Large Scale Integration (VLSI) circuits or gate arrays as well as existing semiconductors such as logic chips, transistors, or other discrete components. The modules can also be implemented with programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices, and the like.
上述范例性实施例是参考该些附图来描述的,许多不同的形式和实施例是可行而不偏离本公开的精神及教示,因此,本公开不应被建构成为在此所提出范例性实施例的限制。更确切地说,这些范例性实施例被提供以使得本公开会是完善又完整,且会将本公开范围传达给那些熟知此项技术的人士。在该些图式中,组件尺寸及相对尺寸也许基于清晰起见而被夸大。在此所使用的术语只是基于描述特定范例性实施例目的,并无意成为限制用。如在此所使用地,除非该内文清楚地另有所指,否则该单数形式“一”、“一个”和“该”是意欲将该些多个形式也纳入。会进一步了解到该些术语“包含”及/或“包括”在使用于本说明书时,表示特征、整数、步骤、操作、构件及/或组件的存在,但不排除一或更多其它特征、整数、步骤、操作、构件、组件及/或其族群的存在或增加。除非另有所示,陈述时,一值范围包含该 范围的上下限及其间的任何子范围。The above-described exemplary embodiments are described with reference to the drawings, and the various embodiments and embodiments may be practiced without departing from the spirit and scope of the disclosure. The limitations of the example. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and the scope of the disclosure will be disclosed to those skilled in the art. In these figures, component dimensions and relative dimensions may be exaggerated for clarity. The terminology used herein is for the purpose of describing the particular embodiments of the embodiments The singular forms "a", "the", and "the" It will be further understood that the terms "comprises" and/or "comprises", when used in the specification, are used to indicate the presence of features, integers, steps, operations, components and/or components, but do not exclude one or more other features, The presence or addition of integers, steps, operations, components, components, and/or their ethnic groups. Unless otherwise stated, a range of values includes the statement The upper and lower limits of the range and any subranges between them.
以上是本公开的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本公开的原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本公开的保护范围。 The above is a preferred embodiment of the present disclosure, and it should be noted that those skilled in the art can also make several improvements and refinements without departing from the principles of the present disclosure. These improvements and retouchings should also be considered as The scope of protection of the present disclosure.

Claims (15)

  1. 一种报文发送方法,包括:A method for sending a message, comprising:
    获取线卡下发的报文的第一流量信息;Obtaining the first traffic information of the packet delivered by the line card;
    根据所述第一流量信息对所述报文进行第一级流量控制,并得到进行第一级流量控制后接收到的报文的第二流量信息;Performing, according to the first traffic information, performing first-level flow control on the packet, and obtaining second traffic information of the packet received after performing the first-level flow control;
    根据所述第二流量信息对所述报文进行第二级流量控制,并得到进行第二级流量控制后接收到的报文的第三流量信息;And performing second-level flow control on the packet according to the second flow information, and obtaining third traffic information of the received packet after performing the second-level flow control;
    将所述进行第二级流量控制后的报文送入该报文对应的通道化队列,并根据所述第三流量信息对所述通道化队列中的报文进行第三级流量控制;Transmitting the packet with the second-level flow control to the channelized queue corresponding to the packet, and performing third-level flow control on the packet in the channelized queue according to the third traffic information;
    将进行第三级流量控制后的报文送入该报文对应的发送端口进行发送。The packet with the third-level flow control is sent to the sending port corresponding to the packet for transmission.
  2. 根据权利要求1所述的报文发送方法,其中,获取线卡下发的报文的第一流量信息的步骤包括:The method for transmitting a packet according to claim 1, wherein the step of acquiring the first traffic information of the packet delivered by the line card comprises:
    接收并缓存线卡下发的报文;Receiving and buffering the message delivered by the line card;
    获取所述报文的所述第一流量信息。Obtaining the first traffic information of the packet.
  3. 根据权利要求1所述的报文发送方法,其中,根据所述第一流量信息对所述报文进行第一级流量控制,并得到进行第一级流量控制后接收到的报文的第二流量信息的步骤包括:The packet sending method according to claim 1, wherein the first traffic control is performed on the packet according to the first traffic information, and the second packet received after the first-level traffic control is obtained is obtained. The steps of the traffic information include:
    若所述第一流量信息表示的流量大于第一门限,则向线卡发送第一反压报文,其中,所述第一反压报文用于所述线卡对所述报文进行第一级流量控制;And sending, by the line card, the first back pressure message to the line card, if the traffic indicated by the first traffic information is greater than the first threshold, where the first backpressure message is used by the line card to perform the first Primary flow control;
    对所述报文进行分类,得到该报文对应的通道所对应的输出端口,其中,所述报文中具有携带有通道号的自定义标签;以及And classifying the packet, and obtaining an output port corresponding to the channel corresponding to the packet, where the packet has a custom label carrying a channel number;
    获得进行第一级流量控制后接收到的报文的第二流量信息。Obtaining second traffic information of the received message after performing the first-level flow control.
  4. 根据权利要求1所述的报文发送方法,其中,根据所述第二流量信息对所述报文进行第二级流量控制,并得到进行第二级流量控制后接收到的报文的第三流量信息的步骤包括:The packet sending method according to claim 1, wherein the second traffic control is performed on the packet according to the second traffic information, and the third packet received after the second-level traffic control is obtained. The steps of the traffic information include:
    若所述第二流量信息表示的流量大于该报文对应的通道所对应的输出端口的带宽,则通过反压通道输出第二反压报文对所述报文进行第二级流量控制;If the traffic indicated by the second traffic information is greater than the bandwidth of the output port corresponding to the channel corresponding to the packet, outputting the second backpressure packet through the backpressure channel to perform second-level flow control on the packet;
    获得进行第二级流量控制后的报文的第三流量信息。The third traffic information of the packet after the second-level flow control is obtained.
  5. 根据权利要求1所述的报文发送方法,其中,根据所述第三流量信息对所述通道化队列中的报文进行第三级流量控制的步骤包括:The packet sending method according to claim 1, wherein the step of performing third-level flow control on the packets in the channelized queue according to the third traffic information comprises:
    若所述第三流量信息表示的流量大于第二门限,则通过反压通道输出第三反压报文对所述报文进行第三级流量控制。And if the traffic indicated by the third traffic information is greater than the second threshold, the third backflow packet is output through the backpressure channel to perform third-level flow control on the packet.
  6. 根据权利要求1所述的报文发送方法,其中,将所述进行第二级流量控制后的报文送入该报文对应的通道化队列的步骤包括: The packet sending method according to claim 1, wherein the step of sending the packet with the second-level flow control to the channelized queue corresponding to the packet includes:
    将所述进行第二级流量控制后的报文进行整形处理,得到处理后的报文;And performing the shaping processing on the packet after the second-level flow control is performed to obtain the processed packet;
    按照处理后的报文的通道号,平滑的将处理后的报文送入该通道号对应的通道化队列。According to the channel number of the processed packet, the processed packet is smoothly sent to the channelized queue corresponding to the channel number.
  7. 根据权利要求1所述的报文发送方法,其中,将进行第三级流量控制后的报文送入该报文对应的发送端口进行发送的步骤包括:The method for transmitting a message according to claim 1, wherein the step of sending the packet with the third-level flow control to the sending port corresponding to the packet for transmission comprises:
    将进行第三级流量控制后的报文,按照各自的通道号进行封装,并交叉映射入对应的发送端口,按照发送端口的速率发送出去。Packets that are subjected to the third-level flow control are encapsulated according to their respective channel numbers, and are cross-mapped into the corresponding sending port and sent out at the rate of the sending port.
  8. 一种报文发送装置,其中,包括:A message sending device, comprising:
    获取模块,设置为获取线卡下发的报文的第一流量信息;The obtaining module is configured to obtain the first traffic information of the packet delivered by the line card;
    第一控制模块,设置为根据所述第一流量信息对所述报文进行第一级流量控制,并得到进行第一级流量控制后接收到的报文的第二流量信息;The first control module is configured to perform first-level flow control on the packet according to the first traffic information, and obtain second traffic information of the received packet after performing the first-level flow control;
    第二控制模块,设置为根据所述第二流量信息对所述报文进行第二级流量控制,并得到进行第二级流量控制后接收到的报文的第三流量信息;The second control module is configured to perform second-level flow control on the packet according to the second traffic information, and obtain third traffic information of the packet received after performing the second-level flow control;
    转发模块,设置为将所述进行第二级流量控制后的报文送入该报文对应的通道化队列;The forwarding module is configured to send the packet with the second-level flow control to the channelized queue corresponding to the packet;
    第三控制模块,设置为根据所述第三流量信息对所述通道化队列中的报文进行第三级流量控制;The third control module is configured to perform third-level flow control on the packets in the channelized queue according to the third traffic information;
    发送模块,设置为将进行第三级流量控制后的报文送入该报文对应的发送端口进行发送。The sending module is configured to send the packet with the third-level flow control to the sending port corresponding to the packet for sending.
  9. 根据权利要求8所述的报文发送装置,其中,所述获取模块包括:The message transmitting apparatus according to claim 8, wherein the obtaining module comprises:
    接收单元,设置为接收线卡下发的报文;a receiving unit, configured to receive a message sent by the line card;
    缓存单元,设置为缓存所述报文;a cache unit, configured to cache the message;
    获取子单元,设置为获取所述报文的所述第一流量信息。Obtaining a subunit, configured to obtain the first traffic information of the packet.
  10. 根据权利要求8所述的报文发送装置,其中,所述第一控制模块设置为:若所述第一流量信息表示的流量大于第一门限,则向线卡发送第一反压报文,其中,所述第一反压报文用于所述线卡对所述报文进行第一级流量控制;The message transmitting apparatus according to claim 8, wherein the first control module is configured to: if the traffic indicated by the first traffic information is greater than the first threshold, send the first backpressure packet to the line card, The first backpressure packet is used by the line card to perform first-level flow control on the packet.
    获得进行第一级流量控制后接收的报文的第二流量信息;并且Obtaining second traffic information of the packet received after performing the first-level flow control; and
    其中,所述报文发送装置还包括识别模块,设置为对所述报文进行分类,得到该报文对应的通道所对应的输出端口,其中,所述报文中具有携带有通道号的自定义标签。The packet sending device further includes an identifying module, configured to classify the packet, and obtain an output port corresponding to the channel corresponding to the packet, where the packet has a channel number carrying Define the label.
  11. 根据权利要求8所述的报文发送装置,其中,所述第二控制模块设置为:The message transmitting apparatus according to claim 8, wherein said second control module is configured to:
    若所述第二流量信息表示的流量大于该报文对应的通道所对应的输出端口的带宽,则通过反压通道输出第二反压报文对所述报文进行第二级流量控制;If the traffic indicated by the second traffic information is greater than the bandwidth of the output port corresponding to the channel corresponding to the packet, outputting the second backpressure packet through the backpressure channel to perform second-level flow control on the packet;
    获得进行第二级流量控制后的报文的第三流量信息。The third traffic information of the packet after the second-level flow control is obtained.
  12. 根据权利要求8所述的报文发送装置,其中,所述第三控制模块设置为:The message transmitting apparatus according to claim 8, wherein said third control module is configured to:
    若所述第三流量信息表示的流量大于第二门限,则通过反压通道输出第三反压报文对 所述报文进行第三级流量控制。If the traffic indicated by the third traffic information is greater than the second threshold, outputting a third backpressure packet through the backpressure channel The message performs third-level flow control.
  13. 根据权利要求8所述的报文发送装置,其中,所述转发模块设置为:将所述进行第二级流量控制后的报文进行整形处理,得到处理后的报文;并按照处理后的报文的通道号,平滑的将处理后的报文送入该通道号对应的通道化队列。The packet sending apparatus according to claim 8, wherein the forwarding module is configured to: perform shaping processing on the packet subjected to the second-level flow control, to obtain a processed packet; and follow the processed The channel number of the packet is sent to the channelized queue corresponding to the channel number.
  14. 根据权利要求8所述的报文发送装置,其中,所述发送模块设置为:将进行第三级流量控制后的报文,按照各自的通道号进行封装,并交叉映射入对应的发送端口,按照发送端口的速率发送出去。The message transmitting apparatus according to claim 8, wherein the sending module is configured to: encapsulate the packets subjected to the third-level flow control, encapsulate them according to respective channel numbers, and cross-map them into corresponding sending ports. Send out at the rate of the sending port.
  15. 一种计算机存储介质,所述计算机存储介质存储有执行指令,所述执行指令被处理器执行时执行如权利要求1至7中任一项所述的方法。 A computer storage medium storing execution instructions, the execution instructions being executed by a processor to perform the method of any one of claims 1 to 7.
PCT/CN2017/087095 2016-06-24 2017-06-02 Message sending method and device WO2017219847A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610471812.3 2016-06-24
CN201610471812.3A CN107547414A (en) 2016-06-24 2016-06-24 File transmitting method and device

Publications (1)

Publication Number Publication Date
WO2017219847A1 true WO2017219847A1 (en) 2017-12-28

Family

ID=60783759

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/087095 WO2017219847A1 (en) 2016-06-24 2017-06-02 Message sending method and device

Country Status (2)

Country Link
CN (1) CN107547414A (en)
WO (1) WO2017219847A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111669334B (en) * 2020-05-15 2023-03-28 南京南瑞继保电气有限公司 Flow control method, device, equipment and computer readable storage medium
CN111526097B (en) * 2020-07-03 2020-10-30 新华三半导体技术有限公司 Message scheduling method, device and network chip

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101572673A (en) * 2009-06-19 2009-11-04 杭州华三通信技术有限公司 Distributed packet switching system and distributed packet switching method of expanded switching bandwidth
CN101997772A (en) * 2010-10-13 2011-03-30 福建星网锐捷网络有限公司 Flow control method, device, system and network equipment
US20120023304A1 (en) * 2010-07-22 2012-01-26 International Business Machines Corporation Flow control for reliable message passing
EP2887590A1 (en) * 2012-09-25 2015-06-24 Huawei Technologies Co., Ltd. Flow control method, device and network

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1260915C (en) * 2002-11-19 2006-06-21 华为技术有限公司 Traffic control method for MAN transmission apparatus
US7688721B2 (en) * 2006-03-13 2010-03-30 Alcatel Lucent Distributed communication traffic control systems and methods
CN100591050C (en) * 2007-03-12 2010-02-17 杭州华三通信技术有限公司 Data transmission apparatus and method for supporting multi-channel data transmission
CN104348749B (en) * 2014-07-28 2018-02-16 湖北誉恒科技有限公司 A kind of flow control methods, apparatus and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101572673A (en) * 2009-06-19 2009-11-04 杭州华三通信技术有限公司 Distributed packet switching system and distributed packet switching method of expanded switching bandwidth
US20120023304A1 (en) * 2010-07-22 2012-01-26 International Business Machines Corporation Flow control for reliable message passing
CN101997772A (en) * 2010-10-13 2011-03-30 福建星网锐捷网络有限公司 Flow control method, device, system and network equipment
EP2887590A1 (en) * 2012-09-25 2015-06-24 Huawei Technologies Co., Ltd. Flow control method, device and network

Also Published As

Publication number Publication date
CN107547414A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
US7551650B2 (en) Backplane bus
WO2017202158A1 (en) Data forwarding method and device
JP3128654B2 (en) Supervisory control method, supervisory control device and switching system
US7649843B2 (en) Methods and apparatus for controlling the flow of multiple signal sources over a single full duplex ethernet link
US20020176450A1 (en) System and methods for selectively transmitting ethernet traffic over SONET/SDH optical network
US11412074B2 (en) Method and device for transparently transmitting service frequency
US7525989B2 (en) System, method and device for time slot status messaging among SONET nodes
WO2017219847A1 (en) Message sending method and device
WO2022143046A1 (en) Multi-service transmission method and system, and storage medium and electronic device
EP1782558A2 (en) Pause frame reconciliation in end-to-end and local flow control for ethernet over sonet
US7554975B2 (en) Protocol agnostic switching
US8249063B2 (en) Method and apparatus for signal formation with guaranteed consistent overhead insertion
US8179807B2 (en) In-band communication of alarm status information in a synchronous transport communication system
WO2021218721A1 (en) Service processing method and apparatus
US20050141567A1 (en) Extending Ethernet-over-SONET to provide point-to-multipoint service
US9065761B2 (en) Packet reassembly processing
US8228943B2 (en) Systems and methods for providing framing mapping, muxing and data processing
WO2024109725A1 (en) Data mapping method, data de-mapping method, and related device
WO2023231764A1 (en) Service data processing method and device
WO2023232097A1 (en) Service data processing method and apparatus
Hughes et al. Geographic extension of HIPPI channels via high speed SONET
Yang et al. Channel statistical multiplexing in SDH/SONET networks
US7519064B1 (en) Virtual tributary processing using shared resources
Liu et al. A single chip solution of dual-gigabit Ethernet over 2.5 G SDH/SONET
Ge et al. Design and implementation of an EOS chip

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: 17814585

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17814585

Country of ref document: EP

Kind code of ref document: A1