Rate adaptation algorithm for fibre channel protocol

文档序号:1159451 发布日期:2020-09-15 浏览:8次 中文

阅读说明:本技术 光纤通道协议的速率自适应算法 (Rate adaptation algorithm for fibre channel protocol ) 是由 林德伟 刘勤让 沈剑良 陈艇 陶常勇 朱珂 汪欣 刘长江 张华� 汤先拓 李卓远 于 2020-04-26 设计创作,主要内容包括:本发明提供了一种光纤通道协议的速率自适应算法,可以分为4个阶段:等待信号阶段:循环改变发送速率以允许邻接节点接收同步;循环改变接收速率以收取邻接节点的信号;在物理层连接建立后发送端尝试着以最大速率工作。主协商阶段:发送端从最大速率开始逐步降低工作速率;在每一级速率逗留一段时间以使得邻接节点同步跟随;若同步测试通过且满足条件进入从协商阶段:发送速率设置为接收速率。测试接收同步的稳定性以确保协商成功,或者跟随协商主角的发送速率。若因同步不稳定或信号丢失,则回到等待信号阶段。若通过同步稳定性测试,则进入正常工作阶段。本发明在实际应用中随着外界FC的频点的改变能实时改变自身频点,同步时间不超过2s。(The invention provides a rate self-adaptive algorithm of a fiber channel protocol, which can be divided into 4 stages: a signal waiting stage: cyclically varying the transmission rate to allow the neighboring nodes to receive synchronization; cyclically varying the reception rate to collect signals of the neighboring nodes; the sender attempts to operate at the maximum rate after the physical layer connection is established. A main negotiation stage: the sending end gradually reduces the working rate from the maximum rate; lingering for a period of time at each stage rate to allow the neighboring nodes to follow in synchronization; if the synchronous test is passed and the condition is satisfied, entering a slave negotiation stage: the transmission rate is set to the reception rate. The stability of the receive synchronization is tested to ensure that the negotiation is successful or to follow the transmission rate of the negotiating chairman. If the synchronization is unstable or the signal is lost, the signal waiting stage is returned. And if the synchronous stability test is passed, entering a normal working stage. In practical application, the invention can change the frequency point of the FC in real time along with the change of the frequency point of the external FC, and the synchronization time is not more than 2 s.)

1. Rate adaptation algorithm for a fibre channel protocol, characterized in that said rate adaptation algorithm comprises 4 stages:

the first stage, entering into waiting starting mode, includes the following steps:

11) adjusting the receiving rate and the sending rate to the frequency point which is supported by the current system rate in a self-adaptive maximum mode;

12) waiting for synchronization, judging whether a first condition is met, wherein the first condition is signal loss or a synchronization test is passed after an internal cycle period rxcycle, and entering a second stage; if not, go to step 13)

13) Continuously judging whether the external cycle period txcycle is exceeded, if not, gradually reducing the rx rate, returning to the step 12), and if so, entering the step 14);

14) the receiving and sending rates are all adjusted down by one gear and then the step 12) is returned;

and a second stage, entering a rate adaptive main mode, comprising the following steps:

21) the receiving rate and the sending rate are both adjusted to the frequency point which is supported by the maximum rate self-adapting of the current system,

22) waiting for synchronization, judging whether a second condition is met, wherein the second condition is that a synchronization test is finished after an internal cycle rxcycle and whether the current rx rate is greater than or equal to the tx rate, and entering a third stage if the second condition is met; if not, entering the step 23);

23) continuously judging whether the external cycle period txcycle is exceeded, if not, gradually reducing the rx rate, returning to the step 22), and if so, entering the step 24);

24) adjusting the rx rate to the tx rate, waiting for synchronization, judging whether the rx rate passes through the synchronization test after an internal cycle period rxcycle, if not, returning to the step 22 after the transceiving rates are all adjusted to be lower by one level, and if so, entering a third stage;

and a third stage, entering a rate adaptive slave mode:

31) the transmission rate is set to the reception rate,

32) judging whether the synchronous test is finished after the internal cycle period rxcycle, and entering a fourth stage if the synchronous test is finished; if not, the receiving rate is adjusted downwards to a first gear, and after the internal cycle period rxcycle, the step 31) is returned;

and a fourth stage, synchronously and stably entering a normal working mode.

2. The rate adaptation algorithm for a fibre channel protocol according to claim 1, wherein: the jump condition for entering the waiting starting mode in the normal working mode is as follows: a loss of signal occurs, or a synchronization loss timeout occurs, or a rate adaptation request is received.

3. The rate adaptation algorithm for a fibre channel protocol according to claim 1, wherein: in the step 24), judging whether the synchronous test is passed after the internal cycle period rxcycle, if not, continuously judging whether the timing of the ncycle timer is greater than a given value t _ ncycle, otherwise, returning to the step 22 after the transceiving rates are all reduced by one gear); if yes, go to step 24).

Technical Field

The invention belongs to the technical field of communication, and particularly relates to a rate adaptive algorithm of a fiber channel protocol.

Background

Most of the current network communication modes are client/server modes, the client and the server are not equal, the server is only used for providing services, and the client only makes service requests, that is, the server cannot make service requests to the client through the communication connection established between the client and the server. If a firewall exists between the server side and the client side and the server side is required to be in an intranet, the network deployment is difficult to realize because the firewall security policy requires that users in the intranet are not allowed to access the intranet.

The P2P (peer to peer) mode is a peer-to-peer connection communication mode (computer engineering, 12: 36-39, 2000), the communication mode of P2P breaks the above network communication mode, allows each communication entity to act as both a client and a server, and has multiple protocols for various applications in the application layer, respectively implementing different functions, such as File Transfer Protocol (FTP) file transfer; telnet protocol remote login; HTTP protocol browses web pages, etc.

The IEEE802.3 standard supports transmission at multiple rates in the physical layer, but does not specify a rate selection strategy, and the core of the rate adaptive rate selection algorithm is to acquire information capable of reflecting the channel state in real time. The current rate adaptive algorithms are ARF, SNIR, RSS, SampleRate, RRAA, etc.

In the network communication process, the frequency point is changed by the communication device A in the application process, and the corresponding frequency point must be adapted by the communication device B in order to maintain communication with the communication device B.

The existing network communication has the theoretical algorithms of ARF, SNIR, RSS, SampleRate, RRAA and the like, and the algorithms have corresponding defects. The ARF algorithm cannot quickly reflect the change of a channel, the SNIR algorithm and the RSS algorithm are difficult to realize in practical application based on a cross-layer design idea, the SampleRate algorithm adopts a sampling mode to detect, so that misjudgment on the whole rate is easy to cause, the performance of the RRAA algorithm is related to a selected window, and the selection of the window in practical application influences the performance of the whole system.

Disclosure of Invention

In view of this, the present invention is directed to a rate adaptive algorithm of a fibre channel protocol, which can actively detect a frequency change of an external device to implement a self-adaptive frequency point function.

In order to achieve the purpose, the technical scheme of the invention is realized as follows:

a rate adaptation algorithm for a fibre channel protocol, said rate adaptation algorithm comprising 4 stages:

the first stage, entering into waiting starting mode, includes the following steps:

11) adjusting the receiving rate and the sending rate to the frequency point which is supported by the current system rate in a self-adaptive maximum mode;

12) waiting for synchronization, judging whether a first condition is met, wherein the first condition is signal loss or a synchronization test is passed after an internal cycle period rxcycle, and entering a second stage; if not, go to step 13)

13) Continuously judging whether the external cycle period txcycle is exceeded, if not, gradually reducing the rx rate, returning to the step 12), and if so, entering the step 14);

14) the receiving and sending rates are all adjusted down by one gear and then the step 12) is returned;

and a second stage, entering a rate adaptive main mode, comprising the following steps:

21) the receiving rate and the sending rate are both adjusted to the frequency point which is supported by the maximum rate self-adapting of the current system,

22) waiting for synchronization, judging whether a second condition is met, wherein the second condition is that a synchronization test is finished after an internal cycle rxcycle and whether the current rx rate is greater than or equal to the tx rate, and entering a third stage if the second condition is met; if not, entering the step 23);

23) continuously judging whether the external cycle period txcycle is exceeded, if not, gradually reducing the rx rate, returning to the step 22), and if so, entering the step 24);

24) adjusting the rx rate to the tx rate, waiting for synchronization, judging whether the rx rate passes through the synchronization test after an internal cycle period rxcycle, if not, returning to the step 22 after the transceiving rates are all adjusted to be lower by one level, and if so, entering a third stage;

and a third stage, entering a rate adaptive slave mode:

31) the transmission rate is set to the reception rate,

32) judging whether the synchronous test is finished after the internal cycle period rxcycle, and entering a fourth stage if the synchronous test is finished; if not, the receiving rate is adjusted downwards to a first gear, and after the internal cycle period rxcycle, the step 31) is returned;

and a fourth stage, synchronously and stably entering a normal working mode.

Further, the jump condition for entering the waiting start mode in the normal operating mode is as follows: a loss of signal occurs, or a synchronization loss timeout occurs, or a rate adaptation request is received.

Further, in the step 24), whether the synchronous test is passed after the internal cycle period rxcycle is judged, if not, whether the timing of the ncycle timer is greater than the given value t _ ncycle is continuously judged, and if not, the transceiving rates are all adjusted to be lower by one gear, and then the step 22 is returned to); if yes, go to step 24).

Compared with the prior art, the invention has the following advantages:

(1) in practical application, the invention can change the frequency point of the FC in real time along with the change of the frequency point, the synchronization time is not more than 2s, and the negotiation synchronization of three frequency points of 2.125G, 4.25G and 8.5G is supported; 4 stages of state transitions in the rate adaptation process.

(2) The invention realizes the self-adaptation under the condition that 2 devices start self-adaptation at the same time, shows excellent stability in practical chip application, and does not exceed 2s from self-adaptation to link establishment.

(3) The invention can quickly sense the signal quality change in the communication process in real time according to the signals given by the physical layer.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:

FIG. 1 is a diagram illustrating a rate adaptive algorithm mechanism according to an embodiment of the present invention;

FIG. 2 is a flow chart of an implementation of a rate adaptation algorithm according to an embodiment of the present invention;

fig. 3 is a flow chart of designing a rate adaptive main mode according to an embodiment of the present invention.

Detailed Description

It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.

The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.

The invention provides a rate self-adaptive algorithm implementation mode based on FC-AE-ASM protocol compatible with FC protocol.

The invention can realize the rate self-adaptation of 1.0625G, 2.125G, 4.25G and 8.5G frequency points of the FC protocol, and can realize the self frequency point self-adaptation function by actively detecting the frequency change of the external equipment.

The rate adaptation of the FC of the present invention can be initiated under two conditions:

(1) receiving a loss of signal indication (loss _ of _ signal) signal by the FC port;

(2) the FC link is in a synchronization loss timeout (loss _ of _ syn > R _ T _ TOV) state.

The FC rate adaptation process of the present invention can be divided into 4 stages:

1. wait _ for _ signal stage:

cyclically varying the transmission rate to allow the neighboring nodes to receive synchronization; cyclically varying the reception rate to collect signals of the neighboring nodes; the sender attempts to operate at the maximum rate after the physical layer connection is established.

2. Main negotiation stage (new _ master):

the transmitting end and the receiving end gradually reduce the working rate from the maximum rate; lingering for a period of time at each stage rate to allow the neighboring nodes to follow in synchronization; if the synchronization test passes and the following conditions are met, the stage is exited:

A) the receiving rate is equal to the sending rate and becomes a principal in negotiation;

B) the receiving rate is greater than the sending rate, or the receiving rate is equal to the maximum sending support rate, which becomes the parietal angle in negotiation.

3. From the negotiation (new _ follow) phase:

the transmission rate is set to the reception rate. The stability of the receive synchronization is tested to ensure that the negotiation is successful or to follow the transmission rate of the negotiating chairman. If the synchronization is unstable or the signal is lost, the signal waiting stage is returned. And if the synchronous stability test is passed, entering a normal working stage.

4. And a negotiation completion stage:

and (5) a normal working stage.

Table 1 below lists the time parameters commonly used in the rate adaptation process of the present invention, and fig. 1 shows the rate adaptation algorithm mechanism of the present invention.

TABLE 1 Rate adaptive common time parameter

Figure BDA0002468406950000061

The invention mainly aims at FC-FC-4 optical fiber channel protocol to make gradual decomposition and refinement of rate self-adaptive algorithm, forming a finite state machine, matching with several timers to make rate self-negotiation, the invention is divided into 4 modes: waiting for starting, rate adaptation master, rate adaptation slave and normal operation.

In the waiting starting mode, the receiving and sending rates work at the maximum supporting rate and wait for synchronization, the receiving and sending rates are gradually reduced, and the rate self-adaptive main mode is not entered until the receiving and sending rate synchronization test is passed or signal loss occurs or transmission words or transmission bytes lose synchronization overtime;

in the rate self-adaptive main mode, the receiving and transmitting rates are all switched to the maximum supporting rate, and the receiving and transmitting rates are synchronized according to the mode of switching the receiving direction rate to be inner circulation and switching the transmitting rate to be outer circulation; specifically, if the receiving direction rate completes synchronization and the receiving direction rate is not less than the sending rate, entering a rate self-adaptive slave mode, otherwise, continuing a cycle synchronization test in the rate self-adaptive master mode;

in the rate self-adaptive slave mode, the sending rate value is equal to the receiving rate, and the normal working mode is entered after the synchronous stability test is passed through the switching of the sending and receiving rates;

in the normal operation mode, if a signal loss or synchronization loss timeout is encountered or a rate adaptation request is made, the standby starting mode is re-entered.

Fig. 2 is a general flow chart of the present invention for implementing rate adaptation, and it has been described above that the rate adaptation is divided into 4 phases, wherein the most important phase of the rate adaptation is the main mode test phase of the rate adaptation, and this phase mainly determines the rate value of the current port adaptation. And finishing the waiting starting mode of the rate adaptation and entering a main mode of the rate adaptation.

The left-most diagram of fig. 2 is a flow chart of the rate-adaptive standby start-up phase, which enters the standby start-up mode after the system reset is released, if the system enables the rate-adaptive function: (1) firstly, switching the receiving and transmitting (rx receiving direction and tx transmitting direction) rate to the frequency point which is supported by the current system rate self-adaption maximum, and carrying out synchronous test by the current frequency point; if the signal loss or the overtime of the synchronization loss of the transmission word is detected to be true, judging whether the rxcycle timer counts t _ rxcycle to be true, judging whether the synchronization test is finished, if the synchronization test is finished, entering a rate self-adaptive main mode, and recording the rate of the current rx direction; initializing an ncycle timer, if the synchronous test is not completed in an rxcycle, judging whether a txcycle cycle passes, if the txcycle passes, reducing the speed in the rx and tx directions by one step for synchronous test; if the txcycle period does not pass, the speed in the rx direction is reduced by one gear and then a synchronization test is carried out, and if the rx direction is synchronized, the speed self-adaptive main mode is entered; (2) if no loss of signal is detected during the detection synchronization phase, the transmission word synchronization loss signal is directly entered into the rate adaptive main mode at the current rate. The role of the ncycle timer may not work in the actual scene because the value of the timer is more than 10 times of the time of the txcycle, but the initial purpose of designing the timer is to adjust the speed in the tx direction to the speed at which rx has been synchronized and recorded before when rx can not be synchronized after a plurality of ncycle times and the speed in the rx direction is more than or equal to the speed in the current tx direction, and adjust the speed in the rx direction to synchronize at the speed of the tx in the txcycle.

The design idea of the rate self-adaptive master mode is that the sending (tx) direction rate is changed into an outer loop, the receiving (rx) direction rate is changed into an inner loop, after the rate self-adaptive master mode is entered, (1) the tx direction rate and the rx direction rate are both adjusted into the maximum supporting frequency point, the synchronous test is started at the maximum rate, a watchdog timer is started, after an rx cycle period, whether the synchronous test is completed is judged, if the synchronous test is completed, whether the current rx direction rate is greater than or equal to the tx direction rate is judged, and if the synchronous test is true, the rate self-adaptive slave mode is entered; if the current rx direction speed is false, recording the current rx direction speed, putting the current rx direction speed into a register, and initializing an ncycle timer, wherein the initialization value is 370, and the ncycle timer starts to time with the initial value; (2) if the condition of entering the rate self-adaptive slave mode is not met, judging whether a txcycle period passes or not, if so, assigning the current rate in the tx direction to the rx direction, carrying out synchronous test on the tx direction and the rx direction of the system at the rate, and if the synchronous test is finished, entering the rate self-adaptive slave mode; if the synchronization test is not passed, judging whether the ncycle timer is larger than a given value t _ ncycle, if so, adjusting the tx and tx direction frequency points to the next supported frequency point simultaneously, and entering (1) and starting a new round of synchronization test, wherein the txcycle is supposed to pass at the beginning of (2). Then now, assuming that txcycle has not passed, the speed in rx direction is shifted down or the next supported frequency point is found, and this frequency point is put into a register named mem and enters (1) to start a new round of synchronization test. When the watchdog timer reaches the threshold value, the whole state machine enters an IDLE state to restart the self-adaptation, otherwise, the current program process is carried out, which is the design implementation method of the rate self-adaptation main mode.

After the synchronization test is completed in the stage of the rate adaptive master mode, the current mode enters the rate adaptive slave mode, the current mode mainly does the work of assigning the rx-direction rate to the tx direction and performing synchronization again, and the specific synchronization process can refer to the right synchronization process of the flowchart 2.

The invention can change the frequency point of the self in real time along with the change of the frequency point of the external FC in practical application, the synchronization time does not exceed 2s, and the negotiation synchronization of three frequency points of 2.125G, 4.25G and 8.5G is supported,

the invention supports the synchronization of the maximum speed supported by two ends under the condition that two devices are simultaneously started and the speed self-adaption is realized, and the invention can also expand the method to the speed self-adaption supporting 1.0625G, 2.125G, 4.25G, 8.5G and 16G frequency points in the future design, and has good robustness, real-time property and expansibility.

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:扬声器模组及电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!