A port self-negotiation method based on an FEC mode, an electronic device, and a storage medium

CN116980079BActive Publication Date: 2026-08-11SUZHOU CENTEC COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-07
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

在使用该端口Speed和FEC模式时出现异常,导致通信异常

Benefits of technology

[0042]本申请通过确定接收端的第一端口组信息和发送端的第二端口组信息,基于仲裁规定从第一端口组信息和第二端口组信息中确定第三端口组信息,其中,第三端口组信息为第一端口组信息和第二端口组信息的共有端口组信息,第三端口组信息包括至少一个第一端口和各第一端口对应的各FEC模式,从第三端口组信息中确定目标端口,在接收端和发送端完成FEC_SEL交互后,确定目标端口对应的各目标FEC模式,将各目标FEC模式进行排序,得到目标排序,按照目标排序的顺序,遍历各目标FEC模式,从各目标FEC模式中获取满足链路训练条件、稳定连接条件以及传输条件的最优FEC模式。当端口拥有多种FEC能力时,通过端口自协商能选出链路质量最优的FEC模式,而不是按照现有流程只能协商出固定的FEC模式,从而提高通信质量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116980079B_ABST
    Figure CN116980079B_ABST
Patent Text Reader

Abstract

This application provides a port auto-negotiation method, electronic device, and storage medium based on FEC mode, relating to the field of communications. The method includes: determining first port group information of a receiving end and second port group information of a transmitting end; determining third port group information from the first and second port group information based on arbitration rules; determining a target port from the third port group information; determining each target FEC mode corresponding to the target port after the receiving and transmitting ends complete FEC_SEL interaction; sorting the target FEC modes to obtain a target ranking; traversing each target FEC mode according to the target ranking order; and obtaining the optimal FEC mode from among the target FEC modes. When a port has multiple FEC capabilities, port auto-negotiation can select the FEC mode with the best link quality, instead of negotiating a fixed FEC mode according to existing procedures, thereby improving communication quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more specifically, to a port auto-negotiation method, electronic device, and storage medium based on FEC mode. Background Technology

[0002] In the current network, 10G and above speed ports generally follow the backplane / copper cable auto-negotiation specification defined by IEEE 802.3 Clause 73. When a device port is in auto-negotiation mode for connection, it will first enter the auto-negotiation process, that is, the two ports of the device exchange protocols and follow the auto-negotiation process according to the claimed capability bits. Based on the priority defined by the protocol, the negotiated port Speed ​​and FEC (Forward Error Correction) modes are determined.

[0003] The existing auto-negotiation process determines the Speed ​​and FEC modes for a port, but the port may become unusable in subsequent use. Restarting the auto-negotiation process and repeating the procedure results in a fixed outcome: the port remains unusable in Speed ​​and FEC modes. When using this port in Speed ​​and FEC modes, anomalies occur, leading to communication failures. Summary of the Invention

[0004] The purpose of this application is to provide a port auto-negotiation method, electronic device and storage medium based on FEC mode, which can select the optimal FEC mode to improve communication capabilities.

[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0006] In a first aspect, embodiments of this application provide a port auto-negotiation method based on FEC mode, the method comprising:

[0007] Determine the first port group information of the receiving end and the second port group information of the sending end;

[0008] Based on the arbitration provisions, the third port group information is determined from the first port group information and the second port group information, wherein the third port group information is the shared port group information of the first port group information and the second port group information, and the third port group information includes at least one first port and each FEC mode corresponding to each first port;

[0009] The target port is determined from the third port group information;

[0010] After the receiving end and the sending end complete the FEC_SEL interaction, the target FEC mode corresponding to the target port is determined.

[0011] The target FEC modes are sorted to obtain the target sorting;

[0012] According to the order of the target sorting, traverse each target FEC mode, and obtain the optimal FEC mode that satisfies the link training conditions, stable connection conditions, and transmission conditions from each target FEC mode.

[0013] In an optional implementation, the step of determining the target port from the third port group information includes:

[0014] Each first port is determined from the third port group information;

[0015] The first port with the highest rate among all the first ports is determined as the target port.

[0016] In an optional implementation, the step of traversing each target FEC mode according to the order of the target sorting, and obtaining the optimal FEC mode that satisfies the link training conditions, stable connection conditions, and transmission conditions from each target FEC mode includes:

[0017] Determine the first target FEC pattern that ranks first from the target ranking;

[0018] Determine whether the first target FEC mode meets the link training conditions, stable connection conditions, and transmission conditions;

[0019] If the first target FEC mode does not meet any of the link training conditions, stable connection conditions, and transmission conditions, the next target FEC mode ranked in the first target FEC mode is determined from the target ranking and used as the new first target FEC mode.

[0020] Determine whether the new first target FEC mode meets the link training conditions, stable connection conditions, and transmission conditions;

[0021] If the new first target FEC mode does not meet any of the link training conditions, stable connection conditions, and transmission conditions, the process returns to determining the next target FEC mode ranked in the target ranking as the new first target FEC mode, and continues until the optimal FEC mode is determined from the target ranking.

[0022] In an optional implementation, the method further includes:

[0023] If none of the target FEC modes in the target sorting meet any of the link training conditions, stable connection conditions, and transmission conditions, the process returns to the step of determining the target port from the third port group information.

[0024] In an optional implementation, the step of determining whether the first target FEC mode satisfies the link training condition, stable connection condition, and transmission condition includes:

[0025] Link training is performed on the receiver and the transmitter based on the target port and the first target FEC mode.

[0026] Obtain the first packet loss rate of the receiving end and the second packet loss rate of the sending end after link training;

[0027] When both the first packet loss rate and the second packet loss rate are less than the preset packet loss rate, it is determined that the first target FEC mode meets the link training conditions.

[0028] In an optional implementation, the method further includes:

[0029] Determine the connection status between the target port of the receiving end and the first target FEC mode corresponding to the target port and the target port of the sending end and the first target FEC mode corresponding to the target port;

[0030] When the connection status is UP, it is determined that the first target FEC mode meets the stable connection conditions.

[0031] In an optional implementation, the method further includes:

[0032] Determine the bit error rate of the first target FEC mode within a preset time period;

[0033] When the bit error rate is less than the bit error rate threshold, the first target FEC mode is determined to meet the transmission conditions.

[0034] In an optional implementation, the method further includes:

[0035] When the receiving end and the sending end cannot complete the FEC_SEL interaction, determine the maximum rate port in the third port group information;

[0036] Determine the FEC mode corresponding to the maximum rate port;

[0037] Based on the self-negotiation communication protocol, the FEC mode with the highest priority is determined from all the described FEC modes;

[0038] The data interaction between the receiver and the transmitter is completed based on the maximum rate port and the highest priority FEC mode.

[0039] Secondly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the port auto-negotiation method based on FEC mode.

[0040] Thirdly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the port auto-negotiation method based on FEC mode.

[0041] This application has the following beneficial effects:

[0042] This application determines a third port group based on arbitration rules by identifying the first port group information of the receiving end and the second port group information of the transmitting end. The third port group information is shared by the first and second port group information, including at least one first port and corresponding FEC modes for each first port. A target port is determined from this third port group information. After the receiving and transmitting ends complete the FEC_SEL interaction, the target FEC modes corresponding to the target port are determined. These target FEC modes are then sorted to obtain a target ranking. Following this ranking, the target FEC modes are traversed to obtain the optimal FEC mode that satisfies the link training conditions, stable connection conditions, and transmission conditions. When a port possesses multiple FEC capabilities, port self-negotiation can select the FEC mode with the best link quality, instead of negotiating a fixed FEC mode as in existing processes, thereby improving communication quality. Attached Figure Description

[0043] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 A block diagram illustrating an electronic device provided in an embodiment of this application;

[0045] Figure 2 One of the flowcharts for a port auto-negotiation method based on FEC mode provided in this application embodiment;

[0046] Figure 3 A second schematic flowchart illustrating a port auto-negotiation method based on FEC mode provided for embodiments of this application;

[0047] Figure 4 The third flowchart illustrates a port auto-negotiation method based on FEC mode, as provided in the embodiments of this application.

[0048] Figure 5 The fourth flowchart illustrates a port auto-negotiation method based on FEC mode, provided for an embodiment of this application.

[0049] Figure 6 Fifth flowchart illustrating a port auto-negotiation method based on FEC mode provided for embodiments of this application;

[0050] Figure 7 This is a schematic diagram of a port auto-negotiation device based on FEC mode provided in an embodiment of this application. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0052] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0053] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0054] In the description of this application, it should be noted that if terms such as "upper," "lower," "inner," or "outer" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of the invention is usually placed during use, they are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.

[0055] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0056] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the terms "set up," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0057] Extensive research by the inventors revealed that in current networks, 10G and higher speed ports generally adhere to the backplane / copper cable auto-negotiation specification defined by IEEE 802.3 Clause 73. When device ports are connected in auto-negotiation mode, they first enter the auto-negotiation process. This involves protocol interaction between the two ends of the device, proceeding through the auto-negotiation process according to the claimed capabilities, and determining the negotiated port Speed ​​and FEC (Forward Error Correction) modes based on the priority defined by the protocol.

[0058] The existing auto-negotiation process determines the Speed ​​and FEC modes for a port, but the port may become unusable in subsequent use. Restarting the auto-negotiation process and repeating the procedure results in a fixed outcome: the port remains unusable in Speed ​​and FEC modes. When using this port in Speed ​​and FEC modes, anomalies occur, leading to communication failures.

[0059] For example, after the existing auto-negotiation process determines the port's Speed ​​and FEC, the port may not be able to link up. However, equipment manufacturers often restart the auto-negotiation process immediately after detecting that the port cannot link up, and go through the process again. However, the negotiation result is fixed. If different devices have problems with not being able to UP when connected in this mode, according to the existing process, the port may never be able to link up or may have packet loss problems even if it does UP.

[0060] Some port speed modes support multiple FEC modes. For example, 25G supports BASER-FEC and RS-FEC, while 50G R1 supports both RS272 and RS544 FEC modes. However, when a port is configured with all supported capability sets, the negotiation result can only be the FEC mode with the highest priority, according to the negotiation process. The selected highest priority FEC may not be able to link up.

[0061] Different FEC modes have different error correction capabilities, forwarding performance, and link performance. Different equipment manufacturers may have specific requirements for the FEC mode of a port. If a port claims to support all FEC modes, it may not be able to select the user's preferred FEC mode when the auto-negotiation capability is fully enabled according to the existing process.

[0062] In view of the above-mentioned problems, this embodiment provides a port auto-negotiation method, electronic device, and storage medium based on FEC mode. It can determine a third port group based on arbitration rules by determining the first port group information of the receiving end and the second port group information of the transmitting end. The third port group information is shared by the first and second port group information, and includes at least one first port and the corresponding FEC modes for each first port. A target port is determined from the third port group information. After the receiving end and the transmitting end complete the FEC_SEL interaction, the target FEC modes corresponding to the target port are determined. The target FEC modes are sorted to obtain a target ranking. Following the target ranking, the target FEC modes are traversed to obtain the optimal FEC mode that satisfies the link training conditions, stable connection conditions, and transmission conditions. When a port has multiple FEC capabilities, port auto-negotiation can select the FEC mode with the best link quality, instead of negotiating a fixed FEC mode according to existing procedures, thereby improving communication quality. The solution provided in this embodiment is described in detail below.

[0063] This embodiment provides an electronic device capable of auto-negotiation of ports based on FEC mode. In one possible implementation, the electronic device can be a user terminal, such as, but not limited to, servers, smartphones, personal computers (PCs), tablets, personal digital assistants (PDAs), mobile internet devices (MIDs), and switches.

[0064] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application. The electronic device 100 may further include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.

[0065] The electronic device 100 includes a port auto-negotiation device 110 based on FEC mode, a memory 120, and a processor 130.

[0066] The components of the memory 120 and processor 130 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The FEC-based port auto-negotiation device 110 includes at least one software function module that can be stored in the memory 120 in the form of software or firmware or embedded in the operating system (OS) of the electronic device 100. The processor 130 is used to execute executable modules stored in the memory 120, such as the software function modules and computer programs included in the FEC-based port auto-negotiation device 110.

[0067] The memory 120 may be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory 120 is used to store programs, and the processor 130 executes the programs after receiving execution instructions.

[0068] Please refer to Figure 2 , Figure 2 For application Figure 1 The flowchart below shows a port auto-negotiation method for an electronic device 100 based on FEC mode. The method includes a detailed description of each step.

[0069] S201: Determine the first port group information of the receiving end and the second port group information of the sending end.

[0070] S202: Determine the third port group information from the first port group information and the second port group information based on the arbitration provisions.

[0071] The third port group information is the shared port group information of the first port group information and the second port group information. The third port group information includes at least one first port and each FEC mode corresponding to each first port.

[0072] S203: Determine the target port from the third port group information.

[0073] S204: After the FEC_SEL interaction is completed at the receiving end and the sending end, determine the target FEC mode corresponding to each target port.

[0074] S205: Sort the FEC patterns of each target to obtain the target sorting.

[0075] S206: According to the order of target sorting, traverse the FEC modes of each target and obtain the optimal FEC mode that satisfies the link training conditions, stable connection conditions and transmission conditions from the FEC modes of each target.

[0076] The receiver and sender enable auto-negotiation. After enabling auto-negotiation, the receiver and sender interact with each other using the auto-negotiation protocol to determine the first port group information of the receiver and the second port group information of the sender, and to determine the third port group information that overlaps with the first port group information and the second port group information.

[0077] Specifically, the IEEE Clause 73 auto-negotiation communication method is based on the differential Manchester coding (DME) coding mechanism. The receiver and transmitter determine the receiver's first port group information and the transmitter's second port group information by exchanging DME Pages (which carry their respective supported capabilities / modes).

[0078] The target port is determined from the information of the third port group. There are multiple ways to determine the target port. In one implementation, each first port is determined from the information of the third port group, and the first port with the highest speed is selected as the target port.

[0079] For example, when the third port group information includes a 10G first port and a 25G first port, the first port with the highest speed, i.e., 25G, is determined as the target port.

[0080] To ensure compatibility with existing port auto-negotiation procedures, it's necessary to determine if the receiver and transmitter can complete the FEC_SEL interaction. If they do, it indicates that both support FEC mode selection. If they cannot, it means they do not support FEC mode selection, and communication is completed through auto-negotiation using existing methods to determine the FEC mode. Specifically, when the receiver and transmitter cannot complete the FEC_SEL interaction, the highest-rate port in the third port group information is determined, along with the corresponding FEC modes. Based on the auto-negotiation communication protocol, the highest-priority FEC mode is selected, and data exchange between the receiver and transmitter is completed based on the highest-rate port and the highest-priority FEC mode.

[0081] After the FEC_SEL interaction is completed at the receiving and sending ends, the optimal FEC mode among the target FEC modes corresponding to the target port is determined. The target FEC modes are sorted according to the user-defined or default method to obtain the target sorting. The target FEC modes are traversed, and the optimal FEC mode that satisfies the link training conditions, stable connection conditions, and transmission conditions is obtained from each target FEC mode to carry out communication based on the optimal FEC mode.

[0082] There are multiple ways to implement the process of traversing the FEC modes of each target in the order they are sorted, and then selecting the optimal FEC mode that satisfies the link training conditions, stable connection conditions, and transmission conditions. One implementation method is as follows: Figure 3 As shown, it includes the following steps:

[0083] S206-1: Determine the first target FEC pattern ranked first from the target ranking.

[0084] S206-2: Determine whether the first target FEC mode meets the link training conditions, stable connection conditions, and transmission conditions.

[0085] S206-3: When the first target FEC mode does not meet any of the link training conditions, stable connection conditions, and transmission conditions, determine the next target FEC mode ranked after the first target FEC mode from the target ranking and use it as the new first target FEC mode.

[0086] S206-4: Determine whether the new first target FEC mode meets the link training conditions, stable connection conditions, and transmission conditions.

[0087] S206-5: If the new first target FEC mode does not meet any of the link training conditions, stable connection conditions, and transmission conditions, return to the step of determining the next target FEC mode ranked in the target ranking as the new first target FEC mode, and continue to the step of determining whether the new first target FEC mode meets the link training conditions, stable connection conditions, and transmission conditions, until the optimal FEC mode is determined from the target ranking.

[0088] It should be noted that each target FEC mode is an FEC mode supported by both the receiver and the transmitter.

[0089] The target FEC modes are sorted according to user-defined requirements or default methods to obtain the target ranking. When the target ranking includes the first target FEC mode Rs528, the second target FEC mode FC2112, and the third target FEC mode FEC-NONE, the first target FEC mode, which is ranked first, is selected from the target order. It is then determined whether the first target FEC mode meets the link training conditions, stable connection conditions, and transmission conditions. If the first target FEC mode meets the link training conditions, stable connection conditions, and transmission conditions, it is selected as the optimal FEC mode. If the first target FEC mode does not meet the link training condition, the stable connection condition, or the transmission condition, then a second target EFC mode is obtained from the target ranking. It is then determined whether the second target EFC mode meets the link training condition, the stable connection condition, and the transmission condition. If the second target EFC mode meets all three conditions, it is designated as the optimal EFC mode. If the second target EFC mode does not meet any one of these conditions, a third target EFC mode is obtained from the target ranking. If the third target EFC mode meets all three conditions, it is designated as the optimal EFC mode. If the third target EFC mode does not meet any one of these conditions, the process returns to the step of determining the target port from the third port group information.

[0090] It should be noted that when the third target EFC mode does not meet any of the link training conditions, stable connection conditions, and transmission conditions, a first target port can be determined from each first port in the third port information based on a user-defined method. This first target port is different from the target port. Using the first target port as the new target port, the following steps are performed: after the FEC_SEL interaction is completed at the receiving end and the sending end, determine the target FEC modes corresponding to the target port, traverse each target FEC mode in the order of target sorting, and obtain the optimal FEC mode that satisfies the link training conditions, stable connection conditions, and transmission conditions from among the target FEC modes.

[0091] For example, if the target port is a 25G port, then the first target port can be a 10G port.

[0092] There are multiple ways to determine whether the first target FEC mode meets the link training conditions. In one implementation, such as... Figure 4 As shown, it includes the following steps:

[0093] S206-6: Perform link training on the receiver and transmitter based on the target port and the first target FEC mode.

[0094] S206-7: Obtain the first packet loss rate of the receiver and the second packet loss rate of the sender after link training.

[0095] S206-8: When both the first packet loss rate and the second packet loss rate are less than the preset packet loss rate, it is determined that the first target FEC mode meets the link training conditions.

[0096] Link training is performed on the target port of the receiving end and the first target EFC mode corresponding to the target port, and the target port of the sending end and the first target EFC mode corresponding to the target port. The receiving end and the sending end train each other with training frames to adjust the EEF parameters of the receiving end and the sending end. The receiving end and the sending end with adjusted EEF parameters send pseudo-random codes to each other. The first packet loss rate of the pseudo-random code sent by the sending end is determined, and the second packet loss rate of the pseudo-random code sent by the sending end is determined. The first packet loss rate and the second packet loss rate are both compared with the preset packet loss rate. When the first packet loss rate and the second packet loss rate are both less than the preset packet loss rate, it is determined that the first target EFC mode meets the link training conditions.

[0097] There are multiple ways to determine whether the first target FEC mode satisfies the stable connection condition. In one implementation, such as... Figure 5 As shown, it includes the following steps:

[0098] S206-9: Determine the connection status between the target port of the receiving end and the first target FEC mode corresponding to the target port, and the target port of the sending end and the first target FEC mode corresponding to the target port.

[0099] S206-10: When the connection status is UP, determine that the first target FEC mode meets the stable connection conditions.

[0100] When the first target EFC mode meets the link training conditions, determine whether the first target EFC mode meets the connection stability conditions based on the above method.

[0101] When the connection status is DOWN, it is determined that the first target EFC mode does not meet the stable connection conditions. Then, the next target FEC mode ranked after the first target FEC mode is determined from the target ranking and taken as the new first target FEC mode. The link training conditions are then reassessed.

[0102] There are multiple ways to determine whether the first target FEC mode meets the transmission conditions. In one implementation, such as... Figure 6 As shown, it includes the following steps:

[0103] S206-11: Determine the bit error rate of the first target FEC mode within a preset time period.

[0104] S206-12: When the bit error rate is less than the bit error rate threshold, the first target FEC mode is determined to meet the transmission conditions.

[0105] When the first target EFC mode meets the link training conditions and stable connection conditions, it is determined whether the first target EFC mode meets the transmission conditions. If the bit error rate exceeds the bit error rate threshold within a preset time period, it is considered that the quality of the first target EFC mode has not met the expectations, that is, the first target EFC mode does not meet the transmission conditions. The next target EFC mode ranked after the first target EFC mode is determined from the target ranking and used as the new first target EFC mode. Then, it is re-determined whether the new first target EFC mode meets the link training conditions.

[0106] Please refer to Figure 7 This application embodiment also provides an application for Figure 1 The electronic device 100 includes an FEC-based port auto-negotiation device 110, which comprises:

[0107] The determining module 111 is used to determine the first port group information of the receiving end and the second port group information of the transmitting end; determine the third port group information from the first port group information and the second port group information based on the arbitration rules, wherein the third port group information is the common port group information of the first port group information and the second port group information, and the third port group information includes at least one first port and each FEC mode corresponding to each first port; determine the target port from the third port group information; after the receiving end and the transmitting end complete the FEC_SEL interaction, determine each target FEC mode corresponding to the target port; and sort the target FEC modes to obtain the target sorting.

[0108] The acquisition module 112 is used to traverse each target FEC mode according to the sorting order of the targets, and acquire the optimal FEC mode that satisfies the link training conditions, stable connection conditions and transmission conditions from each target FEC mode.

[0109] This application also provides an electronic device 100, which includes a processor 130 and a memory 120. The memory 120 stores computer-executable instructions, which, when executed by the processor 130, implement the port auto-negotiation method based on the FEC mode.

[0110] This application embodiment also provides a computer-readable storage medium storing a computer program, which, when executed by a processor 130, implements the port auto-negotiation method based on FEC mode.

[0111] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0112] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part. If the function is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.

[0113] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0114] The above descriptions are merely various embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A port auto-negotiation method based on FEC mode, characterized in that, The method includes: Determine the first port group information of the receiving end and the second port group information of the sending end; Based on the arbitration provisions, the third port group information is determined from the first port group information and the second port group information, wherein the third port group information is the shared port group information of the first port group information and the second port group information, and the third port group information includes at least one first port and each FEC mode corresponding to each first port; The target port is determined from the third port group information; After the receiving end and the sending end complete the FEC_SEL interaction, the target FEC mode corresponding to the target port is determined. The target FEC modes are sorted to obtain the target sorting; According to the order of the target sorting, traverse each target FEC mode, and obtain the optimal FEC mode that satisfies the link training condition, stable connection condition and transmission condition from each target FEC mode. The step of traversing each target FEC mode according to the sorted order of the targets, and obtaining the optimal FEC mode that satisfies the link training conditions, stable connection conditions, and transmission conditions from each target FEC mode includes: Determine the first target FEC pattern that ranks first from the target ranking; Determine whether the first target FEC mode meets the link training conditions, stable connection conditions, and transmission conditions; If the first target FEC mode does not meet any of the link training conditions, stable connection conditions, and transmission conditions, the next target FEC mode ranked in the first target FEC mode is determined from the target ranking and used as the new first target FEC mode. Determine whether the new first target FEC mode meets the link training conditions, stable connection conditions, and transmission conditions; If the new first target FEC mode does not meet any of the link training conditions, stable connection conditions, and transmission conditions, the process returns to determining the next target FEC mode ranked in the target ranking as the new first target FEC mode, and continues until the optimal FEC mode is determined from the target ranking.

2. The method according to claim 1, characterized in that, The step of determining the target port from the third port group information includes: Each first port is determined from the third port group information; The first port with the highest rate among all the first ports is determined as the target port.

3. The method according to claim 1, characterized in that, The method further includes: If none of the target FEC modes in the target sorting meet any of the link training conditions, stable connection conditions, and transmission conditions, the process returns to the step of determining the target port from the third port group information.

4. The method according to claim 1, characterized in that, The step of determining whether the first target FEC mode meets the link training conditions, stable connection conditions, and transmission conditions includes: Link training is performed on the receiver and the transmitter based on the target port and the first target FEC mode. Obtain the first packet loss rate of the receiving end and the second packet loss rate of the sending end after link training; When both the first packet loss rate and the second packet loss rate are less than the preset packet loss rate, it is determined that the first target FEC mode meets the link training conditions.

5. The method according to claim 4, characterized in that, The method further includes: Determine the connection status between the target port of the receiving end and the first target FEC mode corresponding to the target port and the target port of the sending end and the first target FEC mode corresponding to the target port; When the connection status is UP, it is determined that the first target FEC mode meets the stable connection conditions.

6. The method according to claim 5, characterized in that, The method further includes: Determine the bit error rate of the first target FEC mode within a preset time period; When the bit error rate is less than the bit error rate threshold, the first target FEC mode is determined to meet the transmission conditions.

7. The method according to claim 1, characterized in that, The method further includes: When the receiving end and the sending end cannot complete the FEC_SEL interaction, determine the maximum rate port in the third port group information; Determine the FEC mode corresponding to the maximum rate port; Based on the self-negotiation communication protocol, the FEC mode with the highest priority is determined from all the described FEC modes; The data interaction between the receiver and the transmitter is completed based on the maximum rate port and the highest priority FEC mode.

8. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method according to any one of claims 1-7.

9. A storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Auto-negotiation method and device

    CN112688906A

  • Rate self-adaption method and device and storage medium

    CN112887223A