WO2012167685A1 - 基于fpga的丢包率监测方法及装置 - Google Patents

基于fpga的丢包率监测方法及装置 Download PDF

Info

Publication number
WO2012167685A1
WO2012167685A1 PCT/CN2012/075528 CN2012075528W WO2012167685A1 WO 2012167685 A1 WO2012167685 A1 WO 2012167685A1 CN 2012075528 W CN2012075528 W CN 2012075528W WO 2012167685 A1 WO2012167685 A1 WO 2012167685A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
sending
fpga
count value
protocol
Prior art date
Application number
PCT/CN2012/075528
Other languages
English (en)
French (fr)
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 WO2012167685A1 publication Critical patent/WO2012167685A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss

Definitions

  • the present invention relates to the field of communication technologies, and in particular, to a packet link rate monitoring method and apparatus based on an FPGA (Field-Programmable Gate Array) in a network link quality monitoring technology.
  • FPGA Field-Programmable Gate Array
  • one method for measuring the link loss rate of a link is: adding a count/serial number to the message, and measuring the link loss rate of the link by the count/serial number.
  • the method includes the process of periodically transmitting a connection confirmation message to each other in the communication network, and the steps include: A. carrying the message sequence number in the protocol data unit of the connection confirmation message; The maintenance endpoint calculates the packet loss rate by the sequence number of the connection confirmation packet.
  • the above method only needs to calculate the packet loss rate through the message sequence number, the process is quick and convenient, and the convenience of performance monitoring of the LM (low voltage version mobile processor) can be improved.
  • the method introduces measurement packets, The original packet traffic has a large impact.
  • the dedicated measurement packet flow initiated by the network will occupy a large amount of network bandwidth resources.
  • the packet loss rate is measured, the normal communication of the network is greatly affected or even interrupted.
  • the network communicates normally, which increases the bandwidth overhead of the network system and reduces the availability of the system. Summary of the invention
  • the main object of the present invention is to provide an FPGA-based packet loss rate monitoring method and apparatus, which can monitor the link loss rate without affecting the available bandwidth of the network.
  • an FPGA-based packet loss rate monitoring method including:
  • the local FPGA receives 4 ⁇ messages sent by the peer FPGA
  • the received count value when the first normal message is received is recorded; when the message is the first protocol message, the current received count value is filled in the First protocol message;
  • the current sending count value refers to the current statistics of the peer end FPGA loading the first protocol packet when the peer end FPGA sends the first protocol packet to the local end FPGA.
  • the transmission count value of the first normal message refers to the current statistics of the peer end FPGA loading the first protocol packet when the peer end FPGA sends the first protocol packet to the local end FPGA.
  • the method further includes: sending the first protocol packet, the first common packet, and the local link packet loss rate to the local exchange chip.
  • the method further comprises:
  • the local FPGA receives the second normal packet sent by the local switching chip
  • the second common packet and the second protocol packet are sent to the peer FPGA according to a preset sending policy, and the peer end FPGA calculates a packet loss rate of the peer link.
  • the step of sending the second normal message and the second protocol message to the peer FPGA according to a preset sending policy includes: Determine whether the local FPGA port transmission rate reaches a predetermined threshold; if yes, then
  • the second protocol packet is not allowed to enter the sending queue. Otherwise, the second protocol packet is allowed to enter the sending queue, and the second protocol packet and the second common packet are sorted.
  • the method before the step of receiving, by the local FPGA, the second normal packet sent by the local switching chip, the method further includes:
  • the preset policy includes setting a protocol packet sending interval time, and/or a sending time length, and/or a last sending count value, and/or a last received count value and/or
  • the invention also provides an FPGA-based packet loss rate monitoring device, comprising:
  • a first receiving module configured to receive a packet sent by the peer FPGA
  • a recording module configured to: when the message is the first normal message, record a received count value when the first normal message is received; when the message is a first protocol message, the current receiving count is The value is filled in the first protocol message;
  • a calculation module configured to calculate a current sending count value, a last sent count value, a last received count value, the current received count value, and a preset protocol packet sending interval time carried by the first protocol packet End link packet loss rate.
  • the current sending count value refers to the current statistics of the peer end FPGA loading the first protocol packet when the peer end FPGA sends the first protocol packet to the local end FPGA.
  • the transmission count value of the first normal message refers to the current statistics of the peer end FPGA loading the first protocol packet when the peer end FPGA sends the first protocol packet to the local end FPGA.
  • the method further comprises:
  • the first sending module is configured to send the first protocol packet, the first common packet, and the local link packet loss rate to the local switching chip.
  • the method further comprises:
  • a second receiving module configured to receive a second common packet sent by the local switching chip, and a generating module, configured to generate a second protocol packet according to the preset policy;
  • a second sending module configured to send the second normal packet and the second protocol packet to the peer FPGA according to a preset sending policy, where the peer end FPGA calculates a packet loss rate of the peer link.
  • the second sending module includes:
  • the determining operation unit is configured to determine whether the sending rate of the local FPGA port reaches a predetermined threshold; if yes, the second protocol packet is not allowed to enter the sending queue; otherwise, the second protocol packet is allowed to enter the sending queue, and Sorting the second protocol message and the second normal message;
  • a counting unit configured to count the second normal message to be sent, to obtain a sending value
  • a writing unit configured to: when the second protocol packet is sent, fill the current sending count value into the second protocol packet;
  • the sending unit is configured to send the second normal packet and the second protocol packet carrying the current sending count value to the peer FPGA in a sorted order.
  • the method further comprises:
  • the preset policy includes setting a protocol packet sending interval time, and/or a sending time length, and/or a last sending count value, and/or a last received count value And / or enable.
  • the invention provides an FPGA-based packet loss rate monitoring method and device, and configures a protocol packet generation policy according to the requirement of measuring a packet loss rate, and sends a protocol packet for measuring a packet loss rate, thereby reducing a limited network bandwidth resource. Occupy.
  • the use of the original ordinary message in the network environment does not substantially affect the network availability. In the case of bandwidth, the packet loss rate in the monitoring link is recorded, the impact on the network system environment is reduced in the later stage, and the availability of the network system is improved.
  • the invention makes the network system more operable and more adaptable.
  • FIG. 1 is a schematic flowchart of an embodiment of an FPGA-based packet loss rate monitoring method according to the present invention
  • FIG. 2 is a schematic diagram of a network architecture involved in an FPGA-based packet loss rate monitoring method according to the present invention
  • FIG. 3 is a FPGA-based packet loss rate monitoring according to the present invention
  • FIG. 4 is a schematic diagram of a method for monitoring a packet loss rate based on an FPGA according to another embodiment of the present invention.
  • the second normal packet and the second protocol packet are sent to the peer FPGA according to a preset transmission policy.
  • FIG. 5 is a schematic structural diagram of an FPGA-based packet loss rate monitoring apparatus according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of another embodiment of an FPGA-based packet loss rate monitoring apparatus according to the present invention
  • the solution of the embodiment of the present invention is mainly: configuring a policy to generate a protocol packet according to the requirement of measuring the packet loss rate, and combining the protocol packet with the common packet in the existing network to implement monitoring of the packet loss rate of the link, Reduce the occupation of limited network bandwidth resources and improve the availability of network systems.
  • an embodiment of the present invention provides a method for monitoring packet loss rate based on an FPGA, including:
  • Step S101 the local FPGA receives the 4 ⁇ message sent by the peer FPGA;
  • the operating environment of the method in this embodiment involves sending and receiving in a network device.
  • the data transmission between the terminals, the sender and the receiver are respectively configured with the local exchange chip and the peer switch chip responsible for message exchange, in order to monitor the loss of the link between the local exchange chip and the peer switch chip.
  • the packet rate is set between the transmitting end and the receiving end with the local FPGA and the opposite end FPGA.
  • the packet sent by the peer FPGA to the local end FPGA includes: an ordinary packet and a protocol packet for measuring a packet loss rate, that is, the first common packet and the first protocol packet in the embodiment.
  • the identification of the message can be distinguished by the ⁇ text recognizer.
  • the first protocol packet is generated according to a predetermined configuration policy when the peer FPGA receives the first common packet sent by the peer switching chip.
  • the configuration policy may be configured by the peer switch chip or by the peer FPGA under the control of the peer switch chip or the CPU (central processing unit).
  • the configuration policy includes: setting a protocol packet sending interval, Send time length, last sent count value, last received count value, and enable. As shown in Table 1 below, the values in the table can be set according to the actual situation:
  • the port number refers to the device port number
  • Length of sending time Indicates how much time is measured, in seconds
  • Transmission frequency interval Indicates the interval of the transmission protocol. The unit is millisecond. Enable: When the value is 1, it indicates that the measurement loss rate function is used. When it is 0, it indicates that the function is not enabled.
  • the last sent count value refers to the count value of the normal ordinary message sent when the last protocol message is sent;
  • Last received count value refers to the received count value of the regular ordinary message when the last protocol message was received.
  • the protocol packet in this embodiment that is, the structure of the first protocol packet is as shown in Table 2 below:
  • the packet header refers to the header of the protocol packet, such as the source address and the destination address.
  • Protocol field The identifier packet belongs to the field of measuring the packet loss rate, which is used to distinguish common packets.
  • Count The count value of the normal packet sent by the last time the protocol packet was sent. The last sent count is copied from the last send count field of the protocol packet.
  • the last received count refers to the received count value of the normal received message, and the last received count is copied from the original received count field;
  • Send count When sending this protocol packet, fill in the send count value of the current normal packet counted by the counter into this field;
  • Step S102 When the message is the first normal message, record the received count value when receiving the first normal message; when the message is the first protocol message, fill the current received count value into the first protocol message. ;
  • the packet identifier is used to distinguish whether the packet received by the local FPGA is an ordinary packet or a protocol packet.
  • the normal packet received by the counter is the first common packet in the embodiment. Counting is performed, wherein the counter can use a 32-bit counter.
  • the protocol packet is sent according to the configured transmission interval.
  • the received counter value in the current counter is filled in the protocol packet, that is, the first protocol packet.
  • Step S103 according to the current sending count value carried by the first protocol packet, the last sent count value, the last received count value, the current received count value, and the preset protocol packet sending interval Calculate the local link loss rate.
  • the current transmit count value refers to the peer FPGA sending the first protocol packet to the local end.
  • the peer FPGA fills in the transmit count value of the first regular message currently counted in the first protocol packet.
  • the local link loss rate can be calculated according to the current sending count value, the last sending count value, the last received count value, the current receiving count value, and the preset protocol packet sending interval time carried in the first protocol packet.
  • the local end After receiving the two protocol packets, the local end can calculate the packet loss rate.
  • the two packets A and B (hereinafter referred to as A and B packets) are received at different times to calculate the packet loss rate.
  • Local packet loss rate local packet loss value / peer packet number
  • the method of this embodiment can be designed and implemented in a CPLD (Complex Programmable Logic Device) in addition to the FPGA implementation.
  • CPLD Complex Programmable Logic Device
  • this embodiment makes the system more operability, more adaptable, and less impact on the original network.
  • the device can use the ordinary packets in the network environment to monitor the packet loss rate of the network, thereby reducing the impact on the network system environment.
  • the availability of the system is improved.
  • another embodiment of the present invention provides an FPGA-based packet loss rate monitoring method. Based on the foregoing embodiments,
  • the method further includes:
  • Step S100 Configure a preset policy; the preset policy includes setting a protocol packet sending interval time, a sending time length, a last sending count value, a last received counting value, and/or enabling.
  • Step S104 Send the first protocol packet, the first common packet, and the local link packet loss rate to the local exchange chip.
  • Step S105 receiving a second normal packet sent by the local exchange chip.
  • Step S106 Generate a second protocol packet according to the preset policy.
  • Step S107 Send the second normal message and the second protocol message to the peer FPGA according to the preset sending policy, and calculate, by the peer FPGA, the packet loss rate of the peer link.
  • the foregoing embodiment implements the monitoring of the link loss rate of the link from the peer FPGA to the local FPGA.
  • the foregoing embodiment implements the monitoring of the link loss rate of the link from the peer FPGA to the local FPGA.
  • the local FPGA has the same functional features as the peer FPGA, and includes the functional features of both the local FPGA and the peer FPGA in the above embodiment.
  • both the local FPGA and the peer FPGA have a receiving and transmitting process of the message
  • the local FPGA is taken as an example, and the receiving process of the same is the same as the above embodiment, and is not elaborated herein; as follows:
  • the local FPGA configuration protocol packet is the policy and related parameters of the second protocol packet in this embodiment.
  • the policy includes setting the interval for sending protocol packets, the length of the transmission, the last sent count, and the last time. Receive count value and enable, etc.
  • the local FPGA receives the second common packet from the local switching chip, and generates the second protocol packet according to the foregoing configuration policy, and then sends the second normal packet and the second protocol packet to the peer according to the preset sending policy.
  • the peer end FPGA calculates the packet loss rate of the peer link. Of which, the opposite end
  • the process of calculating the packet loss rate of the peer link by the FPGA is the same as the process of calculating the packet loss rate of the local link in the local FPGA in the foregoing embodiment.
  • the calculation process of the link loss rate is as follows: After receiving the two protocol packets, the local FPGA can calculate the packet loss rate, and receive the two protocol packets A and B (hereinafter referred to as the A packet and the B packet) at different times to calculate the packet loss rate.
  • Local packet loss rate local packet loss value / peer packet number
  • the calculation process of the peer packet loss rate is as follows:
  • Peer packet loss value IB packet transmission count - A packet transmission count I-IB packet reception count - A packet reception count I;
  • Peer packet loss rate peer packet loss value / local packet transmission number
  • the local FPGA sends the second normal message and the second protocol message
  • the second general message and the second protocol message are first sorted, and then sent to the outbound port sending queue for transmission.
  • the added second protocol packet for measuring the packet loss rate will affect the port speed when the port line speed is sent to the port, for example, for a port of 100 Mbps, if it has reached the line speed, however, because the protocol packet of the packet loss rate measurement is added, the packet delivery speed exceeds 100 Mbps. Even if the port can send packets at a speed of more than 100 Mbps, the receiver will also lose packets due to speed mismatch.
  • the line speed refers to the maximum speed of the port, for example, the maximum speed of the 100M port is 100 Mbps.
  • the port sending rate needs to be monitored.
  • the local end FPGA detects that the port sending rate has reached the maximum port rate, the first time is not allowed.
  • the second protocol packet enters the sending queue of the egress port, and the second protocol packet is not sent temporarily. If the transmission rate of the port is detected to be allowed to send the second protocol packet, the second protocol packet is allowed to enter the outbound port transmission queue.
  • the local FPGA sends the second normal packet in the sending queue, the second normal packet to be sent by the counter is counted, and the sending count value is obtained. If the packet to be sent is the second protocol packet, the current count value is filled in the corresponding field of the second protocol packet, and then the second normal packet and the second protocol packet are sent. Send to the peer FPGA.
  • step S107 includes:
  • Step S1071 determining whether the local FPGA port transmission rate reaches a predetermined threshold; if yes, proceeding to step S1072, otherwise, proceeding to step S1073;
  • Step S1072 The second protocol packet is not allowed to enter the sending queue.
  • the second protocol message is allowed to enter the outbound port transmission queue.
  • Step S1073 Allow the second protocol packet to enter the sending queue, and sort the second protocol packet and the second normal packet.
  • Step S1074 The second normal packet to be sent is counted to obtain a sending count value.
  • Step S1075 When the second protocol packet is sent, the current sending count value is filled in the second protocol packet.
  • Step S1076 Send the second normal message and the second protocol message carrying the current sending count value to the peer FPGA in sequence.
  • the protocol for generating a protocol packet is configured according to the requirement of measuring the packet loss rate, and the protocol packet for measuring the packet loss rate is sent to reduce the occupation of the limited network bandwidth resource.
  • the protocol packet for measuring the packet loss rate is sent to reduce the occupation of the limited network bandwidth resource.
  • the monitoring of the packet loss rate reduces the impact on the network system environment and improves the availability of the network system.
  • the invention makes the network system more operable and more adaptable.
  • an embodiment of the present invention provides an FPGA-based packet loss rate monitoring apparatus, including: a first receiving module 401, a recording module 402, and a computing module 403, where: The first receiving module 401 is configured to receive a packet sent by the peer FPGA;
  • the recording module 402 is configured to: when the message is the first common message, record the received count value when receiving the first normal message; when the message is the first protocol message, fill the current received count value into the first Protocol message;
  • the calculation module 403 is configured to calculate the local link according to the current sending count value, the last sent count value, the last received count value, the current received count value, and the preset protocol packet sending interval time carried in the first protocol packet. Packet loss rate.
  • the operating environment of the device in this embodiment involves the transmission of data packets between the transmitting end and the receiving end in the network device.
  • the transmitting end and the receiving end respectively correspond to the local switching chip responsible for message exchange and
  • the peer switch chip in order to monitor the packet loss rate of the link between the local switch chip and the peer switch chip, is provided with a local FPGA and a peer FPGA between the sender and the receiver.
  • the device in this embodiment is the local FPGA, and the following uses the local FPGA as the device of the embodiment.
  • the peer FPGA receives the packet sent by the peer FPGA from the first receiving module 401 of the local FPGA, and includes a common packet and a protocol packet for measuring a packet loss rate, that is, the first common packet and the first packet in the embodiment.
  • a protocol message The identification of the message can be distinguished by the message identifier.
  • the first protocol packet is generated according to a predetermined configuration policy when the peer FPGA receives the first common packet sent by the peer switching chip.
  • the predetermined configuration policy may be configured by the peer switch chip, or may be configured by the peer FPGA under the control of the peer switch chip or the CPU.
  • the configuration policy includes: setting a protocol packet sending interval, sending time length, and The secondary transmission count value, the last received count value, and enable. As shown in Table 3 below, the values in the table can be set according to the actual situation:
  • the port number refers to the device port number
  • Length of sending time Indicates how much time is measured, in seconds
  • Transmission frequency interval Indicates the interval of the transmission protocol. The unit is millisecond. Enable: When the value is 1, it indicates that the measurement loss rate function is used. When it is 0, it indicates that the function is not enabled.
  • the last sent count value refers to the count value of the normal ordinary message sent when the last protocol message is sent;
  • Last received count value refers to the count value of the received normal message when the last protocol message was received.
  • the protocol packet in this embodiment that is, the structure of the first protocol packet is as follows:
  • the header of the packet refers to the header of the protocol packet, such as the source address and the destination address.
  • Protocol field The field in which the packet belongs to the measurement packet loss rate is used to distinguish the ordinary packet.
  • Count The count value of the normal packet sent by the last time the protocol packet was sent. The last sent count is copied from the last send count field of the protocol packet.
  • the last received count refers to the received count value of the normal received message, and the last received count is copied from the original received count field;
  • Send count When sending this protocol packet, fill in the send count value of the current normal packet counted by the counter into this field;
  • the packet identifier is used to distinguish whether the packet received by the local FPGA is an ordinary packet or a protocol packet.
  • the packet is received by the recording module 402.
  • the first normal message is counted, wherein the recording module 402 can adopt 32 bits. Counter.
  • the protocol packet is sent according to the configured transmission interval.
  • the current receiving count value recorded by the recording module 402 is filled in the protocol packet, that is, the first protocol packet.
  • the current transmit count value in this embodiment refers to the first common data of the current protocol when the peer FPGA sends the first protocol packet to the local FPGA.
  • the send count value of the message The local link loss ratio can be calculated according to the current sending count value, the last sent count value, the last received count value, the current received count value, and the preset protocol packet sending interval carried in the first protocol packet.
  • the local end After receiving the two protocol packets, the local end can calculate the packet loss rate.
  • the two packets A and B (hereinafter referred to as A and B packets) are received at different times to calculate the packet loss rate.
  • Local packet loss rate local packet loss value / peer packet number
  • another embodiment of the present invention provides an FPGA-based packet loss rate monitoring device. Based on the foregoing embodiments, the method further includes:
  • the configuration module 400 is connected to the first receiving module 401 and configured to configure a preset policy.
  • the preset policy includes setting a protocol packet sending interval time, a sending time length, a last sending count value, a last received counting value, and/or can.
  • the first sending module 404 is connected to the calculating module 403, and configured to send the first protocol packet, the first The normal packet and the local link loss rate are sent to the local switch chip.
  • the second receiving module 405 is configured to receive a second normal packet sent by the local switching chip, and the generating module 406 is configured to generate a second protocol packet according to the preset policy.
  • the second sending module 407 is configured to send the second normal packet and the second protocol packet to the peer FPGA according to the preset sending policy, and the peer FPGA calculates the packet loss rate of the peer link.
  • the second sending module 407 includes: a determining operating unit 4071, a counting unit
  • the determining operation unit 4071 is configured to determine whether the sending rate of the local FPGA port reaches a predetermined threshold; if yes, the second protocol packet is not allowed to enter the sending queue; otherwise, the second protocol packet is allowed to enter the sending queue, and the second protocol packet is allowed to enter the sending queue. Sorting the protocol message and the second normal message;
  • a counting unit 4072 configured to count a second normal message to be sent, to obtain a sending value
  • the writing unit 4073 is configured to: when sending the second protocol packet, fill the current sending count value into the second protocol packet;
  • the sending unit 4074 is configured to send the second normal packet and the second protocol packet carrying the current sending count value to the peer FPGA in a sorted order.
  • the foregoing embodiment implements the monitoring of the link loss rate of the link from the peer FPGA to the local FPGA.
  • the foregoing embodiment implements the monitoring of the link loss rate of the link from the peer FPGA to the local FPGA.
  • the local FPGA has the same functional features as the peer FPGA, and includes the functional features of both the local FPGA and the peer FPGA in the above embodiment.
  • both the local FPGA and the peer FPGA have a receiving and transmitting process of the packet
  • the local end FPGA is taken as an example, and the receiving process thereof is the same as the above embodiment, and will not be described in detail herein;
  • the message sending process is as follows:
  • the local FPGA configuration protocol packet is the policy and related parameters of the second protocol packet in this embodiment.
  • the policy includes setting the interval for sending protocol packets, the length of the transmission, the last sent count, and the last time. Receive count value and enable, etc.
  • the local FPGA receives the second common packet from the local switching chip, and generates the second protocol packet according to the foregoing configuration policy, and then sends the second normal packet and the second protocol packet to the peer according to the preset sending policy.
  • the peer end FPGA calculates the packet loss rate of the peer link.
  • the process of calculating the packet loss rate of the peer link by the peer end FPGA is the same as the process of calculating the packet loss rate of the local end link in the foregoing embodiment, and is not described in detail herein.
  • the local FPGA sends the second normal message and the second protocol message
  • the second general message and the second protocol message are first sorted, and then sent to the outbound port sending queue for transmission.
  • the added second protocol packet for measuring the packet loss rate will affect the port speed when the port line speed is sent to the port, for example, for a port of 100 Mbps, if it has reached the line speed, however, because the protocol packet of the packet loss rate measurement is added, the packet delivery speed exceeds 100 Mbps. Even if the port can send packets at speeds exceeding 100 Mbps, packets will be lost at the receiving end due to speed mismatch.
  • the line speed refers to the maximum speed of the port, for example, the maximum speed of the 100M port is 100 Mbps.
  • the port sending rate needs to be monitored.
  • the local end FPGA detects that the port sending rate has reached the maximum port rate, the first time is not allowed.
  • the second protocol packet enters the sending queue of the egress port, and the second protocol packet is not sent temporarily. If it is detected that the port transmission rate drops to allow the second protocol packet to be sent, the second protocol packet is allowed to enter the outbound port transmission queue.
  • the second normal packet to be sent by the counter is counted, and the sending count value is obtained. If the message to be sent is the second association The packet is sent to the corresponding field of the second protocol packet, and then the second normal packet and the second protocol packet are sent to the peer FPGA.
  • the packet loss rate monitoring method and device based on the FPGA configure a protocol packet generation policy according to the requirement of measuring the packet loss rate, and send a protocol packet that measures the packet loss rate, thereby reducing the occupation of the limited network bandwidth resource.
  • the original packet in the network environment can be used to record the packet loss rate in the monitoring link without substantially affecting the available bandwidth of the network. The impact on the network system environment in the later period, and improved the availability of the network system. Compared with the prior art, the invention makes the network system more operable and more adaptable.

Landscapes

  • Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明涉及一种基于现场可编程门阵列(FPGA)的丢包率监测方法及装置,方法包括:本端FPGA接收对端FPGA发送的报文;当报文为第一普通报文时,记录接收第一普通报文时的接收计数值;当报文为第一协议报文时,将当前接收计数值填入第一协议报文;根据第一协议报文携带的当前发送计数值、上次发送计数值、上次接收计数值、当前接收计数值以及预设的发送协议报文的间隔时间计算本端链路丢包率。本发明根据测量丢包率的需求,配置协议报文的生成策略,发送测量丢包率的协议报文,减少对带宽资源的占用,还利用网络中原有的普通报文,在不影响网络可用带宽的情况下,记录监测链路中的丢包率,降低后期对网络环境的影响,并提高了网络的可用性。

Description

基于 FPGA的丢包率监测方法及装置 技术领域
本发明涉及通信技术领域, 尤其涉及一种网络链路质量监测技术中基 于 FPGA ( Field - Programmable Gate Array, 现场可编程门阵列) 的丟包率 监测方法及装置。 背景技术
随着数据通信技术的不断发展, 通信设备的设计不断复杂化, 挂接在 通信网络系统上的通信设备不断增多, 使得这些通信设备的稳定性面临着 挑战。 操作员在调试通信设备时, 常常会产生链路不畅或者信息包丟失等 情况。
目前, 一种测量链路丟包率的方法是: 在报文加入计数 /序列号, 通过 计数 /序列号测量链路丟包率。该方法包括至少两个维护端点在通信网络中, 相互周期性地发送连接确认报文的过程, 其步驟具体包括: A.在连接确认 报文的协议数据单元中携带报文序列号; B.维护端点通过连接确认报文的 序列号计算丟包率。
上述方法虽然仅需要通过报文序列号就能计算丟包率, 过程快捷方便, 并可提高 LM (低电压版移动处理器)性能监控的便利性, 但是, 该方法因 引入测量报文, 对原有报文流量产生了较大影响, 主动发起的专用的测量 报文流, 会占用大量的网络带宽资源, 从而导致在测量丟包率时, 网络的 正常通信受到极大的影响, 甚至中断网络正常通信, 从而增加了网络系统 的带宽开销, 降低了系统的可用性。 发明内容
有鉴于此, 本发明的主要目的在于提供一种基于 FPGA的丟包率监测 方法及装置, 能在不影响网络可用带宽的情况下, 实现对链路丟包率的监 测。
为了达到上述目的, 本发明提出一种基于 FPGA的丟包率监测方法, 包括:
本端 FPGA接收对端 FPGA发送的 4艮文;
当所述报文为第一普通报文时, 记录接收所述第一普通报文时的接收 计数值; 当所述报文为第一协议报文时, 将当前接收计数值填入所述第一 协议报文;
根据所述第一协议报文携带的当前发送计数值、 上次发送计数值、 上 次接收计数值、 所述当前接收计数值以及预设的协议报文发送间隔时间计 算本端链路丟包率。
优选地, 所述当前发送计数值是指所述对端 FPGA发送所述第一协议 报文至所述本端 FPGA时, 该对端 FPGA填入该第一协议报文内的、 当前 统计的第一普通报文的发送计数值。
优选地, 所述计算本端链路丟包率之后还包括: 将所述第一协议报文、 第一普通报文以及本端链路丟包率发送至本端交换芯片。
优选地, 还包括:
所述本端 FPGA接收本端交换芯片发送的第二普通报文;
根据预置策略生成第二协议报文;
将所述第二普通报文及第二协议报文按照预设的发送策略发送至所述 对端 FPGA , 由所述对端 FPGA计算对端链路丟包率。
优选地, 所述将第二普通报文及第二协议报文按照预设的发送策略发 送至所述对端 FPGA的步驟包括: 判断本端 FPGA端口发送速率是否达到预定阀值; 若是, 则
不允许第二协议报文进入发送队列, 否则, 允许所述第二协议报文进 入发送队列, 并对第二协议报文及第二普通报文进行排序;
对待发送的所述第二普通报文进行计数, 得到发送计数值;
在发送所述第二协议报文时, 将当前发送计数值填入所述第二协议报 文;
将所述第二普通报文及携带有当前发送计数值的第二协议报文按照排 序先后发送至对端 FPGA。
优选地, 所述本端 FPGA接收本端交换芯片发送的第二普通报文的步 驟之前还包括:
配置所述预置策略; 所述预置策略包括设置协议报文发送间隔时间、 和 /或发送时间长度、 和 /或上次发送计数值、 和 /或上次接收计数值和 /或使
•6匕
匕。
本发明还提出一种基于 FPGA的丟包率监测装置, 包括:
第一接收模块, 用于接收对端 FPGA发送的报文;
记录模块, 用于当所述报文为第一普通报文时, 记录接收所述第一普 通报文时的接收计数值; 当所述报文为第一协议报文时, 将当前接收计数 值填入所述第一协议报文;
计算模块, 用于根据所述第一协议报文携带的当前发送计数值、 上次 发送计数值、 上次接收计数值、 所述当前接收计数值以及预设的协议报文 发送间隔时间计算本端链路丟包率。
优选地, 所述当前发送计数值是指所述对端 FPGA发送所述第一协议 报文至所述本端 FPGA时, 该对端 FPGA填入该第一协议报文内的、 当前 统计的第一普通报文的发送计数值。
优选地, 还包括: 第一发送模块, 用于将所述第一协议报文、 第一普通报文以及本端链 路丟包率发送至本端交换芯片。
优选地, 还包括:
第二接收模块 , 用于接收本端交换芯片发送的第二普通报文; 生成模块, 用于根据预置策略生成第二协议报文;
第二发送模块, 用于将所述第二普通报文及第二协议报文按照预设的 发送策略发送至所述对端 FPGA, 由所述对端 FPGA计算对端链路丟包率。
优选地, 所述第二发送模块包括:
判断操作单元,用于判断本端 FPGA端口发送速率是否达到预定阀值; 若是, 则不允许第二协议报文进入发送队列, 否则, 允许所述第二协议报 文进入发送队列, 并对第二协议报文及第二普通报文进行排序;
计数单元, 用于对待发送的所述第二普通报文进行计数, 得到发送计 数值;
写入单元, 用于当发送所述第二协议报文时, 将当前发送计数值填入 所述第二协议报文;
发送单元, 用于将所述第二普通报文及携带有当前发送计数值的第二 协议报文按照排序先后发送至对端 FPGA。
优选地, 还包括:
配置模块, 用于配置所述预置策略; 所述预置策略包括设置协议报文 发送间隔时间、 和 /或发送时间长度、 和 /或上次发送计数值、 和 /或上次接收 计数值和 /或使能。
本发明提出的一种基于 FPGA的丟包率监测方法及装置, 根据测量丟 包率的需求, 配置协议报文的生成策略, 发送测量丟包率的协议报文, 减 少对有限的网络带宽资源的占用。 同时, 可不依赖专门的用于测量丟包率 的序列报文, 而利用网络环境中原有的普通报文, 在基本不影响网络可用 带宽的情况下, 记录监测链路中的丟包率, 降低了后期对网络系统环境的 影响, 并提高了网络系统的可用性。 与现有技术相比, 本发明使得网络系 统可操作性更强, 适应面更广泛。 附图说明
图 1是本发明基于 FPGA的丟包率监测方法一实施例流程示意图; 图 2是本发明基于 FPGA的丟包率监测方法涉及的网络架构示意图; 图 3是本发明基于 FPGA的丟包率监测方法另一实施例流程示意图; 图 4是本发明基于 FPGA的丟包率监测方法另一实施例中将第二普通报 文及第二协议报文按照预设的发送策略发送至对端 FPGA, 由对端 FPGA计 算对端链路丟包率的流程示意图;
图 5是发明基于 FPGA的丟包率监测装置一实施例结构示意图; 图 6是发明基于 FPGA的丟包率监测装置另一实施例结构示意图; 图 7是发明基于 FPGA的丟包率监测装置另一实施例中第二发送模块的 结构示意图。
为了使本发明的技术方案更加清楚、 明了, 下面将结合附图作进一步 评述。 具体实施方式
本发明实施例解决方案主要是: 根据测量丟包率的需求, 配置策略生 成协议报文, 并结合协议报文与现有网络中的普通报文, 实现对链路丟包 率的监测, 以减少对有限的网络带宽资源的占用, 提高网络系统的可用性。
如图 1所示, 本发明一实施例提出一种基于 FPGA的丟包率监测方法, 包括:
步驟 S101 , 本端 FPGA接收对端 FPGA发送的 4艮文;
如图 2所示, 本实施例方法运行环境涉及网络设备中的发送端及接收 端之间的数据包的传输, 发送端及接收端分别对应设置有负责报文交换的 本端交换芯片及对端交换芯片, 为了监测本端交换芯片及对端交换芯片之 间链路的丟包率, 在发送端及接收端之间设置有本端 FPGA及对端 FPGA。
对端 FPGA向本端 FPGA发送的报文包括: 普通报文及用于测量丟包 率的协议报文, 即本实施例所称第一普通报文及第一协议报文。 对于报文 的识别可以通过 ·^艮文识别器来进行区分。
上述第一协议报文是在对端 FPGA收到对端交换芯片发送的第一普通 报文时, 根据预定的配置策略生成的。
其中,预定的配置策略可以由对端交换芯片配置,也可以由对端 FPGA 在对端交换芯片或 CPU (中央处理器) 的控制下配置, 该配置策略包括: 设置协议报文发送间隔时间、 发送时间长度、 上次发送计数值、 上次接收 计数值以及使能等。 如下表 1所示, 其中表内的值可以根据实际情况设定:
Figure imgf000008_0001
表 1
上述表 1中, 端口号: 指设备端口号;
发送时间长度: 表示测量多少时间, 单位为秒;
发送频率间隔: 表示发送协议 4艮文的间隔时间, 单位为毫秒; 使能: 其值为 1时, 表示使用此测量丟包率功能; 为 0时, 表示不启 动此项功能;
上次发送计数值: 指上次协议报文被发送时, 统计的普通报文的发送 计数值;
上次接收计数值: 指上次协议报文被接收时, 统计的普通报文的接收 计数值。 本实施例中协议报文, 即第一协议报文的结构如下表 2所示:
Figure imgf000009_0001
表 2
上述表 2中, 报文头: 指协议报文的头部, 如源地址、 目的地址; 协议字段: 在此标识报文属于测量丟包率的字段, 用以区分普通报文; 上次发送计数: 指上一次发送协议报文时统计的普通报文的发送计数 值, 该上次发送计数从协议报文上次的发送计数字段拷贝而来;
上次接收计数: 指上一次接收协议报文是统计的普通报文的接收计数 值, 该上次接收计数从原来的接收计数字段拷贝而来;
发送计数: 在发送本协议报文时, 将计数器统计的当前普通报文的发 送计数值填入到此字段;
接收计数: 在接收到本协议报文时, 将计数器统计的当前普通报文的 接收计数值填入到此字段。
步驟 S102, 当报文为第一普通报文时, 记录接收第一普通报文时的接 收计数值; 当报文为第一协议报文时, 将当前接收计数值填入第一协议报 文;
通过报文识别器来区分本端 FPGA接收的报文为普通报文还是协议报 文, 当为普通报文时, 通过计数器对接收到的普通报文即本实施例所称第 一普通报文进行计数, 其中, 计数器可以采用 32位计数器。
由于对端 FPGA对普通报文和协议报文是以预定排序后的发送队列进 行发送的, 因此协议报文根据配置的发送间隔时间进行发送。
当本端 FPGA接收的报文为协议报文时, 将当前计数器中的接收计数 值填入该协议报文即第一协议报文中。
步驟 S103, 根据第一协议报文携带的当前发送计数值、 上次发送计数 值、 上次接收计数值、 当前接收计数值以及预设的协议报文发送间隔时间 计算本端链路丟包率。
如上所述, 当前发送计数值是指对端 FPGA发送第一协议报文至本端
FPGA时,该对端 FPGA填入该第一协议报文内的、 当前统计的第一普通报 文的发送计数值。 根据第一协议报文携带的当前发送计数值、 上次发送计 数值、 上次接收计数值、 当前接收计数值以及预设的协议报文发送间隔时 间即可计算本端链路丟包率。
其中, 本端链路丟包率的计算过程如下:
在本端收到二个协议报文之后即可以计算丟包率, 以不同时刻先后收 到两协议包 A和 B (以下简称 A包和 B包) 为例计算丟包率。
本端丟包数值 =IB包上一次发送计数 -A包上一次发送计数 I-IB包上一次 接收计数 -A包上一次接收计数 I;
本端丟包率 =本端丟包数值 /对端发送包数
=本端丟包数值 /I B包发送计数 -A包发送计数 I
需要说明的是,本实施例方法除了基于 FPGA实现外,还可以在 CPLD ( Complex Programmable Logic Device,复杂可编程逻辑器件 )中设计完成。
本实施例与现有技术相比, 使系统可操作性更强, 适应面更广泛, 对 原有网络的影响更小。 其可以不依赖专门的测量丟包率的序列报文, 而是 利用了网络环境中原有的普通报文, 即可完成对网络的丟包率监测, 从而 降低了后期对网络系统环境的影响, 同时提高了系统的可用性。
如图 3所示, 本发明另一实施例提出基于 FPGA的丟包率监测方法, 在上述实施例的基础上,
在步驟 S101之前还包括:
步驟 S100, 配置预置策略;预置策略包括设置协议报文发送间隔时间、 发送时间长度、 上次发送计数值、 上次接收计数值和 /或使能。
在步驟 S103之后还包括: 步驟 S104, 将第一协议报文、 第一普通报文以及本端链路丟包率发送 至本端交换芯片。
步驟 S105, 接收本端交换芯片发送的第二普通报文;
步驟 S106, 根据预置策略生成第二协议报文;
步驟 S107, 将第二普通报文及第二协议报文按照预设的发送策略发送 至对端 FPGA, 由对端 FPGA计算对端链路丟包率。
本实施例与上述实施例的区别在于, 上述实施例实现了从对端 FPGA 到本端 FPGA 的链路丟包率的监测, 本实施例中, 不仅可以实现从对端 FPGA到本端 FPGA的链路丟包率的监测,并将第一协议报文、第一普通报 文以及本端链路丟包率发送至本端交换芯片,同时还可以实现从本端 FPGA 到对端 FPGA的链路丟包率的监测。 本实施例中本端 FPGA与对端 FPGA 具有相同的功能特征,并同时包括有上述实施例中本端 FPGA与对端 FPGA 两者的功能特征。
具体地, 本端 FPGA与对端 FPGA均具有报文的接收与发送过程, 以 本端 FPGA为例, 其 ^艮文接收过程与上述实施例相同, 在此不作详细阐述; 其报文发送过程如下:
首先, 本端 FPGA配置生成协议报文即本实施例所称第二协议报文的 策略及相关参数, 该策略包括设置协议报文发送间隔时间、 发送时间长度、 上次发送计数值、 上次接收计数值和使能等。
本端 FPGA从本端交换芯片接收第二普通报文, 同时根据上述配置策 略生成第二协议报文, 然后将第二普通报文及第二协议报文按照预设的发 送策略发送至对端 FPGA, 由对端 FPGA计算对端链路丟包率。 其中, 对端
FPGA计算对端链路丟包率的过程与上述实施例中本端 FPGA计算本端链 路丟包率的过程相同。
具体地, 链路丟包率的计算过程如下: 在本端 FPGA收到二个协议报文之后即可以计算丟包率, 以不同时刻 先后收到两协议包 A和 B (以下简称 A包和 B包) 为例计算丟包率。
本端丟包数值 =IB包上一次发送计数 -A包上一次发送计数 I-IB包上一次 接收计数 -A包上一次接收计数 I;
本端丟包率 =本端丟包数值 /对端发送包数
=本端丟包数值 /I B包发送计数 -A包发送计数 I
对端丟包率计算过程如下:
对端丟包数值 =IB 包发送计数 -A包发送计数 I-IB 包接收计数 -A包接收 计数 I;
对端丟包率 =对端丟包数值 /本地发送包数
=对端丟包数值 /I B包上一次发送计数 -A包上一次发送计数 I 若再进行多次测量可求得长时间内的平均丟包率值。
本端 FPGA在发送第二普通报文及第二协议报文时, 首先要对第二普 通报文及第二协议报文进行排序, 然后送入出端口发送队列进行发送。
同时, 考虑到增加的用于测量丟包率的第二协议报文会在端口线速度 发包时影响到端口的速度给端口增加负担, 比如, 对于 100Mbps的端口, 若其已达到线速度发包, 但因为加入了丟包率测量的协议报文, 端口的发 包速度超过 100Mbps。 即使本端口能以超过 100Mbps的速度发包, 在接收 端亦会因为速度不匹配而丟包。 其中, 所述线速度是指端口的最大速度, 比如百兆端口的最大速度为 100Mbps。 本实施例在将第二普通报文及第二 协议报文送入端口发送队列进行发送前, 需要监测端口发送速率, 若本端 FPGA监测到端口发送速率已达到端口最大速率,则不允许第二协议报文进 入到出端口的发送队列, 暂不发送该第二协议报文。 若监测到端口发送速 率下降到允许发送该第二协议报文, 则允许第二协议报文进入到出端口发 送队列。 本端 FPGA在发送队列中发送第二普通报文时, 通过计数器对待发送 的第二普通报文进行计数, 得到发送计数值。 如果待发送的报文为第二协 议报文, 则将当前计数得到的发送计数值填入到该第二协议报文的对应字 段中, 然后, 将第二普通报文和第二协议报文发送至对端 FPGA。
如图 4所示, 步驟 S107包括:
步驟 S1071 , 判断本端 FPGA端口发送速率是否达到预定阀值; 若是, 则进入步驟 S1072, 否则, 进入步驟 S1073;
步驟 S1072, 不允许第二协议报文进入发送队列;
若监测到端口发送速率下降到低于预定阀值, 则允许第二协议报文进 入到出端口发送队列。
步驟 S1073,允许第二协议报文进入发送队列,并对第二协议报文及第 二普通报文进行排序;
步驟 S1074,对待发送的所述第二普通报文进行计数,得到发送计数值; 步驟 S1075,在发送第二协议报文时,将当前发送计数值填入第二协议 报文;
步驟 S1076,将第二普通报文及携带有当前发送计数值的第二协议报文 按照排序先后发送至对端 FPGA。
本实施例根据测量丟包率的需求, 配置协议报文的生成策略, 发送测 量丟包率的协议报文, 减少对有限的网络带宽资源的占用。 同时可不依赖 专门的用于测量丟包率的序列报文, 而利用网络环境中原有的普通报文, 在基本不影响网络可用带宽的情况下, 可实现本端与对端之间链路的丟包 率的监测, 降低了后期对网络系统环境的影响, 并提高了网络系统的可用 性。 与现有技术相比, 本发明使得网络系统可操作性更强, 适应面更广泛。
如图 5所示, 本发明一实施例提出一种基于 FPGA的丟包率监测装置, 包括: 第一接收模块 401、 记录模块 402以及计算模块 403, 其中: 第一接收模块 401 , 用于接收对端 FPGA发送的报文;
记录模块 402, 用于当报文为第一普通报文时, 记录接收第一普通报文 时的接收计数值; 当报文为第一协议报文时, 将当前接收计数值填入第一 协议报文;
计算模块 403 , 用于根据第一协议报文携带的当前发送计数值、上次发 送计数值、 上次接收计数值、 当前接收计数值以及预设的协议报文发送间 隔时间计算本端链路丟包率。
本实施例装置的运行环境涉及网络设备中的发送端及接收端之间的数 据包的传输, 如图 2所示, 发送端及接收端分别对应设置有负责报文交换 的本端交换芯片及对端交换芯片, 为了监测本端交换芯片及对端交换芯片 之间链路的丟包率, 在发送端及接收端之间设置有本端 FPGA 以及对端 FPGA。 本实施例装置即为本端 FPGA, 以下均以本端 FPGA作为本实施例 装置进行说明。
对端 FPGA向本端 FPGA的第一接收模块 401接收对端 FPGA发送的 报文包括普通报文及用于测量丟包率的协议报文, 即本实施例所称第一普 通报文及第一协议报文。 对于报文的识别可以通过报文识别器来进行区分。
上述第一协议报文是在对端 FPGA收到对端交换芯片发送的第一普通 报文时, 根据预定的配置策略生成的。
其中,预定的配置策略可以由对端交换芯片配置,也可以由对端 FPGA 在对端交换芯片或 CPU的控制下配置, 该配置策略包括: 设置协议报文发 送间隔时间、 发送时间长度、 上次发送计数值、 上次接收计数值以及使能 等。 如下表 3所示, 其中表内的值可以根据实际情况设定:
Figure imgf000014_0001
表 3 上述表 3中, 端口号: 指设备端口号;
发送时间长度: 表示测量多少时间, 单位为秒;
发送频率间隔: 表示发送协议 ^艮文的间隔时间, 单位为毫秒; 使能: 其值为 1时, 表示使用此测量丟包率功能, 为 0时, 表示不启 动此项功能;
上次发送计数值: 指上次协议报文被发送时, 统计的普通报文的发送 计数值;
上次接收计数值: 指上次协议报文被接收时, 统计的普通报文的接收 计数值。
本实施例中协议报文, 即第一协议报文的结构如下表 4所示:
Figure imgf000015_0001
表 4
上述表 4中, 报文头: 指协议报文的头部, 如源地址、 目的地址; 协议字段: 在此标识报文属于测量丟包率的字段, 用以区分普通报文; 上次发送计数: 指上一次发送协议报文时统计的普通报文的发送计数 值, 该上次发送计数从协议报文上次的发送计数字段拷贝而来;
上次接收计数: 指上一次接收协议报文是统计的普通报文的接收计数 值, 该上次接收计数从原来的接收计数字段拷贝而来;
发送计数: 在发送本协议报文时, 将计数器统计的当前普通报文的发 送计数值填入到此字段;
接收计数: 在接收到本协议报文时, 将计数器统计的当前普通报文的 接收计数值填入到此字段。
本实施例通过报文识别器来区分本端 FPGA接收的报文为普通报文还 是协议报文, 当为普通报文时, 通过记录模块 402对接收到的普通报文即 本实施例所称第一普通报文进行计数, 其中, 记录模块 402可以采用 32位 计数器。
由于对端 FPGA对普通报文和协议报文是以预定排序后的发送队列进 行发送的, 因此协议报文根据配置的发送间隔时间进行发送。
当本端 FPGA接收的报文为协议报文时, 将记录模块 402记录的当前 接收计数值填入该协议报文即第一协议报文中。
如上所述, 本实施例中当前发送计数值是指对端 FPGA发送第一协议 报文至本端 FPGA时, 该对端 FPGA填入该第一协议报文内的、 当前统计 的第一普通报文的发送计数值。 根据第一协议报文携带的当前发送计数值、 上次发送计数值、 上次接收计数值、 当前接收计数值以及预设的协议报文 发送间隔时间即可计算本端链路丟包率。
其中, 本端链路丟包率的计算过程如下:
在本端收到二个协议报文之后即可以计算丟包率, 以不同时刻先后收 到两协议包 A和 B (以下简称 A包和 B包) 为例计算丟包率。
本端丟包数值 =IB包上一次发送计数 -A包上一次发送计数 I-IB包上一次 接收计数 -A包上一次接收计数 I;
本端丟包率 =本端丟包数值 /对端发送包数
=本端丟包数值 /I B包发送计数 -A包发送计数 I
需要说明的是,本实施例方法除了基于 FPGA实现外,还可以在 CPLD 中设计完成。
如图 6所示, 本发明另一实施例提出一种基于 FPGA的丟包率监测装 置, 在上述实施例的基础上, 还包括:
配置模块 400, 与第一接收模块 401连接, 用于配置预置策略; 预置策 略包括设置协议报文发送间隔时间、 发送时间长度、 上次发送计数值、 上 次接收计数值和 /或使能。
第一发送模块 404, 与计算模块 403连接, 用于将第一协议报文、 第一 普通报文以及本端链路丟包率发送至本端交换芯片。
第二接收模块 405 , 用于接收本端交换芯片发送的第二普通报文; 生成模块 406, 用于根据预置策略生成第二协议报文;
第二发送模块 407,用于将第二普通报文及第二协议报文按照预设的发 送策略发送至对端 FPGA, 由对端 FPGA计算对端链路丟包率。
上述各模块可由本实施例装置中控制部分比如控制器进行控制工作。 如图 7所示, 第二发送模块 407包括: 判断操作单元 4071、 计数单元
4072、 写入单元 4073及发送单元 4074, 其中:
判断操作单元 4071 , 用于判断本端 FPGA端口发送速率是否达到预定 阀值; 若是, 则不允许第二协议报文进入发送队列, 否则, 允许第二协议 报文进入发送队列, 并对第二协议报文及第二普通报文进行排序;
计数单元 4072, 用于对待发送的第二普通报文进行计数, 得到发送计 数值;
写入单元 4073, 用于当发送第二协议报文时, 将当前发送计数值填入 第二协议报文;
发送单元 4074, 用于将第二普通报文及携带有当前发送计数值的第二 协议报文按照排序先后发送至对端 FPGA。
本实施例与上述实施例的区别在于, 上述实施例实现了从对端 FPGA 到本端 FPGA 的链路丟包率的监测, 本实施例中, 不仅可以实现从对端 FPGA到本端 FPGA的链路丟包率的监测,并将第一协议报文、第一普通报 文以及本端链路丟包率发送至本端交换芯片,同时还可以实现从本端 FPGA 到对端 FPGA的链路丟包率的监测。 本实施例中本端 FPGA与对端 FPGA 具有相同的功能特征,并同时包括有上述实施例中本端 FPGA与对端 FPGA 两者的功能特征。
具体地, 本端 FPGA与对端 FPGA均具有报文的接收与发送过程, 以 本端 FPGA为例 , 其 ^艮文接收过程与上述实施例相同 , 在此不作详细阐述; 其报文发送过程如下:
首先, 本端 FPGA配置生成协议报文即本实施例所称第二协议报文的 策略及相关参数, 该策略包括设置协议报文发送间隔时间、 发送时间长度、 上次发送计数值、 上次接收计数值和使能等。
本端 FPGA从本端交换芯片接收第二普通报文, 同时根据上述配置策 略生成第二协议报文, 然后将第二普通报文及第二协议报文按照预设的发 送策略发送至对端 FPGA, 由对端 FPGA计算对端链路丟包率。 其中, 对端 FPGA计算对端链路丟包率的过程与上述实施例中本端 FPGA计算本端链 路丟包率的过程相同, 在此不作详述。
本端 FPGA在发送第二普通报文及第二协议报文时, 首先要对第二普 通报文及第二协议报文进行排序, 然后送入出端口发送队列进行发送。
同时, 考虑到增加的用于测量丟包率的第二协议报文会在端口线速度 发包时影响到端口的速度给端口增加负担, 比如, 对于 100Mbps的端口, 若其已达到线速度发包, 但因为加入了丟包率测量的协议报文, 端口的发 包速度超过 100Mbps。 即使本端口能以超过 100Mbps的速度发包, 在接收 端亦会因为速度不匹配而丟包。 其中, 所述线速度是指端口的最大速度, 比如百兆端口的最大速度为 100Mbps。 本实施例在将第二普通报文及第二 协议报文送入端口发送队列进行发送前, 需要监测端口发送速率, 若本端 FPGA监测到端口发送速率已达到端口最大速率,则不允许第二协议报文进 入到出端口的发送队列, 暂不发送该第二协议报文。 若监测到端口发送速 率下降到允许发送该第二协议报文, 则允许第二协议报文进入到出端口发 送队列。
本端 FPGA在发送队列中发送第二普通报文时, 通过计数器对待发送 的第二普通报文进行计数, 得到发送计数值。 如果待发送的报文为第二协 议报文, 则将当前计数得到的发送计数值填入到该第二协议报文的对应字 段中, 然后, 将第二普通报文和第二协议报文发送至对端 FPGA。
本发明实施例基于 FPGA的丟包率监测方法及装置, 根据测量丟包率 的需求, 配置协议报文的生成策略, 发送测量丟包率的协议报文, 减少对 有限的网络带宽资源的占用。 同时, 可不依赖专门的用于测量丟包率的序 列报文, 而利用网络环境中原有的普通报文, 在基本不影响网络可用带宽 的情况下, 记录监测链路中的丟包率, 降低了后期对网络系统环境的影响, 并提高了网络系统的可用性。 与现有技术相比, 本发明使得网络系统可操 作性更强, 适应面更广泛。
以上所述仅为本发明的优选实施例, 并非因此限制本发明的专利范围, 凡是利用本发明说明书及附图内容所作的等效结构或流程变换, 或直接或 间接运用在其它相关的技术领域, 均同理包括在本发明的专利保护范围内。

Claims

权利要求书
1、一种基于现场可编程门阵列 FPGA的丟包率监测方法,其特征在于, 该方法包括:
本端 FPGA接收对端 FPGA发送的 4艮文;
当所述报文为第一普通报文时, 记录接收所述第一普通报文时的接收 计数值; 当所述报文为第一协议报文时, 将当前接收计数值填入所述第一 协议报文;
根据所述第一协议报文携带的当前发送计数值、 上次发送计数值、 上 次接收计数值、 所述当前接收计数值, 以及预设的发送协议报文的间隔时 间计算本端链路的丟包率。
2、根据权利要求 1所述的方法,其特征在于, 所述当前发送计数值为: 所述对端 FPGA发送所述第一协议报文至所述本端 FPGA时,该对端 FPGA 填入该第一协议报文内的、 当前统计的第一普通报文的发送计数值。
3、 根据权利要求 2所述的方法, 其特征在于, 所述计算本端链路丟包 率之后, 该方法还包括:
将所述第一协议报文、 第一普通报文以及本端链路丟包率发送至本端 交换芯片。
4、 根据权利要求 1、 2或 3所述的方法, 其特征在于, 该方法还包括: 所述本端 FPGA接收本端交换芯片发送的第二普通报文;
根据预置策略生成第二协议报文;
将所述第二普通报文及第二协议报文按预设的发送策略发送至所述对 端 FPGA, 由所述对端 FPGA计算对端链路的丟包率。
5、 根据权利要求 4所述的方法, 其特征在于, 所述将第二普通报文及 第二协议报文按预设的发送策略发送至所述对端 FPGA, 为:
判断本端 FPGA端口发送速率是否达到预定阀值; 若是, 则不允许第 二协议报文进入发送队列; 否则, 允许所述第二协议报文进入发送队列, 并对第二协议报文及第二普通报文进行排序;
对待发送的所述第二普通报文进行计数, 得到发送计数值;
在发送所述第二协议报文时, 将当前发送计数值填入所述第二协议报 文;
将所述第二普通报文、 及携带有当前发送计数值的第二协议报文按排 序先后发送至对端 FPGA。
6、 根据权利要求 4所述的方法, 其特征在于, 所述本端 FPGA接收本 端交换芯片发送的第二普通报文的步驟之前, 该方法还包括:
配置所述预置策略; 所述预置策略包括: 设置发送协议报文的间隔时 间、 和 /或发送时间长度、 和 /或上次发送计数值、 和 /或上次接收计数值和 / 或使能。
7、 一种基于 FPGA的丟包率监测装置, 其特征在于, 该装置包括: 第一接收模块, 用于接收对端 FPGA发送的报文;
记录模块, 用于当所述报文为第一普通报文时, 记录接收所述第一普 通报文时的接收计数值; 当所述报文为第一协议报文时, 将当前接收计数 值填入所述第一协议报文;
计算模块, 用于根据所述第一协议报文携带的当前发送计数值、 上次 发送计数值、 上次接收计数值、 所述当前接收计数值, 以及预设的发送协 议报文的间隔时间计算本端链路的丟包率。
8、根据权利要求 7所述的装置,其特征在于, 所述当前发送计数值为: 所述对端 FPGA发送所述第一协议报文至所述本端 FPGA时,该对端 FPGA 填入该第一协议报文内的、 当前统计的第一普通报文的发送计数值。
9、 根据权利要求 7所述的装置, 其特征在于, 该装置还包括: 第一发送模块, 用于将所述第一协议报文、 第一普通报文以及本端链 路丟包率发送至本端交换芯片。
10、根据权利要求 7、 8或 9所述的装置, 其特征在于, 该装置还包括: 第二接收模块 , 用于接收本端交换芯片发送的第二普通报文; 生成模块, 用于根据预置策略生成第二协议报文;
第二发送模块, 用于将所述第二普通报文及第二协议报文按照预设的 发送策略发送至所述对端 FPGA, 由所述对端 FPGA计算对端链路的丟包 率。
11、 根据权利要求 10所述的装置, 其特征在于, 所述第二发送模块包 括:
判断操作单元,用于判断本端 FPGA端口发送速率是否达到预定阀值; 若是, 则不允许第二协议报文进入发送队列; 否则, 允许所述第二协议报 文进入发送队列, 并对第二协议报文及第二普通报文进行排序;
计数单元, 用于对待发送的所述第二普通报文进行计数, 得到发送计 数值;
写入单元, 用于当发送所述第二协议报文时, 将当前发送计数值填入 所述第二协议报文;
发送单元, 用于将所述第二普通报文、 及携带有当前发送计数值的第 二协议报文按排序先后发送至对端 FPGA。
12、 根据权利要求 10所述的装置, 其特征在于, 该装置还包括: 配置模块, 用于配置所述预置策略; 所述预置策略包括: 设置发送协 议报文的间隔时间、 和 /或发送时间长度、 和 /或上次发送计数值、 和 /或上次 接收计数值和 /或使能。
PCT/CN2012/075528 2011-06-09 2012-05-15 基于fpga的丢包率监测方法及装置 WO2012167685A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110154165.0A CN102223263B (zh) 2011-06-09 2011-06-09 基于fpga的丢包率监测方法及装置
CN201110154165.0 2011-06-09

Publications (1)

Publication Number Publication Date
WO2012167685A1 true WO2012167685A1 (zh) 2012-12-13

Family

ID=44779696

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/075528 WO2012167685A1 (zh) 2011-06-09 2012-05-15 基于fpga的丢包率监测方法及装置

Country Status (2)

Country Link
CN (1) CN102223263B (zh)
WO (1) WO2012167685A1 (zh)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102223263B (zh) * 2011-06-09 2016-12-28 中兴通讯股份有限公司 基于fpga的丢包率监测方法及装置
CN102882747B (zh) * 2012-10-10 2015-08-19 烽火通信科技股份有限公司 基于发送、接收时间戳的以太网丢包率测量方法及系统
CN102891780B (zh) * 2012-10-10 2015-05-13 烽火通信科技股份有限公司 基于发送时间戳的以太网丢包率测量方法及测量系统
CN106411625A (zh) * 2015-07-27 2017-02-15 中兴通讯股份有限公司 链路报文丢包测量方法、系统及目标节点、发起端节点
CN105591839A (zh) * 2015-12-23 2016-05-18 浪潮集团有限公司 一种测试网络交换芯片的装置、方法及系统
CN107426042A (zh) * 2016-05-23 2017-12-01 中兴通讯股份有限公司 一种报文传输方法和发送设备
CN106506265B (zh) * 2016-10-25 2019-08-06 杭州迪普科技股份有限公司 检测fpga芯片挂死的方法及装置
CN107566222A (zh) * 2017-10-18 2018-01-09 中国联合网络通信集团有限公司 一种计算丢包率的方法及装置
CN110708253B (zh) * 2018-07-09 2023-05-12 华为技术有限公司 一种报文控制方法、流表更新方法和节点设备
CN110876158B (zh) * 2018-08-29 2023-07-14 阿里巴巴集团控股有限公司 LoRa网络状况监测方法、装置、系统、设备及存储介质
CN112073256B (zh) * 2020-06-01 2022-07-19 新华三信息安全技术有限公司 一种丢包处理方法、装置、设备及机器可读存储介质
CN112653536B (zh) * 2020-06-18 2022-11-01 中国科学院国家空间科学中心 一种基于FPGA的SpaceFibre星载网络节点测试系统及方法
CN112039724B (zh) * 2020-08-17 2021-09-28 鹏城实验室 网络丢包检测方法、装置、存储介质及网络系统
CN113590431B (zh) * 2021-09-27 2022-01-21 联想长风科技(北京)有限公司 一种cpu与fpga的数据传输动态监测方法及系统
CN114567574B (zh) * 2022-03-01 2023-11-10 烽火通信科技股份有限公司 一种基于时序控制实现lm免流量测试的方法与装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101695171A (zh) * 2009-10-16 2010-04-14 中兴通讯股份有限公司 通过流控制传输协议测量网络传输质量的方法和装置
CN101742358A (zh) * 2009-12-22 2010-06-16 重庆重邮东电通信技术有限公司 网络电视质量的测试方法及装置
CN101854268A (zh) * 2009-04-04 2010-10-06 华为技术有限公司 Ip网络性能测量、服务质量控制的方法、装置和系统
CN102223263A (zh) * 2011-06-09 2011-10-19 中兴通讯股份有限公司 基于fpga的丢包率监测方法及装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010148166A1 (en) * 2009-06-17 2010-12-23 Coherent Logix, Incorporated Parallel execution of trellis-based methods
CN101719850B (zh) * 2009-11-04 2013-03-27 中兴通讯股份有限公司 对以太网丢包率进行统计的装置、方法及报文交换设备
CN101800679B (zh) * 2010-03-10 2012-07-11 华为技术有限公司 一种报文丢包检测方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854268A (zh) * 2009-04-04 2010-10-06 华为技术有限公司 Ip网络性能测量、服务质量控制的方法、装置和系统
CN101695171A (zh) * 2009-10-16 2010-04-14 中兴通讯股份有限公司 通过流控制传输协议测量网络传输质量的方法和装置
CN101742358A (zh) * 2009-12-22 2010-06-16 重庆重邮东电通信技术有限公司 网络电视质量的测试方法及装置
CN102223263A (zh) * 2011-06-09 2011-10-19 中兴通讯股份有限公司 基于fpga的丢包率监测方法及装置

Also Published As

Publication number Publication date
CN102223263A (zh) 2011-10-19
CN102223263B (zh) 2016-12-28

Similar Documents

Publication Publication Date Title
WO2012167685A1 (zh) 基于fpga的丢包率监测方法及装置
JP6672340B2 (ja) データフローを調整するシステム及び方法
CN102098301B (zh) 多链路自适应的数据传输方法与系统
Magalhaes et al. Transport level mechanisms for bandwidth aggregation on mobile hosts
EP2220818B1 (en) Methods, systems, and computer program products for performing ip link proving using heartbeat messages
US9426080B2 (en) Data communication apparatus, data transmission method, and computer system
US20210176177A1 (en) Network control apparatus and network control method
CN105634840B (zh) 一种丢包的测量方法及装置
WO2014053992A4 (en) Method and system for radio service optimization using active probing over transport networks
US11522803B2 (en) Method and apparatus for handling packet delay budget division and quality of service monitoring in a communication system
US9577873B2 (en) Method and a system for providing a flexible secondary data path
JP2006157918A (ja) 高スループットを実現する通信システム、通信端末、セッション中継装置、及び通信プロトコル
WO2011144141A1 (zh) 拥塞控制方法和系统以及网络设备
WO2011009304A1 (zh) 一种利用混合报文测量可用带宽的方法和装置
WO2017186070A1 (zh) 流量整形方法、控制器、网络设备和流量整形系统
WO2022062931A1 (zh) 网络异常确定方法及装置
WO2007056915A1 (en) A method for measuring mpls network performance parameter and device and system for transmitting packet
WO2015149353A1 (zh) 一种oam报文处理方法、网络设备和网络系统
WO2012071851A1 (zh) 根据网络抖动调整bfd发送间隔的方法及装置
CN106230654B (zh) 一种快速实现rfc2544带背景流下最大吞吐率的方法
WO2014031106A1 (en) Congestion notification in a network
WO2011124184A2 (zh) 丢包处理方法、目的网络节点设备及移动传输网络系统
WO2008122240A1 (fr) Procédé et appareil de gestion de liaison virtuelle basée sur ip
Szilágyi et al. LTE user plane congestion detection and analysis
US20140086091A1 (en) Method, apparatus, and system for analyzing network transmission characteristic

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

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

Country of ref document: EP

Kind code of ref document: A1