Transmission path and data processing method for transmission path
09813349 · 2017-11-07
Assignee
Inventors
Cpc classification
H04L47/263
ELECTRICITY
H04L47/26
ELECTRICITY
H04L47/36
ELECTRICITY
International classification
Abstract
The present invention provide a transmission path, including: an FD storage module, configured to receive and store an FD; a calculating module, configured to determine, according to a length value of the first frame stored in the FD storage module, a volume of data stored in the transmission path; a determining module, configured to determine whether the volume of the data stored in the transmission path determined by the calculating module is greater than a preset data volume threshold; and an instructing module, configured to send a backpressure signal to the TM module when the determining module determines that the volume of the data stored in the transmission path is greater than the preset data volume threshold, where the backpressure signal is used to instruct the TM module to stop sending an FD of the second frame to the transmission path.
Claims
1. A data processing method for a transmission path, comprising: receiving and storing, by the transmission path, a frame descriptor (FD), sent by a traffic management (TM) module, of a first frame, wherein the FD of the first frame comprises a length value of the first frame; determining, by the transmission path, according to the length value of the first frame, a volume of data stored in the transmission path, wherein the volume of the data stored in the transmission path is determined as a sum of a) the length value of the first frame, and b) a volume of data stored before the FD of the first frame is stored, wherein the volume of data stored before the FD of the first frame comprises a data volume of a frame corresponding to a stored FD and a data volume of a stored frame; determining, by the transmission path, whether the volume of the data stored in the transmission path is greater than a preset data volume threshold; and sending, by the transmission path, a backpressure signal to the TM module when the volume of the data stored in the transmission path is greater than the preset data volume threshold, wherein the backpressure signal is used to instruct the TM module to stop sending an FD of a second frame to the transmission path.
2. The method according to claim 1, further comprising: sending, by the transmission path, first data to a link, wherein the first data is data of a frame stored in the transmission path; and subtracting, by the transmission path, a data volume of the first data from the volume of the data stored in the transmission path, so as to update the volume of the data stored in the transmission path.
3. The method according to claim 1, further comprising: determining, by the transmission path, a quantity of FDs stored in the transmission path; and sending, by the transmission path, the backpressure signal to the TM module when it is determined that the quantity of the stored FDs reaches a preset quantity threshold.
4. The method according to claim 1, wherein the FD of the first frame further comprises a start storage address of the first frame stored in a memory, and the method further comprises: obtaining, by the transmission path, the first frame from the memory according to the length value of the first frame and the start storage address of the first frame; and storing the first frame in the memory.
5. A transmission path, comprising a processor and a non-transitory processor-readable medium having processor-executable instructions stored thereon, the processor-executable instructions including a plurality of modules, the modules including: a frame descriptor (FD) storage module, configured to receive and store a frame descriptor FD, sent by a traffic management (TM) module, a the first frame, wherein the FD of the first frame comprises a length value of the first frame; a calculating module, configured to determine, according to the length value of the first frame stored in the FD storage module, a volume of data stored in the transmission path, wherein the volume of the data stored in the transmission path comprises a data volume of a frame corresponding to a stored FD and a data volume of a stored frame; a determining module, configured to determine whether the volume of the data stored in the transmission path is greater than a preset data volume threshold; and an instructing module, configured to send a backpressure signal to the TM module when the volume of the data stored in the transmission path is greater than the preset data volume threshold, wherein the backpressure signal is used to instruct the TM module to stop sending an FD of a second frame to the transmission path.
6. The transmission path according to claim 5: further comprising a sending module, configured to send first data to a link, wherein the first data is data of a frame stored in the transmission path; and wherein the calculating module is further configured to subtract a data volume of the first data from the volume of the data stored in the transmission path, for updating the volume of the data stored in the transmission path.
7. The transmission path according to claim 5, wherein: the calculating module is further configured to determine a quantity of FDs stored in the FD storage module; the determining module is further configured to determine whether the quantity of FDs stored in the FD storage module reaches a preset quantity threshold; and the instructing module sends the backpressure signal to the TM module when the quantity of FDs stored in the FD storage module reaches the preset quantity threshold.
8. The transmission path according to claim 5, wherein: the FD of the first frame further comprises a start storage address of the first frame stored in a memory; and the transmission path further comprises a frame storage module, configured to obtain the first frame from the memory according to the length value of the first frame stored in the FD storage module and the start storage address of the first frame, and store the first frame in the memory.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
DESCRIPTION OF EMBODIMENTS
(7) Embodiments of the present invention provide a transmission path and a data processing method for a transmission path, which are used to control blocking latency for a packet in the transmission path and avoid a case of an excessively high blocking latency for the packet.
(8) After a TM module sends an FD of the first frame to a transmission path module, a transmission path stores the FD of the first frame in an FD queue; the transmission path does not extract the FD of the first frame until the FD of the first frame enters a position at a queue head, obtains the first frame from a memory according to information of the extracted FD, and stores the first frame to a frame queue; and finally the transmission path sends frames in sequence according to an order of the frame queue. In this embodiment of the present invention, a volume of data stored in the transmission path refers to the sum of data volumes of frames to be sent by the transmission path. Because the transmission path stores both an FD and a frame, and the FD is used to obtain a corresponding frame and send the frame, the volume of the data stored in the transmission path includes a data volume of a frame corresponding to the stored FD and a data volume of the stored frame.
(9) Referring to
(10) an FD storage module 210, configured to receive and store an FD, sent by a traffic management TM module, of the first frame, where the FD of the first frame includes a length value of the first frame;
(11) a calculating module 220, configured to determine, according to the length value of the first frame stored in the FD storage module, a volume of data stored in the transmission path, where the volume of the data stored in the transmission path includes a data volume of a frame corresponding to a stored FD and a data volume of a stored frame;
(12) a determining module 230, configured to determine whether the volume of the data stored in the transmission path determined by the calculating module is greater than a preset data volume threshold; and
(13) an instructing module 240, configured to send a backpressure signal to the TM module when the determining module determines that the volume of the data stored in the transmission path is greater than the preset data volume threshold, where the backpressure signal is used to instruct the TM module to stop sending an FD of the second frame to the transmission path.
(14) The calculating module 220 is specifically configured to:
(15) determine the sum of a volume of data stored in the transmission path before the FD storage module stores the FD of the first frame and the length value of the first frame stored in the FD storage module, as the volume of the data stored in the transmission path.
(16) Optionally, the calculating module is further configured to determine a quantity of FDs stored in the FD storage module;
(17) the determining module is further configured to determine whether the quantity of FDs determined by the calculating module reaches a preset quantity threshold; and
(18) the instructing module sends the backpressure signal to the TM module when the determining module determines that the quantity of FDs determined by the calculating module reaches the preset quantity threshold.
(19) FDs are stored in the transmission path one by one. A quantity of FDs that can be stored in the transmission path is limited. When the quantity of FDs stored in the transmission path reaches a maximum storage quantity, the backpressure signal is sent to the TM module. In this embodiment of the present invention, a quantity of FDs currently stored in the transmission path is monitored, and when the quantity of FDs reaches the preset quantity threshold, the backpressure signal is sent to the TM module. The quantity threshold may be set to any value that is not greater than the maximum storage quantity, so as to achieve an objective of controlling data processing for the transmission path more flexibly. It should be noted that, although blocking latency can be reduced by limiting a quantity of FDs allowed to enter the transmission path to a relatively small value, anti-burst performance of the transmission path is affected to a certain degree, that is, when packets corresponding to multiple consecutive FDs are all short packets, it may be caused that a speed at which the transmission path sends a packet to a network is greater than a scheduling speed of the TM, and working efficiency of the transmission path is reduced.
(20) Optionally, the FD of the first frame further includes a start storage address, in a memory, of the first frame, and the transmission path further includes:
(21) a frame storage module, configured to obtain the first frame from the memory according to the length value of the first frame stored in the FD storage module and the start storage address of the first frame, and store the first frame.
(22) Optionally, the transmission path further includes:
(23) a sending module, configured to send first data to a link, where the first data is data of a frame stored in the transmission path, where
(24) the calculating module is further configured to subtract a data volume of the first data from the volume of the data stored in the transmission path, so as to update the volume of the data stored in the transmission path.
(25) That is, the transmission path keeps recording a volume of data stored currently, increases the recorded data volume when an FD enters the transmission path, and reduces the recorded data volume when a packet is sent, so as to ensure correctness of the volume of the stored data that is recorded by the transmission path.
(26) Further, the first data sent by the sending module is data of 2 bytes or 16 bytes in a frame at a queue head in the frame storage module of the transmission path.
(27) The embodiments of the present invention are further described below with reference to an actual hardware structure of a transmission path. Referring to
(28) a frame descriptor first input first output unit 310, configured to receive and store an FD, sent by the TM module, of the first frame, and obtain a length value of the first frame according to the FD;
(29) the transmit processing unit 320, configured to extract the FD of the first frame from the frame descriptor first input first output unit 310, obtain through parsing a start storage address, in a memory, of the first frame, obtain the first frame from the memory according to the start storage address of the first frame and the length value of the first frame, and write the first frame into a transmit buffer unit 330;
(30) the transmit buffer unit 330, configured to send the first frame to a link; and
(31) a counting unit (BYTE_COUNTER) 340, configured to: add a recorded volume of data stored in the transmission path to the length value of the first frame obtained from the frame descriptor first input first output unit 310, and each time when it is detected that the transmit buffer unit 330 sends data in a packet to the link once, subtract a volume of the data sent by the transmit buffer unit 330 from the recorded volume of the data stored in the transmission path; determine whether the recorded volume of the data stored in the transmission path is greater than a preset data volume threshold; and send a backpressure signal to the TM module when the recorded volume of the data stored in the transmission path is greater than the preset data volume threshold, to instruct the TM module to stop sending an FD.
(32) A volume of data sent by the transmit buffer unit 330 to the link each time may be a preset fixed value, which generally is 2 bytes or 16 bytes. Therefore, each time when detecting that the transmit buffer unit 330 sends data to the link once, the counting unit directly subtracts the preset fixed value from a currently recorded data volume of data to be sent, so as to update the volume of the data stored in the transmission path and avoid detection on the volume of the data sent by the transmit buffer unit 330 to the link.
(33) It is assumed that a storage depth (a maximum quantity of FDs and frames that can be stored) of an entire transmission path is TXBUF_DEPTH packets, a maximum length of packet data is MTU, a maximum value of the volume BYTE_CONTER of the data stored in the transmission path that can be counted by the counting unit is: BYTE_CONTER.sub.max=TXBUF_DEPTH*MTU, and a data volume threshold (BP_TH) configured by the transmission path is BYTE_COUNTER.sub.max. When finding that the BYTE_CONTER is greater than the BP_TH, the counting unit outputs the backpressure signal to the upper-level TM module; and when the BYTE_CONTER is not greater than the BP_TH, the backpressure signal for upper-level TM is cancelled, and the TM starts to schedule again a new FD to be sent to the transmission path.
(34)
(35) Further, when a maximum quantity of bytes that can be stored in the transmission path, that is, the volume of the data stored in the transmission path, is just one byte less than the BP_TH, the TM sends an FD having a recorded frame length of MTU to enter the transmission path, that is, the stored maximum quantity of bytes is (BP_TH−1)+MTU, and then maximum blocking latency for a packet that enters the transmission path subsequently may be calculated as:
Latency.sub.max=[(BP_TH−1)+MTU]*8 bits/BW,
(36) where BW is a bandwidth of the link.
(37) Therefore, blocking latency for a packet can be controlled within a certain range (less than Latency.sub.max) by setting a value of BP_TH, so as to ensure that no excessively large latency is introduced to the packet due to blocking of a same-level device, thereby improving transmission efficiency and performance of a TCP application, and improving quality of service (Quality of Service, QoS).
(38) An effect of this embodiment of the present invention is further described below with reference to specific data.
(39) It is assumed that the storage depth of the transmission path is 10 packets, the bandwidth of the link is 2 Mbps, and FTP downloading and uploading services are performed at the same time.
(40) Assuming that a frame length of an ACK frame of an FTP service and a frame length of an uploaded data packet are both 1518 bytes, and the apparatus shown in
Latency.sub.max=[1518*(10+1)]*8/2 Mbps≈67 ms.
(41) If the apparatus shown in
Latency.sub.max=[1000−1+1518]*8/2 Mbps≈10 ms.
(42) Therefore, in a case in which there are many long packets at a head of an ACK frame queue, blocking latency for an ACK frame can be significantly reduced in this embodiment of the present invention.
(43) Assuming that a frame length of an ACK frame responded by a download service and a frame length of an uploaded data packet are both 64 bytes, and the apparatus shown in
Latency.sub.max=[64*(10+1)]*8/2 Mbps≈3 ms.
(44) If the apparatus shown in
Latency.sub.max=[64*(10+1)]*8/2 Mbps≈3 ms.
(45) By using such two kinds of backpressure mechanisms at the same time, burstiness for short packets can be ensured and it can also be ensured that no excessively large blocking latency is introduced to the transmission path.
(46) Referring to
(47) S610: The transmission path receives and stores a frame descriptor FD, sent by a traffic management TM module, of the first frame, where the FD of the first frame includes a length value of the first frame.
(48) S620: The transmission path determines, according to the length value of the first frame, a volume of data stored in the transmission path, where the volume of the data stored in the transmission path includes a data volume of a frame corresponding to a stored FD and a data volume of a stored frame.
(49) S630: The transmission path determines whether the volume of the data stored in the transmission path is greater than a preset data volume threshold.
(50) S640: When the volume of the data stored in the transmission path is greater than the preset data volume threshold, the transmission path sends a backpressure signal to the TM module, where the backpressure signal is used to instruct the TM module to stop sending an FD of the second frame to the transmission path.
(51) Specifically, the step S620 includes:
(52) determining, by the transmission path, the sum of a volume of data stored before the FD of the first frame is stored and the length value of the first frame, as the volume of the data stored in the transmission path.
(53) Optionally, the method further includes:
(54) sending, by the transmission path, first data to a link, where the first data is data of a frame stored in the transmission path; and
(55) subtracting, by the transmission path, a data volume of the first data from the volume of the data stored in the transmission path, so as to update the volume of the data stored in the transmission path.
(56) Optionally, the method further includes:
(57) determining, by the transmission path, a quantity of FDs stored in the transmission path; and
(58) sending, by the transmission path, the backpressure signal to the TM module when it is determined that the quantity of the stored FDs reaches a preset quantity threshold.
(59) Optionally, the FD of the first frame further includes a start storage address, in a memory, of the first frame, and the method further includes:
(60) obtaining, by the transmission path, the first frame from the memory according to the length value of the first frame and the start storage address of the first frame, and storing the first frame.
(61) In conclusion, the embodiments of the present invention provide a transmission path and a data processing method for a transmission path. By controlling a data volume of to-be-sent packets overstocked in the transmission path, blocking latency for a packet that newly enters the transmission path is controlled, and transmit latency for the packet is reduced.
(62) A person skilled in the art should understand that the embodiments of the present invention may be provided as a method, a system, or a computer program product. Therefore, the present invention may use a form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may use a form of a computer program product that is implemented on one or more computer-usable storage mediums (including but not limited to a disk memory, an optical memory, and the like) that include computer-usable program code.
(63) The present invention is described with reference to the flowcharts and/or block diagrams of the method, the device (system), and the computer program product according to the embodiments of the present invention. It should be understood that computer program instructions may be used to implement each process and/or each block in the flowcharts and/or the block diagrams and a combination of a process and/or a block in the flowcharts and/or the block diagrams. These computer program instructions may be provided for a general-purpose computer, a dedicated computer, an embedded processor, or a processor of another programmable data processing device to generate a machine, so that the instructions executed by the computer or the processor of the another programmable data processing device generate an apparatus for implementing a specific function in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams.
(64) These computer program instructions may also be stored in a computer readable memory that can instruct the computer or the another programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory generate an artifact that includes an instruction apparatus. The instruction apparatus implements a specific function in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams.
(65) These computer program instructions may also be loaded onto a computer or another programmable data processing device, so that a series of operations and steps are performed on the computer or the another programmable device, thereby generating computer-implemented processing. Therefore, the instructions executed on the computer or the another programmable device provide steps for implementing a specific function in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams.
(66) Apparently, a person skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. In this way, the present invention is intended to cover these modifications and variations provided that these modifications and variations to the present invention fall within the scope of the claims of the present invention and their equivalent technologies.