An automatic training method, device and medium for a switch port

By monitoring the switch port status in real time and automatically adjusting Serdes Training, the cumbersome and inefficient problems of traditional switch port training mechanisms are solved, achieving more intelligent and efficient port training, and improving network communication stability and user experience.

CN119135569BActive Publication Date: 2025-11-04INSPUR NETWORK TECH (SHANDONG) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411326270.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-11-04
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

Traditional switch port SerDes Training mechanisms are cumbersome to operate, inefficient, and unable to adapt to changes in different hardware environments and application scenarios, resulting in incorrect signal reproduction and affecting the stability and reliability of network communication.

Method used

By monitoring the switch port status in real time, the Serdes Training status detection is triggered to detect whether the communication link is down, continuously probe the stability of the condition signal status, perform Serdes Training, and update the parameters of the decision feedback equalizer (DFE) based on the results, thereby achieving automatic adjustment.

Benefits of technology

It improves the stability and reliability of network communication, reduces link oscillations, enhances device compatibility, simplifies configuration and maintenance, and improves user experience and system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135569B_ABST
    Figure CN119135569B_ABST
Patent Text Reader

Abstract

The application discloses an automatic Training method and device for a switch port and a medium, and relates to the technical field of switch communication. The method comprises the following steps: monitoring the port state of a switch in real time, triggering the detection of the Serdes Training state of the port when the port state is converted from the Down state to the Up state, detecting whether the communication link of the Serdes is in the Down state if the port is not in the Serdes Training completion state or the Serdes Training incomplete state, continuously detecting the port state of the switch for a preset time length to determine whether the condition signal state of the port Serdes Training is stable when it is determined that the communication link of the Serdes is in the Down state, and performing the port Serdes Training when it is determined that the condition signal state is stable, polling the Serdes Training state of the port through a timing task, and updating the parameters of the decision feedback equalizer (DFE) in the Serdes according to the Serdes Training result when it is determined that the port is in the Serdes Training completion state.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of switch communication, and in particular to an automatic Training method for switch ports, a device and a medium. BACKGROUND

[0002] With the rapid development of information technology and the continuous expansion of application fields, especially the rise of artificial intelligence (AI) and high-performance computing (HPC) fields, unprecedented high requirements have been put forward for the stability and reliability of network communication. As a key device in network communication, the performance and stability of the switch directly determine the running effect of the entire network system.

[0003] In the traditional process of connecting switch ports, signals are often interfered by attenuation and noise on the transmission path, which seriously affects the integrity and accuracy of the signals. Especially at the receiving end (Rx side), the serial deserializer (Serdes) as a key component of signal conversion, its performance directly affects whether the signal can be correctly restored at the receiving side. However, due to the non-ideal configuration of Serdes parameters or the difference in hardware design, it often leads to the fact that the signal cannot be correctly restored at the receiving side, and further causes a series of problems such as the port cannot be normally activated (i.e. the port cannot be normally Up), CRC (Cyclic Redundancy Check) packet loss, and packet error.

[0004] In order to overcome the above-mentioned signal problems, Serdes usually needs to go through a series of Training processes to optimize its parameter settings. However, the traditional Training mechanism often has many shortcomings, such as improper Training timing, complex and time-consuming Training process, and link oscillation caused by the Training process, etc. These problems not only increase the instability factors of the system, but also seriously affect the user experience.

[0005] In order to solve the above-mentioned problems, the existing technical solutions mostly use manual configuration or preset parameter mode to realize the Training process of Serdes. However, this mode not only is tedious and inefficient, but also cannot adapt to the changes of different hardware environments and application scenarios, and is difficult to meet the high requirements of modern network communication for stability and reliability. Therefore, how to realize a more intelligent and efficient automatic Training mechanism for switch ports has become a technical problem to be solved. SUMMARY

[0006] The embodiments of the present application provide an automatic Training method for switch ports, a device and a medium, to solve the technical problem of how to realize a more intelligent and efficient automatic Training mechanism for switch ports.

[0007] In a first aspect, the embodiments of the present application provide an automatic Training method for a switch port, characterized in that the method comprises: monitoring the port state of a switch in real time, and triggering the detection of the Serdes Training state of the port when the port state is converted from the Down state to the Up state; if the port is not in the Serdes Training complete state or the Serdes Training incomplete state, detecting whether the communication link of the Serdes is in the Down state; when it is determined that the communication link of the Serdes is in the Down state, continuously detecting the port state of the switch for a preset time length to determine whether the condition signal state of the port Serdes Training is stable, and performing the port Serdes Training when it is determined that the condition signal state is stable; polling the Serdes Training state of the port through a timing task, and updating the parameters of the decision feedback equalizer (DFE) in the Serdes according to the Serdes Training result when it is determined that the port is in the Serdes Training complete state.

[0008] In an implementation manner of the present application, the method further comprises: if the port is in the Serdes Training complete state or the Serdes Training incomplete state, starting the timing task to poll the Serdes Training state of the port, and updating the parameters of the decision feedback equalizer (DFE) in the Serdes according to the Serdes Training result when it is determined that the port is in the Serdes Training complete state.

[0009] In an implementation manner of the present application, the method further comprises: when it is determined that the communication link of the Serdes is not in the Down state, detecting whether there is a communication signal in the communication link of the Serdes; when it is determined that there is no communication signal in the communication link of the Serdes, directly converting the communication link of the Serdes into the Down state; and when it is determined that there is a communication signal in the communication link of the Serdes, continuously sending a remote fault signal to the Serdes to force the communication link of the Serdes to be converted into the Down state.

[0010] In an implementation form of the present application, after the communication link of the Serdes is forced to convert to the Down state, the method further comprises: detecting whether the condition signal states have all met the conditions of the port Serdes Training; wherein the condition signals comprise: a signal detection signal Signal Detect, a physical coding sublayer alignment lock signal Pcs Align Lock, and a gearbox lock signal Gear Box Lock; and when it is determined that all the signals have met the conditions of the port Serdes Training, stopping sending the remote fault signal to the Serdes.

[0011] In an implementation form of the present application, the port state of the switch is continuously probed for a preset duration to determine whether the condition signal states are stable, specifically comprising: continuously monitoring the states of the condition signals within the preset duration, and determining whether the condition signals have not appeared state jumps within the preset duration; if all the condition signal states have not appeared state jumps, it is determined that the condition signals meet the conditions of the port Serdes Training; and if there is any condition signal that has appeared state jumps within the preset duration, it is determined that the condition signal states are unstable and do not meet the conditions of the port Serdes Training.

[0012] In an implementation form of the present application, the port Serdes Training comprises: sending a start Serdes Training instruction to the port of the switch through the management interface of the switch; and after the port of the switch receives the instruction, starting the internal Serdes Training mechanism to implement the port Serdes Training.

[0013] In an implementation form of the present application, the parameters of the decision feedback equalizer DFE in the Serdes are updated according to the Serdes Training result, specifically comprising: obtaining the optimal DFE parameter configuration according to the Serdes Training result; downloading the optimal DFE parameter configuration to the port of the switch through the management interface of the switch; and after the port of the switch receives the optimal DFE parameter configuration, automatically updating the internal DFE parameters.

[0014] In an implementation form of the present application, after the parameters of the decision feedback equalizer DFE in the Serdes are updated according to the Serdes Training result, the method further comprises: verifying whether the updated parameters of the decision feedback equalizer DFE in the Serdes are valid; if the verification fails, rolling back to the parameters of the decision feedback equalizer DFE in the Serdes before the update, and generating an alarm information to notify the administrator to manually handle.

[0015] In a second aspect, the embodiments of the present application also provide an automatic Training device for a switch port, characterized in that the device comprises: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: monitor a port state of a switch in real time, and trigger a port Serdes Training state detection when the port state is converted from a Down state to an Up state; if the port is not in a Serdes Training complete state or a Serdes Training incomplete state, detect whether a communication link of the Serdes is in a Down state; when it is determined that the communication link of the Serdes is in the Down state, perform a preset time length of continuous detection on the port state of the switch to determine whether a condition signal state for the port Serdes Training is stable, and perform the port Serdes Training when it is determined that the condition signal state is stable; poll a Serdes Training state of the port through a timing task, and update parameters of a decision feedback equalizer (DFE) in the Serdes according to a Serdes Training result when it is determined that the port is in the Serdes Training complete state.

[0016] In a third aspect, the embodiments of the present application also provide a nonvolatile computer storage medium for automatic Training of a switch port, which stores computer executable instructions, characterized in that the computer executable instructions are configured to: monitor a port state of a switch in real time, and trigger a port Serdes Training state detection when the port state is converted from a Down state to an Up state; if the port is not in a Serdes Training complete state or a Serdes Training incomplete state, detect whether a communication link of the Serdes is in a Down state; when it is determined that the communication link of the Serdes is in the Down state, perform a preset time length of continuous detection on the port state of the switch to determine whether a condition signal state for the port Serdes Training is stable, and perform the port Serdes Training when it is determined that the condition signal state is stable; poll a Serdes Training state of the port through a timing task, and update parameters of a decision feedback equalizer (DFE) in the Serdes according to a Serdes Training result when it is determined that the port is in the Serdes Training complete state.

[0017] The automatic Training method, device and medium for a switch port provided by the embodiments of the present application have the following beneficial effects:

[0018] 1. Improved stability and reliability of network communication: By monitoring the port status of the switch in real time and triggering Serdes Training at the appropriate time, the application can ensure that the switch port automatically adjusts to the optimal link quality after the optical module is inserted and activated, greatly reducing communication errors caused by signal attenuation and noise interference, thereby significantly improving the stability and reliability of network communication.

[0019] 2. Reduced impact of link oscillation: Traditional Serdes Training process may cause link oscillation, affecting the performance of the entire system. The application effectively minimizes the occurrence of link oscillation through reasonable Training timing selection and mechanism design, ensuring smooth network communication.

[0020] 3. Enhanced compatibility and adaptability of equipment: The application does not rely on specific optical module brands or models, but automatically adjusts and optimizes Serdes parameters through unified software implementation, improving the compatibility of equipment and making it adaptable to a wider range of optical modules, simplifying the complexity of equipment configuration and maintenance.

[0021] 4. Improved system performance and user experience: By automatically adjusting and optimizing Serdes parameters, the application can ensure that the switch port is always in the best working state, thereby improving the efficiency and accuracy of data transmission. This is particularly important for applications that require high-speed and stable network communication (such as AI, HPC, etc.), significantly improving user experience and system performance.

[0022] 5. Reduced operation and maintenance costs: Traditional Serdes parameter configuration often needs to be done manually, which is not only time-consuming and labor-intensive, but also prone to errors. The automatic Training method of the application greatly simplifies this process, reduces operation and maintenance costs, and improves work efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0023] The accompanying drawings, which are included to provide a further understanding of the application, constitute a part of this specification and illustrate illustrative embodiments of the application and together with their description serve to explain the application. In the drawings:

[0024] Figure 1 An automatic Training method flowchart for switch ports is provided for the embodiments of the application;

[0025] Figure 2 An automatic Training device internal structure schematic diagram for switch ports is provided for the embodiments of the application. DETAILED DESCRIPTION

[0026] In order to make the purposes, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described below in connection with specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0027] The embodiments of the present application provide an automatic Training method, device and medium for a switch port, to solve the technical problem of how to implement a more intelligent and efficient automatic Training mechanism for a switch port.

[0028] The technical solutions of the embodiments of the present application will be described in detail below with reference to the drawings.

[0029] Figure 1 A flowchart of an automatic Training method for a switch port provided by the embodiments of the present application is shown in FIG. 1. As shown in FIG. 1, the automatic Training method for a switch port provided by the embodiments of the present application specifically includes the following steps: Figure 1

[0030] Step 101, real-time monitoring of the port state of a switch, and triggering port Serdes Training state detection when the port state is converted from a Down state to an Up state.

[0031] In an embodiment of the present application, to implement the automatic Training method for a switch port, first, the port state of a switch needs to be monitored in real time, and port Serdes Training state detection is triggered when the port state is converted from a Down state to an Up state.

[0032] In an embodiment, first, the state of each port is tracked in real time through a state monitoring mechanism inside the switch. This monitoring mechanism can be event-driven or time-polling, to ensure that the change of the port state can be found in time. The content of the monitoring mainly includes the physical connection state of the port, i.e., whether the port is in a connected (Up) state or disconnected (Down) state. This is usually achieved by detecting the presence or absence of a physical layer signal, for example, by detecting the intensity of an optical signal or the voltage level of an electrical signal.

[0033] ​When the state of a certain port is detected to be converted from Down state to Up state, it indicates that a new optical module is inserted and activated, or the previous connection failure has been recovered, which is the key opportunity to trigger the Serdes Training state detection. In order to accurately capture this state conversion, the application adopts state change detection logic, which can compare the results of the previous and subsequent state detection, so as to determine whether the state of the port has changed.

[0034] Once the port state is detected to be converted from Down to Up, the Serdes Training state detection process will be triggered immediately. The purpose of this process is to confirm whether the Serdes of the current port has completed the necessary training and optimization to ensure the quality of the link. The triggering method can be to send a start signal or instruction to the hardware or software module responsible for managing Serdes, which will activate the Training mechanism or state detection logic inside Serdes. In the Serdes Training state detection process, the current state of Serdes will be checked, including whether the Training is in progress, whether the Training has been completed, and whether the result of the Training is successful, etc. These state information is usually obtained by reading the state register inside Serdes or receiving the state report sent by Serdes. According to these state information, it can be decided whether to start or restart the Serdes Training process.

[0035] Step 102, if the port is not in the Serdes Training completed state or the Serdes Training incomplete state, detect whether the communication link of the Serdes is in the Down state.

[0036] In an embodiment of the application, after triggering the port Serdes Training state detection, if the port is not in the Serdes Training completed state or the Serdes Training incomplete state, the communication link of the Serdes is detected whether it is in the Down state.

[0037] In an embodiment of the application, when it is determined that the communication link of the Serdes is not in the Down state, it is detected whether there is a communication signal in the communication link of the Serdes; when it is determined that there is no communication signal in the communication link of the Serdes, the communication link of the Serdes is directly converted to the Down state; when it is determined that there is a communication signal in the communication link of the Serdes, the remote fault signal is continuously sent to the Serdes, so that the communication link of the Serdes is forced to convert to the Down state.

[0038] In one embodiment, if the port is not in the Serdes Training Complete state or the Serdes Training Incomplete state, it is further detected whether the communication link of the Serdes is in the Down state, to determine whether the communication link has been established. If it is detected that the communication link of the Serdes is not in the Down state, that is, the link has been established, it is further detected whether there is a communication signal in the link, to determine whether the link is active, that is, whether there is data being transmitted on the link. The method of detecting the communication signal can include monitoring the amount of data transmission on the link, detecting a specific signal pattern or frame structure, etc. If no communication signal is detected within a certain time, it is determined that the link is established but not active, at this time, in order to save resources and avoid unnecessary interference, the communication link of the Serdes can be directly converted to the Down state, and this conversion can be achieved by closing the relevant physical layer interface, stopping transmitting or receiving data, etc. On the other hand, if it is determined that there is a communication signal in the communication link of the Serdes, that is, the link is both established and active, but needs to be optimized or reset for some reason (such as poor link quality, high bit error rate, etc.), specifically, a remote fault signal is continuously sent to the Serdes to inform the opposite end device that there is a problem with the current link and request the opposite end device to cooperate in resetting or optimizing the link. The remote fault signal is usually a specific signal pattern that conforms to the relevant communication protocol or standard and can be correctly recognized and responded by the opposite end device. By sending the remote fault signal, the communication link of the Serdes can be forced to convert to the Down state, thereby creating conditions for subsequent Serdes Training or optimization operation. After the link is converted to the Down state, the Serdes Training process can be triggered again to re-establish and optimize the link parameters, to ensure the stability and performance of the communication.

[0039] In one embodiment of the present application, after the communication link of the Serdes is forced to convert to the Down state, the method further comprises: detecting whether the conditions of the signal states have all met the conditions of the port Serdes Training; wherein the condition signals include: signal detection signal Signal Detect, physical coding sublayer alignment lock signal Pcs Align Lock, and gearbox lock signal Gear Box Lock; when it is determined that all signals meet the conditions of the port Serdes Training, the sending of the remote fault signal to the Serdes is stopped.

[0040] In one embodiment, after the communication link of the Serdes is forced to the Down state, a series of condition signals are further detected to ensure the port can smoothly proceed with the Serdes Training. These condition signals are prerequisites for the port to perform Serdes Training, and only when all of them are in the expected state, the Training process can be effectively started and executed.

[0041] Specifically, the present application detects the following three key condition signal states:

[0042] Signal Detect: This is a flag indicating whether the physical layer has detected a valid input signal. It confirms whether the Signal Detect signal is in the active state, i.e., whether a valid optical or electrical signal from the opposite device has been detected. Only when the Signal Detect signal is valid, it indicates that a physical connection has been established between the two ends of the link, which is the basis for Serdes Training.

[0043] Pcs Align Lock: This signal indicates whether the Physical Coding Sublayer (PCS) has completed the alignment and lock process. The PCS layer is responsible for data encoding and decoding to ensure the integrity and reliability of data during transmission. The present application checks whether the Pcs Align Lock signal has been locked, i.e., whether the PCS layer is ready for data transmission. This is one of the key conditions for the correct execution of Serdes Training.

[0044] Gear Box Lock: For Serdes interfaces supporting multiple rates and modes, the Gear Box Lock signal is used to indicate whether the Gear Box has been locked at a specific rate or mode. The Gear Box is responsible for adjusting the transmission rate and format of data according to the actual situation of the link. Verify whether the Gear Box Lock signal is valid to ensure that the Gear Box has been stably locked at the expected rate or mode before Serdes Training.

[0045] In the process of detecting these condition signals, the application can adopt the polling, interrupt or event-driven manner to ensure the timely acquisition of the change of signal state. Once it is detected that all signals meet the conditions of port Serdes Training, i.e. the Signal Detect signal is valid, the Pcs Align Lock signal is locked and the Gear Box Lock signal is valid, the application will stop sending the remote fault signal to the Serdes. This marks that the link is ready for Serdes Training, and the transmission performance of the port can be adjusted and optimized.

[0046] Step 103, when it is determined that the communication link of the Serdes is in the Down state, the port state of the switch is continuously probed for a preset time length to determine whether the condition signal state for port Serdes Training is stable, and when it is determined that the condition signal state is stable, the port Serdes Training is performed.

[0047] In an embodiment of the application, when it is determined that the communication link of the Serdes is in the Down state, the port state of the switch needs to be continuously probed for a preset time length to determine whether the condition signal state for port Serdes Training is stable.

[0048] Specifically, the state of the condition signal is continuously monitored within the preset time length, and it is judged whether the condition signal has state jump within the preset time length; if all condition signals have no state jump, it is determined that the condition signal meets the condition for port Serdes Training; if there is any condition signal that has state jump within the preset time length, it is determined that the condition signal state is unstable and does not meet the condition for port Serdes Training.

[0049] In one embodiment, when the communication link of the Serdes is determined to be in the Down state, in order to ensure the smooth progress of the subsequent port Serdes Training, the present application introduces a continuous detection mechanism to continuously monitor the state of the port of the switch for a preset time period to verify whether the condition signal state relied on for Serdes Training is stable, so as to avoid Training failure or performance decline caused by unstable signal state. In the specific implementation process, the present application will set a preset time period, for example, several seconds or several minutes, which can be adjusted according to the actual application scene and demand. Within the preset time period, the system will continuously monitor the state of a series of key condition signals, including but not limited to signal detection signal (Signal Detect), physical coding sublayer alignment lock signal (Pcs Align Lock) and gearbox lock signal (Gear Box Lock). During the continuous monitoring process, the state change of each condition signal is recorded. If all the monitored condition signals do not appear state jump within the entire preset time period, that is, their states always remain consistent and stable, it is determined that these condition signals meet the conditions for port Serdes Training, which means that the link state has been stable and the subsequent Training operation can be performed. If there is any condition signal that appears state jump within the preset time period, for example, from active state to inactive state, or from locked state to unlocked state, it is determined that the condition signal state is unstable. In this case, due to the instability of the signal state, Serdes Training may cause unpredictable results or performance problems, so the present application will determine that the current conditions do not meet the conditions for port Serdes Training.

[0050] Further, when the condition signal state is determined to be stable, the port Serdes Training is performed.

[0051] Specifically, an instruction to start Serdes Training is sent to the port of the switch through the management interface of the switch; after the port of the switch receives the instruction, the internal Serdes Training mechanism is started to realize the port Serdes Training.

[0052] In one embodiment, to perform port Serdes Training, first send a command to start Serdes Training to the port of the switch through the management interface of the switch. The management interface can be a command line interface (CLI), a simple network management protocol (SNMP) interface, or other proprietary management interface, depending on the model and configuration of the switch. The command to start Serdes Training can be a specific command or message that tells the switch port that it needs to start the internal Serdes Training mechanism now. This command can contain some parameters such as the mode of Training, duration, etc., which can be set according to actual situation. After receiving the command to start Serdes Training, the port of the switch starts the internal Serdes Training mechanism. This mechanism usually includes a series of complex algorithms and processes for automatically adjusting and optimizing the transmission parameters of the port to ensure the stability and efficiency of data transmission at high speed. The Serdes Training mechanism may involve multiple aspects of adjustment and optimization, including but not limited to clock synchronization, signal equalization, noise suppression, etc. Through these adjustments, the port can better adapt to the current transmission environment and conditions, thereby improving the quality and speed of data transmission. During the Serdes Training process, the switch port may perform multiple handshakes and negotiations with the opposite device to ensure that both sides can reach the best transmission state. This process may take some time, depending on the complexity of the link and the performance of the port.

[0053] Step 104, polling the Serdes Training state of the port through the timing task, and updating the parameters of the decision feedback equalizer DFE in Serdes according to the Serdes Training result when determining that the port is in the Serdes Training completion state.

[0054] In one embodiment of the present application, during the process of port Serdes Training, the Serdes Training state of the port is polled through the timing task, and the parameters of the decision feedback equalizer DFE in Serdes are updated according to the Serdes Training result when determining that the port is in the Serdes Training completion state.

[0055] Specifically, according to the result of Serdes Training, the optimal DFE parameter configuration is obtained; the optimal DFE parameter configuration is sent to the port of the switch through the management interface of the switch; after the port of the switch receives the optimal DFE parameter configuration, it automatically updates the internal DFE parameters.

[0056] In one embodiment, when the port is performing Serdes Training, the present application introduces a mechanism to dynamically monitor the state of Training and optimize the performance of the port according to the results of Training. The core of this mechanism is to poll the Serdes Training state of the port through a timing task, and update the decision feedback equalizer (DFE) parameters in Serdes according to the Training results. First, a timing task is started, which periodically polls the ports of the switch to check the current state of Serdes Training. The polling frequency can be set according to the actual needs to ensure that the Training state can be updated in time. During the polling process, once the port is detected to be in the Serdes Training completion state, the results of Serdes Training are further obtained. These results usually include a series of key indicators about the performance of the link, as well as the optimal DFE parameter configuration recommended based on these indicators. After obtaining the optimal DFE parameter configuration, the parameters are sent to the corresponding port through the management interface of the switch. This step ensures that the port can receive the most suitable parameter configuration according to its actual transmission environment and conditions, thereby optimizing its performance. After the port of the switch receives the optimal DFE parameter configuration, it automatically triggers its internal parameter update mechanism. This mechanism will be responsible for applying the received parameter configuration to the DFE of the port, thereby completing the parameter update process. The updated DFE parameters can better adapt to the current transmission environment, improving the signal reception quality and transmission efficiency of the port.

[0057] In one embodiment of the present application, after updating the parameters of the decision feedback equalizer DFE in Serdes according to the results of Serdes Training, the method further comprises: verifying whether the updated parameters of the decision feedback equalizer DFE in Serdes are valid; if the verification fails, rolling back to the parameters of the decision feedback equalizer DFE in Serdes before the update, and generating an alarm information to notify the administrator to handle manually.

[0058] The above is a method embodiment of the present application. Based on the same inventive concept, the present application embodiment also provides an automatic Training device for a switch port, the structure of which is shown in Figure 2

[0059] Figure 2 An internal structure diagram of an automatic Training device for a switch port provided by an embodiment of the present application. As shown in Figure 2

[0060] at least one processor 201; ​​

[0061] and a memory 202 in communication with the at least one processor;

[0062] The memory 202 stores instructions executable by the at least one processor 201, and the instructions are executed by the at least one processor 201 to enable the at least one processor 201 to:

[0063] monitor the port state of the switch in real time, and trigger the detection of the port Serdes Training state when the port state is converted from the Down state to the Up state;

[0064] If the port is not in the Serdes Training completed state or the Serdes Training incomplete state, detect whether the communication link of the Serdes is in the Down state;

[0065] When it is determined that the communication link of the Serdes is in the Down state, perform the preset duration of continuous detection on the port state of the switch to determine whether the condition signal state for performing the port Serdes Training is stable, and perform the port Serdes Training when it is determined that the condition signal state is stable;

[0066] poll the Serdes Training state of the port through the timing task, and update the parameters of the decision feedback equalizer (DFE) in the Serdes according to the Serdes Training result when it is determined that the port is in the Serdes Training completed state.

[0067] Some embodiments of the present application provide a non-volatile computer storage medium for automatic Training of a switch port corresponding to Figure 1 The non-volatile computer storage medium stores computer executable instructions, and the computer executable instructions are configured to:

[0068] monitor the port state of the switch in real time, and trigger the detection of the port Serdes Training state when the port state is converted from the Down state to the Up state;

[0069] If the port is not in the Serdes Training completed state or the Serdes Training incomplete state, detect whether the communication link of the Serdes is in the Down state;

[0070] When it is determined that the communication link of the Serdes is in the Down state, perform the preset duration of continuous detection on the port state of the switch to determine whether the condition signal state for performing the port Serdes Training is stable, and perform the port Serdes Training when it is determined that the condition signal state is stable;

[0071] The Serdes Training state of the port is polled by a timing task, and when it is determined that the port is in a Serdes Training Complete state, parameters of a decision feedback equalizer (DFE) in the Serdes are updated according to the Serdes Training result.

[0072] Each of the embodiments in the present application is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, the IoT device and medium embodiments are described simply because they are basically similar to the method embodiments, and the relevant parts can be referred to the part of the method embodiments.

[0073] The system and medium provided by the embodiments of the present application are one-to-one corresponding to the method, and therefore, the system and medium also have the similar beneficial technical effects as the method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the system and medium will not be described here.

[0074] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer-usable program code.

[0075] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device implemented in the flowcharts and / or block diagrams. Figure 1 The function of one flow or multiple flows and / or blocks Figure 1 The device that implements the function specified in one block or multiple blocks.

[0076] These computer program instructions can also be stored in a computer-readable memory that can guide the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction devices that implement the flowcharts and / or block diagrams. Figure 1one or more processes and / or blocks Figure 1 the function(s) specified in the block or blocks.

[0077] These computer program instructions can also be loaded into computer or other programmable data processing devices to cause a series of operational steps to be performed on the computer or other programmable devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable devices provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more processes and / or blocks Figure 1 the function(s) specified in the block or blocks.

[0078] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0079] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) about which the computer stores information about the operating environment. This memory can also include non-volatile memory, such as read only memory (ROM), EPROM, EEPROM, or flash memory, about which the computer stores information, such as firmware for graphics processing. Examples of computer-readable media include but are not limited to phase-change RAM, SRAM, DRAM, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROMs, digital versatile discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store information that can be accessed by computing device, alone or in combination with other computer-readable media. In some embodiments, computer-readable media can include transitory media, such as modulated data signals and carrier waves.

[0080] Computer-readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile discs (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store information that can be accessed by computing device. According to the definition herein, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.

[0081] It should also be noted that the terms "comprising", "including", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not include only those elements recited, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without further limitation, an element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0082] The above merely provides an example of the present application, but is not intended to limit the present application. The present application can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.

Claims

1. An automatic training method for switch ports, characterized in that, The method includes: Monitor the port status of the switch in real time, and trigger port Serdes Training status detection when the port status changes from Down to Up. If the port is not in the Serdes Training Complete state or the Serdes Training Incomplete state, check if the Serdes communication link is in the Down state; When the communication link of the Serdes is determined to be in the Down state, the port status of the switch is continuously probed for a preset duration to determine whether the condition signal status for port Serdes Training is stable, and port Serdes Training is performed when the condition signal status is determined to be stable. The Serdes Training status of the port is polled by a timed task, and when the port is determined to be in the Serdes Training completed state, the parameters of the decision feedback equalizer (DFE) in Serdes are updated according to the Serdes Training results.

2. The automatic training method for switch ports according to claim 1, characterized in that, The method further includes: If the port is in the Serdes Training completed state or the Serdes Training incomplete state, start a timed task to poll the port's Serdes Training status, and when it is determined that the port is in the Serdes Training completed state, update the parameters of the decision feedback equalizer (DFE) in Serdes according to the Serdes Training results.

3. The automatic training method for switch ports according to claim 1, characterized in that, The method further includes: When it is determined that the communication link of the Serdes is not in the Down state, the presence of a communication signal in the communication link of the Serdes is detected. When it is determined that there is no communication signal in the communication link of the Serdes, the communication link of the Serdes is directly switched to the Down state; When it is determined that a communication signal exists in the communication link of the Serdes, a remote fault signal is continuously sent to the Serdes to force the communication link of the Serdes to switch to the Down state.

4. The automatic training method for switch ports according to claim 3, characterized in that, After the communication link of the Serdes is forcibly switched to the Down state, the method further includes: The system checks whether the conditions of the condition signals have been met by the port Serdes Training; wherein the condition signals include: Signal Detect, Pcs Align Lock, and Gear Box Lock. Once it is determined that all signals meet the conditions for port Serdes Training, stop sending remote fault signals to the Serdes.

5. The automatic training method for switch ports according to claim 4, characterized in that, Continuous probing of the port status of the switch for a preset duration is performed to determine whether the condition signal status is stable, specifically including: Within the preset time period, the state of the condition signal is continuously monitored, and it is determined whether the condition signal has not undergone a state transition within the preset time period. If no state transition occurs in any of the condition signals, then the condition signals are determined to meet the conditions for port SerdesTraining. If any condition signal undergoes a state transition within a preset time period, it is determined that the condition signal is unstable and does not meet the conditions for port Serdes Training.

6. The automatic training method for switch ports according to claim 1, characterized in that, Port SerDes Training includes: Send the command to start Serdes Training to the switch port through the switch's management interface; After receiving the instruction at the port of the switch, the internal Serdes Training mechanism is activated to implement port Serdes Training.

7. The automatic training method for switch ports according to claim 1, characterized in that, The parameters of the decision feedback equalizer (DFE) in Serdes are updated based on the Serdes Training results, specifically including: Based on the results of Serdes Training, obtain the optimal DFE parameter configuration; The optimal DFE parameter configuration is sent to the switch ports through the switch's management interface. Once the switch port receives the optimal DFE parameter configuration, it automatically updates its internal DFE parameters.

8. The automatic training method for switch ports according to claim 1, characterized in that, After updating the parameters of the decision feedback equalizer (DFE) in Serdes based on the Serdes Training results, the method further includes: Verify that the parameters of the decision feedback equalizer (DFE) in the updated Serdes are valid; If verification fails, the parameters of the decision feedback equalizer DFE in the Serdes before the update will be rolled back, and an alarm message will be generated to notify the administrator to handle it manually.

9. An automatic training device for switch ports, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: Monitor the port status of the switch in real time, and trigger port Serdes Training status detection when the port status changes from Down to Up. If the port is not in the Serdes Training Complete state or the Serdes Training Incomplete state, check if the Serdes communication link is in the Down state; When the communication link of the Serdes is determined to be in the Down state, the port status of the switch is continuously probed for a preset duration to determine whether the condition signal status for port Serdes Training is stable, and port Serdes Training is performed when the condition signal status is determined to be stable. The Serdes Training status of the port is polled by a timed task, and when the port is determined to be in the Serdes Training completed state, the parameters of the decision feedback equalizer (DFE) in Serdes are updated according to the Serdes Training results.

10. A non-volatile computer storage medium for automatic training of switch ports, storing computer-executable instructions, characterized in that, The computer-executable instructions are set as follows: Monitor the port status of the switch in real time, and trigger port Serdes Training status detection when the port status changes from Down to Up. If the port is not in the Serdes Training Complete state or the Serdes Training Incomplete state, check if the Serdes communication link is in the Down state; When the communication link of the Serdes is determined to be in the Down state, the port status of the switch is continuously probed for a preset duration to determine whether the condition signal status for port Serdes Training is stable, and port Serdes Training is performed when the condition signal status is determined to be stable. The Serdes Training status of the port is polled by a timed task, and when the port is determined to be in the Serdes Training completed state, the parameters of the decision feedback equalizer (DFE) in Serdes are updated according to the Serdes Training results.

Citation Information

Patent Citations

  • Port training method and device

    CN106375110A

  • Port configuration method and device

    CN107547265A