Link state detection method of physical port and related device
By obtaining the local and remote physical layer states of the FlexE physical port, and combining the state of the FlexE Shim layer, the link state of the FlexE physical port is determined, which solves the problem of unreliable panel port fault detection in the prior art, and improves the reliability and user experience of link state detection.
Patent Information
- Application Number
- CN202411682440.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-11
AI Technical Summary
The fault detection mechanism of the panel port in the existing FlexE technology is unreliable, resulting in unstable linkup status and inability to ensure network connectivity and service quality. Especially in latency-sensitive application scenarios, it may lead to packet loss or retransmission, affecting the user experience.
By obtaining the local and remote physical layer states of the FlexE physical port, combining the state of the FlexE Shim layer, the link state of the target physical port is determined to ensure the reliability of link state judgment.
It improves the reliability of link status detection of FlexE physical ports, shortens the linkup time difference between the devices on both ends, improves the user experience, and enhances the robustness of the entire system.
Smart Images

Figure CN119603191A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a link status detection method for a physical port and a related device. Background Art
[0002] The birth of FlexE (Flexible Ethernet) technology stems from the extremely high requirements for network bandwidth and flexibility in emerging application scenarios such as the fifth-generation mobile communication network and data center interconnection. With the surge in data traffic, traditional Ethernet technology has gradually shown its limitations in meeting the requirements of high speed, low latency and high-precision synchronization. Figure 1 As shown in the figure, FlexE technology introduces the FlexE Shim layer between the MAC (Medium Access Control) layer and the PHY (Physical Layer Device) layer to achieve flexible allocation and management of interface resources, breaking the fixed binding between the MAC layer and the PHY layer in traditional Ethernet, providing the network with unprecedented bandwidth flexibility and network slicing capabilities, and meeting diverse business needs.
[0003] The emergence of FlexE technology not only solves the rigidity of bandwidth allocation in traditional Ethernet, but also realizes on-demand allocation of bandwidth resources by introducing time slot technology, greatly improving the utilization efficiency of network resources. In addition, FlexE's network slicing capability makes it possible to build multiple isolated logical networks on the same physical network, and each network can be configured with independent resources and service quality according to specific business requirements. FlexE technology also has the advantage of high-precision synchronization. With the help of negotiation and interaction between FlexE devices, the real-time performance of bandwidth switching can be greatly improved, which is crucial for scenarios with extremely high requirements for time synchronization, such as financial transactions and industrial automation.
[0004] When discussing FlexE technology, we need to first understand the concepts of physical ports and virtual ports. A physical port, also known as a panel port, represents the actual physical connection point on a device and is connected to other devices through optical fiber or cable. The PHY in the following text refers to a physical port. A virtual port refers to a logical port created in a network device. It is not a panel port on a device, but exists in the device in a software-defined manner. In the FlexE architecture, a virtual port is called a FlexEClient, which allows multiple independent logical channels to be divided on a physical link. Each channel has its own MAC layer and physical layer resources and can independently carry data streams.
[0005] like Figure 2As shown in the figure, the FlexE shim layer serves as a transit station between the PHY layer and the MAC layer. It can integrate multiple PHYs and then divide them into multiple logical channels. For example, two 50G physical ports can be integrated to divide them into four virtual ports with bandwidths of 70G, 20G, 5G, and 5G respectively.
[0006] The fault detection mechanism of the panel port in the current FlexE technology is to determine whether the link status of the panel port is up or down based on whether the local physical layer is in the up state. This method makes the link linkup state unreliable, cannot ensure network connectivity and service quality, and causes the linkup time at both ends of the link to be out of sync. Especially in delay-sensitive application scenarios, this delay may cause data packet loss or retransmission, affecting user experience. Summary of the invention
[0007] The embodiments of the present application provide a link status detection method and related device for a physical port, which can more accurately determine the link status of a FlexE physical port, improve the reliability of the obtained link status of the FlexE physical port, and effectively shorten the linkup time difference between the devices at both ends, thereby improving the user experience.
[0008] The embodiments of the present application can be implemented as follows:
[0009] In a first aspect, an embodiment of the present application provides a link status detection method for a physical port, where the physical port is a FlexE physical port, and the method includes:
[0010] Obtaining the physical layer status of the local end corresponding to the target physical port, wherein the physical layer status is used to indicate whether the physical layer can receive signals normally;
[0011] Obtain the remote physical layer status corresponding to the target physical port;
[0012] The link state of the target physical port is determined according to the local physical layer state and the remote physical layer state, wherein the link state is up or down.
[0013] In a second aspect, an embodiment of the present application provides a link status detection device for a physical port, wherein the physical port is a FlexE physical port, and the device includes:
[0014] A status acquisition module is used to obtain the physical layer status of the local end corresponding to the target physical port, wherein the physical layer status is used to indicate whether the physical layer can receive signals normally;
[0015] The state acquisition module is also used to obtain the remote physical layer state corresponding to the target physical port;
[0016] A determination module is used to determine the link state of the target physical port according to the local physical layer state and the remote physical layer state, wherein the link state is up or down.
[0017] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the link status detection method of the physical port described in the aforementioned embodiment.
[0018] In a fourth aspect, an embodiment of the present application provides a readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the link status detection method of a physical port as described in the aforementioned embodiment is implemented.
[0019] The link status detection method and related device of the physical port provided in the embodiment of the present application are used to detect the link status of the FlexE physical port. During the detection, the local physical layer status and the remote physical layer status corresponding to the target physical port are obtained, and then the link status of the target physical port is determined according to the above local physical layer status and the remote physical layer status. Among them, the physical layer status is used to indicate whether the physical layer can receive normal signals, and the link status is up or down. In the above method, when determining the link status of the FlexE physical port, not only the local end but also the opposite end is considered, so that the link status of the FlexE panel port can be determined more accurately, thereby enhancing the reliability of the physical port, and indirectly providing protection for the FlexE virtual port, enhancing the robustness of the entire system, and can effectively shorten the linkup time difference of the devices at both ends, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 Schematic diagram of the location of the FlexE shim layer;
[0022] Figure 2 Schematic diagram of dividing physical ports into virtual ports for FlexE;
[0023] Figure 3 A block diagram of an electronic device provided in an embodiment of the present application;
[0024] Figure 4One of the flow charts of the link status detection method of the physical port provided in the embodiment of the present application;
[0025] Figure 5 This is a schematic diagram of the FlexE overhead frame format;
[0026] Figure 6 A second flow chart of a link status detection method for a physical port provided in an embodiment of the present application;
[0027] Figure 7 This is a schematic diagram of the connection between two devices;
[0028] Figure 8 A third flowchart of a link status detection method for a physical port provided in an embodiment of the present application;
[0029] Fig. 9 A schematic diagram of a link status detection process of a physical port provided in an embodiment of the present application;
[0030] Fig.10 One of the block diagrams of the link status detection device of the physical port provided in the embodiment of the present application;
[0031] Fig.11 The second block diagram of the link status detection device of the physical port provided in the embodiment of the present application.
[0032] Icons: 100 - electronic device; 110 - memory; 120 - processor; 130 - communication unit; 200 - link status detection device of physical port; 201 - detection module; 210 - status acquisition module; 220 - determination module. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0034] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0035] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0036] The following first introduces the mechanism for determining the link status of traditional Ethernet, the link mechanism of FlexE's existing virtual port (i.e., FlexE virtual port), and the link mechanism and defects of FlexE's existing panel port (i.e., FlexE physical port, also called FlexE physical port).
[0037] In traditional Ethernet technology, the MAC layer is responsible for detecting remote PHY faults. The establishment of a communication link is a two-way process. The link up of the physical port not only depends on the local physical layer being in the up state, but also requires that no remote PHY faults are detected. This state indicates that the local and remote physical layer components are working normally, and the physical port has established a stable physical connection. Once a signal loss is detected (signal loss determines that the local physical layer is down) or a remote fault is detected, the device will set the link state of the physical port to "down" and trigger the corresponding fault recovery measures to ensure network connectivity and service quality.
[0038] In the FlexE architecture, each virtual port is equivalent to an independent Ethernet interface with its own set of MAC layer functions and a link establishment and fault detection mechanism similar to that of traditional Ethernet. That is, the link up of the virtual port is determined when the local physical layer is up and no remote PHY fault is detected. Each virtual port can independently perform link status check, fault isolation and recovery, ensuring service continuity and network reliability.
[0039] However, compared with FlexE virtual ports, FlexE physical ports (panel ports) are insufficient in fault detection. In the FlexE architecture, MACs are not assigned to FlexE panel ports. Therefore, FlexE panel ports do not have a mechanism for detecting remote faults like Ethernet ports.
[0040] The existing technology focuses on the link status of the FlexE virtual port, but lacks the panel port. The method for determining the link status of the FlexE panel port is limited to the physical layer up on the local side. As a result, the determined link status of the FlexE physical port is unreliable and cannot ensure the connectivity and service quality of the network; and, because the FlexE panel port does not have a MAC layer mechanism to detect remote faults to assist in link establishment, during the link establishment process, the device is often ready and the link status is set to "up" without considering the status of the other end, resulting in the linkup time of both ends being out of sync, especially in delay-sensitive application scenarios. This delay may cause data packet loss or retransmission, affecting the user experience. Linkup means that the link is in an active state and is ready to send and receive data packets; linkdown means that the link is not in an active state and is not ready to send and receive data packets.
[0041] In view of the fact that the existing technology cannot effectively handle the link status of the FlexE panel port, the embodiment of the present application provides a link status detection method and related devices for a physical port. When determining the link status of the FlexE physical port, not only the local end but also the opposite end is considered. In this way, the link status of the FlexE panel port can be determined more accurately, thereby enhancing the reliability of the physical port, and indirectly providing protection for the FlexE virtual port, enhancing the robustness of the entire system, and effectively shortening the linkup time difference of the devices at both ends, thereby improving the user experience. It is worth noting that the defects existing in the above schemes are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the embodiments of the present application for the above problems below should be the contributions made by the inventor to the present application during the application process.
[0042] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0043] Please refer to Figure 3 , Figure 3 A block diagram of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 may be, but is not limited to, a switch, etc. The electronic device 100 includes a memory 110, a processor 120, and a communication unit 130. The memory 110, the processor 120, and the communication unit 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses or signal lines.
[0044] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0045] The processor 120 is used to read / write data or programs stored in the memory 110 and execute corresponding functions. For example, the memory 110 stores a link state detection device 200 for a physical port, and the link state detection device 200 for a physical port includes at least one software function module that can be stored in the memory 110 in the form of software or firmware. The processor 120 executes various functional applications and data processing by running software programs and modules stored in the memory 110, such as the link state detection device 200 for a physical port in the embodiment of the present application, that is, implementing the link state detection method for a physical port in the embodiment of the present application.
[0046] The communication unit 130 is used to establish a communication connection between the electronic device 100 and other communication terminals through a network, and to send and receive data through the network.
[0047] It should be understood that Figure 3 The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown. It is worth noting that Figure 3 The components shown can be implemented by hardware, software or a combination thereof. That is, the implementation of the processing flow in the above embodiments is not limited to the processor reading and running pure computer-readable program code from the memory, but can also be implemented by hardware or logic devices.
[0048] It should be understood here that improvements to a technology can be divided into hardware improvements (for example, improvements to circuit structures such as diodes, transistors, switches, etc.) and software improvements (improvements to method flows). However, with the development of technology, many improvements to method flows today can be regarded as direct improvements to hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement to a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and make a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. Among them, VHDL (Very High Speed Integrated Circuit Hardware Description Language) and Verilog are currently the most commonly used. Those skilled in the art should also be aware that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0049] Please refer to Figure 4 , Figure 4One of the flow diagrams of the link status detection method of the physical port provided in the embodiment of the present application. The method can be applied to the above-mentioned electronic device, and the electronic device includes a FlexE physical port. The above method can be applied to Ethernet environments with high requirements for real-time data transmission, such as data center networks, industrial networks, etc. The specific process of the link status detection method of the physical port is described in detail below. In this embodiment, the method may include step S110, step S130 to step S140.
[0050] Step S110, obtaining the local physical layer state corresponding to the target physical port.
[0051] Step S130, obtaining the remote physical layer status corresponding to the target physical port.
[0052] Step S140: determining the link status of the target physical port according to the local physical layer status and the remote physical layer status.
[0053] A device may include multiple FlexE physical ports (i.e., FlexE physical ports). Each physical port corresponds to a local physical layer state. The physical layer state is used to indicate whether the physical layer can receive signals normally. Each FlexE physical port included in the electronic device can be used as a target physical port, and then the link state is detected for each target physical port; or some of the FlexE physical ports included in the electronic device can be used as a target physical port, and then the link state is detected for each target physical port. The target physical port can be determined in combination with actual needs, and is not specifically limited here.
[0054] The local end is used to indicate the device where the target physical port is located, and the remote end (also called the opposite end) is used to indicate the device where another physical port connected to the target physical port is located. The local end physical layer status is used to indicate whether the local end physical layer can receive signals normally; the remote end physical layer status is used to indicate whether the remote end physical layer can receive signals normally. The local end physical layer status and the remote end physical layer status corresponding to the target physical port can be obtained in any way, which is not specifically limited here.
[0055] As a possible implementation method, the local pcs_link state corresponding to the target physical port can be obtained to obtain the local physical layer state. PCS (Physical Coding Sublayer) is a sublayer of the physical layer. Its Link Up state indicates that this part of the physical layer has been successfully initialized and is ready for data transmission. It is an important milestone in link establishment, and the upper layers need to be prepared before the entire network can complete the link establishment. If link down, it means that the link has no signal or has been disconnected. The local pcs_link state corresponding to the target physical port can be used as the local physical layer state. That is, if the local pcs_link state corresponding to the target physical port is 1, the local physical layer state is that the local physical layer can receive signals normally; if the local pcs_link state corresponding to the target physical port is 0, the local physical layer state is that the local physical layer cannot receive signals normally.
[0056] As a possible implementation, rpf information may be obtained from a received overhead frame, and the Shim layer state may be determined according to the rpf information. An overhead frame is a FlexE control code block.
[0057] In FlexE technology, RPF (Remote Phy Fault) is a specific alarm mechanism designed to report remote physical layer faults. If a fault is detected on the remote PHY, such as the ohlock loss of the remote PHY, RPF will be sent to the local FlexE shim layer through an overhead frame to inform the remote PHY that the status is faulty. That is, RPF is used to indicate a fault in the opposite physical layer. When the local end detects a fault in the opposite physical layer, the RPF status is 1.
[0058] RPF is transmitted through overhead frames. The basic principle of overhead frames is explained below.
[0059] The sending and receiving of FlexE control information is achieved by inserting FlexE overhead blocks into the data stream. When FlexE devices are connected, the FlexE Shim layer will divide the complete overhead frame into multiple parts according to a predetermined period, insert them into the data stream, and send them to the other end so that the receiving end can obtain link status information regularly. The FlexE overhead frame consists of 66b of data. Its data format is different from the user's data message and can be identified. 8 consecutive overhead blocks constitute a FlexE overhead frame, such as Figure 5 As shown in the figure, it carries the latest information about the link status and is an important information carrier for establishing a link between two devices.
[0060] There is a lot of information in the overhead frame. In this embodiment, only the bit occupied by RPF is needed. If RPF is 0, it means that the remote PHY is working normally. If it is 1, it means that the remote PHY is abnormal. In this way, the state of the remote physical layer can be determined according to the RPF signal in the overhead frame corresponding to the target physical port.
[0061] Optionally, when obtaining the local physical layer status and remote physical layer status corresponding to the target physical port, if the local physical layer status and remote physical layer status both indicate that the physical layer can receive signals normally, then it can be determined that the link status of the target physical port is up, that is, the link is working normally; if the local physical layer status and remote physical layer status do not both indicate that the physical layer can receive signals normally, then it can be determined that the link status of the target physical port is down, that is, the link is faulty. The link status of the target physical port can also be determined in combination with other information.
[0062] Please refer to Figure 6 , Figure 6 The second flowchart of the link status detection method of the physical port provided in the embodiment of the present application. In this embodiment, before step S140, the method may further include step S130. Among them, steps S110 to S130 may be executed in parallel or in sequence. The specific execution order may be determined in combination with actual needs and is not specifically limited here.
[0063] Step S130: Obtain the Shim layer status of the local FlexE Shim layer corresponding to the target physical port.
[0064] In this embodiment, each physical port also corresponds to a Shim layer state. The Shim layer state of the local FlexE Shim layer corresponding to the target physical port can be obtained in any manner. The Shim layer state of the local FlexE Shim layer is used to indicate whether the local FlexE Shim layer can work normally.
[0065] As a possible implementation, the Shim layer state can be determined according to the local ohlock state corresponding to the target physical port. The local ohlock (Overhead locking) state indicates whether the local end can correctly decode and process the overhead frame sent by the sender. The local ohlock state can be used as the Shim layer state.
[0066] In FlexE technology, there is an overhead locking mechanism, which is a function of FlexE to ensure that data can be correctly organized and identified when transmitted on the network. The sender periodically sends overhead frames. As a locking mechanism, ohlock can ensure that the receiver correctly decodes and processes the sender's overhead frames. When the receiver correctly locks to the overhead frame, the ohlock state is 1, indicating that the receiver can receive FlexE data in an orderly and reliable manner. Otherwise, it cannot be decoded correctly.
[0067] When the local physical layer state, remote physical layer state and Shim layer state corresponding to the target physical port are obtained, the link state of the target physical port can be determined to be up or down according to the local physical layer state, remote physical layer state and Shim layer state. It can be understood that the local physical layer state, remote physical layer state and Shim layer state are all current states.
[0068] In this embodiment, when the local physical layer status indicates that the signal can be received normally, the remote physical layer status indicates that the signal can be received normally, and the Shim layer status indicates that the FlexE Shim layer can work normally, it can be determined that the link state of the target physical port is up, that is, the link is normal. When the local physical layer status indicates that the signal cannot be received normally, or the remote physical layer status indicates that the signal cannot be received normally, or the Shim layer status indicates that the FlexE Shim layer cannot work normally, it is determined that the link state of the target physical port is down, that is, there is a problem with the link.
[0069] That is, in this embodiment, the state of the physical port is set to linkup only when pcs and ohlock on the local end are 1 and rpfbit in the received overhead frame is 0. If this condition is not met, the state of the physical port is set to linkdown.
[0070] like Figure 7 As shown, two FlexE devices are connected through cables. In this embodiment, for the FlexE physical port, only the PHY layer and the FlexE shim layer need to be concerned, and the MAC layer mainly serves the virtual port. When the pcs_link of the PHY layer is 1, it means that the PHY layer is already in a state where it can receive signals normally; when ohlock is 1, it means that the FlexEshim layer can already work normally; when the RPF in the overhead frame sent by the other end is 0, it means that there is no fault in the other end. At this time, it can be considered that the FlexE physical port can work normally; otherwise, it is considered that the FlexE physical port cannot work normally.
[0071] Optionally, the relevant status may be obtained periodically to determine the link status of the target physical port, or the relevant status may be obtained continuously to determine the link status of the target physical port. The specific implementation may be determined in combination with actual needs.
[0072] Please refer to Figure 8 , Figure 8 The third flowchart of the link status detection method of the physical port provided in the embodiment of the present application is as follows. In the present embodiment, before sub-step S110, the method may further include steps S101 to S102.
[0073] Step S101, detecting whether a target change event occurs.
[0074] If it is determined that the target change event occurs, step S102 is executed.
[0075] Step S102: The FlexE physical port corresponding to the target change event is used as the target physical port.
[0076] In this embodiment, it is possible to detect whether a target change event occurs in the electronic device. Optionally, detection may be performed continuously or periodically, etc., which may be determined in combination with actual needs. In the case where the link state is determined only according to the local physical layer state and the remote physical layer state, the target change event is a change in the local physical layer state corresponding to the FlexE physical port, or a change in the corresponding remote physical layer state, that is, if a change in the local physical layer state corresponding to the FlexE physical port, or a change in the corresponding remote physical layer state, is detected, it is determined that a target change event is detected. In the case where the link state is determined according to the local physical layer state, the remote physical layer state and the Shim layer state, the target change event is a change in the local physical layer state corresponding to the FlexE physical port, or a change in the corresponding remote physical layer state, or a change in the corresponding Shim layer state, that is, if a change in the local physical layer state corresponding to the FlexE physical port, or a change in the corresponding remote physical layer state, or a change in the local Shim layer state, is detected, it is determined that a target change event is detected.
[0077] When no target change event is detected, detection can continue. If a target change event is detected, the FlexE physical port corresponding to the detected target change event can be used as the target physical port. It can be understood that if only one target change event is detected, the FlexE physical port corresponding to the target change event is used as a target physical port, and then the link status monitoring is performed on the target physical port; if multiple target change events are detected, when multiple target change events correspond to one FlexE physical port respectively, the FlexE physical ports corresponding to the multiple target change events are respectively used as a target physical port, and then the link status monitoring is performed on the determined multiple target physical ports respectively.
[0078] Optionally, after the target physical port is determined, steps S110 to S140 may be directly executed to determine the link status of the target physical port.
[0079] Alternatively, when it is determined that the target change event occurs, an interrupt signal may be sent to the interrupt controller. After receiving the interrupt signal, the interrupt controller may send interrupt information to the CPU (Centre processing Unit, central processing unit), and the interrupt information may include the port identifier of the target physical port and the specific target change event, etc., wherein the specific target change event is used to indicate whose state has changed from what to what, for example, the pcs state of the FlexE physical port changes from 1 to 0. The CPU can obtain the state of the relevant layer as described above and then determine the link state of the target physical port.
[0080] Optionally, with the assistance of ASIC (Application Specific Integrated Circuit), the MAC layer, FlexE shim layer and PHY layer can all be located in the ASIC. When the ASIC (chip) detects an event that requires the attention of the CPU (i.e., a target change event), that is, it detects a change in the PCS state of the FlexE physical port, a change in the OHLOCK state, or a change in the RPF in the received overhead frame, a signal can be sent to the interrupt controller of the processor through one or more physical pins. This signal is usually a level change (high or low) or an edge trigger (rising or falling edge). The interrupt controller receives an interrupt signal from an external device and sets the corresponding interrupt flag (i.e., set to 1), indicating that an interrupt is pending. The interrupt controller provides the interrupt information (which may include the port ID corresponding to the interrupt and the specific event detected, etc.) to the CPU; the CPU responds to the interrupt request, saves the current context, and then starts interrupt processing.
[0081] When the CPU receives an interrupt message, it performs necessary processing, which may include reading device status, data transfer, updating buffers, etc. After the interrupt processing is completed, it usually clears the interrupt flag to tell the interrupt controller that the interrupt has been processed.
[0082] In this embodiment, the CPU processes the interrupt as follows: regardless of whether it is an interruption caused by a change in the pcs state of the local FlexE physical port, an interruption caused by a change in the ohlock state, or an interruption caused by a change in the RPF in the received overhead frame, the current pcs, ohlock, and rpf states are re-read. Only when a certain interrupt is triggered and the pcs up, ohlock, and rpf read at the moment are simultaneously 1, can the physical port be determined to be linkup, otherwise, the physical port is determined to be linkdown. After the interrupt processing is completed, the CPU returns to the state before the interruption and continues to execute the main program.
[0083] That is, in this embodiment, with the assistance of ASIC, when the pcs status, ohlock status, and RPF in the received overhead frame of the local FlexE physical port change, the chip triggers an interrupt and reports to the CPU for judgment; only when the pcs and ohlock of the local end are 1 and the rpf bit in the received overhead frame is 0, the state of the physical port is set to linkup, and when this condition is not met, the state of the physical port is set to linkdown.
[0084] In this embodiment, when the link status of the target physical port is obtained, the link status of the target physical port can also be reported to the gateway system, which helps to respond to fault information immediately and improve network reliability.
[0085] Combine the following Fig. 9 An example is given to illustrate the link status detection method of a physical port.
[0086] P1: When the ASIC detects a link signal change, it reports it to the interrupt processor; after being processed by the interrupt processor, it reports it to the CPU.
[0087] J1: Link status judgment mechanism: The CPU reads the values of pcs, ohlock, and RPF once. Only when pcs up, ohlock is 1, and rpf is 0 at the same time, can the physical port be judged as linkup. Otherwise, the physical port is judged as linkdown.
[0088] P2: The link status is determined to be up.
[0089] P3: The link status is determined to be down.
[0090] P4: Send the link status to the network management system for processing by the user. Finally, after the interrupt processing is completed, the CPU returns to the state before the interrupt and continues to execute the main program.
[0091] In this embodiment, the RPF in the overhead frame received by the FlexE shim layer is introduced to indicate the fault condition of the remote PHY, and the local physical layer up, the FlexE shim layer up, and the absence of remote PHY faults are used as the linkup conditions of the FlexE physical port to ensure that the local and remote physical layer components are working normally. Through the above method, the link status of the FlexE panel port can be determined more accurately. This design not only enhances the reliability of the physical port, but also indirectly provides protection for the FlexE virtual port and enhances the robustness of the entire system. In addition, since the link status of the physical port in the above method needs to consider not only the local end but also the opposite end, the linkup time difference of the devices at both ends can be effectively shortened, thereby improving the user experience. The above method is a method for optimizing the establishment of FlexE links, which can provide support for network operation and maintenance.
[0092] In order to execute the corresponding steps in the above embodiments and various possible methods, an implementation method of a link status detection device 200 for a physical port is provided below. Optionally, the link status detection device 200 for a physical port can adopt the above Figure 3 The device structure of the electronic device 100 is shown. Fig.10 , Fig.10 One of the block diagrams of the link state detection device 200 for the physical port provided in the embodiment of the present application. It should be noted that the basic principle and technical effect of the link state detection device 200 for the physical port provided in this embodiment are the same as those in the above-mentioned embodiment. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above-mentioned embodiment. In this embodiment, the physical port is a FlexE physical port, and the link state detection device 200 for the physical port may include: a state acquisition module 210 and a determination module 220.
[0093] The state acquisition module 210 is used to obtain the physical layer state of the local end corresponding to the target physical port, wherein the physical layer state is used to indicate whether the physical layer can receive signals normally.
[0094] The state acquisition module 210 is further used to obtain the remote physical layer state corresponding to the target physical port.
[0095] The determination module 220 is used to determine the link status of the target physical port according to the local physical layer status and the remote physical layer status, wherein the link status is up or down.
[0096] Please refer to Fig.11 , Fig.11 The second block diagram of the link status detection device 200 for a physical port provided in the embodiment of the present application. In this embodiment, the link status detection device 200 for a physical port may further include a detection module 201 .
[0097] The detection module 201 is used to: detect whether a target change event occurs. The target change event is a change in the local physical layer state corresponding to the FlexE physical port, or a change in the corresponding remote physical layer state, or a change in the corresponding Shim layer state; when it is determined that the target change event occurs, the FlexE physical port corresponding to the target change event is used as the target physical port.
[0098] In this embodiment, the determination module 220 is further configured to send the link status of the target physical port to a network management system.
[0099] Optionally, the above modules can be stored in the form of software or firmware. Figure 3 The memory 110 shown in the figure may be fixed in the operating system (OS) of the electronic device 100 and may be Figure 1 Meanwhile, the data and program codes required for executing the above modules may be stored in the memory 110.
[0100] An embodiment of the present application further provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the link status detection method of the physical port is implemented.
[0101] In summary, the embodiments of the present application provide a link status detection method and related devices for a physical port, which are used to detect the link status of a FlexE physical port. During the detection, the local physical layer status and the remote physical layer status corresponding to the target physical port are obtained, and then the link status of the target physical port is determined according to the above local physical layer status and the remote physical layer status. Among them, the physical layer status is used to indicate whether the physical layer can receive normal signals, and the link status is up or down. In the above method, when determining the link status of the FlexE physical port, not only the local end but also the opposite end is considered, so that the link status of the FlexE panel port can be determined more accurately, thereby enhancing the reliability of the physical port, and indirectly providing protection for the FlexE virtual port, enhancing the robustness of the entire system, and effectively shortening the linkup time difference of the devices at both ends, thereby improving the user experience.
[0102] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0104] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0105] The above description is only an optional embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for detecting the link status of a physical port, characterized in that: The physical port is a FlexE physical port, and the method includes: Obtaining the physical layer status of the local end corresponding to the target physical port, wherein the physical layer status is used to indicate whether the physical layer can receive signals normally; Obtain the remote physical layer status corresponding to the target physical port; The link state of the target physical port is determined according to the local physical layer state and the remote physical layer state, wherein the link state is up or down.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining a Shim layer status of a local FlexE Shim layer corresponding to the target physical port, wherein the Shim layer status is used to indicate whether the FlexE Shim layer can work normally; The determining the link state of the target physical port according to the local physical layer state and the remote physical layer state includes: The link state of the target physical port is determined according to the local physical layer state, the remote physical layer state and the Shim layer state.
3. The method according to claim 2, characterized in that The determining the link state of the target physical port according to the local physical layer state, the remote physical layer state and the Shim layer state includes: When the local physical layer status indicates that a signal can be received normally, the remote physical layer status indicates that a signal can be received normally, and the Shim layer status indicates that the FlexE Shim layer can work normally, determining that the link status of the target physical port is up; When the local physical layer status indicates that the signal cannot be received normally, or the remote physical layer status indicates that the signal cannot be received normally, or the Shim layer status indicates that the FlexE Shim layer cannot work normally, it is determined that the link status of the target physical port is down.
4. The method according to claim 2, characterized in that: The obtaining of the local physical layer state corresponding to the target physical port includes: Obtain the local end pcs_link state corresponding to the target physical port to obtain the local end physical layer state; The obtaining of the remote physical layer status corresponding to the target physical port includes: Obtaining rpf information from the received overhead frame, and determining the remote physical layer state according to the rpf information; The obtaining the Shim layer status of the local FlexE Shim layer corresponding to the target physical port includes: The Shim layer state is determined according to the local ohlock state corresponding to the target physical port, wherein the local ohlock state indicates whether the local end can correctly decode and process the overhead frame sent by the sending end.
5. The method according to any one of claims 2 to 4, characterized in that: The method further comprises: Detect whether a target change event occurs, wherein the target change event is a change in the local physical layer state corresponding to the FlexE physical port, or a change in the corresponding remote physical layer state, or a change in the corresponding Shim layer state; If it is determined that the target change event occurs, the FlexE physical port corresponding to the target change event is used as the target physical port, and the step of obtaining the local physical layer state corresponding to the target physical port is performed.
6. The method according to claim 5, characterized in that The method further comprises: When it is determined that the target change event occurs, an interrupt signal is sent to the interrupt controller, so that the CPU executes the step of obtaining the local physical layer state corresponding to the target physical port after receiving the interrupt information sent by the interrupt controller based on the interrupt signal.
7. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The link status of the target physical port is sent to the network management system.
8. A link status detection device for a physical port, characterized in that: The physical port is a FlexE physical port, and the device includes: A status acquisition module is used to obtain the physical layer status of the local end corresponding to the target physical port, wherein the physical layer status is used to indicate whether the physical layer can receive signals normally; The state acquisition module is also used to obtain the remote physical layer state corresponding to the target physical port; A determination module is used to determine the link state of the target physical port according to the local physical layer state and the remote physical layer state, wherein the link state is up or down.
9. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the link status detection method of a physical port according to any one of claims 1 to 7.
10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the link status detection method of a physical port according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Flexible ethernet operations, administration, and maintenance systems and methods
US20170005901A1
Flexible ethernet time slot resource configuration method, terminal, and storage medium
WO2023061134A1