WO2019015449A1 - Srio-based hot plug method, hot plug apparatus and hot plug device, and storage medium - Google Patents
Srio-based hot plug method, hot plug apparatus and hot plug device, and storage medium Download PDFInfo
- Publication number
- WO2019015449A1 WO2019015449A1 PCT/CN2018/093032 CN2018093032W WO2019015449A1 WO 2019015449 A1 WO2019015449 A1 WO 2019015449A1 CN 2018093032 W CN2018093032 W CN 2018093032W WO 2019015449 A1 WO2019015449 A1 WO 2019015449A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- port
- state
- hot
- srio
- peer
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
- G06F13/4081—Live connection to bus, e.g. hot-plugging
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
Definitions
- the present disclosure relates to the field of communications, and in particular, to a hot plug method based on a high speed serial interface (SRIO), a hot plug device, a hot plug device, and a storage medium.
- SRIO high speed serial interface
- SRIO is widely used in interconnect interfaces for high-performance microprocessors and systems, supporting chip-to-chip and board-to-board communication.
- SRIO hot swap refers to the dynamic insertion and removal of one of the boards connected through SRIO while the system is running, without affecting the normal operation of the system.
- the SRIO link cannot be restored during the hot swap, which affects the data communication between the two boards connected through the SRIO.
- An SRIO-based hot plugging method, a hot plug device, a hot plug device, and a storage medium are provided in the embodiments of the present disclosure.
- An SRIO-based hot plugging method includes: in a state in which a local board and a peer board are interconnected through a high-speed serial interface SRIO, the local board pair port The state is detected, and according to the detection result of the port state, it is determined whether there is a hot plug operation or a hot pull operation on the peer port; if it is determined that the peer port has a hot plug operation, the local board performs port recovery. Processing and starting the SRIO data transmission and reception; and if it is determined that the remote port has a hot-pull operation, the local board prohibits the SRIO data transmission and reception.
- An SRIO-based hot-swap device includes: a plug-and-play determination module configured to perform port state in a state in which a local board and a peer board are interconnected by SRIO Detecting, and determining whether there is a hot plug operation or a hot pull operation on the peer port according to the detection result of the port state; the first processing module is configured to perform port recovery if it is determined that the peer port has a hot plug operation Processing and starting SRIO data transceiving; and a second processing module configured to disable SRIO data transmission and reception if it is determined that the peer port has a hot pull operation.
- An SRIO-based hot-swappable device includes: a processor configured to detect a port state in a state in which a local board and a peer board are interconnected by SRIO, And determining whether there is a hot plug operation or a hot pull operation on the peer port according to the detection result of the port state, wherein if it is determined that the peer port has a hot plug operation, performing port recovery processing, and starting SRIO data transmission and reception, If it is determined that the peer port has a hot pull operation, the SRIO data transmission and reception is prohibited; and the memory is configured to store a program for execution by the processor.
- a storage medium stores a program executable by a processor, which causes the processor to perform the following steps:
- the status of the port is detected, and according to the detection result of the port status, whether the hot-plug operation or the hot-pull operation of the opposite port exists is determined. If it is determined that the peer port has a hot plug operation, performing port recovery processing and starting SRIO data transmission and reception; and if it is determined that the peer port has a hot pull operation, the SRIO data transmission and reception is prohibited.
- FIG. 1 is a flow chart of an SRIO-based hot plug method provided in accordance with an embodiment of the present disclosure
- FIG. 2 is a block diagram of an SRIO-based hot plug device provided in accordance with an embodiment of the present disclosure
- FIG. 3 is a block diagram of an SRIO-based hot plug device provided in accordance with an embodiment of the present disclosure
- FIG. 4 is an application scenario diagram of an SRIO-based hot plug device according to an embodiment of the present disclosure
- FIG. 5 is a functional block diagram of an SRIO-based hot plug device according to another embodiment of the present disclosure.
- FIG. 6 is a flow diagram of an embodiment of an SRIO based hot plug method provided in accordance with an embodiment of the present disclosure.
- FIG. 1 is a flowchart of an SRIO-based hot plug method according to an embodiment of the present disclosure. As shown in FIG. 1, the method includes:
- Step S101 The local board detects the port status in the state that the local board is connected to the peer board through the high-speed serial interface SRIO, and determines whether the peer port is based on the detection result of the port status. There is a hot insertion operation or a hot extraction operation.
- Step S101 includes a step of detecting a port state and a determining step of a hot plug operation of the peer port.
- the detecting step of the port status includes:
- the port initialization state acquired by the local board is a failure state, it is determined that the detection result of the port state is an unplugged state;
- the input/output error state is an error state without input and output, and the port mode reaches a specified mode and the number of channel synchronizations does not decrease, then the port state is determined.
- the detection result is an insertion state
- the determining step of the peer port hot plug operation includes:
- the last detection result of the port state is the inserted state, the current detection result of the port state is the unplugged state, and one or more subsequent detection results of the port state are the unplugged state, then Determining that the opposite port has a hot pull operation;
- the last detection result of the port state is an inserted state
- the current detection result of the port state is an unplugged state
- at least one of one or more subsequent detection results of the port state is an inserted state.
- Step S102 If it is determined that the peer port has a hot plug operation, the local board performs port recovery processing and starts SRIO data transmission and reception.
- the step of performing the port recovery process on the local board in the step S102 includes: the local board is configured to close the local port, clear the sending buffer of the local port, receive the buffer and the port hardware error status, and then The local port is set to enable recovery of the connection with the peer.
- Step S103 If it is determined that the remote port has a hot-pull operation, the local board prohibits SRIO data transmission and reception.
- the method further includes the step of performing a port recovery process on the local board, for example, including: closing the local port and clearing the local port status. Then, the local port is enabled to wait for the peer board to be inserted.
- step S101 to step S103 are included.
- the present disclosure may further provide a storage medium on which a computer program is stored.
- steps S101 to S103 that is, the local board and the opposite board pass the high-speed serial interface. If the hot-plug operation is performed on the peer port, the local board is configured to perform the hot-plug operation or the hot-plug operation on the peer port. The port is restored and the SRIO data is sent and received. If it is determined that the remote port is hot-swappable, the SRIO data transmission and reception of the local board is prohibited.
- the storage medium may include a ROM/RAM, a magnetic disk, an optical disk, and a USB flash drive.
- the hot plug device includes: a plug determination module, a first processing module, and a second processing module.
- the plug-in determination module is configured to detect the state of the port when the local board and the peer board are interconnected by the SRIO, and determine whether the peer port has a hot-plug operation according to the detection result of the port state. Hot pull out operation.
- the first processing module is configured to perform port recovery processing and initiate SRIO data transmission and reception if it is determined that the peer port has a hot insertion operation.
- the second processing module is configured to disable SRIO data transmission and reception if it is determined that the peer port has a hot pull operation.
- the plug determination module first detects the port status. Specifically, if the acquired port initialization state is a failure state, the plug determination module determines that the detection result of the port state is an unplugged state; if the acquired port initialization state is a successful state, the input and output error state is no input and output. The error state, the port mode reaches the specified mode and the number of channel synchronizations does not decrease, and the plug determination module determines that the detection result of the port state is an inserted state.
- the plugging and determining module determines the hot plug operation of the peer port according to the detection result of the port state. Specifically, the plug determination module determines that the peer port has a hot insertion operation when the last detection result of the port state is an unplugged state and the current detection result of the port state is an inserted state; The last detection result of the port state is an insertion state, and the current detection result of the port state is an unplugged state, and when one or more subsequent detection results of the port state are all pulled out, the determination is performed.
- the opposite port has a hot pull operation.
- the first processing module closes the local port, clears the sending buffer, the receiving buffer, and the port hardware error status of the local port, and enables the local port to be enabled.
- the port hardware error status the local port is set to be enabled, so that the peer board is inserted.
- the hot plug device includes:
- the processor is configured to detect the state of the port when the local board and the peer board are interconnected by the SRIO, and determine whether the peer port has a hot plug operation or hot pull according to the detection result of the port status. In the operation, if it is determined that the peer port has a hot plug operation, the port recovery process is performed, and the SRIO data is transmitted and received; if it is determined that the peer port has a hot pull operation, the SRIO data is prohibited from being transmitted and received;
- a memory configured to store a program for execution by the processor, the memory being communicable with the processor.
- the local board is connected to the peer board through a physical link.
- the peer board can still send the underlying information to the local board through the physical link.
- the local board updates the local port status register according to the received information, so as to determine the in-position status of the peer board and finally implement link recovery.
- the local board and the remote board perform SRIO data transmission and reception.
- FIG. 4 is an application scenario diagram of an SRIO-based hot plug device according to an embodiment of the present disclosure.
- the SRIO on the board A and the board B passes through the serializer/deserializer on the backplane. (SERializer/DESerializer, serdes) is interconnected.
- serializer/deserializer serializer/deserializer, serdes
- the SRIO-based hot plugging device on the board B detects and recovers the link.
- the SRIO-based hot plug device on the board A detects and recovers the link.
- FIG. 5 is a functional block diagram of an SRIO-based hot plug device according to another embodiment of the present disclosure.
- the hot plug device includes: a timing module, a port state detection module, and a port state recording module.
- the above-mentioned function modules cooperate with each other to detect the hot swap operation of the board and restore the link to ensure that the peer board can continue to work normally.
- the port state detecting module, the port state recording module, and the port plugging and determining module implement the function of the plugging and unplugging module of FIG. 2, and the port state recovery module and the port state indicating module jointly implement the first and the second of FIG. The function of the second processing module.
- the timing module is configured to repeatedly initiate the port state detection module at a specified timing interval, and record the detection result into the port state recording module.
- the port insertion and determination module performs insertion and removal determination on the peer port according to the record in the port state record module. If it is determined that the peer port has a hot plug operation, the port state recovery module clears the port state, and the port plug determination module updates the state of the port state indication module; if the port insertion and removal determination module decides to the opposite end If there is a hot pull operation, the port plug determination module updates the state of the port status indication module, and the port status recovery module clears the port status. After the above port insertion and extraction judgment is completed, the next timing time of the timing module is waited for, and the above process is repeated.
- the port state detection module is configured to acquire a port initialization state and a port mode (ie, the port is in a mode of 1x, 2x, 4x, 8x, etc.). If the port initialization status is successful, the port has no input error and output error, the port mode reaches the specified mode, and when the number of channel synchronization drops, the port is determined to be inserted; if the port initialization status is successful, but the port has input If the error or output error occurs, or the number of channel synchronizations on the port decreases, it is determined that the port is in the connected state; if the port initialization state is in the failed state, it is determined that the port is in the unplugged state.
- a port initialization state and a port mode ie, the port is in a mode of 1x, 2x, 4x, 8x, etc.
- the port plug determination module is configured to read a record in the port record module, compare the last port state and the current port state, and determine whether the peer end has a plug operation. Specifically, if the last port state is the unplugged state and the secondary port state is the inserted state, it is determined that there is a hot plug operation at the opposite end. At this time, the port hot plug processing module (which is a submodule of the port state recovery module) clears the port buffer and the error state, and the port plug determination module updates the state of the port status indication module. If the last port state is the inserted state and the secondary port state is the unplugged state, the port state detecting module performs one or more port state detections at intervals.
- the port state detection results is inserted in one or more times, it is determined that the peer end has no hot pull operation. If the one or more detection results are all pulled out, the hot swap operation is determined, and the port insertion and determination module updates the state of the port status indication module, and the port status recovery module clears the port. status.
- the port state recovery module is configured to close the port, then clear the port's transmit buffer, receive buffer, and port hardware error status, and then enable the port.
- the port status recording module is configured to record the last and current port status, and the port plug determination module performs the pair port according to the record in the port status record module. Plug and drop judgment.
- the port status indication module is configured to control whether SRIO data transceiving is possible. Specifically, when the port plugging and judging module determines that the peer port has a hot plug operation, the port state indicating module controls to enable SRIO data transmission and reception; and when the port plugging and judging module determines that the peer port is hot pulled When the operation is performed, the port status indication module controls prohibiting data transmission and reception.
- the timing module sets the timing. After the timing moment arrives, the port state detection module detects the port state and records the result in the port state recording module.
- the port insertion and determination module reads the record in the port state record module, and determines whether the peer port has a hot plug operation according to the record.
- the port state recovery module first closes the port, and then clears the port's transmit buffer, receive buffer, and port hardware error status, and then sets the port to enable. In order to restore the SRIO link.
- the port insertion and determination module updates the state of the port status indication module.
- the port insertion determination module updates the state of the port status indication module.
- the port state recovery module first closes the port, and then clears the port's transmit buffer, receive buffer, and port hardware error status, and then sets the port to be enabled to wait for the peer board to be inserted.
- FIG. 6 is a flowchart of an embodiment of an SRIO-based hot plug method according to an embodiment of the present disclosure. As shown in FIG. 6, the embodiment mainly includes the following steps:
- Step 1 When the system is initialized, the timer is used as a timing module, configured as a 1s timing time and configured as a repeating mode.
- Step 2 After the 1s timing of the timer is arrived, the port state detection module obtains the current state of the port by querying the mode register and the state control register of the SRIO port: if the initialization success status bit (bit) in the port state control register is 1 The input error and output error status bits in the port status control register are both 0, and the mode in the port mode register indicates that the number of channel synchronizations is not decreased, the port status detection module determines that the current status of the port is the inserted state; if the port status control The initialization success status bit in the register is 1, but the input error bit in the port status register is 1, or the output error bit is 1, or the mode in the port mode register indicates that the number of channel synchronization drops, the port status detection module determines The current state of the port is the connection state; if the initialization success bit in the port state control register is 0, the port state detection module determines that the current state of the port is the unplugged state.
- the initialization success status bit (bit) in the port state control register is 1
- Step 3 The port state detection module stores the detected current state of the port into the port state record module.
- Step 4 The port plugging and judging module reads the port last state detection result and the current state result of the port in the port state recording module, and determines whether the port currently has a hot plug operation according to the two state records.
- Step 5 If the last port state detection result is the unplugged state and the current port state detection result is the inserted state, the port plugging and judging module determines that the peer port has a hot plug operation, and the port state recovery module clears the port's send buffer and receives. Cache, clear the error status of the port, and the port status indication module notifies the SRIO data sending module to enable the data sending function.
- Step 6 If the result of the last port state detection is the inserted state and the current port state detection result is the unplugged state, the port state detection module adds the port state twice every 10 us. If the next two detection results are inserted at least once, the port insertion and determination module determines that the peer port has no hot pull operation; if the next two test results are all pulled out, the port is plugged and unplugged. The judging module judges that the peer end has a hot pull operation, and the port state recovery module clears the send buffer and the receive buffer, clears the port hardware error state, and the port status indication module notifies the SRIO data sending module to prohibit the data sending function.
- Step 7 After the above detection process is completed, wait for the next 1s timing of the timing timer to arrive, and repeat the above detection process.
- the SRIO-based hot plug method and apparatus may have the following technical effects:
- the peer board does not need to be reset to improve the stability of the board running.
- the SRIO link recovery time is short
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Stored Programmes (AREA)
Abstract
Provided are an SRIO-based hot plug method, hot plug apparatus and hot plug device, and a storage medium. The method comprises: in the state that a local terminal single board and an opposite terminal single board are interconnected via an SRIO, the local terminal single board detecting a port state, and according to a detection result of the port state, determining whether there is a hot plug-in operation or a hot plug-out operation at an opposite terminal port; if it is determined that there is a hot plug-in operation at the opposite terminal port, the local terminal single board performing port recovery processing, and starting SRIO data transceiving; and if it is determined that there is a hot plug-out operation at the opposite terminal port, the local terminal single board prohibiting SRIO data transceiving.
Description
本公开涉及通信领域,特别涉及一种基于高速串行接口(Serial Rapid IO,SRIO)的热插拔方法、热插拔装置、热插拔设备及存储介质。The present disclosure relates to the field of communications, and in particular, to a hot plug method based on a high speed serial interface (SRIO), a hot plug device, a hot plug device, and a storage medium.
SRIO作为新一代高速互联技术,广泛应用于面向高性能微处理器及系统的互联接口,支持芯片到芯片和板到板的通信。SRIO热插拔是指在系统运行时,动态地对通过SRIO互联的其中一块单板进行拔插,而不影响系统的正常运行的操作。As a new generation of high-speed interconnect technology, SRIO is widely used in interconnect interfaces for high-performance microprocessors and systems, supporting chip-to-chip and board-to-board communication. SRIO hot swap refers to the dynamic insertion and removal of one of the boards connected through SRIO while the system is running, without affecting the normal operation of the system.
由于SRIO协议在物理层、传输层和逻辑层都没有定义热插拔规范,因此在出现热插拔时会导致SRIO链路无法恢复,影响通过SRIO互联的两块单板之间的数据通信。Because the SRIO protocol does not define a hot-swap specification at the physical layer, the transport layer, and the logical layer, the SRIO link cannot be restored during the hot swap, which affects the data communication between the two boards connected through the SRIO.
目前业界的解决方法是,对通过SRIO互联的两块单板都进行复位,这种方法的缺点在于两块互联的单板需要较长的时间完成系统初始化,而且复位期间单板所有业务均处于中断状态。The current solution in the industry is to reset the two boards connected through the SRIO. The disadvantage of this method is that the two interconnected boards take a long time to complete the system initialization, and all services of the board are in the reset period. Interrupt status.
发明内容Summary of the invention
本公开实施例提供的一种基于SRIO的热插拔方法、热插拔装置、热插拔设备及存储介质。An SRIO-based hot plugging method, a hot plug device, a hot plug device, and a storage medium are provided in the embodiments of the present disclosure.
根据本公开的一个实施例提供的一种基于SRIO的热插拔方法,包括:在本端单板与对端单板通过高速串行接口SRIO互联的状态下,所述本端单板对端口状态进行检测,并且根据对端口状态的检测结果,确定对端端口是否存在热插入操作或热拔出操作;若确定所述对端端口存在热插入操作,则所述本端单板进行端口恢复处理,并启动SRIO数据收发;以及若确定所述对端端口存在热拔出操作,则所述本端单板禁止SRIO数据收发。An SRIO-based hot plugging method according to an embodiment of the present disclosure includes: in a state in which a local board and a peer board are interconnected through a high-speed serial interface SRIO, the local board pair port The state is detected, and according to the detection result of the port state, it is determined whether there is a hot plug operation or a hot pull operation on the peer port; if it is determined that the peer port has a hot plug operation, the local board performs port recovery. Processing and starting the SRIO data transmission and reception; and if it is determined that the remote port has a hot-pull operation, the local board prohibits the SRIO data transmission and reception.
根据本公开的一个实施例提供的一种基于SRIO的热插拔装置,包括:插拔确定模块,被配置为在本端单板与对端单板通过SRIO互联的状态下,对端口状态进行检测,并且根据对端口状态的检测结果,确定对端端口是否存在热插入操作或热拔出操作;第一处理模块,被配置为若确定所述对端端口存在热插入操作,则进行端口恢复处理,并启动SRIO数据收发;以及第二处理模块,被配置为若确定所述对端端口存在热拔出操作,则禁止SRIO数据收发。An SRIO-based hot-swap device according to an embodiment of the present disclosure includes: a plug-and-play determination module configured to perform port state in a state in which a local board and a peer board are interconnected by SRIO Detecting, and determining whether there is a hot plug operation or a hot pull operation on the peer port according to the detection result of the port state; the first processing module is configured to perform port recovery if it is determined that the peer port has a hot plug operation Processing and starting SRIO data transceiving; and a second processing module configured to disable SRIO data transmission and reception if it is determined that the peer port has a hot pull operation.
根据本公开的一个实施例提供的一种基于SRIO的热插拔设备,包括:处理器,被配置为在本端单板与对端单板通过SRIO互联的状态下,对端口状态进行检测,并且根据对端口状态的检测结果,确定对端端口是否存在热插入操作或热拔出操作,其中,若确定所述对端端口存在热插入操作,则进行端口恢复处理,并启动SRIO数据收发,若确定所述对端端口存在热拔出操作,则禁止SRIO数据收发;以及存储器,被配置为存储供所述处理器执行的程序。An SRIO-based hot-swappable device according to an embodiment of the present disclosure includes: a processor configured to detect a port state in a state in which a local board and a peer board are interconnected by SRIO, And determining whether there is a hot plug operation or a hot pull operation on the peer port according to the detection result of the port state, wherein if it is determined that the peer port has a hot plug operation, performing port recovery processing, and starting SRIO data transmission and reception, If it is determined that the peer port has a hot pull operation, the SRIO data transmission and reception is prohibited; and the memory is configured to store a program for execution by the processor.
根据本公开的一个实施例提供的存储介质,存储有处理器可执行的程序,该程序使处理器执行以下步骤:A storage medium according to an embodiment of the present disclosure stores a program executable by a processor, which causes the processor to perform the following steps:
在本端单板与对端单板通过高速串行接口SRIO互联的状态下,对端口状态进行检测,并且根据对端口状态的检测结果,确定对端端口是否存在热插入操作或热拔出操作;若确定所述对端端口存在热插入操作,则进行端口恢复处理,并启动SRIO数据收发;以及若确定所述对端端口存在热拔出操作,则禁止SRIO数据收发。When the local board and the peer board are interconnected through the high-speed serial interface SRIO, the status of the port is detected, and according to the detection result of the port status, whether the hot-plug operation or the hot-pull operation of the opposite port exists is determined. If it is determined that the peer port has a hot plug operation, performing port recovery processing and starting SRIO data transmission and reception; and if it is determined that the peer port has a hot pull operation, the SRIO data transmission and reception is prohibited.
图1是根据本公开实施例提供的基于SRIO的热插拔方法的流程图;1 is a flow chart of an SRIO-based hot plug method provided in accordance with an embodiment of the present disclosure;
图2是根据本公开实施例提供的基于SRIO的热插拔装置的框图;2 is a block diagram of an SRIO-based hot plug device provided in accordance with an embodiment of the present disclosure;
图3是根据本公开实施例提供的基于SRIO的热插拔设备的框图;3 is a block diagram of an SRIO-based hot plug device provided in accordance with an embodiment of the present disclosure;
图4是根据本公开实施例提供的基于SRIO的热插拔装置的应用场景图;4 is an application scenario diagram of an SRIO-based hot plug device according to an embodiment of the present disclosure;
图5是根据本公开另一实施例提供的基于SRIO的热插拔装置的功能模块框图;以及FIG. 5 is a functional block diagram of an SRIO-based hot plug device according to another embodiment of the present disclosure; and
图6是根据本公开实施例提供的基于SRIO的热插拔方法的实施方式的流程图。6 is a flow diagram of an embodiment of an SRIO based hot plug method provided in accordance with an embodiment of the present disclosure.
以下结合附图对本公开的优选实施例进行详细说明,应当理解,以下所说明的优选实施例仅用于说明和解释本公开,并不用于限定本公开。The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings.
图1是根据本公开实施例提供的基于SRIO的热插拔方法的流程图,如图1所示,所述方法包括:FIG. 1 is a flowchart of an SRIO-based hot plug method according to an embodiment of the present disclosure. As shown in FIG. 1, the method includes:
步骤S101:在本端单板与对端单板通过高速串行接口SRIO互联的状态下,所述本端单板对端口状态进行检测,并且根据对端口状态的检测结果,确定对端端口是否存在热插入操作或热拔出操作。Step S101: The local board detects the port status in the state that the local board is connected to the peer board through the high-speed serial interface SRIO, and determines whether the peer port is based on the detection result of the port status. There is a hot insertion operation or a hot extraction operation.
步骤S101包括端口状态的检测步骤和对端端口热插拔操作的确定步骤。Step S101 includes a step of detecting a port state and a determining step of a hot plug operation of the peer port.
在一个示例性实施例中,端口状态的检测步骤包括:In an exemplary embodiment, the detecting step of the port status includes:
1.若所述本端单板获取的端口初始化状态是失败状态,则确定所述端口状态的检测结果是拔出状态;1. If the port initialization state acquired by the local board is a failure state, it is determined that the detection result of the port state is an unplugged state;
2.若所述本端单板获取的端口初始化状态是成功状态,输入输出错误状态是无输入输出的错误状态,所述端口模式达到指定模式且通道同步数目未下降,则确定所述端口状态的检测结果是插入状态;2. If the port initialization state acquired by the local board is a successful state, the input/output error state is an error state without input and output, and the port mode reaches a specified mode and the number of channel synchronizations does not decrease, then the port state is determined. The detection result is an insertion state;
3.若所述本端单板获取的端口初始化状态是成功状态,但输入输出错误状态是有输入或输出的错误状态或者所述通道同步数 目下降,则确定所述端口状态的检测结果是插入状态。3. If the port initialization state acquired by the local board is a successful state, but the input/output error state is an input or output error state or the channel synchronization number decreases, it is determined that the port state detection result is inserted. status.
在一个示例性实施例中,对端端口热插拔操作的确定步骤包括:In an exemplary embodiment, the determining step of the peer port hot plug operation includes:
1.若所述端口状态的上次检测结果是拔出状态并且所述端口状态的当次检测结果是插入状态,则确定所述对端端口有热插入操作;1. If the last detection result of the port state is the unplugged state and the current detection result of the port state is the inserted state, it is determined that the peer port has a hot plug operation;
2.若所述端口状态的上次检测结果是插入状态,所述端口状态的当次检测结果是拔出状态,且所述端口状态的一个或多个后续检测结果均是拔出状态,则确定所述对端端口有热拔出操作;2. If the last detection result of the port state is the inserted state, the current detection result of the port state is the unplugged state, and one or more subsequent detection results of the port state are the unplugged state, then Determining that the opposite port has a hot pull operation;
3.若所述端口状态的上次检测结果是插入状态,所述端口状态的当次检测结果是拔出状态,且所述端口状态的一个或多个后续检测结果中至少一者是插入状态,则确定所述对端端口无热拔出操作。3. If the last detection result of the port state is an inserted state, the current detection result of the port state is an unplugged state, and at least one of one or more subsequent detection results of the port state is an inserted state. And determining that the opposite port has no hot extraction operation.
步骤S102:若确定所述对端端口存在热插入操作,则所述本端单板进行端口恢复处理,并启动SRIO数据收发。Step S102: If it is determined that the peer port has a hot plug operation, the local board performs port recovery processing and starts SRIO data transmission and reception.
步骤S102中的所述本端单板进行端口恢复处理的步骤包括:所述本端单板关闭本端端口,清除所述本端端口的发送缓存,接收缓存和端口硬件错误状态,然后将所述本端端口设为使能,以便恢复与对端的连接。The step of performing the port recovery process on the local board in the step S102 includes: the local board is configured to close the local port, clear the sending buffer of the local port, receive the buffer and the port hardware error status, and then The local port is set to enable recovery of the connection with the peer.
步骤S103:若确定所述对端端口存在热拔出操作,则所述本端单板禁止SRIO数据收发。Step S103: If it is determined that the remote port has a hot-pull operation, the local board prohibits SRIO data transmission and reception.
在步骤S103中的所述本端单板禁止SRIO数据收发的步骤之后,所述方法还包括所述本端单板进行端口恢复处理的步骤,例如,包括关闭本端端口、清除本端端口状态、然后将本端端口设为使能,以便等待对端单板插入。After the step of disabling the SRIO data transmission and reception in the local board in the step S103, the method further includes the step of performing a port recovery process on the local board, for example, including: closing the local port and clearing the local port status. Then, the local port is enabled to wait for the peer board to be inserted.
本领域普通技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于计算机可读取存储介质中,该程序在执行时,包括步骤S101至步骤S103。进一步说,本公开还可以提供一种存储介质,其上存储有计算机程序,该程序被处理器执行时至少步 骤S101至步骤S103,即在本端单板与对端单板通过高速串行接口SRIO互联的状态下,根据对本端单板端口状态的检测结果,确定对端端口是否存在热插入操作或热拔出操作;若确定所述对端端口存在热插入操作,则进行本端单板的端口恢复处理,并启动SRIO数据收发;若确定所述对端端口存在热拔出操作,则禁止本端单板SRIO数据收发。在本文中,所述的存储介质可以包括ROM/RAM、磁碟、光盘、U盘。It will be understood by those skilled in the art that all or part of the steps of the above embodiments may be implemented by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, and the program is executed. When it is, step S101 to step S103 are included. Further, the present disclosure may further provide a storage medium on which a computer program is stored. When the program is executed by the processor, at least steps S101 to S103, that is, the local board and the opposite board pass the high-speed serial interface. If the hot-plug operation is performed on the peer port, the local board is configured to perform the hot-plug operation or the hot-plug operation on the peer port. The port is restored and the SRIO data is sent and received. If it is determined that the remote port is hot-swappable, the SRIO data transmission and reception of the local board is prohibited. Herein, the storage medium may include a ROM/RAM, a magnetic disk, an optical disk, and a USB flash drive.
图2是根据本公开实施例提供的基于SRIO的热插拔装置的框图,如图2所示,所述热插拔装置包括:插拔确定模块、第一处理模块和第二处理模块。2 is a block diagram of an SRIO-based hot plug device according to an embodiment of the present disclosure. As shown in FIG. 2, the hot plug device includes: a plug determination module, a first processing module, and a second processing module.
插拔确定模块,被配置为在本端单板与对端单板通过SRIO互联的状态下,对端口状态进行检测,并且根据对端口状态的检测结果,确定对端端口是否存在热插入操作或热拔出操作。The plug-in determination module is configured to detect the state of the port when the local board and the peer board are interconnected by the SRIO, and determine whether the peer port has a hot-plug operation according to the detection result of the port state. Hot pull out operation.
第一处理模块,被配置为若确定所述对端端口存在热插入操作,则进行端口恢复处理,并启动SRIO数据收发。The first processing module is configured to perform port recovery processing and initiate SRIO data transmission and reception if it is determined that the peer port has a hot insertion operation.
第二处理模块,被配置为若确定所述对端端口存在热拔出操作,则禁止SRIO数据收发。The second processing module is configured to disable SRIO data transmission and reception if it is determined that the peer port has a hot pull operation.
下面将详细描述所述装置的工作过程。The operation of the device will be described in detail below.
插拔确定模块首先检测端口状态。具体地说,若获取的端口初始化状态是失败状态,则插拔确定模块确定所述端口状态的检测结果是拔出状态;若获取的端口初始化状态是成功状态,输入输出错误状态是无输入输出的错误状态,所述端口模式达到指定模式且通道同步数目未下降,则插拔确定模块确定所述端口状态的检测结果是插入状态。The plug determination module first detects the port status. Specifically, if the acquired port initialization state is a failure state, the plug determination module determines that the detection result of the port state is an unplugged state; if the acquired port initialization state is a successful state, the input and output error state is no input and output. The error state, the port mode reaches the specified mode and the number of channel synchronizations does not decrease, and the plug determination module determines that the detection result of the port state is an inserted state.
插拔确定模块根据所述端口状态的检测结果,确定对端端口的热插拔操作。具体地说,所述插拔确定模块在所述端口状态的上次检测结果是拔出状态并且所述端口状态的当次检测结果是插入状态时,确定所述对端端口有热插入操作;在所述端口状态的上次检测结果是插入状态,所述端口状态的当次检测结果是拔出状态,且所述端口状态的一个或多个后续检测结果均是拔出状态 时,确定所述对端端口有热拔出操作。The plugging and determining module determines the hot plug operation of the peer port according to the detection result of the port state. Specifically, the plug determination module determines that the peer port has a hot insertion operation when the last detection result of the port state is an unplugged state and the current detection result of the port state is an inserted state; The last detection result of the port state is an insertion state, and the current detection result of the port state is an unplugged state, and when one or more subsequent detection results of the port state are all pulled out, the determination is performed. The opposite port has a hot pull operation.
若确定对端端口存在热插入操作,第一处理模块关闭本端端口,清除所述本端端口的发送缓存、接收缓存和端口硬件错误状态,将所述本端端口设为使能,以便恢复与对端的连接,然后启动SRIO数据收发;若确定对端端口有热拔出操作,则第二处理模块禁止SRIO数据收发,然后关闭本端端口,清除所述本端端口的发送缓存、接收缓存和端口硬件错误状态,将所述本端端口设为使能,以便等待对端单板插入。If it is determined that there is a hot plug operation on the peer port, the first processing module closes the local port, clears the sending buffer, the receiving buffer, and the port hardware error status of the local port, and enables the local port to be enabled. The connection with the peer end, and then start the SRIO data transmission and reception; if it is determined that the remote port has a hot pull operation, the second processing module prohibits the SRIO data from being sent and received, and then closes the local port, and clears the local port's send buffer and receive buffer. And the port hardware error status, the local port is set to be enabled, so that the peer board is inserted.
图3是根据本公开实施例提供的基于SRIO的热插拔设备的框图,如图3所示,所述热插拔设备包括:3 is a block diagram of an SRIO-based hot plug device according to an embodiment of the present disclosure. As shown in FIG. 3, the hot plug device includes:
处理器,被配置为在本端单板与对端单板通过SRIO互联的状态下,对端口状态进行检测,并且根据对端口状态的检测结果,确定对端端口是否存在热插入操作或热拔出操作,其中,若确定所述对端端口存在热插入操作,则进行端口恢复处理,并启动SRIO数据收发;若确定所述对端端口存在热拔出操作,则禁止SRIO数据收发;The processor is configured to detect the state of the port when the local board and the peer board are interconnected by the SRIO, and determine whether the peer port has a hot plug operation or hot pull according to the detection result of the port status. In the operation, if it is determined that the peer port has a hot plug operation, the port recovery process is performed, and the SRIO data is transmitted and received; if it is determined that the peer port has a hot pull operation, the SRIO data is prohibited from being transmitted and received;
存储器,被配置为存储供所述处理器执行的程序,所述存储器可以与所述处理器通信。A memory configured to store a program for execution by the processor, the memory being communicable with the processor.
本端单板与对端单板通过物理链路连接。在SRIO链路未恢复时,对端单板仍可通过物理链路向本端单板发送底层信息。本端单板根据收到的信息更新本地端口状态寄存器,从而判断对端单板的在位情况,并最终实现链路恢复。在SRIO链路恢复后,本端单板与对端单板进行SRIO数据收发。The local board is connected to the peer board through a physical link. When the SRIO link is not restored, the peer board can still send the underlying information to the local board through the physical link. The local board updates the local port status register according to the received information, so as to determine the in-position status of the peer board and finally implement link recovery. After the SRIO link is restored, the local board and the remote board perform SRIO data transmission and reception.
图4是根据本公开实施例提供的基于SRIO的热插拔装置的应用场景图,如图4所示,单板A和单板B上的SRIO通过背板上的串行器/解串器(SERializer/DESerializer,serdes)进行互联,当对单板A进行热插拔操作,单板B上的基于SRIO的热插拔装置就会对链路进行检测和恢复;当对单板B进行热插拔操作,单板A上的基于SRIO的热插拔装置就会对链路进行检测和恢复。4 is an application scenario diagram of an SRIO-based hot plug device according to an embodiment of the present disclosure. As shown in FIG. 4, the SRIO on the board A and the board B passes through the serializer/deserializer on the backplane. (SERializer/DESerializer, serdes) is interconnected. When hot swapping is performed on the board A, the SRIO-based hot plugging device on the board B detects and recovers the link. When the board B is hot After the plug-in operation, the SRIO-based hot plug device on the board A detects and recovers the link.
图5是根据本公开另一实施例提供的基于SRIO的热插拔装 置的功能模块框图,如图5所示,所述热插拔装置包括:定时模块、端口状态检测模块、端口状态记录模块、端口插拔判断模块、端口状态恢复模块和端口状态指示模块。上述各功能模块相互配合用于对单板热插拔操作进行检测和链路恢复,保证对端单板能持续正常工作。在一个示例性实施例中,端口状态检测模块、端口状态记录模块、端口插拔判断模块实现图2插拔确定模块的功能,端口状态恢复模块和端口状态指示模块共同实现图2第一和第二处理模块的功能。FIG. 5 is a functional block diagram of an SRIO-based hot plug device according to another embodiment of the present disclosure. As shown in FIG. 5, the hot plug device includes: a timing module, a port state detection module, and a port state recording module. The port plugging and judging module, the port state recovery module, and the port status indicating module. The above-mentioned function modules cooperate with each other to detect the hot swap operation of the board and restore the link to ensure that the peer board can continue to work normally. In an exemplary embodiment, the port state detecting module, the port state recording module, and the port plugging and determining module implement the function of the plugging and unplugging module of FIG. 2, and the port state recovery module and the port state indicating module jointly implement the first and the second of FIG. The function of the second processing module.
在一个示例性实施例中,所述定时模块,被配置为以指定的定时间隔,重复启动所述端口状态检测模块,将检测结果记录到所述端口状态记录模块中。所述端口插拔判断模块根据所述端口状态记录模块中的记录,对对端端口进行插拔判断。若判断对端端口有热插入操作,则所述端口状态恢复模块清除端口状态,所述端口插拔判断模块更新所述端口状态指示模块的状态;若所述端口插拔判断模块判决到对端有热拔出操作,则所述端口插拔判断模块更新所述端口状态指示模块的状态,所述端口状态恢复模块清除端口状态。在上述端口插拔判断完成之后,等待所述定时模块下一次定时时刻到来,重复上述的过程。In an exemplary embodiment, the timing module is configured to repeatedly initiate the port state detection module at a specified timing interval, and record the detection result into the port state recording module. The port insertion and determination module performs insertion and removal determination on the peer port according to the record in the port state record module. If it is determined that the peer port has a hot plug operation, the port state recovery module clears the port state, and the port plug determination module updates the state of the port state indication module; if the port insertion and removal determination module decides to the opposite end If there is a hot pull operation, the port plug determination module updates the state of the port status indication module, and the port status recovery module clears the port status. After the above port insertion and extraction judgment is completed, the next timing time of the timing module is waited for, and the above process is repeated.
在一个示例性实施例中,所述端口状态检测模块,被配置为获取端口初始化状态和端口模式(即,端口处于1x、2x、4x、8x等模式)。若端口初始化状态为成功状态,端口无输入错误和输出错误,端口模式达到指定模式,没有出现通道同步个数下降时,则判定端口处于插入状态;若端口初始化状态为成功状态,但端口存在输入错误或者输出错误,或者端口出现通道同步个数下降时,则判定端口处于连接状态;若端口初始化状态为失败状态,则判定端口处于拔出状态。In an exemplary embodiment, the port state detection module is configured to acquire a port initialization state and a port mode (ie, the port is in a mode of 1x, 2x, 4x, 8x, etc.). If the port initialization status is successful, the port has no input error and output error, the port mode reaches the specified mode, and when the number of channel synchronization drops, the port is determined to be inserted; if the port initialization status is successful, but the port has input If the error or output error occurs, or the number of channel synchronizations on the port decreases, it is determined that the port is in the connected state; if the port initialization state is in the failed state, it is determined that the port is in the unplugged state.
在一个示例性实施例中,所述端口插拔判断模块,被配置为读取所述端口记录模块中的记录,比较上次端口状态和当次端口状态,判断对端是否有插拔操作。具体地说,若上次端口状态为拔出状态并且当次端口状态为插入状态,则判决对端有热插入操 作。此时,端口热插入处理模块(为所述端口状态恢复模块的子模块)清除端口缓存和错误状态,所述端口插拔判断模块更新所述端口状态指示模块的状态。若上次端口状态为插入状态并且当次端口状态为拔出状态,则端口状态检测模块每隔一段时间再进行一次或者多次端口状态检测。如果一次或者多次端口状态检测结果中至少有一次为插入状态,则判决对端无热拔出操作。如果这一次或者多次检测结果都是拔出状态,则判决对端有热拔出操作,则所述端口插拔判断模块更新所述端口状态指示模块的状态,所述端口状态恢复模块清除端口状态。In an exemplary embodiment, the port plug determination module is configured to read a record in the port record module, compare the last port state and the current port state, and determine whether the peer end has a plug operation. Specifically, if the last port state is the unplugged state and the secondary port state is the inserted state, it is determined that there is a hot plug operation at the opposite end. At this time, the port hot plug processing module (which is a submodule of the port state recovery module) clears the port buffer and the error state, and the port plug determination module updates the state of the port status indication module. If the last port state is the inserted state and the secondary port state is the unplugged state, the port state detecting module performs one or more port state detections at intervals. If at least one of the port state detection results is inserted in one or more times, it is determined that the peer end has no hot pull operation. If the one or more detection results are all pulled out, the hot swap operation is determined, and the port insertion and determination module updates the state of the port status indication module, and the port status recovery module clears the port. status.
在一个示例性实施例中,所述端口状态恢复模块,被配置为关闭端口,然后清除端口的发送缓存、接收缓存和端口硬件错误状态,再将端口设为使能。In an exemplary embodiment, the port state recovery module is configured to close the port, then clear the port's transmit buffer, receive buffer, and port hardware error status, and then enable the port.
在一个示例性实施例中,所述端口状态记录模块,被配置为记录上一次和当次端口状态,所述端口插拔判断模块根据所述端口状态记录模块中的记录,对对端端口进行插拔判决。In an exemplary embodiment, the port status recording module is configured to record the last and current port status, and the port plug determination module performs the pair port according to the record in the port status record module. Plug and drop judgment.
在一个示例性实施例中,所述端口状态指示模块被配置为控制能否进行SRIO数据收发。具体地说,当所述端口插拔判断模块判断对端端口有热插入操作时,所述端口状态指示模块控制使能SRIO数据收发;当所述端口插拔判断模块判断对端端口有热拔出操作时,所述端口状态指示模块控制禁止数据收发。In an exemplary embodiment, the port status indication module is configured to control whether SRIO data transceiving is possible. Specifically, when the port plugging and judging module determines that the peer port has a hot plug operation, the port state indicating module controls to enable SRIO data transmission and reception; and when the port plugging and judging module determines that the peer port is hot pulled When the operation is performed, the port status indication module controls prohibiting data transmission and reception.
下面将详细描述所述装置的工作过程。The operation of the device will be described in detail below.
所述定时模块设置定时。在定时时刻到来后,所述端口状态检测模块对端口状态进行检测,并将结果记录到所述端口状态记录模块中。The timing module sets the timing. After the timing moment arrives, the port state detection module detects the port state and records the result in the port state recording module.
所述端口插拔判断模块读取所述端口状态记录模块中的记录,根据该记录判断对端端口是否存在热插拔操作。The port insertion and determination module reads the record in the port state record module, and determines whether the peer port has a hot plug operation according to the record.
若所述端口插拔判断模块判断对端存在热插入操作,则所述端口状态恢复模块先关闭端口,然后清除端口的发送缓存、接收缓存和端口硬件错误状态,接着将端口设为使能,以使SRIO链路恢复。所述端口插拔判断模块更新所述端口状态指示模块的状态。If the port insertion and determination module determines that there is a hot plug operation at the opposite end, the port state recovery module first closes the port, and then clears the port's transmit buffer, receive buffer, and port hardware error status, and then sets the port to enable. In order to restore the SRIO link. The port insertion and determination module updates the state of the port status indication module.
若所述端口插拔判断模块判断对端存在热拔出操作,则所述端口插拔判断模块更新所述端口状态指示模块的状态。所述端口状态恢复模块先关闭端口,然后清除端口的发送缓存、接收缓存和端口硬件错误状态,接着将端口设为使能,以等待对端单板插入。If the port insertion and determination module determines that there is a hot extraction operation at the opposite end, the port insertion determination module updates the state of the port status indication module. The port state recovery module first closes the port, and then clears the port's transmit buffer, receive buffer, and port hardware error status, and then sets the port to be enabled to wait for the peer board to be inserted.
在上述端口插拔判断完成之后,等待所述定时模块下一次定时时刻到来,重复上述的过程。After the above port insertion and extraction judgment is completed, the next timing time of the timing module is waited for, and the above process is repeated.
图6是根据本公开实施例提供的基于SRIO的热插拔方法的实施方式的流程图,如图6所示,所述实施方式主要包括以下几个步骤:6 is a flowchart of an embodiment of an SRIO-based hot plug method according to an embodiment of the present disclosure. As shown in FIG. 6, the embodiment mainly includes the following steps:
步骤一:在系统初始化时,将定时timer作为定时模块,配置成1s定时时间且配置为重复模式。Step 1: When the system is initialized, the timer is used as a timing module, configured as a 1s timing time and configured as a repeating mode.
步骤二:当定时timer的1s定时时刻到来后,端口状态检测模块通过查询SRIO端口的模式寄存器和状态控制寄存器得到端口当前的状态:若端口状态控制寄存器中的初始化成功状态比特(位)为1,端口状态控制寄存器中的输入错误和输出错误状态比特均为0,并且端口模式寄存器中的模式指示没有通道同步个数下降,则端口状态检测模块判断端口当前状态为插入状态;若端口状态控制寄存器中的初始化成功状态比特为1,但端口状态寄存器中的输入错误比特为1,或者输出错误比特为1,或者端口模式寄存器中的模式指示存在通道同步个数下降,则端口状态检测模块判断端口当前状态为连接状态;若端口状态控制寄存器中的初始化成功比特为0,则端口状态检测模块判断端口当前状态为拔出状态。Step 2: After the 1s timing of the timer is arrived, the port state detection module obtains the current state of the port by querying the mode register and the state control register of the SRIO port: if the initialization success status bit (bit) in the port state control register is 1 The input error and output error status bits in the port status control register are both 0, and the mode in the port mode register indicates that the number of channel synchronizations is not decreased, the port status detection module determines that the current status of the port is the inserted state; if the port status control The initialization success status bit in the register is 1, but the input error bit in the port status register is 1, or the output error bit is 1, or the mode in the port mode register indicates that the number of channel synchronization drops, the port status detection module determines The current state of the port is the connection state; if the initialization success bit in the port state control register is 0, the port state detection module determines that the current state of the port is the unplugged state.
步骤三:端口状态检测模块将检测到的端口当前状态存储到端口状态记录模块中。Step 3: The port state detection module stores the detected current state of the port into the port state record module.
步骤四:端口插拔判断模块读取端口状态记录模块中端口上次状态检测结果和端口当前状态结果,根据这两个状态记录判断端口当前是否有热插拔操作。Step 4: The port plugging and judging module reads the port last state detection result and the current state result of the port in the port state recording module, and determines whether the port currently has a hot plug operation according to the two state records.
步骤五:若上次端口状态检测结果为拔出状态,当前端口状 态检测结果为插入状态,则端口插拔判断模块判决对端端口有热插入操作,端口状态恢复模块清空端口的发送缓存和接收缓存,清除端口的错误状态,端口状态指示模块通知SRIO数据发送模块使能数据发送功能。Step 5: If the last port state detection result is the unplugged state and the current port state detection result is the inserted state, the port plugging and judging module determines that the peer port has a hot plug operation, and the port state recovery module clears the port's send buffer and receives. Cache, clear the error status of the port, and the port status indication module notifies the SRIO data sending module to enable the data sending function.
步骤六:若上次端口状态检测结果为插入状态,当前端口状态检测结果为拔出状态,则端口状态检测模块每隔10us再加测2次端口状态。若接下来的两次检测结果有至少1次为插入状态,则端口插拔判断模块判断对端端口无热拔出操作;若接下来的两次检测结果均为拔出状态,则端口插拔判断模块判断对端有热拔出操作,则端口状态恢复模块清空发送缓存和接收缓存,清除端口硬件错误状态,端口状态指示模块通知SRIO数据发送模块禁止数据发送功能。Step 6: If the result of the last port state detection is the inserted state and the current port state detection result is the unplugged state, the port state detection module adds the port state twice every 10 us. If the next two detection results are inserted at least once, the port insertion and determination module determines that the peer port has no hot pull operation; if the next two test results are all pulled out, the port is plugged and unplugged. The judging module judges that the peer end has a hot pull operation, and the port state recovery module clears the send buffer and the receive buffer, clears the port hardware error state, and the port status indication module notifies the SRIO data sending module to prohibit the data sending function.
步骤七:在上述检测过程完成之后,等待定时timer的下一次1s的定时时刻到来,再重复上述的检测过程。Step 7: After the above detection process is completed, wait for the next 1s timing of the timing timer to arrive, and repeat the above detection process.
综上所述,根据本公开的实施例的基于SRIO的热插拔方法和装置,可以具有以下技术效果:In summary, the SRIO-based hot plug method and apparatus according to an embodiment of the present disclosure may have the following technical effects:
1.以软件方式实现对链路的监控和恢复;1. Implement monitoring and recovery of links in software mode;
2.对端单板无需复位,提高单板运行的稳定性;2. The peer board does not need to be reset to improve the stability of the board running.
3.SRIO链路恢复时间短;3. The SRIO link recovery time is short;
4.不中断除SRIO相关业务以外的其它业务。4. Do not interrupt other services except SRIO related services.
尽管上文对本公开进行了详细说明,但是本公开不限于此,本技术领域技术人员可以根据本公开的原理进行各种修改。因此,凡按照本公开原理所作的修改,都应当理解为落入本公开的保护范围。Although the present disclosure has been described in detail above, the present disclosure is not limited thereto, and various modifications may be made by those skilled in the art in accordance with the principles of the present disclosure. Therefore, modifications made in accordance with the principles of the present disclosure are to be understood as falling within the scope of the present disclosure.
Claims (10)
- 一种基于SRIO的热插拔方法,包括:A SRIO-based hot plug method, including:在本端单板与对端单板通过高速串行接口SRIO互联的状态下,所述本端单板对端口状态进行检测,并且根据对端口状态的检测结果,确定对端端口是否存在热插入操作或热拔出操作;The local board detects the port status in the state that the local board is connected to the peer board through the high-speed serial interface SRIO, and determines whether the peer port has hot plug according to the detection result of the port status. Operation or hot extraction operation;若确定所述对端端口存在热插入操作,则所述本端单板进行端口恢复处理,并启动SRIO数据收发;以及If it is determined that the remote port has a hot plug operation, the local board performs port recovery processing and starts SRIO data transmission and reception;若确定所述对端端口存在热拔出操作,则所述本端单板禁止SRIO数据收发。If it is determined that the remote port has a hot-pull operation, the local board prohibits SRIO data transmission and reception.
- 根据权利要求1所述的方法,其中,所述根据对端口状态的检测结果,确定对端端口是否存在热插入操作或热拔出操作的步骤包括:The method according to claim 1, wherein the step of determining whether the peer port has a hot plug operation or a hot pull operation according to the detection result of the port state comprises:若所述端口状态的上次检测结果是拔出状态并且所述端口状态的当次检测结果是插入状态,则确定所述对端端口有热插入操作;以及Determining that the peer port has a hot plug operation if the last detection result of the port state is an unplugged state and the current detection result of the port state is an inserted state;若所述端口状态的上次检测结果是插入状态,所述端口状态的当次检测结果是拔出状态,且所述端口状态的一个或多个后续检测结果均是拔出状态,则确定所述对端端口有热拔出操作。If the last detection result of the port state is an insertion state, the current detection result of the port state is an unplugged state, and one or more subsequent detection results of the port state are all pulled out, determining The opposite port has a hot pull operation.
- 根据权利要求2所述的方法,其中,所述本端单板对端口状态进行检测的步骤包括:The method of claim 2, wherein the step of detecting, by the local board, the port status comprises:所述本端单板获取端口初始化状态、输入输出错误状态和端口模式;The local board acquires a port initialization state, an input/output error state, and a port mode.若所述端口初始化状态是失败状态,则确定所述端口状态的检测结果是拔出状态;以及If the port initialization state is a failure state, determining that the detection result of the port state is an unplugged state;若所述端口初始化状态是成功状态,输入输出错误状态是无输入输出的错误状态,所述端口模式达到指定模式且通道同步数目未下降,则确定所述端口状态的检测结果是插入状态。If the port initialization state is a successful state, the input/output error state is an error state without input and output, and the port mode reaches a specified mode and the number of channel synchronizations does not decrease, it is determined that the detection result of the port state is an inserted state.
- 根据权利要求1所述的方法,其中,所述本端单板进行端口恢复处理的步骤包括:The method of claim 1, wherein the step of performing port recovery processing on the local board comprises:所述本端单板关闭本端端口,并清除所述本端端口的发送缓存、接收缓存和端口硬件错误状态;以及The local board closes the local port, and clears the sending buffer, the receiving buffer, and the port hardware error status of the local port;所述本端单板将所述本端端口设为使能,以便恢复与对端的连接。The local board is configured to enable the local port to restore the connection with the peer end.
- 根据权利要求1-4任意一项所述的方法,其中,在若确定所述对端端口存在热拔出操作,则所述本端单板禁止SRIO数据收发之后,所述方法还包括:所述本端单板进行端口恢复处理。The method according to any one of claims 1 to 4, wherein, after determining that the remote port has a hot-pull operation, the local board prohibits SRIO data transmission and reception, the method further includes: The local board performs port recovery processing.
- 一种基于SRIO的热插拔装置,包括:A SRIO-based hot swap device, comprising:插拔确定模块,被配置为在本端单板与对端单板通过SRIO互联的状态下,对端口状态进行检测,并且根据对端口状态的检测结果,确定对端端口是否存在热插入操作或热拔出操作;The plug-in determination module is configured to detect the state of the port when the local board and the peer board are interconnected by the SRIO, and determine whether the peer port has a hot-plug operation according to the detection result of the port state. Hot extraction operation;第一处理模块,被配置为若确定所述对端端口存在热插入操作,则进行端口恢复处理,并启动SRIO数据收发;以及a first processing module configured to perform port recovery processing and initiate SRIO data transmission and reception if it is determined that the peer port has a hot insertion operation;第二处理模块,被配置为若确定所述对端端口存在热拔出操作,则禁止SRIO数据收发。The second processing module is configured to disable SRIO data transmission and reception if it is determined that the peer port has a hot pull operation.
- 根据权利要求6所述的装置,其中,所述插拔确定模块还被配置为在所述端口状态的上次检测结果是拔出状态并且所述端口状态的当次检测结果是插入状态时,确定所述对端端口有热插入操作;在所述端口状态的上次检测结果是插入状态,所述端口状态的当次检测结果是拔出状态,且所述端口状态的一个或多个后续检测结果均是拔出状态时,确定所述对端端口有热拔出操作。The apparatus according to claim 6, wherein said plug determination module is further configured to be configured when a last detection result of said port state is an unplugged state and a current detection result of said port state is an inserted state, Determining that the peer port has a hot plug operation; the last detection result of the port state is an insert state, and the current detection result of the port state is an unplugged state, and one or more subsequent states of the port state When the detection result is in the unplugged state, it is determined that the opposite port has a hot extraction operation.
- 根据权利要求7所述的装置,其中,所述插拔确定模块还被配置为获取端口初始化状态、输入输出错误状态和端口模式; 若所述端口初始化状态是失败状态,则确定所述端口状态的检测结果是拔出状态;若所述端口初始化状态是成功状态,输入输出错误状态是无输入输出的错误状态,所述端口模式达到指定模式且通道同步数目未下降,则确定所述端口状态的检测结果是插入状态。The apparatus according to claim 7, wherein said plug determination module is further configured to acquire a port initialization state, an input/output error state, and a port mode; and if said port initialization state is a failure state, determining said port state The detection result is the unplugged state; if the port initialization state is a successful state, the input/output error state is an error state without input and output, and the port mode reaches the specified mode and the channel synchronization number does not decrease, then the port state is determined. The result of the test is the inserted state.
- 一种基于SRIO的热插拔设备,包括:A SRIO-based hot plug device that includes:处理器,被配置为在本端单板与对端单板通过SRIO互联的状态下,对端口状态进行检测,并且根据对端口状态的检测结果,确定对端端口是否存在热插入操作或热拔出操作,其中,若确定所述对端端口存在热插入操作,则进行端口恢复处理,并启动SRIO数据收发,若确定所述对端端口存在热拔出操作,则禁止SRIO数据收发;以及The processor is configured to detect the state of the port when the local board and the peer board are interconnected by the SRIO, and determine whether the peer port has a hot plug operation or hot pull according to the detection result of the port status. In the operation, if it is determined that the peer port has a hot plug operation, performing port recovery processing, and starting SRIO data transmission and reception, and if it is determined that the peer port has a hot pull operation, prohibiting SRIO data transmission and reception;存储器,被配置为存储供所述处理器执行的程序。A memory configured to store a program for execution by the processor.
- 一种存储介质,存储有处理器可执行的程序,该程序使处理器执行以下步骤:A storage medium storing a program executable by a processor, the program causing the processor to perform the following steps:在本端单板与对端单板通过高速串行接口SRIO互联的状态下,对端口状态进行检测,并且根据对端口状态的检测结果,确定对端端口是否存在热插入操作或热拔出操作;When the local board and the peer board are interconnected through the high-speed serial interface SRIO, the status of the port is detected, and according to the detection result of the port status, whether the hot-plug operation or the hot-pull operation of the opposite port exists is determined. ;若确定所述对端端口存在热插入操作,则进行端口恢复处理,并启动SRIO数据收发;以及If it is determined that the peer port has a hot plug operation, performing port recovery processing and starting SRIO data transmission and reception;若确定所述对端端口存在热拔出操作,则禁止SRIO数据收发。If it is determined that the peer port has a hot pull operation, the SRIO data transmission and reception is prohibited.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710602751.4 | 2017-07-21 | ||
CN201710602751.4A CN109284245A (en) | 2017-07-21 | 2017-07-21 | A kind of hot-plug method based on SRIO, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019015449A1 true WO2019015449A1 (en) | 2019-01-24 |
Family
ID=65016556
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/093032 WO2019015449A1 (en) | 2017-07-21 | 2018-06-27 | Srio-based hot plug method, hot plug apparatus and hot plug device, and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109284245A (en) |
WO (1) | WO2019015449A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113556249B (en) * | 2021-07-20 | 2024-06-28 | 浪潮思科网络科技有限公司 | Hot plug method, device, equipment and medium based on single-chip switch |
CN115695341B (en) * | 2022-08-23 | 2024-04-09 | 中国电子科技集团公司第十研究所 | Method, equipment and medium for recovering port of domestic SRIO exchange chip |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201910801U (en) * | 2010-12-28 | 2011-07-27 | 中国航空工业集团公司第六三一研究所 | Circuit for realizing hot-swapping function of optical fiber passage port |
CN103530245A (en) * | 2013-10-31 | 2014-01-22 | 武汉邮电科学研究院 | SRIO interconnection exchanging device based on field programmable gate array (FPGA) |
CN103955414A (en) * | 2014-04-24 | 2014-07-30 | 深圳市道通科技有限公司 | Self-restoration method and device of USB (universal serial bus) Host fault |
CN104932993A (en) * | 2014-03-21 | 2015-09-23 | 中兴通讯股份有限公司 | Stable hot plug driving method and apparatus as well as hot plugging supporting device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100421423C (en) * | 2005-10-25 | 2008-09-24 | 杭州华三通信技术有限公司 | A Centralized Router Based on Serial RapidIO Bus |
US9479434B2 (en) * | 2013-07-19 | 2016-10-25 | Fabric Embedded Tools Corporation | Virtual destination identification for rapidio network elements |
US9934194B2 (en) * | 2013-12-20 | 2018-04-03 | Rambus Inc. | Memory packet, data structure and hierarchy within a memory appliance for accessing memory |
-
2017
- 2017-07-21 CN CN201710602751.4A patent/CN109284245A/en not_active Withdrawn
-
2018
- 2018-06-27 WO PCT/CN2018/093032 patent/WO2019015449A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201910801U (en) * | 2010-12-28 | 2011-07-27 | 中国航空工业集团公司第六三一研究所 | Circuit for realizing hot-swapping function of optical fiber passage port |
CN103530245A (en) * | 2013-10-31 | 2014-01-22 | 武汉邮电科学研究院 | SRIO interconnection exchanging device based on field programmable gate array (FPGA) |
CN104932993A (en) * | 2014-03-21 | 2015-09-23 | 中兴通讯股份有限公司 | Stable hot plug driving method and apparatus as well as hot plugging supporting device |
CN103955414A (en) * | 2014-04-24 | 2014-07-30 | 深圳市道通科技有限公司 | Self-restoration method and device of USB (universal serial bus) Host fault |
Also Published As
Publication number | Publication date |
---|---|
CN109284245A (en) | 2019-01-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7738502B2 (en) | Signal noise filtering in a serial interface | |
TWI343007B (en) | Point-to-point link negotiation method and apparatus | |
TW552780B (en) | USB communication control apparatus, USB communication system and USB communication control method | |
JP7477237B2 (en) | DisplayPort Alternate Mode Communication Detection | |
CN108008980B (en) | Method and apparatus for initiating re-enumeration of USB3.0 compatible devices | |
KR102559387B1 (en) | Peripheral component interconnect express interface device and operating method thereof | |
US20110320706A1 (en) | Storage apparatus and method for controlling the same | |
US11567893B2 (en) | Method and a mirrored serial interface (MSI) for transferring data | |
WO2022105448A1 (en) | Method and system for maintaining pcie signal connection by using in-place signal, device, and medium | |
CN104750588A (en) | Serial port communication based pressure testing method | |
CN111881076B (en) | A method and device for repairing I2C bus hang-up of domestic CPU and BBU communication | |
CN103312636A (en) | Information processing apparatus, serial communication system, method of initialization of communication therefor, and serial communication apparatus | |
WO2019015449A1 (en) | Srio-based hot plug method, hot plug apparatus and hot plug device, and storage medium | |
US7924750B1 (en) | Method and apparatus for establishing a communication mode between network devices in a network | |
US9182920B2 (en) | Channel activating method and peripheral device performing the same | |
CN111417034A (en) | Switch and hot plug method, device and system for switch board card thereof | |
TWI878595B (en) | Method for error handling of an interconnection protocol and controller | |
EP4502817A1 (en) | Apparatus for error recovery and method of operating the same | |
CN116820840A (en) | An I2C bus hang-up automatic recovery method, device, equipment and medium | |
JP4630288B2 (en) | Verifying the rate of the received serial transfer alignment sequence | |
WO2020014836A1 (en) | Method, device and system for acquiring link negotiation information of optical module | |
CN116893997A (en) | Interface device and computing system including the same | |
CN116126769A (en) | Isolation circuit and device isolation method for serial bus | |
CN109672578B (en) | Link establishing method and device, storage medium and information processing device | |
CN101446887B (en) | Method, device and system for original language processing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18835772 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.06.2020) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18835772 Country of ref document: EP Kind code of ref document: A1 |