[go: up one dir, main page]

CN101115008A - A reputation-based traffic control system, device and method - Google Patents

A reputation-based traffic control system, device and method Download PDF

Info

Publication number
CN101115008A
CN101115008A CNA2007101207536A CN200710120753A CN101115008A CN 101115008 A CN101115008 A CN 101115008A CN A2007101207536 A CNA2007101207536 A CN A2007101207536A CN 200710120753 A CN200710120753 A CN 200710120753A CN 101115008 A CN101115008 A CN 101115008A
Authority
CN
China
Prior art keywords
module
flow control
value
receiving
reputation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA2007101207536A
Other languages
Chinese (zh)
Other versions
CN100596114C (en
Inventor
王达伟
安学军
刘新春
曹政
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Computing Technology of CAS
Original Assignee
Institute of Computing Technology of CAS
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 Institute of Computing Technology of CAS filed Critical Institute of Computing Technology of CAS
Priority to CN200710120753A priority Critical patent/CN100596114C/en
Publication of CN101115008A publication Critical patent/CN101115008A/en
Application granted granted Critical
Publication of CN100596114C publication Critical patent/CN100596114C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种基于信誉的流量控制系统、装置和方法。该系统包括多端口交换机装置。交换机装置包括多个端口模块,仲裁模块和路由模块;端口模块包括发送模块,接收模块和流控模块;接收模块包括多个虚通道接收缓存区。仲裁模块还包括记录子模块,用于根据传输请求记录仲裁失败FPL值;流控模块还包括判断子模块,用于当接收端的发送模块有数据包发送给发送端的接收模块时,接收端的流控模块根据接收到发送端的发送模块发送来的仲裁失败FPL值,与当前接收端的剩余本地信誉值和当前资源剩余相比较,判断是否发送流控包给发送端的接收模块。其提高了数据通信网络的流量控制方法的效率,并提高了交换网络中链路和缓存区资源的利用率。

Figure 200710120753

The invention discloses a reputation-based flow control system, device and method. The system includes a multiport switch device. The switch device includes a plurality of port modules, an arbitration module and a routing module; the port module includes a sending module, a receiving module and a flow control module; the receiving module includes a plurality of virtual channel receiving buffer areas. The arbitration module also includes a record sub-module, which is used to record the FPL value of the arbitration failure according to the transmission request; the flow control module also includes a judgment sub-module, which is used for when the sending module of the receiving end has a data packet to send to the receiving module of the sending end, the flow control of the receiving end The module judges whether to send a flow control packet to the receiving module of the sending end by comparing the FPL value of arbitration failure sent by the sending module of the sending end with the remaining local reputation value of the current receiving end and the remaining resources of the current resource. It improves the efficiency of the flow control method of the data communication network, and improves the utilization rate of link and buffer area resources in the switching network.

Figure 200710120753

Description

一种基于信誉的流量控制系统、装置和方法 A reputation-based traffic control system, device and method

技术领域technical field

本发明涉及数据通信网络领域,特别是涉及一种基于信誉的流量控制系统、装置和方法,适用于高速数据通信网络端到端链路的流量控制。The invention relates to the field of data communication networks, in particular to a credit-based flow control system, device and method, which are suitable for flow control of end-to-end links in high-speed data communication networks.

背景技术Background technique

基于交换机互联的网络中,交换机装置和处理节点或者交换机装置之间采用点到点的方式进行连接,组成数据通信的网络链路。交换机装置包括多个通信端口,每个通信端口内部包括发送、接收和流控三个模块,多个交换机的通信端口两端分别连接,组成数据通信的网络链路。In a switch-based interconnection network, a switch device is connected to a processing node or a switch device in a point-to-point manner to form a network link for data communication. The switch device includes a plurality of communication ports, and each communication port includes three modules of sending, receiving and flow control, and the two ends of the communication ports of the plurality of switches are respectively connected to form a network link for data communication.

发送模块用于发送数据包和流控包。The sending module is used to send data packets and flow control packets.

接收模块用于从接收数据流中提取数据包和流控包。典型高性能网络交换机在其接收模块采用多队列结构对数据进行缓冲,每个队列对应一个虚通道(Virtual Channel),虚通道中包括数据缓存区,该缓存区用于缓冲其目的端口暂不可用的数据包。The receiving module is used to extract data packets and flow control packets from the received data flow. A typical high-performance network switch uses a multi-queue structure to buffer data in its receiving module. Each queue corresponds to a virtual channel (Virtual Channel). The virtual channel includes a data buffer area, which is used to buffer its destination port that is temporarily unavailable. data packets.

除端口中的各个模块外,交换机装置内还包括路由模块、仲裁模块和它们间的交叉互联。In addition to each module in the port, the switch device also includes a routing module, an arbitration module and cross interconnections between them.

路由模块根据数据包提供的目的端口,申请相应的端口进行数据传输;仲裁模块则对申请同一个目的端口的路由模块进行仲裁,仲裁成功的能够传送数据到其目的端口;失败的继续等待下次仲裁结果。The routing module applies for the corresponding port for data transmission according to the destination port provided by the data packet; the arbitration module arbitrates the routing module that applies for the same destination port, and if the arbitration succeeds, it can transmit the data to its destination port; if it fails, continue to wait for the next time Arbitration results.

流量控制,也叫流控,是接收端为了防止接收缓存区溢出,控制发送端的数据发送的机制。流量控制是基于每个虚通道进行的。Flow control, also called flow control, is a mechanism for the receiving end to control the data transmission of the sending end in order to prevent the receiving buffer from overflowing. Flow control is performed on a per virtual channel basis.

高性能交换机通常采用两种流量控制方法:Xon/Xoff的流量控制方法或者基于信誉(Credit-based)的流量控制方法。其中,Xon/Xoff的流量控制方法一般适用于虫洞(Wormhole)交换方式,而对于采用虚切入(Virtual CutThrough,VCT)交换方式的交换机,一般采用基于信誉的流量控制方法。High-performance switches generally adopt two flow control methods: Xon/Xoff flow control method or credit-based flow control method. Among them, the Xon/Xoff flow control method is generally applicable to the wormhole (Wormhole) switching mode, and for the switch adopting the virtual cut-through (Virtual CutThrough, VCT) switching mode, the reputation-based flow control method is generally used.

在基于信誉的流量控制方法中,发送模块被提前告知能够发送的最大数据量-信誉值,该值以信誉块(Credit Block)为单位。所述信誉块就是流量控制的基本单位,它在大小上等于一定数量的字节单元,如64字节、128字节等,发送模块不能发送超过该数量的数据。In the reputation-based flow control method, the sending module is notified in advance of the maximum amount of data that can be sent—the reputation value, which is in credit blocks (Credit Block). The reputation block is the basic unit of flow control, and its size is equal to a certain number of byte units, such as 64 bytes, 128 bytes, etc., and the sending module cannot send data exceeding this number.

在发送模块发送数据的过程中,随着数据包的发送,信誉值逐渐减少,当发送数据包长度大于剩余的信誉值时,发送模块停止发送数据,直到通信的对方补充新的信誉值,发送模块判断有足够的信誉值时才能发送数据。In the process of sending data by the sending module, with the sending of data packets, the reputation value gradually decreases. When the length of the sending data packet is greater than the remaining reputation value, the sending module stops sending data until the other party of communication adds a new reputation value, and sends The module can only send data when it judges that there are enough reputation values.

在基于信誉的流量控制方法中,数据包的发送时机对数据通信网络的性能有着重要影响。一方面当发送模块信誉值不足时,如果通信另一方有足够的空闲空间却没有及时补充新的信誉值时,则发送模块就不能发送新的数据包,造成物理链路的浪费,导致交换机吞吐率下降;另一方面,如果通信的另一方频繁发送信誉信息,就会占用大量物理通道,导致正常的数据包无法发送,也会影响交换机性能。因此,如何判断数据包的发送时机,是基于信誉的流量控制方法中,需要迫切解决的问题。In reputation-based flow control methods, the timing of sending data packets has an important impact on the performance of data communication networks. On the one hand, when the reputation value of the sending module is insufficient, if the other party of the communication has enough free space but fails to replenish the new reputation value in time, the sending module cannot send new data packets, resulting in waste of physical links and resulting in poor throughput of the switch. On the other hand, if the other party of the communication frequently sends reputation information, it will occupy a large number of physical channels, resulting in the inability to send normal data packets, which will also affect the performance of the switch. Therefore, how to determine the sending timing of the data packet is an urgent problem to be solved in the reputation-based flow control method.

此外,现有技术中的基于信誉的流量控制方法中,新信誉值的生成是基于缓存区中现有空闲空间进行计算得到的。对于采用输入队列的交换机,仲裁成功的数据包也可认为释放了缓存区资源。因此在计算新信誉值时,当前资源剩余包括没有存放任何数据的空间和已仲裁成功的数据包但还剩余在缓冲区的空间。采用该预先分配资源的方法,可以进一步提高缓冲区资源利用率。In addition, in the reputation-based traffic control method in the prior art, the generation of the new reputation value is calculated based on the existing free space in the cache area. For a switch that uses an input queue, the data packet that succeeds in arbitration can also be considered as releasing buffer resources. Therefore, when calculating the new reputation value, the remaining space of the current resource includes the space that does not store any data and the space left in the buffer for the data packets that have been successfully arbitrated. By adopting the method for allocating resources in advance, the utilization rate of buffer resources can be further improved.

发明内容Contents of the invention

本发明的目的在于提供一种基于信誉的流量控制系统、装置和方法。其提高了数据通信网络的流量控制方法的效率,并提高了交换网络中链路和缓存区资源的利用率。The purpose of the present invention is to provide a flow control system, device and method based on reputation. It improves the efficiency of the flow control method of the data communication network, and improves the utilization rate of links and buffer area resources in the switching network.

为实现本发明目的而提供的一种基于信誉的流量控制系统,包括多个发送端和接收端的交换机装置,所述交换机装置包括多个端口模块,仲裁模块和路由模块;所述端口模块包括发送模块,接收模块,流控模块;A reputation-based flow control system provided to achieve the purpose of the present invention includes a plurality of sending and receiving switch devices, the switch device includes a plurality of port modules, an arbitration module and a routing module; the port module includes a sending module, receiving module, flow control module;

所述仲裁模块,还包括记录子模块,用于根据传输请求记录仲裁失败FPL值;The arbitration module also includes a recording submodule, configured to record the FPL value of arbitration failure according to the transmission request;

所述的基于信誉的流量控制系统中,所述发送模块还可以包括FPL寄存器,用于接收仲裁模块中的记录子模块记录的仲裁失败FPL值,并由发送模块在发送数据包时,发送给接收端的接收模块;In the described reputation-based flow control system, the sending module may also include an FPL register, which is used to receive the arbitration failure FPL value recorded by the record submodule in the arbitration module, and send it to A receiving module at the receiving end;

所述接收模块包括多个虚通道接收缓存区;The receiving module includes a plurality of virtual channel receiving buffer areas;

所述接收模块还包括提取子模块,用于从接收到的数据包中提取仲裁失败FPL值,把该仲裁失败FPL值传送给接收端的流控模块进行判断;The receiving module also includes an extraction sub-module, which is used to extract the arbitration failure FPL value from the received data packet, and transmit the arbitration failure FPL value to the flow control module at the receiving end for judgment;

所述接收模块还用于接收数据包的过程中,不停检测是否有流控包插入到数据包中;如果有,需要把嵌入到数据包的流控包提取出来。The receiving module is also used to continuously detect whether there is a flow control packet inserted into the data packet during the process of receiving the data packet; if so, it needs to extract the flow control packet embedded in the data packet.

所述接收模块向流控模块四个提供参数The receiving module provides four parameters to the flow control module

第一个参数用于流控模块进行流控包发送时机判断和生成的缓存空闲空间;The first parameter is used by the flow control module to judge the timing of sending the flow control packet and generate the free buffer space;

第二个参数用于接收模块从对方发送流控包中提取的新信誉值;The second parameter is used to receive the new reputation value extracted by the receiving module from the flow control packet sent by the other party;

第三个参数用于通知流控模块本地信誉值自减1;The third parameter is used to notify the flow control module that the local reputation value will decrease by 1;

第四个参数为将要发送的数据包长度值。The fourth parameter is the length value of the data packet to be sent.

所述流控模块,还包括判断子模块,用于当接收端的发送模块有数据包发送给发送端的接收模块时,接收端的流控模块根据仲裁失败FPL值,与当前接收端的流控模块的剩余本地信誉值和当前缓存区资源剩余相比较,判断是否发送流控包给发送端的接收模块。The flow control module also includes a judging sub-module, which is used for when the sending module of the receiving end has a data packet to send to the receiving module of the sending end, the flow control module of the receiving end compares the FPL value of the arbitration failure with the remaining data packets of the flow control module of the current receiving end The local reputation value is compared with the remaining resources in the current buffer area to determine whether to send a flow control packet to the receiving module at the sending end.

所述的基于信誉的流量控制系统,所述流控模块的判断子模块判断是否发送流控包给发送端的接收模块,是指:In the reputation-based flow control system, the judging sub-module of the flow control module determines whether to send a flow control packet to the receiving module of the sending end, which means:

如果当前剩余本地信誉值足以满足将要发送数据包的长度需求,则不发送流控包;If the current remaining local reputation value is sufficient to meet the length requirement of the data packet to be sent, the flow control packet will not be sent;

否则,如果不满足,则观察并读取当前接收端的接收模块中缓存区的资源剩余情况,判断资源剩余情况;Otherwise, if not satisfied, then observe and read the remaining resources in the buffer area of the receiving module of the current receiving end, and judge the remaining resources;

如果缓存区的资源剩余能够满足将要发送数据包长度,就立即发送流控包给发送端的接收模块;If the remaining resources in the buffer area can meet the length of the data packet to be sent, immediately send the flow control packet to the receiving module of the sending end;

否则就不发送流控包,并继续读取并判断当前接收端的接收模块中缓存区的资源剩余情况,直至能够满足将要发送数据包长度,发送流控包给发送端的接收模块为止。Otherwise, the flow control packet will not be sent, and the flow control packet will be sent to the receiving module of the sending end until the length of the data packet to be sent can be satisfied.

所述的基于信誉的流量控制系统,所述路由模块还用于给流控模块提供已仲裁成功,但还在缓存区中有剩余数据的,未传送完的预分配空间,进行资源预分配计算。In the reputation-based flow control system, the routing module is also used to provide the flow control module with pre-allocated space that has been successfully arbitrated but still has remaining data in the buffer area and has not been transmitted, and performs resource pre-allocation calculations .

所述资源剩余包括缓存区当前空闲资源情况和预分配空间资源情况;The resource remaining includes the current idle resource situation of the cache area and the pre-allocated space resource situation;

所述缓存区当前空闲资源是指没有存放任何数据的缓存区空间;The current idle resource of the buffer refers to the buffer space that does not store any data;

所述缓存区预分配空间资源是指已仲裁成功,但还在缓存区中有剩余数据的,未传送完的缓存区空间。The pre-allocated space resources in the buffer area refer to buffer space that has been successfully arbitrated but still has remaining data in the buffer area and has not been completely transmitted.

所述流控模块包括两个计数器,一个是远端信誉值计数器表示从上次接收到对方流控包后,还剩余的信誉值,发送模块用该信誉值来判断能否发送数据包;另一个是本地信誉值计数器,该计数器表示从上次发送流控包给对方后,本地还剩余的信誉值。Described flow control module comprises two counters, and one is the far-end credit value counter representation from receiving the opposite party's flow control packet last time, also remaining reputation value, sending module judges whether to send data packet with this reputation value; One is the local reputation value counter, which indicates the remaining local reputation value after sending the flow control packet to the other party last time.

所述记录子模块记录仲裁失败FPL值时,如果仲裁过程中没有失败的数据包,则该仲裁失败FPL值被赋值为系统默认值。When the recording sub-module records the FPL value of the arbitration failure, if there is no failed data packet during the arbitration process, the FPL value of the arbitration failure is assigned as the default value of the system.

所述默认值是根据网络流量统计分析出的数据包的平均包长,作为对包长的一般估计。The default value is the average packet length of the data packet analyzed according to the network traffic statistics, which is used as a general estimation of the packet length.

为实现本发明目的还提供一种基于信誉的流量控制的交换机装置,包括多个端口模块,仲裁模块和路由模块;所述端口模块包括发送模块,接收模块,流控模块;In order to realize the purpose of the present invention, a switch device based on reputation-based flow control is also provided, including a plurality of port modules, an arbitration module and a routing module; the port module includes a sending module, a receiving module, and a flow control module;

所述仲裁模块,还包括记录子模块,用于根据传输请求向发送模块提供仲裁失败FPL值;The arbitration module also includes a recording submodule, configured to provide the sending module with an arbitration failure FPL value according to the transmission request;

所述的默认值是根据网络流量统计分析出的数据包的平均包长,作为对包长的一般估计;The default value is the average packet length of the data packets analyzed according to network traffic statistics, as a general estimate of the packet length;

所述的基于信誉的流量控制的交换机装置,所述发送模块还可以包括FPL寄存器,用于接收仲裁模块中的记录子模块记录的仲裁失败FPL值,并由发送模块在发送数据包时,发送给接收端的接收模块;In the switch device based on reputation-based flow control, the sending module can also include an FPL register, which is used to receive the arbitration failure FPL value recorded by the recording submodule in the arbitration module, and when sending a data packet, the sending module sends To the receiving module of the receiving end;

所述接收模块包括多个虚通道接收缓存区;The receiving module includes a plurality of virtual channel receiving buffer areas;

所述接收模块还可以包括提取子模块,用于从接收到的数据包中提取仲裁失败FPL值,把该仲裁失败FPL值传送给接收端的流控模块进行判断。The receiving module may also include an extracting sub-module, which is used to extract an arbitration failure FPL value from the received data packet, and transmit the arbitration failure FPL value to the flow control module at the receiving end for judgment.

所述流控模块,还包括判断子模块,用于当接收端的发送模块有数据包发送给发送端的接收模块时,接收端的流控模块根据仲裁失败FPL值,与当前接收端的流控模块的剩余本地信誉值和当前缓存区资源剩余相比较,判断是否发送流控包给发送端的接收模块。The flow control module also includes a judging sub-module, which is used for when the sending module of the receiving end has a data packet to send to the receiving module of the sending end, the flow control module of the receiving end compares the FPL value of the arbitration failure with the remaining data packets of the flow control module of the current receiving end The local reputation value is compared with the remaining resources in the current buffer area to determine whether to send a flow control packet to the receiving module at the sending end.

所述的基于信誉的流量控制的交换机装置,所述路由模块还用于给流控模块提供已仲裁成功,但还在缓存区中有剩余数据的,未传送完的预分配空间,进行资源预分配计算。In the switch device based on reputation-based flow control, the routing module is also used to provide the flow control module with the pre-allocated space that has been successfully arbitrated but still has remaining data in the buffer area and has not been transmitted, and performs resource pre-allocation. Allocation calculation.

所述接收模块还用于接收数据包的过程中,不停检测是否有流控包插入到数据包中;The receiving module is also used to continuously detect whether a flow control packet is inserted into the data packet during the process of receiving the data packet;

如果有,需要把嵌入到数据包的流控包提取出来,并根据流控包的信誉值向流控模块提供参数。If there is, it is necessary to extract the flow control package embedded in the data packet, and provide parameters to the flow control module according to the reputation value of the flow control package.

所述仲裁失败FPL值或者为仲裁失败最小FPL值;或者为仲裁失败平均FPL值;或者为仲裁失败最大FPL值。The arbitration failure FPL value is either a minimum arbitration failure FPL value; or an arbitration failure average FPL value; or an arbitration failure maximum FPL value.

为实现本发明目的还提供一种基于信誉的流量控制方法,包括下列步骤:In order to realize the object of the present invention, a flow control method based on reputation is also provided, which includes the following steps:

步骤A,发送端有数据包请求发送时,发送端的流控模块把当前的远端信誉值传送给发送端的仲裁模块,发送端仲裁模块根据传输请求和该信誉值进行仲裁,同时,根据传输请求向发送模块提供仲裁失败FPL值;Step A, when the sending end has a data packet request to send, the flow control module of the sending end transmits the current remote reputation value to the arbitration module of the sending end, and the arbitration module of the sending end performs arbitration according to the transmission request and the reputation value, and at the same time, according to the transmission request Provide the arbitration failure FPL value to the sending module;

步骤B,该仲裁失败FPL值作为通知对方未来将要发送的数据包长度传送给接收端的接收模块,再由接收模块提取出后传送给接收端的流控模块;Step B, the arbitration failure FPL value is sent to the receiving module of the receiving end as a notification of the length of the data packet to be sent to the other party in the future, and then extracted by the receiving module and then sent to the flow control module of the receiving end;

步骤C,接收端的接收模块接收发送端发送的数据包,把发送端发送的仲裁失败FPL值发送给接收端的流控模块,并提供当前缓存区中空闲空间给接收端的流控模块;Step C, the receiving module of the receiving end receives the data packet sent by the sending end, sends the arbitration failure FPL value sent by the sending end to the flow control module of the receiving end, and provides free space in the current buffer area to the flow control module of the receiving end;

步骤D,接收端根据接收端和发送端数据包发送的情况,以及接收到发送端的发送模块的发送来的仲裁失败FPL值与当前接收端的剩余本地信誉值和当前资源剩余相比较,判断是否发送流控包给发送端的接收模块。Step D, the receiving end judges whether to send according to the situation of the data packets sent by the receiving end and the sending end, and the arbitration failure FPL value sent by the sending module of the sending end is compared with the remaining local reputation value of the current receiving end and the remaining resources of the current resource. The flow control packet is sent to the receiving module of the sending end.

所述的基于信誉的流量控制方法,还可以包括下列步骤:The reputation-based flow control method may also include the following steps:

步骤E,接收端的发送模块发送流控包的同时,将接收端的流控模块中本地信誉值更新为新的信誉值;Step E, when the sending module of the receiving end sends the flow control packet, the local reputation value in the flow control module of the receiving end is updated to a new reputation value;

步骤F,发送端的接收模块接收到该流控包后,传送给发送端的流控模块,流控模块则把的远端信誉值更新为新的信誉值。Step F, after receiving the flow control packet, the receiving module at the sending end transmits it to the flow control module at the sending end, and the flow control module updates the remote reputation value with a new reputation value.

所述的基于信誉的流量控制方法,所述步骤A之前还可以包括下列步骤:The described reputation-based flow control method may also include the following steps before the step A:

步骤A′,发送端的流控模块把当前的信誉值初始化为接收缓存区大小的信誉值。In step A', the flow control module at the sending end initializes the current reputation value as the reputation value of the receiving buffer size.

所述的基于信誉的流量控制方法,所述步骤D包括下列步骤:In the reputation-based flow control method, the step D includes the following steps:

步骤D1,当接收端没有数据包发送到发送端时,不存在流控包和数据包之间的链路竞争关系,此时接收端将不断发送流控包给发送端的接收模块;Step D1, when there is no data packet sent from the receiving end to the sending end, there is no link competition relationship between the flow control packet and the data packet, and the receiving end will continuously send flow control packets to the receiving module of the sending end;

步骤D2,当接收端的发送模块有数据包发送给发送端的接收模块时,数据包和流控包存在竞争关系,则根据接收到的仲裁失败FPL值与当前接收端的剩余本地信誉值和当前资源剩余相比较,判断是否发送流控包给发送端。Step D2, when the sending module of the receiving end has a data packet to send to the receiving module of the sending end, and there is a competitive relationship between the data packet and the flow control packet, then according to the received arbitration failure FPL value, the remaining local reputation value of the current receiving end and the remaining current resources In comparison, it is judged whether to send a flow control packet to the sender.

所述步骤D2中,根据接收到的仲裁失败FPL值与当前接收端的剩余本地信誉值和当前资源剩余相比较,判断是否发送流控包给发送端,包括下列步骤:In the step D2, according to the received arbitration failure FPL value and the remaining local reputation value of the current receiving end and the current resource remaining, it is judged whether to send the flow control packet to the sending end, including the following steps:

步骤D21,接收端的流控模块接收到仲裁失败FPL值后,与当前的剩余本地信誉值进行比较;Step D21, after the flow control module at the receiving end receives the arbitration failure FPL value, compare it with the current remaining local reputation value;

步骤D22,如果当前剩余值足以满足最小数据包的长度需求,则不发送流控包;Step D22, if the current remaining value is sufficient to meet the length requirement of the minimum data packet, then no flow control packet is sent;

步骤D23,否则,如果不满足,则读取当前接收端的接收模块中缓存区的资源剩余情况,判断资源剩余情况:Step D23, otherwise, if not satisfied, then read the remaining resources of the buffer area in the receiving module of the current receiving end, and judge the remaining resources:

步骤D24,如果缓存区的资源剩余能够满足数据包长度,就通过接收端的发送模块发送流控包给发送端的接收模块;Step D24, if the remaining resources in the buffer area can satisfy the length of the data packet, send a flow control packet to the receiving module at the sending end through the sending module at the receiving end;

步骤D25,否则就不发送流控包,并继续读取并判断当前接收端的接收模块中缓存区的资源剩余情况,直至能够满足数据包的长度的发送需求,从而发送流控包给发送端的接收模块为止。Step D25, otherwise do not send the flow control packet, and continue to read and judge the remaining resources of the buffer area in the receiving module of the receiving end until the length of the data packet can be satisfied, so as to send the flow control packet to the receiving end of the sending end module so far.

所述步骤A还可以包括下列步骤:Said step A may also include the following steps:

如果没有仲裁失败的数据包,则把默认值赋予FPL。If there are no lost-arbitration packets, a default value is assigned to the FPL.

所述仲裁失败FPL值或者为仲裁失败最小FPL值;或者为仲裁失败平均FPL值;或者为仲裁失败最大FPL值。The arbitration failure FPL value is either a minimum arbitration failure FPL value; or an arbitration failure average FPL value; or an arbitration failure maximum FPL value.

本发明的有益效果是:本发明的基于信誉的流量控制系统、装置和方法,一方面通过资源预分配增加了缓存区资源剩余,另一方面通过准确的预测和计算流控包的发送时机,这两方面因素,使得在流量控制过程中,不会盲目发送流控制信息,只会根据当前数据流的情况,在需要发送的情况下,立即发送流量控制数据包,来保证链路高效的利用率,从而提高数据通信网络的流量控制方法和效率,并提高交换网络中链路和缓存区资源的利用率。The beneficial effects of the present invention are: the reputation-based flow control system, device and method of the present invention, on the one hand, increase the remaining resources in the buffer area through resource pre-allocation, and on the other hand, through accurate prediction and calculation of the sending timing of flow control packets, These two factors make it impossible to blindly send flow control information during the flow control process, and only send flow control data packets immediately when it needs to be sent according to the current data flow situation to ensure efficient use of the link rate, thereby improving the flow control method and efficiency of the data communication network, and improving the utilization rate of links and buffer resources in the switching network.

附图说明Description of drawings

图1为本发明数据包格式示意图;Fig. 1 is a schematic diagram of the data packet format of the present invention;

图2为本发明流控包格式示意图;Fig. 2 is a schematic diagram of the flow control packet format of the present invention;

图3为本发明基于信誉的流量控制系统示意图;FIG. 3 is a schematic diagram of the reputation-based flow control system of the present invention;

图4为本发明基于信誉的流量控制方法中发送模块发送数据包或者流控包过程流程图;Fig. 4 is the flow chart of the process of sending a data packet or a flow control packet by a sending module in the reputation-based flow control method of the present invention;

图5为本发明基于信誉的流量控制方法中接收模块接收数据包或者流控包过程流程图;Fig. 5 is a flow chart of the process of receiving a data packet or a flow control packet by a receiving module in the reputation-based flow control method of the present invention;

图6A为本发明基于信誉的流量控制方法中流控模块远端信誉值计数器工作过程流程图;6A is a flowchart of the working process of the remote reputation value counter of the flow control module in the reputation-based flow control method of the present invention;

图6B为本发明基于信誉的流量控制方法中流控模块本地信誉值计数器工作过程流程图;6B is a flowchart of the working process of the local reputation value counter of the flow control module in the reputation-based flow control method of the present invention;

图6C为本发明基于信誉的流量控制方法中流控模块发送流控包过程流程图。FIG. 6C is a flowchart of the process of sending a flow control packet by the flow control module in the reputation-based flow control method of the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明的一种基于信誉的流量控制系统、装置和方法进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the purpose, technical solution and advantages of the present invention clearer, a reputation-based flow control system, device and method of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

本发明的基于信誉的流量控制系统,链路通信由对等的两个通信实体-两端都为交换机装置31或一端为交换机另一端为处理节点-组成,互联的两个通信端口,在本发明实施例中,把其中的一个端口称为上游端口,另外一个称为下游端口。In the reputation-based flow control system of the present invention, the link communication is composed of two peer communication entities-both ends of which are switch devices 31 or one end is a switch and the other end is a processing node-, and the two interconnected communication ports are in this In the embodiment of the invention, one of the ports is called an upstream port, and the other is called a downstream port.

每个通信端口包括发送模块33,接收模块35和流控模块34。上游的发送模块33和下游的接收模块35相连,数据流向是由上游流向下游;下游的发送模块33和上游的接收模块35相连,数据流向是下游流向上游。流量控制(也叫流控)在两个流向上相互独立且功能相同。为了方便描述,本发明实施例采用由上游发送端(发送端)到下游接收端(接收端),数据流由上游流向下游为例而进行描述,但其不是对本发明的限制。Each communication port includes a sending module 33 , a receiving module 35 and a flow control module 34 . The upstream sending module 33 is connected to the downstream receiving module 35, and the data flow direction is from upstream to downstream; the downstream sending module 33 is connected to the upstream receiving module 35, and the data flow direction is downstream to upstream. Flow control (also called flow control) is independent and functionally identical in both flow directions. For the convenience of description, the embodiment of the present invention uses an example from an upstream sending end (sending end) to a downstream receiving end (receiving end) and data flow from upstream to downstream for description, but this is not a limitation of the present invention.

当数据包从上游发送端到下游接收端的方向传送时,则流量控制的流控包的方向为下游接收端到上游发送端。When the data packet is transmitted from the upstream sender to the downstream receiver, the direction of the flow control packet of the flow control is from the downstream receiver to the upstream sender.

流量控制(流控)是接收端为了防止接收缓存区溢出,控制发送端的数据发送的方法。其中流量控制大小单元为信誉块(Credit Block)。特别需要说明的是,流量控制是钍对每个虚通道而进行的,因此,在本发明实施例中,所述方法也都是针对虚通道而进行的描述。Flow control (flow control) is a method for the receiving end to control the data transmission of the sending end in order to prevent the receiving buffer from overflowing. The size unit of flow control is Credit Block. In particular, it should be noted that flow control is performed for each virtual channel, therefore, in the embodiments of the present invention, the methods are also described for virtual channels.

同时,为了说明本发明的基于信誉的流量控制系统,首先说明本发明基于信誉的流量控制系统的链路中所传输的包格式。At the same time, in order to illustrate the reputation-based flow control system of the present invention, the packet format transmitted in the link of the reputation-based flow control system of the present invention is firstly described.

链路中传输的包格式包含有两种:数据包格式和流控包格式。There are two packet formats transmitted in the link: data packet format and flow control packet format.

数据包格式如图1所示,其包括数据包包头开始标志符(Start of DataPacket,SDP),包头信息(Packet Information,PI),路由信息(Route Information),数据包有效载荷(Payload),包尾校验字段(CRC)和数据包包结束符(Endof Data Packet,EDP)。The data packet format is shown in Figure 1, which includes the data packet header start identifier (Start of DataPacket, SDP), packet header information (Packet Information, PI), routing information (Route Information), data packet payload (Payload), packet Tail check field (CRC) and end of data packet (Endof Data Packet, EDP).

其中,包头信息包括虚通道号(VC ID)、该数据包长度和将要发送数据包长度(Future Packet Length,FPL)字段,以及对该字段进行错误检查和纠正校验(Error Checking and Correcting,ECC)值。Among them, the packet header information includes the virtual channel number (VC ID), the length of the data packet and the length of the data packet to be sent (Future Packet Length, FPL) field, and the error checking and correcting (Error Checking and Correcting, ECC) field for this field. )value.

路由信息包括每级所要申请的目的端口号。当完成一级路由后,本级路由信息被交换机扔掉,路由队头是下一级交换机的路由地址。The routing information includes the destination port number to be applied for at each level. When the first-level routing is completed, the current-level routing information is discarded by the switch, and the head of the routing queue is the routing address of the next-level switch.

数据包的包尾采用CRC校验方法,校验从包头到有效载荷的最后一个字节的信息。The end of the data packet adopts the CRC check method to check the information from the header to the last byte of the payload.

流控包格式如图2所示,包括流控包包头开始标志符(Start of Flow ControlPacket,SFP),信誉字段包和流控包包结束符(End of Flow Control Packet,EFP)。信誉字段包括虚通道号(VC ID),信誉值,以及错误检查和纠正校验(Error Checking and Correcting,ECC)位。ECC能够纠正错误,从而保证流控包的正确性。The flow control packet format is shown in Figure 2, including the Start of Flow Control Packet (SFP), the reputation field packet, and the End of Flow Control Packet (EFP). The reputation field includes a virtual channel number (VC ID), a reputation value, and Error Checking and Correcting (ECC) bits. ECC can correct errors to ensure the correctness of flow control packets.

如图3所示,本发明的基于信誉的流量控制系统,包括多个发送端和接收端的交换机装置31,所述交换机装置31包括多个端口模块32,虚通道0、虚通道1、……、虚通道m的路由模块36,仲裁模块37,交叉互联(未示出);所述端口模块包括发送模块33,接收模块35和流控模块34。As shown in Figure 3, the reputation-based flow control system of the present invention includes a plurality of switch devices 31 at the sending end and the receiving end, and the switch device 31 includes a plurality of port modules 32, virtual channel 0, virtual channel 1, ... , a routing module 36 of the virtual channel m, an arbitration module 37, and a cross-connection (not shown); the port module includes a sending module 33 , a receiving module 35 and a flow control module 34 .

所述路由模块36用于根据数据包提供的目的端口,申请相应的端口进行数据传输。The routing module 36 is used to apply for a corresponding port for data transmission according to the destination port provided by the data packet.

在本发明中,为了支持资源预分配,路由模块36还给流控模块34提供已仲裁成功,但还在缓存区中有剩余数据的,未传送完的数据空间,进行资源预分配计算。In the present invention, in order to support resource pre-allocation, the routing module 36 also provides the flow control module 34 with the data space that has been successfully arbitrated but still has remaining data in the buffer area and has not been transmitted, and performs resource pre-allocation calculation.

预分配空间(PreAllocSpace:Pre-allocated Space)是指已仲裁成功,但还在缓存区中有剩余数据的,未传送完的数据空间值。Pre-allocated space (PreAllocSpace: Pre-allocated Space) refers to the data space value that has been successfully arbitrated but still has remaining data in the buffer area and has not been transmitted.

仲裁模块37用于根据优先级和信誉值对有输入请求的数据包进行仲裁判断。The arbitration module 37 is used for arbitrating and judging the data packets with input requests according to the priority and reputation value.

仲裁模块37将把发送模块33授权给优先级最高且数据包长度小于流控模块34提供的当前远端信誉值的输入请求。The arbitration module 37 will authorize the sending module 33 to the input request with the highest priority and whose data packet length is smaller than the current remote reputation value provided by the flow control module 34 .

如果裁决成功,数据包将通过交叉互联到达目的端口;如果裁决不成功,则该数据包还保存在接收缓存区中等待下次仲裁的结果。If the award is successful, the data packet will reach the destination port through the cross-connection; if the award is not successful, the data packet will also be stored in the receiving buffer to wait for the result of the next arbitration.

本发明中的仲裁模块37,还包括记录子模块38,用于根据输入请求记录仲裁失败的数据包长度(FPL)值。The arbitration module 37 in the present invention also includes a record sub-module 38, which is used to record the data packet length (FPL) value of the arbitration failure according to the input request.

该仲裁失败的数据包长度值,即仲裁失败FPL值,可以是所有仲裁失败数据包中长度最小的数据包长度值,即仲裁失败最小FPL值;也可以是所有仲裁失败的数据包长度值的平均值,即仲裁失败平均FPL值;也可以是所有仲裁失败的最长数据包长度值,即仲裁失败最大FPL值。还可以是其它的确定的仲裁失败的数据包长度(FPL)值等。The data packet length value of the arbitration failure, that is, the arbitration failure FPL value, can be the data packet length value with the smallest length among all the arbitration failure data packets, that is, the minimum FPL value of the arbitration failure; it can also be the length value of all the arbitration failure data packet length values The average value is the average FPL value of arbitration failure; it can also be the longest data packet length value of all arbitration failures, that is, the maximum FPL value of arbitration failure. It may also be other determined data packet length (FPL) values of arbitration failure and the like.

仲裁失败FPL值表示上游发送端的发送模块33将要发送到下游接收端的接收模块35的数据包的长度值,也可以称为未来FPL值。The arbitration failure FPL value indicates the length value of the data packet that the sending module 33 of the upstream sending end will send to the receiving module 35 of the downstream receiving end, and may also be referred to as a future FPL value.

在本发明中,以该仲裁失败FPL值为仲裁失败最小FPL值为例而对本发明进行说明,但本实施例同样适用于仲裁失败平均FPL值、仲裁失败最大FPL值或者其它确定的仲裁失败的数据包FPL值的实施方式。In the present invention, the present invention is described by taking the arbitration failure FPL value as an example of the minimum FPL value of arbitration failure, but this embodiment is also applicable to the average FPL value of arbitration failure, the maximum FPL value of arbitration failure, or other determined arbitration failures. Implementation of packet FPL values.

记录子模块38根据输入请求提供仲裁失败FPL值给发送模块33,该值是仲裁失败的数据包长度值。The recording sub-module 38 provides an arbitration-failed FPL value to the sending module 33 according to the input request, and the value is the length value of the data packet of the arbitration-failure.

较佳地,如果仲裁过程中没有失败的数据包,则该仲裁失败FPL值被赋值为默认值,所述的默认值是根据网络流量统计分析出的数据包的平均包长,作为对包长的一般估计。Preferably, if there is no failed data packet in the arbitration process, then the arbitration failure FPL value is assigned a default value, and the default value is the average packet length of the data packet analyzed according to network traffic statistics, as a pair of packet length general estimate of .

发送模块33用于发送数据包和流控包。The sending module 33 is used for sending data packets and flow control packets.

当发送模块33完成链路初始化过程后,进入等待发送的状态;如果有数据包发送请求,发送模块33将根据数据包格式把数据包发送出去;同时,发送模块33时时检测有无流控包请求发送,即使在发送数据包过程中,如果有流控包请求,发送模块33也能够把流控包插入到数据包中,以保证流控信息的及时性(即及时发送流控包)。After the sending module 33 completes the link initialization process, it enters the state of waiting to send; if there is a data packet sending request, the sending module 33 will send the data packet according to the data packet format; meanwhile, the sending module 33 detects whether there is a flow control packet from time to time Request to send, even in the process of sending the data packet, if there is a flow control packet request, the sending module 33 can also insert the flow control packet into the data packet to ensure the timeliness of the flow control information (ie send the flow control packet in time).

发送模块33发送流控包中的新信誉值(New_Credit)由流控模块34提供。The new credit value (New_Credit) in the flow control packet sent by the sending module 33 is provided by the flow control module 34 .

发送模块33同时检测发送的数据是否已经达到1个信誉块,如果达到,则通知本地的流控模块34对当前远端信誉值进行自减1操作。The sending module 33 simultaneously detects whether the sent data has reached 1 reputation block, and if so, notifies the local flow control module 34 to decrement the current remote reputation value by 1.

为了支持本发明的基于信誉的流量控制系统,发送模块33还把仲裁模块37提供的仲裁失败FPL值(未来FPL值)嵌入到数据包中发送出去。In order to support the reputation-based flow control system of the present invention, the sending module 33 also embeds the arbitration failure FPL value (future FPL value) provided by the arbitration module 37 into the data packet and sends it out.

该仲裁失败FPL值作为通知对方接收端的接收模块35未来将要发送的数据包长度,由发送模块33传送给对方接收端的接收模块35,再由接收端的接收模块35提取出后传送给接收端的流控模块34。This arbitration failure FPL value is used as the data packet length that the receiving module 35 of the other side's receiving end will send in the future, and is transmitted to the receiving module 35 of the other side's receiving end by the sending module 33, and then is extracted by the receiving module 35 of the receiving end and delivered to the flow control of the receiving end. Module 34.

较佳地,所述发送模块33还包括FPL寄存器39,用于接收仲裁模块37中的记录子模块38记录的仲裁失败FPL值,并由发送模块33在发送数据包时,发送给接收端的接收模块35。Preferably, the sending module 33 also includes an FPL register 39, which is used to receive the arbitration failure FPL value recorded by the recording submodule 38 in the arbitration module 37, and is sent to the receiver at the receiving end by the sending module 33 when sending a data packet. Module 35.

接收模块35用于从接收数据流中提取数据包和流控包。The receiving module 35 is used to extract data packets and flow control packets from the received data stream.

当接收模块35完成链路初始化过程后,就进入等待接收状态。After the receiving module 35 completes the link initialization process, it enters the waiting state for receiving.

接收模块35中包含虚通道0、虚通道1、……、虚通道m接收缓存区,用来暂存网络上的数据包。The receiving module 35 includes virtual channel 0, virtual channel 1, . . . , virtual channel m receiving buffers for temporarily storing data packets on the network.

在接收数据包的过程中,接收模块35还不停地检测是否有流控包插入到数据包中;如果有,则把嵌入到数据包的流控包提取出来。During the process of receiving the data packet, the receiving module 35 continuously detects whether there is a flow control packet inserted into the data packet; if so, extracts the flow control packet embedded in the data packet.

本发明中,接收模块35根据接收到的流控包,在接收数据包的过程中,接收模块还在不停检测是否有流控包插入到数据包中。如果有,需要把嵌入到数据包的流控包提取出来。In the present invention, according to the received flow control packet, the receiving module 35 is continuously detecting whether a flow control packet is inserted into the data packet during the process of receiving the data packet. If there is, it is necessary to extract the flow control package embedded in the data package.

接收模块35向流控模块34提供四个参数:The receiving module 35 provides four parameters to the flow control module 34:

第一个参数为Creditof(FreeSpace),其中,FreeSpace表示当前缓存区中空闲空间,Creditof(FreeSpace)是对FreeSpace按信誉块大小进行规整化操作,该参数用于流控模块34进行流控包发送时机判断和生成新的本地信誉值;The first parameter is Creditof (FreeSpace), wherein, FreeSpace represents free space in the current cache area, and Creditof (FreeSpace) is to carry out normalization operation to FreeSpace according to the reputation block size, and this parameter is used for flow control module 34 to carry out flow control packet sending Opportunity judgment and generation of new local reputation value;

第二个参数为New_Credit,New_Credit表示接收模块35从对方发送流控包中提取的新信誉值。接收模块35将通知流控模块34进行远端信誉值更新操作,该值含义是本地发送模块33能够发送的最大数据量。The second parameter is New_Credit, and New_Credit represents the new credit value extracted by the receiving module 35 from the flow control packet sent by the other party. The receiving module 35 will notify the flow control module 34 to update the remote reputation value, which means the maximum amount of data that the local sending module 33 can send.

第三个参数为通知流控模块34本地信誉值自减1。接收模块35每当接收到一个信誉块数据量时,通知流控模块34把本地信誉值进行自减1操作。The third parameter is to notify the traffic control module 34 that the local reputation value is decreased by 1. The receiving module 35 notifies the flow control module 34 to decrement the local reputation value by 1 whenever it receives a reputation block data amount.

第四个参数为仲裁失败FPL值(即将要发送数据包长度值,未来FPL值),接收模块35要从接收到的数据包中抽取提前通知的仲裁失败FPL值,把该值发送给流控模块34。The 4th parameter is the arbitration failure FPL value (is about to send data packet length value, future FPL value), receiving module 35 will extract the arbitration failure FPL value of notice in advance from the received data packet, send this value to flow control Module 34.

较佳地,所述接收模块35,还包括提取子模块310,用于从接收到的包数据中提取仲裁失败FPL值,把该仲裁失败FPL值传送给接收端的流控模块34进行判断。Preferably, the receiving module 35 further includes an extracting sub-module 310, configured to extract an arbitration failure FPL value from the received packet data, and transmit the arbitration failure FPL value to the flow control module 34 at the receiving end for judgment.

流控模块34用于在发送过程中,向仲裁模块37提供当前远端信誉值,并把流控参数提供给发送模块33,请求发送模块33发送该值给接收端;在接收过程中,把接收端的接收流控参数-新信誉值(New_Credit)-赋值到流控模块中的远端信誉值。The flow control module 34 is used to provide the current far-end reputation value to the arbitration module 37 during the sending process, and provides the flow control parameter to the sending module 33, and requests the sending module 33 to send this value to the receiving end; The receiving flow control parameter of the receiving end - the new credit value (New_Credit) - is assigned to the remote credit value in the flow control module.

流控模块34中包括两个计数器。一个是远端信誉值计数器312(RemoteCreditCnt),该计数器312表示从上次接收到对方流控包后,还剩余的信誉值。发送模块33用该信誉值来判断能否发送数据包;另一个是本地信誉值计数器313(LocalCreditCnt),该计数器313表示从上次发送流控包给对方后,本地还剩余的信誉值,该计数器313在大小上,约等于对方的远端信誉计数器312的值,是对该值的一个估计,有了该计数器313后,本地流控模块34就可以估计对方发送模块33能够发送的数据量大小。The flow control module 34 includes two counters. One is the remote credit value counter 312 (RemoteCreditCnt), and the counter 312 indicates the remaining credit value after receiving the other party's flow control packet last time. Sending module 33 judges whether to send data packet with this reputation value; In size, the counter 313 is approximately equal to the value of the remote reputation counter 312 of the other party, which is an estimate of the value. With the counter 313, the local flow control module 34 can estimate the amount of data that the other party's sending module 33 can send size.

流控模块34根据发送模块33的指示对远端信誉值计数器312(RemoteCreditCnt)进行自减1操作,根据接收模块35的指示对本地信誉值计数器313(LocalCreditCnt)进行自减1操作。The flow control module 34 decrements the remote credit value counter 312 (RemoteCreditCnt) by 1 according to the instruction of the sending module 33, and decrements the local credit value counter 313 (LocalCreditCnt) by 1 according to the instruction of the receiving module 35.

在本发明中,流控模块34还要根据当前缓存区空闲空间和预分配的空闲空间,判断一个合适的时机发送流控包。该时机一方面能够保证数据包不断流,另一方面还能够尽量减少流量控制信息对物理带宽的开销,减少对正常数据通信的影响,提高数据吞吐率,减少数据包平均等待时间,同时能够适应不同数据流对流量控制的影响。In the present invention, the flow control module 34 also judges an appropriate time to send the flow control packet according to the current free space in the buffer area and the pre-allocated free space. On the one hand, this timing can ensure the uninterrupted flow of data packets; on the other hand, it can also minimize the overhead of flow control information on physical bandwidth, reduce the impact on normal data communication, improve data throughput, reduce the average waiting time of data packets, and adapt to Effect of different data streams on flow control.

较佳地,所述流控模块34,还包括判断子模块311,用于当接收端的发送模块33有数据包发送给发送端的接收模块35时,根据接收到发送端的发送模块33发送来的仲裁失败FPL值,与当前接收端的剩余本地信誉值和当前资源剩余相比较,判断是否发送流控包给上游端口模块。Preferably, the flow control module 34 also includes a judging sub-module 311, which is used for receiving the arbitration from the sending module 33 of the sending end when the sending module 33 of the receiving end has a data packet to send to the receiving module 35 of the sending end. The failed FPL value is compared with the remaining local reputation value of the current receiving end and the current resource remaining to determine whether to send a flow control packet to the upstream port module.

接收端的流控模块34接收到仲裁失败FPL值后,与当前的剩余信誉值进行比较:After the flow control module 34 of the receiving end receives the arbitration failure FPL value, it is compared with the current remaining reputation value:

如果当前剩余值足以满足数据包的长度需求,则不发送流控包;If the current remaining value is sufficient to meet the length requirements of the data packet, the flow control packet will not be sent;

否则,如果不满足,则读取当前接收端的接收模块35中缓存区的资源剩余情况,包括当前空闲资源情况和预分配空间资源情况,判断资源剩余情况:Otherwise, if not satisfied, then read the remaining resources of the buffer area in the receiving module 35 of the current receiving end, including the current idle resource situation and the pre-allocated space resource situation, and judge the remaining resource situation:

如果缓存区的资源剩余能够满足数据包长度,就立即发送流控包给发送端的接收模块35;If the remaining resources of the buffer area can satisfy the data packet length, the flow control packet is immediately sent to the receiving module 35 of the sending end;

否则就不发送流控包,并继续读取并判断当前接收端的接收模块35中缓存区的资源剩余情况,直至能够满足数据包长度,发送流控包给发送端的接收模块35为止。Otherwise, the flow control packet will not be sent, and continue to read and judge the remaining resources of the buffer area in the receiving module 35 of the current receiving end until the length of the data packet can be satisfied, and send the flow control packet to the receiving module 35 of the sending end.

下游接收端的发送模块33发送流控包的同时,将下游接收端的流控模块34中本地信誉值计数器313(LocalCreditCnt)更新为新信誉值;When the sending module 33 of the downstream receiving end sends the flow control packet, the local reputation value counter 313 (LocalCreditCnt) in the flow control module 34 of the downstream receiving end is updated to a new reputation value;

上游发送端的接收模块35接收到该流控包后,传送给发送端的流控模块34,流控模块34则把的远端信誉值计数器312(RemoteCreditCnt)更新为新信誉值。After the receiving module 35 of the upstream sending end receives the flow control packet, it sends it to the flow control module 34 of the sending end, and the flow control module 34 updates the remote credit value counter 312 (RemoteCreditCnt) to a new credit value.

这样,本发明基于信誉的流量控制系统和装置,通过流控模块34中的判断子模块311进行判断,选择流控包发送的时机,并选取一个适合的时机发送,就能达到及时而准确的流量控制效果。In this way, the reputation-based flow control system and device of the present invention, through the judging sub-module 311 in the flow control module 34, judges, selects the timing of sending the flow control packet, and selects a suitable timing to send, so as to achieve timely and accurate flow control effect.

下面结合本发明的基于信誉的流量控制系统和装置,如图4,图5,图6A,图6B和图6C所示,进一步详细说明本发明的基于信誉的流量控制方法:The reputation-based flow control method of the present invention will be further described in detail below in conjunction with the reputation-based flow control system and device of the present invention, as shown in Figure 4, Figure 5, Figure 6A, Figure 6B and Figure 6C:

其中,图4为发送模块33发送数据包或者流控包过程流程图;图5为接收模块35接收数据包或者流控包过程流程图;图6A为流控模块34远端信誉值计数器312工作过程流程图;图6B为流控模块34本地信誉值计数器313工作过程流程图;图6C为流控模块34发送流控包过程流程图。Wherein, Fig. 4 is a flow chart of the sending module 33 sending a data packet or a flow control packet process; Fig. 5 is a flow chart of a receiving module 35 receiving a data packet or a flow control packet process; Fig. 6A is a flow control module 34 remote reputation value counter 312 work Process flow chart; FIG. 6B is a flow chart of the working process of the local reputation value counter 313 of the flow control module 34; FIG. 6C is a flow chart of the process of the flow control module 34 sending the flow control packet.

步骤S100,如图4,图5所示,在初始化阶段,上游发送端的流控模块34把远端信誉计数器312(RemoteCreditCnt)初始化为接收缓存区大小的信誉值,用creditof(RxBuf)表示。Step S100, as shown in Fig. 4 and Fig. 5, in the initialization phase, the flow control module 34 of the upstream sender initializes the remote reputation counter 312 (RemoteCreditCnt) to the reputation value of the receiving buffer size, represented by creditof (RxBuf).

其中,creditof(X)表示对X变量按照信誉值进行规整化操作。Among them, creditof(X) means to normalize the X variable according to the credit value.

RxBuf表示接收端接收模块35中缓存区大小,初始化阶段接收模块35中接收缓存区空闲空间的大小就是接收缓存区大小本身。RxBuf represents the size of the buffer area in the receiving module 35 of the receiving end, and the size of the free space of the receiving buffer area in the receiving module 35 at the initialization stage is the size of the receiving buffer area itself.

同时,下游接收端流控模块34的本地信誉值计数器313(LocalCreditCnt)也分别被初始化为creditof(RxBuf)。At the same time, the local reputation value counter 313 (LocalCreditCnt) of the flow control module 34 at the downstream receiving end is also initialized to creditof (RxBuf).

步骤S200,如图4,图5,图6A,图6B,图6C所示,为正常工作阶段。Step S200, as shown in FIG. 4, FIG. 5, FIG. 6A, FIG. 6B, and FIG. 6C, is a normal working stage.

步骤S210,发送端的发送模块33请求向接收端的接收端块传送数据包时,发送端的流控模块34把当前远端信誉计数器(RemoteCreditCnt)中的信誉值传送给发送端的仲裁模块37,发送端仲裁模块37根据传输请求和该信誉值进行仲裁,同时,根据传输请求向发送模块33提供仲裁失败FPL值。Step S210, when the sending module 33 of the sending end requests to transmit data packets to the receiving end block of the receiving end, the flow control module 34 of the sending end sends the credit value in the current remote credit counter (RemoteCreditCnt) to the arbitration module 37 of the sending end, and the sending end arbitrates The module 37 performs arbitration according to the transmission request and the reputation value, and at the same time, provides the sending module 33 with the FPL value of the arbitration failure according to the transmission request.

仲裁模块37为保证公平性,采用最近一次得到服务的优先级最低的方法保证公平性,同时仲裁模块37还要考虑数据包长度,把申请传输的数据长度和当前的远端信誉值进行比较。In order to ensure fairness, the arbitration module 37 adopts the method with the lowest priority of the latest service to ensure fairness. At the same time, the arbitration module 37 also considers the length of the data packet, and compares the length of the data requested for transmission with the current remote reputation value.

仲裁模块37将授权给优先级最高且包长小于信誉值的数据包,使该数据包能够到达目的端口。The arbitration module 37 will authorize the data packet with the highest priority and the packet length smaller than the reputation value, so that the data packet can reach the destination port.

仲裁模块37还将把仲裁失败中FPL值记录下来,发送给发送端的发送模块33中的FPL寄存器39。如果没有仲裁失败的数据包,该仲裁失败FPL值被赋值为默认值。The arbitration module 37 will also record the FPL value in the arbitration failure and send it to the FPL register 39 in the sending module 33 of the sending end. If there is no arbitration-lost packet, the arbitration-lost FPL value is assigned a default value.

上游发送端的发送模块33将把仲裁成功的数据包根据数据包格式进行发送,同时仲裁失败FPL值也将随数据包发送。The sending module 33 at the upstream sending end will send the data packet with successful arbitration according to the data packet format, and at the same time, the FPL value will also be sent with the data packet if the arbitration fails.

同时,每发送一个信誉块的数据量,则发送端的发送模块33通知发送端的流控模块34把当前远端信誉值自减1(RemoteCreditCnt=RemoteCreditCnt-1),当该信誉值被减到没有一个发送请求能够满足后,发送模块33不能够发送该虚通道数据,该虚通道处于停止等待状态。Simultaneously, every time send the data amount of a reputation block, then the sending module 33 of sending end notifies the flow control module 34 of sending end that current far-end reputation value is subtracted 1 (RemoteCreditCnt=RemoteCreditCnt-1), when this reputation value is reduced to no one After the sending request can be satisfied, the sending module 33 cannot send the virtual channel data, and the virtual channel is in a stop waiting state.

步骤S220,该仲裁失败FPL值作为通知对方未来将要发送的数据包长度传送给接收端的接收模块35,再由接收模块35提取出后传送给接收端的流控模块34。Step S220, the arbitration failure FPL value is sent to the receiving module 35 of the receiving end as the length of the data packet to be sent in the future to inform the other party, and then extracted by the receiving module 35 and then sent to the flow control module 34 of the receiving end.

发送端的发送模块33接收仲裁模块37记录的仲裁失败FPL值,并由发送模块33在发送数据包时,嵌入该仲裁失败FPL值到数据包,发送给接收端的接收模块35。The sending module 33 at the sending end receives the arbitration failure FPL value recorded by the arbitration module 37, and when sending the data packet, the sending module 33 embeds the arbitration failure FPL value into the data packet, and sends it to the receiving module 35 at the receiving end.

步骤S230,接收端的接收模块35接收发送端发送的数据包,把发送端发送的仲裁失败FPL值发送给接收端的流控模块34,并提供当前缓存区中空闲空间(FreeSpace)给接收端的流控模块34。Step S230, the receiving module 35 of the receiving end receives the packet sent by the sending end, sends the arbitration failure FPL value sent by the sending end to the flow control module 34 of the receiving end, and provides free space (FreeSpace) in the current buffer area to the flow control of the receiving end Module 34.

接收端的路由模块36还给流控模块34提供已仲裁成功,但还在缓存区中有剩余数据的,未传送完的数据空间的预分配空间,进行资源预分配计算。The routing module 36 at the receiving end also provides the flow control module 34 with the pre-allocated space of the untransmitted data space that has been successfully arbitrated but still has remaining data in the buffer area, and performs resource pre-allocation calculations.

同时,下游接收端的接收模块35接收到一个信誉块大小的数据流量时,通知下游接收端的流控模块34的当前本地信誉值自减1(LocalCreditCnt=LocalCreditCnt-1)。At the same time, when the receiving module 35 of the downstream receiving end receives a data flow of a credit block size, it notifies the flow control module 34 of the downstream receiving end that the current local credit value is decreased by 1 (LocalCreditCnt=LocalCreditCnt-1).

步骤S240,接收端根据下游接收端和上游发送端数据包发送的情况,以及接收到发送端的发送模块33的发送来的仲裁失败FPL值与当前接收端的剩余本地信誉值和当前资源剩余相比较,判断是否发送流控包给发送端的接收模块35。Step S240, the receiving end compares the FPL value of the arbitration failure sent by the sending module 33 of the sending end with the remaining local reputation value of the current receiving end and the current resource remaining according to the data packet transmission of the downstream receiving end and the upstream sending end, It is judged whether to send the flow control packet to the receiving module 35 of the sending end.

步骤S241,当下游接收端没有数据包发送到上游发送端时,不存在流控包和数据包之间的链路竞争关系,此时下游接收端将不断发送流控包给上游发送端的接收模块35,保证流控信息的及时性。Step S241, when there is no data packet sent from the downstream receiving end to the upstream sending end, there is no link competition relationship between the flow control packet and the data packet, and the downstream receiving end will continuously send flow control packets to the receiving module of the upstream sending end 35. Ensure the timeliness of flow control information.

作为一种可实施的方式,该流控包中包含的信誉值为:As an implementable way, the reputation value included in the flow control package is:

New_Credit=FreeCreditdw=creditof(FreeSpace)+creditof(PreAllocSpace)New_Credit = FreeCredit dw = creditof(FreeSpace) + creditof(PreAllocSpace)

其中,FreeCreditdw表示下游空闲信誉值;Among them, FreeCredit dw represents the downstream free credit value;

FreeSpace表示没有存放任何数据的空闲空间;FreeSpace indicates that there is no free space for storing any data;

PreAllocSpace表示已调度成功的数据包中剩余在缓存区的空间;PreAllocSpace indicates the remaining space in the buffer area in the successfully scheduled data packets;

步骤S242,当下游接收端的发送模块33有数据包发送给上游发送端的接收模块35时,接收端的数据包和流控包存在竞争关系,则根据接收到的仲裁失败FPL值与当前接收端的剩余信誉值相比较,判断是否发送流控包给发送端。Step S242, when the sending module 33 of the downstream receiving end has a data packet to send to the receiving module 35 of the upstream sending end, the data packet of the receiving end and the flow control packet have a competitive relationship, then according to the received arbitration failure FPL value and the remaining reputation of the current receiving end Compare the values to determine whether to send a flow control packet to the sender.

在步骤S242中,根据接收到的仲裁失败FPL值与当前接收端的剩余信誉值相比较,判断是否发送流控包给发送端,具体包括下列步骤:In step S242, according to the received arbitration failure FPL value compared with the remaining credit value of the current receiving end, it is judged whether to send the flow control packet to the sending end, which specifically includes the following steps:

步骤S2421,接收端的流控模块34接收到仲裁失败FPL值后,与当前的剩余信誉值进行比较;Step S2421, after the flow control module 34 of the receiving end receives the arbitration failure FPL value, compare it with the current remaining reputation value;

步骤S2422,如果当前剩余值足以满足数据包的长度需求,即剩余值大于仲裁失败FPL值,则不发送流控包;Step S2422, if the current remaining value is sufficient to meet the length requirement of the data packet, that is, the remaining value is greater than the arbitration failure FPL value, then no flow control packet is sent;

步骤S2423,否则,如果不满足,则读取当前接收端的接收模块35中缓存区的资源剩余情况,包括当前空闲资源情况和预分配空间资源情况,判断资源剩余情况:Step S2423, otherwise, if not satisfied, then read the remaining resources of the buffer area in the receiving module 35 of the current receiving end, including the current idle resources and pre-allocated space resources, and judge the remaining resources:

预分配空间,是指已仲裁成功,但还在缓存区中有剩余数据的,未传送完的数据空间值。The pre-allocated space refers to the untransmitted data space value that has been successfully arbitrated but still has remaining data in the buffer.

空闲资源,是指接收模块35中缓存区中没有使用的或者已经释放所缓存数据的缓存空间大小。Idle resources refer to the size of buffer space in the buffer area of the receiving module 35 that is not used or has released buffered data.

步骤S2424,如果缓存区的资源剩余能够满足将要发送数据包长度,就立即通过接收端的发送模块33发送流控包给发送端的接收模块35;Step S2424, if the remaining resources in the buffer area can satisfy the length of the data packet to be sent, immediately send the flow control packet to the receiving module 35 of the sending end through the sending module 33 of the receiving end;

步骤S2425,否则就不发送流控包,并继续读取并判断当前接收端的接收模块35中缓存区的资源剩余情况,直至能够满足数据包的长度的发送需求,从而发送流控包给发送端的接收模块35为止。Step S2425, otherwise do not send the flow control packet, and continue to read and judge the remaining resources of the buffer area in the receiving module 35 of the current receiving end until the sending requirement of the length of the data packet can be met, so as to send the flow control packet to the sending end until the receiving module 35.

作为本发明可实施的一种方式,如图6C所示,为了防止上游发送端由于没有信誉值出现断流,同时也避免发送多余流控包造成链路带宽浪费,根据如式(1)和式(2)的条件判断是否发送流控包到上游发送端。As a way that the present invention can be implemented, as shown in Figure 6C, in order to prevent the upstream sender from disconnecting due to no reputation value, and to avoid the waste of link bandwidth caused by sending redundant flow control packets, according to formula (1) and The condition of formula (2) determines whether to send the flow control packet to the upstream sender.

如果下游接收端的剩余信誉值为:If the remaining reputation value of the downstream receiver is:

RemainCreditdw=LocalCreditCnt;RemainCredit dw = LocalCreditCnt;

下游接收端的接收缓存区中空闲空间为:The free space in the receiving buffer of the downstream receiving end is:

FreeCreditdw=creditof(FreeSpace)+creditof(PreAllocSpace)FreeCredit dw = creditof(FreeSpace)+creditof(PreAllocSpace)

则当:then when:

RemainCreditdw<creditof(FPL)+creditof(RTT×BW)    (1)RemainCredit dw < creditof(FPL)+creditof(RTT×BW) (1)

FreeCreditdw>=creditof(FPL)+creditof(RTT×BW)    (2)FreeCredit dw >=creditof(FPL)+creditof(RTT×BW) (2)

成立时,接收端的流控模块34通过发送模块33发送流控包。When established, the flow control module 34 at the receiving end sends a flow control packet through the sending module 33 .

Creditof(FPL)是对FPL进行按信誉块大小进行规整化操作。Creditof (FPL) is to normalize FPL according to the credit block size.

即当式(1)和式(2)同时满足时,接收端的流控模块34通过接收端的发送模块33发送流控包到发送端的接收模块35,其中包含新的流控信誉值FreeCreditdw,该值将更新上游发送端的流控模块34的远端信誉值RemoteCreditCnt=FreeCreditdw;同时下游也更新本地信誉值LocalCreditCnt=FreeCreditdwThat is, when formula (1) and formula (2) are satisfied at the same time, the flow control module 34 of the receiving end sends a flow control packet to the receiving module 35 of the sending end through the sending module 33 of the receiving end, which contains a new flow control reputation value FreeCredit dw , the The value will update the remote credit value RemoteCreditCnt=FreeCredit dw of the flow control module 34 at the upstream sending end; meanwhile, the downstream will also update the local credit value LocalCreditCnt=FreeCredit dw .

也就是说,如果当前下游接收端仍然具备足够的空间能够容纳FPL长度的数据包,则上游发送端的发送模块33将会继续发送,链路将不会断流。That is to say, if the current downstream receiving end still has enough space to accommodate the FPL-length data packet, the sending module 33 of the upstream sending end will continue to send, and the link will not be interrupted.

较佳地,由于上游发送端和下游接收端链路延迟,还考虑creditof(RTT×BW),来排除该差异。Preferably, due to the link delay between the upstream sending end and the downstream receiving end, creditof(RTT×BW) is also considered to exclude the difference.

其中,RTT(Round Trip Time)表示物理链路回环时间;Among them, RTT (Round Trip Time) represents the loopback time of the physical link;

BW表示物理链路带宽;BW represents the physical link bandwidth;

RTT×BW表示在该回环时间内所包含的流控信息。RTT×BW represents the flow control information included in the loopback time.

Creditof(RTT×BW)表示对RTT×BW进行按信誉块大小进行规整化操作。Creditof(RTT×BW) indicates that RTT×BW is normalized according to the credit block size.

步骤S250,下游接收端的发送模块33发送流控包的同时,将下游接收端的流控模块34中本地信誉值计数器313(LocalCreditCnt)中的信誉值更新为新的信誉值FreeCreditdw,即LocalCreditCnt=FreeCreditdwStep S250, when the sending module 33 of the downstream receiving end sends the flow control packet, the credit value in the local reputation value counter 313 (LocalCreditCnt) in the flow control module 34 of the downstream receiving end is updated to a new reputation value FreeCredit dw , i.e. LocalCreditCnt=FreeCredit dw ;

步骤S260,上游发送端的接收模块35接收到该流控包后,传送给发送端的流控模块34,流控模块34则把的当前远端信誉值计数器312(RemoteCreditCnt)中的信誉值更新为新的信誉值FreeCreditdw,即RemoteCreditCnt=FreeCreditdwStep S260, after the receiving module 35 of the upstream sending end receives the flow control packet, it transmits it to the flow control module 34 of the sending end, and the flow control module 34 updates the credit value in the current far-end credit value counter 312 (RemoteCreditCnt) to a new one. The reputation value of FreeCredit dw , that is, RemoteCreditCnt=FreeCredit dw .

本发明的基于信誉的流量控制方法,通过下游接收端的流控模块34采用仲裁失败FPL值比较当前剩余信誉值。如果当前剩余值足以满足长度需求,就不发送流控包;相反如果不能满足,就观察当前缓存区资源剩余情况,包括当前空闲和预分配空间的资源剩余情况;如果资源能够满足将要发送数据包长度,就立即发送数据包,否则不发送流控包。其不会盲目发送流控信息,只会根据当前数据流情况,在需要发送的情况下,立即发送流控包,来保证链路高效的利用率。In the reputation-based flow control method of the present invention, the flow control module 34 at the downstream receiving end uses the arbitration failure FPL value to compare the current remaining reputation value. If the current remaining value is sufficient to meet the length requirement, the flow control packet will not be sent; on the contrary, if it cannot be satisfied, observe the remaining resources of the current buffer area, including the remaining resources of the current free and pre-allocated space; if the resources can meet the data packets to be sent length, the data packet is sent immediately, otherwise no flow control packet is sent. It will not blindly send flow control information, but will only send flow control packets immediately when it needs to be sent according to the current data flow situation, so as to ensure efficient utilization of the link.

以上对本发明的具体实施例进行了描述和说明,这些实施例应被认为其只是示例性的,并不用于对本发明进行限制,本发明应根据所附的权利要求进行解释。The specific embodiments of the present invention have been described and illustrated above, and these embodiments should be considered as exemplary only, and are not used to limit the present invention, and the present invention should be interpreted according to the appended claims.

Claims (23)

1.一种基于信誉的流量控制系统,包括多个发送端和接收端的交换机装置,所述交换机装置包括多个端口模块,仲裁模块和路由模块;所述端口模块包括发送模块,接收模块,流控模块;1. A flow control system based on reputation, comprising a plurality of sending and receiving switch devices, the switch device includes a plurality of port modules, an arbitration module and a routing module; the port module includes a sending module, a receiving module, a flow control module; 所述接收模块包括多个虚通道接收缓存区;The receiving module includes a plurality of virtual channel receiving buffer areas; 其特征在于:It is characterized by: 所述仲裁模块,还包括记录子模块,用于根据传输请求记录仲裁失败FPL值;The arbitration module also includes a recording submodule, configured to record the FPL value of arbitration failure according to the transmission request; 所述流控模块,还包括判断子模块,用于当接收端的发送模块有数据包发送给发送端的接收模块时,根据接收到发送端的发送模块发送来的仲裁失败FPL值,与当前接收端的剩余本地信誉值和当前资源剩余相比较,判断是否发送流控包给发送端的接收模块。The flow control module also includes a judging sub-module, which is used for when the sending module of the receiving end has a data packet to send to the receiving module of the sending end, according to the received arbitration failure FPL value sent by the sending module of the sending end, and the remaining value of the current receiving end The local reputation value is compared with the current remaining resources to determine whether to send a flow control packet to the receiving module at the sending end. 2.根据权利要求1所述的基于信誉的流量控制系统,其特征在于:2. The reputation-based flow control system according to claim 1, characterized in that: 所述发送模块还包括FPL寄存器,用于接收仲裁模块中的记录子模块记录的仲裁失败FPL值,并由发送模块在发送数据包时,发送给接收端的接收模块;The sending module also includes an FPL register, which is used to receive the arbitration failure FPL value recorded by the recording sub-module in the arbitration module, and is sent to the receiving module at the receiving end by the sending module when sending a data packet; 所述接收模块,还包括提取子模块,用于从接收到的包数据中提取仲裁失败FPL值,把该仲裁失败FPL值传送给接收端的流控模块进行判断。The receiving module further includes an extracting sub-module, which is used to extract the arbitration failure FPL value from the received packet data, and transmit the arbitration failure FPL value to the flow control module at the receiving end for judgment. 3.根据权利要求1或2所述的基于信誉的流量控制系统,其特征在于,所述判断子模块判断是否发送流控包给发送端的接收模块,是指:3. The reputation-based flow control system according to claim 1 or 2, wherein the judging submodule judges whether to send a flow control packet to the receiving module of the sending end, which refers to: 如果当前剩余值足以满足将要发送数据包的长度需求,则不发送流控包;If the current remaining value is sufficient to meet the length requirement of the data packet to be sent, the flow control packet will not be sent; 否则,如果不满足,则观察并读取当前接收端的接收模块中缓存区的资源剩余情况,判断资源剩余情况;Otherwise, if not satisfied, then observe and read the remaining resources in the buffer area of the receiving module of the current receiving end, and judge the remaining resources; 如果缓存区的资源剩余能够满足将要发送数据包长度,就立即发送流控包给发送端的接收模块;If the remaining resources in the buffer area can meet the length of the data packet to be sent, immediately send the flow control packet to the receiving module of the sending end; 否则就不发送流控包,并继续读取并判断当前接收端的接收模块中缓存区的资源剩余情况,直至能够满足将要发送数据包长度,发送流控包给发送端的接收模块为止。Otherwise, the flow control packet will not be sent, and the flow control packet will be sent to the receiving module of the sending end until the length of the data packet to be sent can be satisfied. 4.根据权利要求3所述的基于信誉的流量控制系统,其特征在于:4. The reputation-based flow control system according to claim 3, characterized in that: 所述路由模块还用于给流控模块提供已仲裁成功,但还在缓存区中有剩余数据的,未传送完的预分配空间,进行资源预分配计算。The routing module is also used to provide the flow control module with pre-allocated space that has been successfully arbitrated but still has remaining data in the buffer area and has not been transmitted, and performs resource pre-allocation calculations. 5.根据权利要求4所述的基于信誉的流量控制系统,其特征在于,所述资源剩余包括当前空闲资源情况和预分配空间资源情况。5 . The reputation-based flow control system according to claim 4 , wherein the remaining resources include current idle resources and pre-allocated space resources. 6 . 6.根据权利要求4所述的基于信誉的流量控制系统,其特征在于,所述接收模块还用于接收数据包的过程中,不停检测是否有流控包插入到数据包中;6. The reputation-based flow control system according to claim 4, wherein the receiving module is also used to continuously detect whether a flow control packet is inserted into the data packet during the process of receiving the data packet; 如果有,需要把嵌入到数据包的流控包提取出来,并向流控模块提供参数。If there is, it is necessary to extract the flow control package embedded in the data packet, and provide parameters to the flow control module. 7.根据权利要求6所述的基于信誉的流量控制系统,其特征在于,所述参数包括以下四个参数:7. The reputation-based flow control system according to claim 6, wherein the parameters include the following four parameters: 第一个参数用于流控模块进行流控包发送时机判断和生成新的本地信誉值的当前空闲缓存空间;The first parameter is used by the flow control module to judge the timing of sending the flow control packet and generate the current free cache space of the new local reputation value; 第二个参数用于接收模块从对方发送流控包中提取的新信誉值;The second parameter is used to receive the new reputation value extracted by the receiving module from the flow control packet sent by the other party; 第三个参数用于通知流控模块本地信誉值自减1;The third parameter is used to notify the flow control module that the local reputation value will decrease by 1; 第四个参数为仲裁失败FPL值。The fourth parameter is the arbitration failure FPL value. 8.根据权利要求1或2所述的基于信誉的流量控制系统,其特征在于,所述流控模块包括两个计数器,一个是远端信誉值计数器表示从上次接收到对方流控包后,还剩余的信誉值,发送模块用该信誉值来判断能否发送数据包;另一个是本地信誉值计数器,该计数器表示从上次发送流控包给对方后,本地还剩余的信誉值。8. The reputation-based flow control system according to claim 1 or 2, wherein the flow control module includes two counters, one of which is a remote reputation value counter indicating that the flow control packet from the other party has been received last time. , and the remaining reputation value, the sending module uses the reputation value to judge whether to send the data packet; the other is the local reputation value counter, which represents the remaining reputation value locally after sending the flow control packet to the other party last time. 9.根据权利要求1或2所述的基于信誉的流量控制系统,其特征在于,所述记录子模块记录仲裁失败FPL值时,如果仲裁过程中没有失败的数据包,则该仲裁失败FPL值被赋值为系统默认值。9. The reputation-based flow control system according to claim 1 or 2, wherein when the record submodule records the arbitration failure FPL value, if there is no failed data packet in the arbitration process, then the arbitration failure FPL value is assigned the system default value. 10.根据权利要求9所述的基于信誉的流量控制系统,其特征在于,所述默认值是根据网络流量统计分析出的数据包的平均包长,作为对包长的一般估计。10. The reputation-based flow control system according to claim 9, wherein the default value is the average packet length of data packets analyzed according to network traffic statistics, as a general estimate of the packet length. 11.根据权利要求1或2所述的基于信誉的流量控制系统,其特征在于,所述仲裁失败FPL值,或者为仲裁失败最小FPL值;或者为仲裁失败平均FPL值;或者为仲裁失败最大FPL值。11. The reputation-based flow control system according to claim 1 or 2, wherein the FPL value for arbitration failure is either the minimum FPL value for arbitration failure; or the average FPL value for arbitration failure; or the maximum FPL value for arbitration failure FPL value. 12.一种基于信誉的流量控制的交换机装置,包括多个端口模块,仲裁模块和路由模块;所述端口模块包括发送模块,接收模块,流控模块;12. A switch device based on reputation-based flow control, comprising a plurality of port modules, an arbitration module and a routing module; the port module includes a sending module, a receiving module, and a flow control module; 所述接收模块包括多个虚通道接收缓存区;The receiving module includes a plurality of virtual channel receiving buffer areas; 其特征在于:It is characterized by: 所述仲裁模块,还包括记录子模块,用于根据传输请求向发送模块提供仲裁失败FPL值;The arbitration module also includes a recording submodule, configured to provide the sending module with an arbitration failure FPL value according to the transmission request; 所述流控模块,还包括判断子模块,用于当接收端的发送模块有数据包发送给发送端的接收模块时,根据接收到发送端的发送模块发送来的仲裁失败FPL值,与当前接收端的剩余信誉值和当前资源剩余相比较,判断是否发送流控包给发送端的接收模块。The flow control module also includes a judging sub-module, which is used for when the sending module of the receiving end has a data packet to send to the receiving module of the sending end, according to the received arbitration failure FPL value sent by the sending module of the sending end, and the remaining value of the current receiving end Comparing the reputation value with the current remaining resources, it is judged whether to send a flow control packet to the receiving module of the sending end. 13.根据权利要求12所述的基于信誉的流量控制的交换机装置,其特征在于:13. The switch device based on reputation-based flow control according to claim 12, characterized in that: 所述发送模块还包括FPL寄存器,用于接收仲裁模块中的记录子模块记录的仲裁失败FPL值,并由发送模块在发送数据包时,发送给接收端的接收模块;The sending module also includes an FPL register, which is used to receive the arbitration failure FPL value recorded by the recording sub-module in the arbitration module, and is sent to the receiving module at the receiving end by the sending module when sending a data packet; 所述接收模块,还包括提取子模块,用于从接收到的包数据中提取仲裁失败FPL值,把该仲裁失败FPL值传送给接收端的流控模块进行判断。The receiving module further includes an extracting sub-module, which is used to extract the arbitration failure FPL value from the received packet data, and transmit the arbitration failure FPL value to the flow control module at the receiving end for judgment. 14.根据权利要求12或13所述的基于信誉的流量控制的交换机装置,其特征在于,所述路由模块还用于给流控模块提供已仲裁成功,但还在缓存区中有剩余数据的,未传送完的预分配空间,进行资源预分配计算。14. The switch device based on reputation-based flow control according to claim 12 or 13, characterized in that, the routing module is also used to provide the flow control module with information that has been successfully arbitrated but still has remaining data in the cache area. , the untransmitted pre-allocated space is used for resource pre-allocation calculation. 15.根据权利要求14所述的基于信誉的流量控制的交换机装置,其特征在于,所述接收模块还用于接收数据包的过程中,不停检测是否有流控包插入到数据包中;15. The switch device based on reputation-based flow control according to claim 14, wherein the receiving module is also used to continuously detect whether a flow control packet is inserted into the data packet during the process of receiving the data packet; 如果有,需要把嵌入到数据包的流控包提取出来,并根据流控包的信誉值向流控模块提供参数。If there is, it is necessary to extract the flow control package embedded in the data packet, and provide parameters to the flow control module according to the reputation value of the flow control package. 16.根据权利要求12或13所述的基于信誉的流量控制的交换机装置,其特征在于,所述仲裁失败FPL值,或者为仲裁失败最小FPL值;或者为仲裁失败平均FPL值;或者为仲裁失败最大FPL值。16. The switch device based on reputation-based flow control according to claim 12 or 13, wherein the FPL value of the arbitration failure is either the minimum FPL value of the arbitration failure; or the average FPL value of the arbitration failure; or the arbitration failure FPL value; Failed max FPL value. 17.一种基于信誉的流量控制方法,其特征在于,包括下列步骤:17. A reputation-based flow control method, characterized in that, comprising the following steps: 步骤A,发送端的发送模块请求向接收端的接收模块传送数据包时,发送端的流控模块把当前远端信誉值传送给发送端的仲裁模块,发送端仲裁模块根据传输请求和该信誉值进行仲裁,同时,根据传输请求向发送模块提供仲裁失败FPL值;Step A, when the sending module at the sending end requests to transmit data packets to the receiving module at the receiving end, the flow control module at the sending end transmits the current remote reputation value to the arbitration module at the sending end, and the arbitration module at the sending end performs arbitration according to the transmission request and the reputation value, At the same time, according to the transmission request, the arbitration failure FPL value is provided to the sending module; 步骤B,该仲裁失败FPL值传送给接收端的接收模块,再由接收模块提取出后传送给接收端的流控模块;Step B, the arbitration failure FPL value is sent to the receiving module of the receiving end, and then extracted by the receiving module and sent to the flow control module of the receiving end; 步骤C,接收端的接收模块接收发送端发送的数据包,把发送端发送的仲裁失败FPL值发送给接收端的流控模块,并提供当前缓存区中空闲空间给接收端的流控模块;Step C, the receiving module of the receiving end receives the data packet sent by the sending end, sends the arbitration failure FPL value sent by the sending end to the flow control module of the receiving end, and provides free space in the current buffer area to the flow control module of the receiving end; 步骤D,接收端根据接收端和发送端数据包发送的情况,以及接收到发送端的发送模块的发送来的仲裁失败FPL值与当前接收端的剩余信誉值相比较,判断是否发送流控包给发送端的接收模块。Step D, the receiving end judges whether to send a flow control packet to the sending end based on the data packets sent by the receiving end and the sending end, and compares the FPL value of the failed arbitration sent by the sending module of the sending end with the remaining reputation value of the current receiving end terminal receiving module. 18.根据权利要求17所述的基于信誉的流量控制方法,其特征在于,还包括下列步骤:18. The reputation-based flow control method according to claim 17, further comprising the following steps: 步骤E,接收端的发送模块发送流控包的同时,将接收端的流控模块中当前的本地信誉值更新为新的信誉值;Step E, when the sending module of the receiving end sends the flow control packet, the current local reputation value in the flow control module of the receiving end is updated to a new reputation value; 步骤F,发送端的接收模块接收到该流控包后,传送给发送端的流控模块,流控模块则把的当前远端信誉值更新为新的信誉值。Step F, after receiving the flow control packet, the receiving module at the sending end transmits it to the flow control module at the sending end, and the flow control module updates the current remote reputation value with a new reputation value. 19.根据权利要求18所述的基于信誉的流量控制方法,其特征在于,所述步骤A之前还包括下列步骤:19. The flow control method based on reputation according to claim 18, characterized in that, before the step A, the following steps are also included: 步骤A′,发送端的流控模块把当前的信誉值初始化为接收缓存区大小的信誉值。In step A', the flow control module at the sending end initializes the current reputation value as the reputation value of the receiving buffer size. 20.根据权利要求17至19任一项所述的基于信誉的流量控制方法,其特征在于,所述步骤D包括下列步骤:20. The reputation-based flow control method according to any one of claims 17 to 19, wherein said step D comprises the following steps: 步骤D1,当接收端没有数据包发送到发送端时,不存在流控包和数据包之间的链路竞争关系,此时接收端将不断发送流控包给发送端的接收模块;Step D1, when there is no data packet sent from the receiving end to the sending end, there is no link competition relationship between the flow control packet and the data packet, and the receiving end will continuously send flow control packets to the receiving module of the sending end; 步骤D2,当接收端的发送模块有数据包发送给发送端的接收模块时,数据包和流控包存在竞争关系,则根据接收到的仲裁失败FPL值与当前接收端的剩余信誉值相比较,判断是否发送流控包给发送端。Step D2, when the sending module of the receiving end has a data packet to send to the receiving module of the sending end, and there is a competition between the data packet and the flow control packet, it is judged whether the received arbitration failure FPL value is compared with the remaining reputation value of the current receiving end. Send a flow control packet to the sender. 21.根据权利要求20所述的基于信誉的流量控制方法,其特征在于,所述步骤D2中,根据接收到的仲裁失败FPL值与当前接收端的剩余信誉值相比较,判断是否发送流控包给发送端,包括下列步骤:21. The reputation-based flow control method according to claim 20, wherein in the step D2, it is judged whether to send a flow control packet according to the comparison between the received arbitration failure FPL value and the remaining reputation value of the current receiving end to the sender, including the following steps: 步骤D21,接收端的流控模块接收到仲裁失败FPL值后,与当前的剩余信誉值进行比较;Step D21, after the flow control module at the receiving end receives the arbitration failure FPL value, compare it with the current remaining reputation value; 步骤D22,如果当前剩余值足以满足数据包的长度需求,则不发送流控包;Step D22, if the current remaining value is sufficient to meet the length requirement of the data packet, then no flow control packet is sent; 步骤D23,否则,如果不满足,则读取当前接收端的接收模块中缓存区的资源剩余情况,判断资源剩余情况:Step D23, otherwise, if not satisfied, then read the remaining resources of the buffer area in the receiving module of the current receiving end, and judge the remaining resources: 步骤D24,如果缓存区的资源剩余能够满足数据包长度,就通过接收端的发送模块发送流控包给发送端的接收模块;Step D24, if the remaining resources in the buffer area can satisfy the length of the data packet, send a flow control packet to the receiving module at the sending end through the sending module at the receiving end; 步骤D25,否则就不发送流控包,并继续读取并判断当前接收端的接收模块中缓存区的资源剩余情况,直至能够满足数据包的长度的发送需求,从而发送流控包给发送端的接收模块为止。Step D25, otherwise do not send the flow control packet, and continue to read and judge the remaining resources of the buffer area in the receiving module of the receiving end until the length of the data packet can be satisfied, so as to send the flow control packet to the receiving end of the sending end module so far. 22.根据权利要求17至19任一项所述的基于信誉的流量控制方法,其特征在于,所述步骤A还包括下列步骤:22. The reputation-based traffic control method according to any one of claims 17 to 19, wherein said step A further comprises the following steps: 如果没有仲裁失败的数据包,则该仲裁失败FPL值被赋值为系统默认值。If there is no arbitration-lost data packet, the arbitration-lost FPL value is assigned a system default value. 23.根据权利要求17至19任一项所述的基于信誉的流量控制方法,其特征在于,所述仲裁失败FPL值或者为仲裁失败最小FPL值;或者为仲裁失败平均FPL值;或者为仲裁失败最大FPL值。23. The reputation-based flow control method according to any one of claims 17 to 19, wherein the FPL value of the arbitration failure is either the minimum FPL value of the arbitration failure; or the average FPL value of the arbitration failure; or the arbitration failure FPL value; Failed max FPL value.
CN200710120753A 2007-08-24 2007-08-24 A reputation-based traffic control system, device and method Expired - Fee Related CN100596114C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200710120753A CN100596114C (en) 2007-08-24 2007-08-24 A reputation-based traffic control system, device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200710120753A CN100596114C (en) 2007-08-24 2007-08-24 A reputation-based traffic control system, device and method

Publications (2)

Publication Number Publication Date
CN101115008A true CN101115008A (en) 2008-01-30
CN100596114C CN100596114C (en) 2010-03-24

Family

ID=39023132

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200710120753A Expired - Fee Related CN100596114C (en) 2007-08-24 2007-08-24 A reputation-based traffic control system, device and method

Country Status (1)

Country Link
CN (1) CN100596114C (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101964745A (en) * 2010-06-12 2011-02-02 福建星网锐捷网络有限公司 Network forwarding equipment and message forwarding method thereof
CN102075436A (en) * 2011-02-10 2011-05-25 成都市华为赛门铁克科技有限公司 Ethernet, and data transmitting method and device thereof
CN101534173B (en) * 2009-04-20 2011-11-09 福建星网锐捷网络有限公司 Method and system for controlling data flow
CN104363200A (en) * 2014-10-10 2015-02-18 福建联迪商用设备有限公司 Bluetooth transmission control method and device
CN106664305A (en) * 2014-09-24 2017-05-10 迈克菲股份有限公司 Determining the reputation of data
WO2017107083A1 (en) * 2015-12-23 2017-06-29 华为技术有限公司 Data sending method and receiving method, apparatus and system
US9729459B2 (en) 2012-11-19 2017-08-08 Avago Technologies General Ip (Singapore) Pte. Ltd. System and method for credit-based link level flow control
CN110750486A (en) * 2019-09-24 2020-02-04 支付宝(杭州)信息技术有限公司 RDMA data stream control method, system, electronic device and readable storage medium
WO2020244498A1 (en) * 2019-06-04 2020-12-10 阿里巴巴集团控股有限公司 Method, apparatus, and system for processing messages in server system
CN112230880A (en) * 2020-10-23 2021-01-15 浪潮(北京)电子信息产业有限公司 A data transmission control method, device, FPGA and medium
CN112398921A (en) * 2020-11-02 2021-02-23 北京左江科技股份有限公司 Design method of in-band flow control
CN114422441A (en) * 2022-03-30 2022-04-29 北京奥星贝斯科技有限公司 Method and device for controlling flow
CN114490456A (en) * 2021-12-28 2022-05-13 海光信息技术股份有限公司 Circuit module, credit control method, integrated circuit, and storage medium
CN115378873A (en) * 2022-08-23 2022-11-22 山东云海国创云计算装备产业创新中心有限公司 Flow control method and system for improving Ethernet data transmission efficiency
WO2024244466A1 (en) * 2023-05-31 2024-12-05 华为技术有限公司 Data transmission method, apparatus and system
CN119135768A (en) * 2024-09-19 2024-12-13 无锡众星微系统技术有限公司 A method and device for decoupling multi-channel arbitration scheduling and credit calculation

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1639763A1 (en) * 2003-04-21 2006-03-29 Siemens Aktiengesellschaft Network traffic control system
CN100377104C (en) * 2005-02-28 2008-03-26 中国科学院计算技术研究所 Device for capturing memory access information in real time and method for capturing memory access information
US7924708B2 (en) * 2005-12-13 2011-04-12 Intel Corporation Method and apparatus for flow control initialization

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534173B (en) * 2009-04-20 2011-11-09 福建星网锐捷网络有限公司 Method and system for controlling data flow
CN101964745A (en) * 2010-06-12 2011-02-02 福建星网锐捷网络有限公司 Network forwarding equipment and message forwarding method thereof
CN102075436A (en) * 2011-02-10 2011-05-25 成都市华为赛门铁克科技有限公司 Ethernet, and data transmitting method and device thereof
CN102075436B (en) * 2011-02-10 2014-09-17 华为数字技术(成都)有限公司 Ethernet, and data transmitting method and device thereof
US9729459B2 (en) 2012-11-19 2017-08-08 Avago Technologies General Ip (Singapore) Pte. Ltd. System and method for credit-based link level flow control
CN106664305A (en) * 2014-09-24 2017-05-10 迈克菲股份有限公司 Determining the reputation of data
CN104363200A (en) * 2014-10-10 2015-02-18 福建联迪商用设备有限公司 Bluetooth transmission control method and device
WO2017107083A1 (en) * 2015-12-23 2017-06-29 华为技术有限公司 Data sending method and receiving method, apparatus and system
WO2020244498A1 (en) * 2019-06-04 2020-12-10 阿里巴巴集团控股有限公司 Method, apparatus, and system for processing messages in server system
CN110750486A (en) * 2019-09-24 2020-02-04 支付宝(杭州)信息技术有限公司 RDMA data stream control method, system, electronic device and readable storage medium
CN112230880A (en) * 2020-10-23 2021-01-15 浪潮(北京)电子信息产业有限公司 A data transmission control method, device, FPGA and medium
CN112230880B (en) * 2020-10-23 2023-08-11 浪潮(北京)电子信息产业有限公司 Data transmission control method and device, FPGA and medium
CN112398921A (en) * 2020-11-02 2021-02-23 北京左江科技股份有限公司 Design method of in-band flow control
CN114490456A (en) * 2021-12-28 2022-05-13 海光信息技术股份有限公司 Circuit module, credit control method, integrated circuit, and storage medium
CN114490456B (en) * 2021-12-28 2024-06-04 海光信息技术股份有限公司 Circuit module, credit control method, integrated circuit, and storage medium
CN114422441A (en) * 2022-03-30 2022-04-29 北京奥星贝斯科技有限公司 Method and device for controlling flow
CN115378873A (en) * 2022-08-23 2022-11-22 山东云海国创云计算装备产业创新中心有限公司 Flow control method and system for improving Ethernet data transmission efficiency
WO2024244466A1 (en) * 2023-05-31 2024-12-05 华为技术有限公司 Data transmission method, apparatus and system
CN119135768A (en) * 2024-09-19 2024-12-13 无锡众星微系统技术有限公司 A method and device for decoupling multi-channel arbitration scheduling and credit calculation

Also Published As

Publication number Publication date
CN100596114C (en) 2010-03-24

Similar Documents

Publication Publication Date Title
CN101115008A (en) A reputation-based traffic control system, device and method
CN100574310C (en) A kind of credit flow control method
US7042842B2 (en) Fiber channel switch
US7221647B2 (en) Packet communication apparatus and controlling method thereof
US8379658B2 (en) Deferred queuing in a buffered switch
US7957293B2 (en) System and method to identify and communicate congested flows in a network fabric
US9007902B1 (en) Method and apparatus for preventing head of line blocking in an Ethernet system
CN100405344C (en) Apparatus and method for distributing buffer status information in a switch fabric
US8625427B1 (en) Multi-path switching with edge-to-edge flow control
EP0823166B1 (en) Flow control protocol system and method
US7161907B2 (en) System and method for dynamic rate flow control
US20150103667A1 (en) Detection of root and victim network congestion
JP3908483B2 (en) Communication device
JPH08504554A (en) Packet switch flow control system
US9319310B2 (en) Distributed switchless interconnect
WO2010007339A1 (en) Switching device
US9197541B2 (en) Router with passive interconnect and distributed switchless switching
JP2007201965A (en) Packet relay device having transmission control function
US20050281282A1 (en) Internal messaging within a switch
WO2022259040A1 (en) Method for distributing multipath flows in a direct interconnect network
US20060013135A1 (en) Flow control in a switch
US9277300B2 (en) Passive connectivity optical module
CN101364940A (en) A router internal communication method and routing device
CN118200265B (en) Switch cache management method for distinguishing monitoring and exchanging data
JP2001111556A (en) Congestion avoidance apparatus and method using RED

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100324