Method, device and equipment for dynamically adjusting end-to-end cyclic redundancy check function

By identifying and dynamically adjusting the ECRC function of the PCIe device through preconfigured configuration information, the downtime problem caused by the device not having ECRC checking capabilities is solved, and the reliability and stability of the system are improved.

CN119718765AActive Publication Date: 2025-03-28INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411591748.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-03-28
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

In PCIe devices, if some devices do not have the ability to check end-to-end cyclic redundancy check (ECRC), turning on the ECRC function without distinction may cause PCIe UCE, causing machine downtime, and interrupt tasks.

Method used

By preconfiguring the first configuration information and the second configuration information, the ECRC function of each PCIe device is identified and dynamically adjusted. The first configuration information is used to indicate whether the device has an ECRC function, and the second configuration information is used to indicate whether the ECRC function is enabled. After powering on, the server traverses all PCIe devices, identifies devices with ECRC function and enables the function, and performs ECRC processing on these devices.

Benefits of technology

It avoids downtime due to the lack of ECRC function of PCIe devices, and improves the reliability and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718765A_ABST
    Figure CN119718765A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a method, a device and equipment for dynamically adjusting an end-to-end cyclic redundancy check (CRC) function, and the method comprises the following steps: identifying first configuration information pre-configured on each PCIe (Peripheral Component Interconnect Express) equipment after starting up and electrifying; when it is determined that the first PCIe device has an end-to-end cyclic redundancy check function according to the first configuration information, identifying second configuration information pre-configured by the first PCIe device; and when it is determined that the end-to-end cyclic redundancy check function is enabled on the first PCIe device according to the second configuration information, executing end-to-end cyclic redundancy check processing on data transmitted between the server and the first PCIe device. In this way, the ECRC function is no longer executed on all devices indifferently. However, the corresponding processing is executed for the equipment which has the corresponding capability and independently starts the function. The downtime problem caused by the fact that the equipment does not have the ECRC function is prevented, and the reliability and stability of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device and equipment for dynamically adjusting an end-to-end cyclic redundancy check function. Background Art

[0002] In the PCI Express (PCIe) protocol, an end-to-end cyclic redundancy check (CRC) is a mechanism used to verify data integrity from end to end. The full name of the CRC is End-to-End CRC. It calculates a CRC (cyclic redundancy check) on the data during transmission and appends the result to the transmitted data. When the receiving end receives the data, it recalculates the CRC and compares the result with the CRC appended by the sender to detect any errors during transmission.

[0003] In related technologies, when performing end-to-end cyclic redundancy check (CRC) on PCIe devices, it is performed uniformly on all PCIe devices. However, in some special cases, if the PCIe device does not have CRC checking capabilities, it will trigger PCIe UCE, causing the machine to crash, interrupting ongoing tasks and creating a poor user experience. Summary of the Invention

[0004] In view of this, the present invention provides a method, apparatus, and device for dynamically adjusting the end-to-end cyclic redundancy check function to solve the problem that if some PCIe devices do not have the end-to-end cyclic redundancy check capability and the function is indiscriminately enabled, it is easy to trigger PCIE UCE, causing the machine to crash and interrupting the ongoing task.

[0005] In a first aspect, the present invention provides a method for dynamically adjusting an end-to-end cyclic redundancy check function. The method is applied to a server, the server being connected to at least one PCIe device, and the method being executed by the server. The method comprises:

[0006] After powering on, identifying first configuration information pre-configured on each PCIe device, wherein the first configuration information is used to indicate whether an end-to-end cyclic redundancy check function is provided;

[0007] When it is determined according to the first configuration information that the first PCIe device has an end-to-end cyclic redundancy check function, identifying second configuration information preconfigured for the first PCIe device, wherein the first PCIe device is any one of the at least one PCIe devices, and the second configuration information is used to indicate whether the end-to-end cyclic redundancy check function is enabled on the first PCIe device;

[0008] When it is determined according to the second configuration information that the end-to-end cyclic redundancy check function is enabled on the first PCIe device, an end-to-end cyclic redundancy check process is performed on data transmitted between the server and the first PCIe device.

[0009] The method for dynamically adjusting the end-to-end cyclic redundancy check function provided by the present invention has the following advantages:

[0010] By pre-configuring the first configuration information, the system can quickly identify which PCIe devices support the ECRC function. Through the second configuration information, the system can identify which PCIe devices that support the ECRC function have enabled the ECRC function. This makes it convenient for the sender and receiver to perform ECRC check processing on devices that support the ECRC function and have enabled the ECRC function after receiving the data. In this way, the ECRC function is no longer performed indiscriminately on all PCIe devices. Instead, all PCIe devices are configured individually by adding the first configuration information and the second configuration information. After the server is powered on, all PCIe devices are traversed to identify which PCIe devices have specific corresponding capabilities and have enabled the ECRC function individually, and the corresponding ECRC processing is performed on these PCIe devices. For those PCIe devices that do not support the ECRC function or have not enabled the ECRC function, the ECRC processing is not performed. In this way, downtime caused by PCIe devices not having the ECRC function can be prevented, thereby improving the reliability and stability of the system.

[0011] In an optional embodiment, the first configuration information is configured by setting a target optional option based on the ECRC option configured in the first PCIe device, the target optional option corresponds to a first string, and the attribute value corresponding to the first string is used to indicate whether the first PCIe device has an ECRC function.

[0012] Specifically, the use of predefined target options and strings makes the configuration process simple and intuitive. System administrators no longer need to understand the complex details of ECRC; they simply select the corresponding string to set device functions, simplifying the configuration process. Furthermore, the use of strings and attribute values ​​facilitates configuration and maintenance for administrators. This configuration method standardizes device configuration, facilitating batch management and updates. Furthermore, the use of standardized strings to indicate ECRC functions helps ensure compatibility across different devices. If devices from different manufacturers adhere to the same configuration standards, interaction between them will be smoother.

[0013] In an optional embodiment, the target options may be expressed in the form of: Per Port Support;

[0014] The expression of the first character string includes: STR_PER_PORT_SUPPORT.

[0015] In an optional implementation, the second configuration information is configured by setting a target option on the PCIe device, the target option corresponds to a second string, and the attribute value corresponding to the second string is used to indicate whether the PCIe device enables the ECRC function.

[0016] Specifically, using strings and attribute values ​​to indicate the enabled status of the ECRC function makes the device configuration process more intuitive and easy to understand. This helps system administrators quickly identify and adjust the configuration of the device. By using predefined strings to control the enabling of the ECRC function, configuration errors caused by manual input errors or misunderstanding of technical terms can be reduced. This configuration method provides a flexible control method, allowing system administrators to easily enable or disable the ECRC function based on specific application needs and performance requirements. For system administrators, using strings to manage the ECRC function configuration of devices simplifies system management tasks and improves management efficiency. For software developers, using simple string configurations instead of complex binary or structured configurations can speed up development progress and reduce error rates. When a problem occurs in the system, by checking the configuration status of the ECRC function, the source of the problem can be quickly diagnosed and appropriate recovery measures can be taken.

[0017] In an optional implementation, the target option may be expressed as follows: IIO Per Port ECRCSupport;

[0018] The expression form of the second character string includes: STR_IIO_PRR_PORT_ECRC_SUPPORT.

[0019] In an optional embodiment, after powering on, before identifying the first configuration information pre-configured on each PCIe device, the method further includes:

[0020] By scanning the PCIe bus, obtain each PCIe device connected to the server;

[0021] Obtaining a PCIe device identifier corresponding to each PCIe device and an identifier of a PCIe device manufacturer;

[0022] Identify a PCIe device identifier and a PCIe device manufacturer identifier corresponding to each PCIe device;

[0023] When it is determined that a parameter value of any parameter in the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device is a preset threshold, determining that the second PCIe device is incorrectly identified, wherein the second PCIe device is any PCIe device connected to the server;

[0024] or,

[0025] When it is determined that the parameter values ​​corresponding to the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device are not preset thresholds, determining that the second PCIe device is correctly identified;

[0026] When it is determined that the second PCIe device is correctly identified, reading register configuration information corresponding to the second PCIe device from a preconfigured register;

[0027] Determining, based on the register configuration information, whether the second PCIe device has hardware capability for end-to-end cyclic redundancy check checking and whether it supports end-to-end cyclic redundancy check checking;

[0028] When it is determined that the second PCIe device has hardware capability for end-to-end cyclic redundancy check and supports end-to-end cyclic redundancy check, it is determined whether the second PCIe device performs ECRC processing according to the first configuration information and the second configuration information.

[0029] Specifically, by scanning the PCIe bus to obtain information about each PCIe device connected to the server, it can ensure that the system fully identifies all connected devices. By obtaining the identifier of the PCIe device and the manufacturer's identifier, it helps the system accurately identify and distinguish different devices and prevent identification errors. By determining whether the device identifier and manufacturer identifier reach the preset threshold, identification errors can be automatically detected, improving the system's self-inspection capability of the device status. After confirming that the device is correctly identified, the register configuration information is read from the pre-configured register, and based on the register configuration information, it is determined whether the device has the hardware capability for ECRC check and whether it supports end-to-end cyclic redundancy check check. Confirm whether the PCIE device has the ECRC function from the hardware characteristics and determine whether it supports the function. When the device does not have the hardware capability for ECRC, the system can automatically adjust the configuration to prohibit the ECRC function from being enabled, thereby avoiding subsequent unnecessary configuration errors.

[0030] In an optional embodiment, the register configuration information includes a first flag bit and a second flag bit; wherein the first flag bit is used to indicate whether the second PCIe device has the hardware capability of end-to-end cyclic redundancy check; the second flag bit is used to indicate whether the second PCIe device supports end-to-end cyclic redundancy check.

[0031] Specifically, the first flag bit is used to indicate whether the second PCIE device has the hardware capability to perform ECRC checks. If this bit is set, it means that the second PCIE device has the hardware resources to perform ECRC checks. The function of the first flag bit is equivalent to a capability declaration, telling the system whether the second PCIE device can support ECRC checks, but it does not necessarily mean that the function is currently enabled. The second flag bit controls the actual enabled state of the ECRC check function. If this bit is set to an invalid state, then even if the second PCIE device has the capability of ECRC checks, the ECRC check function will not be enabled. The two work together at the hardware level to ensure the correct configuration and use of the data integrity check function.

[0032] In an optional embodiment, the method further includes:

[0033] By scanning the PCIe bus, the PCIe device bus number, PCIe device number, and PCIe device function number corresponding to each PCIe device are obtained;

[0034] When it is determined that the second PCIe device is correctly identified, the location of the second PCIe device is determined according to the PCIe device bus number, PCIe device number, and PCIe device function number corresponding to the PCIe device.

[0035] Specifically, by scanning the PCIe bus to obtain the bus number, device number, and function number of each PCIe device, the physical location and identification of each PCIe device can be accurately determined, facilitating system management and troubleshooting. When a system problem occurs, the specific PCIe device can be quickly located, facilitating rapid troubleshooting and resolution.

[0036] In an optional implementation, when determining that any parameter value corresponding to the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device is a preset threshold, the following situations are included:

[0037] The connection between the second PCIe device and the PCIe bus fails;

[0038] and / or,

[0039] The second PCIe device is not initialized correctly or is not configured correctly by the server;

[0040] and / or,

[0041] The second PCIe device is incompatible with the server.

[0042] In a second aspect, the present invention provides a device for dynamically adjusting an ECRC function, the device corresponding to a server, the server being connected to at least one PCIe device, and the device comprising:

[0043] an identification module configured to, upon power-up, identify first configuration information preconfigured on each PCIe device, wherein the first configuration information is used to indicate whether an end-to-end cyclic redundancy check function is enabled; and, when it is determined based on the first configuration information that the first PCIe device has the end-to-end cyclic redundancy check function, identify second configuration information preconfigured on the first PCIe device, wherein the first PCIe device is any one of the at least one PCIe devices, and the second configuration information is used to indicate whether the end-to-end cyclic redundancy check function is enabled on the first PCIe device;

[0044] The processing module is configured to perform an end-to-end cyclic redundancy check process on data transmitted between the server and the first PCIe device when it is determined according to the second configuration information that the end-to-end cyclic redundancy check function is enabled on the first PCIe device.

[0045] The present invention provides a device for dynamically adjusting the ECRC function, which has the following advantages:

[0046] By pre-configuring the first configuration information, the system can quickly identify which PCIe devices support the ECRC function. Through the second configuration information, the system can identify which PCIe devices that support the ECRC function have enabled the ECRC function. This makes it convenient for the sender and receiver to perform ECRC check processing on devices that support the ECRC function and have enabled the ECRC function after receiving the data. In this way, the ECRC function is no longer performed indiscriminately on all PCIe devices. Instead, all PCIe devices are configured individually by adding the first configuration information and the second configuration information. After the server is powered on, all PCIe devices are traversed to identify which PCIe devices have specific corresponding capabilities and have enabled the ECRC function individually, and the corresponding ECRC processing is performed on these PCIe devices. For those PCIe devices that do not support the ECRC function or have not enabled the ECRC function, the ECRC processing is not performed. In this way, downtime caused by PCIe devices not having the ECRC function can be prevented, thereby improving the reliability and stability of the system.

[0047] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the computer instructions to thereby execute the method for dynamically adjusting the ECRC function of the above-mentioned first aspect or any corresponding embodiment thereof.

[0048] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for dynamically adjusting the ECRC function of the above-mentioned first aspect or any corresponding embodiment thereof.

[0049] In a fifth aspect, the present invention provides a computer program product comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the method for dynamically adjusting the ECRC function of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0051] Figure 1 1 is a flow chart of a method for dynamically adjusting the ECRC function provided by an embodiment of the present invention;

[0052] Figure 2 This is a conceptual flow diagram of transaction-level data packets at each layer in the data transmission process provided by the present invention;

[0053] Figure 3 1 is a flow chart of another method for dynamically adjusting the ECRC function provided by an embodiment of the present invention;

[0054] Figure 4 1 is a schematic diagram of field allocation of the AECR register provided by the present invention;

[0055] Figure 5 This is a structural block diagram of a device for dynamically adjusting ECRC function provided by an embodiment of the present invention;

[0056] Figure 6 The figure is a schematic diagram of the hardware structure of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0057] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0058] In the PCI Express (PCIe) protocol, ECRC (End-to-End CRC) is a mechanism used for end-to-end data integrity verification. ECRC, short for End-to-End Cyclic Redundancy Check (CRC), works by performing a CRC calculation on the data during transmission and appending the result to the transmitted data. When the receiving end receives the data, it recalculates the CRC and compares the result with the CRC appended by the sending end to detect any errors during transmission.

[0059] The ECRC is calculated based on the header and data payload of a TLP. Upon receipt, it is calculated in the Transaction Layer and appended to the end of the Transaction Layer Packet (TLP). The receiver recalculates the ECRC value for these contents and compares it with the ECRC value in the received TLP to confirm the correctness of the message content. If the comparison results are inconsistent, the receiver discards the TLP and logs an error.

[0060] This mechanism can effectively detect errors during data transmission. If the CRC calculated by the receiving end does not match the CRC added by the sending end, it means that an error has occurred during data transmission. The receiving end can request data retransmission or perform other error handling. This helps the system detect and correct errors in a timely manner during data transmission, improving system reliability and stability.

[0061] In the PCIe protocol, ECRC insertion and checking can be controlled by configuring the ECRC generation capability bit (ECRC Check Capable) and the ECRC generation enable bit (ECRC Check Enable) in the Advanced Error Capabilities and Control Register (AECR). A value of 1 for ECRC Check Capable indicates that the EP has the ability to detect ECRC, and a value of 1 for ECRC Check Enable indicates support for ECRC detection.

[0062] In addition, the ECRC calculation algorithm uses a specific polynomial and seed value. For example, the ECRC algorithm defined in the PCI Express specification uses a polynomial with coefficients of 04C1 1DB7h and uses FFFFFFFFh as the initial value of the ECRC storage register.

[0063] ECRC is used in the PCIe protocol to improve the reliability of data transmission. It detects errors during transmission by appending a check field at the end of the TLP to ensure data integrity and correctness.

[0064] The current ECRC option is set for all IIO ports, and turning it on or off is for all PCIE devices on the machine.

[0065] Specifically, the ECRC option is set for all IIO ports, and enabling or disabling it applies to all PCIe devices on the machine. If the ECRC option is enabled and the device lacks ECRC checking capabilities, it will trigger a PCIe Uncertainty Event (UCE), causing the machine to crash, interrupting ongoing tasks, and creating a negative user experience.

[0066] To solve the above problems, an embodiment of the present invention provides an embodiment of dynamically adjusting the ECRC function. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system (computer device) including, for example, a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0067] In this embodiment, a method for dynamically adjusting the ECRC function is provided, which can be used in the above-mentioned terminal devices, such as mobile phones, tablet computers, etc. Figure 1 FIG. 1 is a flow chart of a method for dynamically adjusting the ECRC function provided by an embodiment of the present invention, such as Figure 1 As shown, the method is applied to a server, the server is connected to at least one PCIe device, and the method flow is executed by the server.

[0068] Before introducing the method steps of the embodiment of the present application, the preparatory work and related information before executing the method steps are first introduced. For details, see the following:

[0069] PCI Express (PCIe) is a high-speed serial computer expansion bus standard. PCIE is a standard interface for connecting various components within a server (such as storage devices, network adapters, graphics cards, etc.). It provides an expansion bus that enables these devices to communicate at high speed with the server's main processor (CPU). It is used to transfer data between the server and its internal or external devices. In some practical application scenarios, PCIe is often used for internal expansion of servers, such as graphics cards (GPUs), network adapters (NICs), storage controllers, input / output (I / O) cards, etc. In addition, through PCIe external expansion slots, the server can connect to external devices such as USB 3.0 expansion cards and SATA storage expansion boxes.

[0070] In addition to the above, PCIE also includes the following functions:

[0071] PCIe provides allocable bandwidth, allowing servers to allocate bandwidth to different PCIe devices as needed. For example, a high-end server might allocate more bandwidth to a high-performance graphics card to ensure smooth graphics processing. Error detection and recovery mechanisms ensure reliable data transmission. If a transmission error is detected, the PCIe bus can attempt to correct the error or retransmit the data.

[0072] PCIE devices are hardware devices that connect to computers or servers via the PCIe bus. The following are some common types of PCIe devices:

[0073] 1. Graphics card (GPU): This is one of the most typical PCIe devices.

[0074] High-performance graphics cards can provide faster graphics processing capabilities and support complex 3D graphics rendering, gaming and video editing.

[0075] 2. Network adapter: PCIe network adapter provides high-speed network connection, including Ethernet and wireless network adapter.

[0076] They support higher data transfer rates and are suitable for applications requiring fast network communications.

[0077] 3. Storage controllers: These devices include solid-state drive (SSD) controllers, redundant array of independent disks controllers, and storage expansion cards, which provide high-speed data storage and access capabilities.

[0078] 4. Sound card: PCIe sound card provides high-quality audio output and input functions, and supports multi-channel audio and surround sound.

[0079] 5. Expansion cards: These cards include various functions, such as USB expansion cards, Serial Advanced Technology Attachment (SATA) controllers, external Serial ATA (eSATA) interfaces, IEEE 1394 (FireWire) interfaces, etc.

[0080] 6. Input devices: Such as PCIe keyboards and mice, which provide more advanced functions and higher precision.

[0081] 7. Communication cards: These cards are used for specific communication needs, such as Fibre Channel adapters, wireless communication modules, etc.

[0082] 8. Other external devices: External devices connected through PCIe expansion slots, such as external storage arrays, USB 3.0 docking stations, etc.

[0083] When performing data transfers, PCI Express (PCI Express) uses packets to pass information between components.

[0084] Forms data packets in the transaction and data link layers to transfer information from transmitting components to receiving components;

[0085] On the receiving end, the data packet is converted from the physical layer representation to the data link layer representation and finally to a form that can be processed by the transaction layer of the receiving device.

[0086] See Figure 2 As shown, Figure 2 The conceptual flow of transaction-level data packets at each layer is illustrated in FIG.

[0087] Specifically include:

[0088] Framing: The process of constructing data into PCIe frames on the sender. On the receiver, the received frames are parsed to extract the data. This data processing occurs at the physical layer.

[0089] Sequence number header data: Included in the header of a PCIe packet, it identifies the order of packets. The sequence number helps the receiver determine the order of packets and detect lost or duplicate packets. This helps ensure that packets are received and processed in the correct order. This processing occurs at the Data Link Layer, the second layer in the OSI model. It lies above the Physical Layer and below the Network Layer.

[0090] Also at the data link layer, a link control redundancy check (LCRC) at the receiving end is performed at the data link layer.

[0091] When a PCIe device sends data, the Transaction Layer calculates a cyclic redundancy check (CRC) value for the header and data payload of the transmitted Transaction Layer Packet (TLP). This CRC value (called ECRC, or End-to-End CRC) is part of the Transaction Layer Packet and is appended to the end of the TLP.

[0092] The sender sends the TLP containing the ECRC to the receiver.

[0093] The sending PCIe device calculates the ECRC based on the content and length of the TLP and sends it as part of the TLP.

[0094] After receiving the TLP, the PCIe device on the receiving end recalculates the ECRC of the TLP header and data payload. The receiving end compares the calculated ECRC with the ECRC in the received TLP.

[0095] If the ECRC calculated by the receiving end is inconsistent with the received ECRC, it indicates that an error occurred during the transmission process.

[0096] The receiver discards the erroneous TLP and may log error information for troubleshooting.

[0097] The ECRC is a key feature of the PCIe protocol. It is calculated at the data link layer via the transaction layer and appended to the end of each TLP to detect errors during data transmission. The receiver verifies data integrity by recalculating the ECRC and comparing it with the received value. If an error is detected, the receiver discards the packet and logs the error. This process involves the transaction layer, data link layer, and physical layer.

[0098] The following describes the preparations for this application method, including:

[0099] Configure the first configuration information and the second configuration information.

[0100] In an optional example, the first configuration information is configured by setting a target optional option based on the ECRC option configured in the first PCIe device, the target optional option corresponds to a first string, and the attribute value corresponding to the first string is used to indicate whether the first PCIe device has an end-to-end cyclic redundancy check function.

[0101] The second configuration information is configured by setting a target option on the PCIe device. The target option corresponds to a second string. The attribute value corresponding to the second string is used to indicate whether the PCIe device enables an end-to-end cyclic redundancy check function.

[0102] In a specific example, for example, the target options may be expressed as: Per Port Support;

[0103] The expression of the first character string includes: STR_PER_PORT_SUPPORT.

[0104] The target options are expressed as follows: IIO Per Port ECRC Support;

[0105] The expression form of the second character string includes: STR_IIO_PRR_PORT_ECRC_SUPPORT.

[0106] Per Port Support is an optional option for the ECRC option. In actual applications, if all PCIE devices have ECRC checksum functionality, consider changing the default value of the ECRC option to Per Port Support. Also, configure the Per Port Support attribute value to indicate the ECRC function, for example, 2.

[0107] For IIO Per Port ECRC Support, similarly configure the options corresponding to the thresholds. For example, the first option is Disabled, which defines the option string as "STR_DISABLED" and the option value as "0" to indicate that the ECRC function is not enabled. The second option is Enabled, which defines the option string as "STR_ENABLED" and the option value as "1" to indicate that the ECRC function is enabled.

[0108] In actual applications, if all PCIE devices have the ECRC check function and need to enable this function, you can set the default value of the IIO Per Port ECRC Support option to "Enabled".

[0109] In the actual process, how to operate is determined according to the actual situation.

[0110] The following is a detailed description of the method flow of this application, including the following steps:

[0111] Step S101: After the computer is powered on, first configuration information pre-configured on each PCIe device is identified.

[0112] The first configuration information is used to indicate whether an end-to-end cyclic redundancy check function is provided.

[0113] As previously described, the first configuration information is used to indicate whether a PCIE device has the ECRC function. To prevent a subsequent downtime caused by enabling the ECRC function when a PCIE device does not have it, after the server is powered on, each PCIE device is traversed to identify whether each PCIE device has the first configuration information.

[0114] Step S102: When it is determined according to the first configuration information that the first PCIe device has an end-to-end cyclic redundancy check function, second configuration information pre-configured for the first PCIe device is identified.

[0115] Specifically, when, based on the first configuration information, it is determined that a first PCIe device among at least one PCIe device establishing a PCIe connection with the server has an ECRC function, it is necessary to further determine whether the ECRC function has been enabled on the device. Therefore, it is also necessary to identify the second configuration information of the first PCIe device. The first PCIe device is any one of the at least one PCIe devices, and the second configuration information is used to indicate whether the end-to-end cyclic redundancy check function is enabled on the first PCIe device.

[0116] Step S103 : When it is determined according to the second configuration information that the end-to-end cyclic redundancy check function is enabled on the first PCIe device, an end-to-end cyclic redundancy check process is performed on the data transmitted between the server and the first PCIe device.

[0117] Specifically, when it is determined according to the second configuration information that the ECRC function is enabled on the first PCIe device, ECRC processing may be subsequently performed on the data transmitted between the server and the first PCIe device.

[0118] The method for dynamically adjusting the ECRC function provided in this embodiment pre-configures first configuration information, allowing the system to quickly identify which PCIe devices support the ECRC function. Using second configuration information, the system can identify which PCIe devices that support the ECRC function have the ECRC function enabled. This facilitates the execution of ECRC checks on devices that support and have the ECRC function enabled after receiving data. This approach eliminates the need to indiscriminately perform the ECRC check on all PCIe devices. Instead, all PCIe devices are individually configured by adding the first and second configuration information. After the server is powered on, the system traverses all PCIe devices to identify which PCIe devices have specific capabilities and have the ECRC function enabled. The system then performs the corresponding ECRC check on these PCIe devices. For PCIe devices that do not support the ECRC function or have not enabled the ECRC function, the ECRC check is not performed. This approach prevents downtime caused by PCIe devices lacking the ECRC function, improving system reliability and stability.

[0119] In this embodiment, a method for dynamically adjusting the ECRC function is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Figure 3 FIG. 1 is a flow chart of another method for dynamically adjusting the ECRC function provided by an embodiment of the present invention, such as Figure 3As shown, based on the above method embodiment, after the server is powered on, before executing the identification of the first configuration information pre-configured on each PCIe device, the method further includes the following method steps, which are specifically referred to as follows:

[0120] Step S301 : Obtain each PCIe device connected to the server by scanning the PCIe bus.

[0121] Specifically, after the server is powered on, it will first initialize, enumerate, and configure all devices (including PCIe devices). Enumeration refers to the process of identifying and configuring newly connected devices.

[0122] For PCIe devices, enumeration consists of the following steps:

[0123] Scan bus: The server scans the PCIe bus to find connected devices.

[0124] Among them, for PCIE devices, the server scans the PCIE devices through a depth-first algorithm.

[0125] In PCIe, scanning is usually done in a tree structure, using a depth-first algorithm to traverse all devices. This means that the system starts from the root bus and scans each device layer by layer.

[0126] Step S302: Obtain the PCIe device identifier corresponding to each PCIe device and the identifier of the PCIe device manufacturer.

[0127] Specifically, the PCIe device identifier corresponding to each PCIe device and the PCIe device manufacturer identifier can be obtained through pre-configured software. In an optional example, the software mentioned here can include hardware detection tools provided by the operating system, such as the Device Manager in Windows, the lspci command in Linux, or graphical interface-based hardware detection tools such as gnome-discoveries or kcmshell5 / plasmashell. Or third-party system management software such as HWM, CPU-Z, GPU-Z, etc.

[0128] Step S303: Identify the PCIe device identifier and the PCIe device manufacturer identifier corresponding to each PCIe device.

[0129] Step S304: When it is determined that the parameter value of any parameter in the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device is a preset threshold, it is determined that the second PCIe device is incorrectly identified.

[0130] or,

[0131] Step S305 : When it is determined that the parameter values ​​corresponding to the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device are not preset thresholds, it is determined that the second PCIe device is correctly identified.

[0132] Specifically, after the PCIe device identifier (Device ID, abbreviated as DID) and the PCIe device manufacturer identifier (Vendor ID, abbreviated as VID) are read by software, because DID is the unique identifier of the device and VID is the identifier of the device manufacturer, these two values ​​are used together to identify the device.

[0133] When it is determined that the parameter value of any parameter in the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device is a preset threshold, it is determined that the second PCIe device is incorrectly identified. In a specific example, the preset threshold is, for example, FFFF.

[0134] Specifically, in the PCIe specification, FFFF (hexadecimal) is a special value that usually indicates an invalid or unrecognized state. If the DID and VID read by the software are not FFFF, it means that the system has recognized the corresponding device.

[0135] If the return value is FFFF, it means there is a recognition error. Otherwise, it means the recognition is correct.

[0136] Step S306: When it is determined that the second PCIe device is correctly identified, read register configuration information corresponding to the second PCIe device from a pre-configured register.

[0137] Step S307: Determine, based on the register configuration information, whether the second PCIe device has hardware capability for end-to-end cyclic redundancy check and whether it supports end-to-end cyclic redundancy check.

[0138] Step S308: When it is determined that the second PCIe device has hardware capability for end-to-end cyclic redundancy check and supports end-to-end cyclic redundancy check, determine whether the second PCIe device performs ECRC processing according to the first configuration information and the second configuration information.

[0139] Specifically, when it is determined that the second PCIe device exists, register configuration information in the Advanced Error Capabilities and Control Register (AECR) may be read.

[0140] In an optional example, the register configuration information includes a first flag bit and a second flag bit; wherein the first flag bit is used to indicate whether the second PCIe device has the hardware capability of end-to-end cyclic redundancy check; the second flag bit is used to indicate whether the second PCIe device supports end-to-end cyclic redundancy check.

[0141] For details, see Figure 4 As shown, Figure 4 The figure shows the field allocation diagram of the AECR register, which includes the First Error Pointer (first error pointer), ECRC Generation Capable (capability to generate ECRC detection), ECRC Generation Enable (capability to generate ECRC support detection), ECRC Check Capable (ECRC generation capability bit), ECRC Check Enable (ECRC generation enable bit), Multiple Header Recording Capable (multiple header recording capability), Multiple Header Recording Enable (start multiple header recording), TLPPrefix Log Present (TLP prefix log exists), and Completion Timeout Prefix / Header LogCpapble (completion timeout shallow drunk / header log recording capability) and other fields.

[0142] Among them, ECRC Check Capable (ECRC generation capability bit) is the first flag bit mentioned above, and ECRC Check Enable (ECRC generation enable bit) is the second flag bit mentioned above.

[0143] Among them, the first flag bit is used to indicate whether the second PCIE device has the hardware capability to perform ECRC checks. If this bit is set, it means that the second PCIE device has the hardware resources to perform ECRC checks. The function of the first flag bit is equivalent to a capability statement, telling the system whether the second PCIE device can support ECRC checks, but it does not necessarily mean that the function is currently enabled. The second flag bit controls the actual enablement status of the ECRC check function. If this bit is set to an invalid state, then even if the second PCIE device has the capability of ECRC checks, the ECRC check function will not be enabled. The two work together at the hardware level to ensure the correct configuration and use of the data integrity check function.

[0144] In a specific example, if the ECRC Check Capable bit of the register AECR is 0, the PCIE device does not have the ECRC check capability; if the ECRC Check Capable bit of the register Advanced Error Capabilities and Control Register is 1, the PCIE device has the ECRC check capability.

[0145] Similarly, if the ECRC Check Enable bit in the register is 0, the ECRC function is not supported. On the contrary, if the ECRC Check Enable bit is 1, the ECRC function is supported.

[0146] Among them, for devices that do not have ECRC checking capabilities, the "IIO Per Port ECRC Support" option value corresponding to this device is forcibly disabled and written to 0 in the software. That is, even if "IIO Per Port ECRC Support" is enabled, the option is actually forcibly disabled;

[0147] For devices with ECRC checking capability, the software will not forcibly disable the "IIO Per Port ECRCSupport" option value corresponding to this device and write it to 0, that is, enable "IIO Per Port ECRC Support".

[0148] That is, the configuration information in the register determines whether the ECRC check capability and support for ECRC processing are available at the hardware level. If the hardware level does not support or does not have the capability, the PCIE device cannot perform ECRC operations even if the IIO Per Port ECRC Support option and the Per Port Support option are configured at the software level.

[0149] In an optional example, when determining that any parameter value of the parameter values ​​corresponding to the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device is a preset threshold, it generally includes the following situations:

[0150] The connection between the second PCIe device and the PCIe bus fails;

[0151] and / or,

[0152] The second PCIe device is not initialized correctly or is not configured correctly by the server;

[0153] and / or,

[0154] The second PCIe device is incompatible with the server.

[0155] If any of the parameter values ​​corresponding to the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device exceeds the preset threshold, the following measures may be taken:

[0156] For example, 1) in case of connection failure:

[0157] Yes, try to reconnect the second PCIe device.

[0158] For example, you can physically reset the PCIe interface or force restart the device through software commands.

[0159] Check the physical connection:

[0160] Make sure all connected cables are correct and not damaged, and replace cables if necessary.

[0161] Bus Check:

[0162] Check the PCIe bus for device failures or resource conflicts. If a device failure or resource conflict is confirmed, reallocate PCIe resources as needed.

[0163] 2) For improper initialization or configuration:

[0164] Driver Update:

[0165] Make sure the correct drivers are installed on the server and that they are the latest versions.

[0166] BIOS / UEFI settings:

[0167] Check the server BIOS / UEFI settings to ensure that the PCIe device is not disabled and is configured correctly.

[0168] Manual configuration:

[0169] If automatic configuration fails, try manually setting the PCIe device configuration parameters, such as interrupt request (IRQ) and memory address.

[0170] 3) For device incompatibility:

[0171] Hardware Compatibility List:

[0172] Refer to the manufacturer's hardware compatibility list to ensure that the second PCIe device is compatible with the server hardware.

[0173] Driver Compatibility:

[0174] Ensure that the PCIe device driver is compatible with the server operating system.

[0175] Update your hardware:

[0176] If the device is incompatible, you can consider upgrading the server hardware or replacing it with a compatible PCIe device.

[0177] During implementation, automated diagnostic tools can be used to detect and isolate issues, helping to identify connection failures, initialization errors, or incompatibilities. In an optional example, remote management tools can be used to access and configure PCIe devices, reducing the need for physical access. Server and PCIe device log files can be analyzed to identify error messages and fault codes to determine the root cause of the problem. The aforementioned measures can then be used to resolve the technical issue.

[0178] In addition, if the PCIE device supports hot plugging, you can try reinserting the device. Sometimes this operation can also solve the initialization problem.

[0179] In an optional example, the method further includes:

[0180] By scanning the PCIe bus, the PCIe device bus number, PCIe device number, and PCIe device function number corresponding to each PCIe device are obtained;

[0181] When it is determined that the second PCIe device is correctly identified, the location of the second PCIe device is determined according to the PCIe device bus number, PCIe device number, and PCIe device function number corresponding to the PCIe device.

[0182] By scanning the PCIe bus to obtain the bus number, device number, and function number of each PCIe device, the physical location and identification of each PCIe device can be accurately determined, facilitating system management and troubleshooting. When a system problem occurs, the specific PCIe device can be quickly located, facilitating rapid troubleshooting and resolution.

[0183] In the present embodiment, a device for dynamically adjusting the ECRC function is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be repeated hereafter. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and contemplated.

[0184] This embodiment provides a device for dynamically adjusting the ECRC function. The device corresponds to a server, and the server is connected to at least one PCIe device, such as Figure 5 As shown, it includes: an identification module 501 and a processing module 502.

[0185] The device corresponds to a server, the server is connected to at least one PCIe device, and the device includes:

[0186] The identification module 501 is configured to, upon power-up, identify first configuration information pre-configured on each PCIe device, wherein the first configuration information is used to indicate whether the device has an end-to-end cyclic redundancy check function; and when it is determined based on the first configuration information that the first PCIe device has the end-to-end cyclic redundancy check function, identify second configuration information pre-configured on the first PCIe device, wherein the first PCIe device is any one of the at least one PCIe devices, and the second configuration information is used to indicate whether the end-to-end cyclic redundancy check function is enabled on the first PCIe device.

[0187] The processing module 502 is configured to perform an end-to-end cyclic redundancy check on data transmitted between the server and the first PCIe device when it is determined according to the second configuration information that the end-to-end cyclic redundancy check function is enabled on the first PCIe device.

[0188] In an optional example, the first configuration information is configured by setting a target optional option based on the ECRC option configured in the first PCIe device, the target optional option corresponds to a first string, and the attribute value corresponding to the first string is used to indicate whether the first PCIe device has an ECRC function.

[0189] In an alternative example, the target options may be expressed as: Per Port Support;

[0190] The expression of the first character string includes: STR_PER_PORT_SUPPORT.

[0191] In an optional example, the second configuration information is configured by setting a target option on the PCIe device, the target option corresponds to a second string, and the attribute value corresponding to the second string is used to indicate whether the PCIe device enables the ECRC function.

[0192] In an optional example, the target option is expressed as follows: IIO Per Port ECRC Support;

[0193] The expression form of the second character string includes: STR_IIO_PRR_PORT_ECRC_SUPPORT.

[0194] In an optional example, the apparatus further includes: a scanning module 503, an acquisition module 504, and a reading module 505;

[0195] A scanning module 503 is configured to obtain each PCIe device connected to the server by scanning the PCIe bus;

[0196] An acquisition module 504 is configured to respectively acquire a PCIe device identifier corresponding to each PCIe device and an identifier of a PCIe device manufacturer;

[0197] The identification module 501 is further configured to identify a PCIe device identifier and a PCIe device manufacturer identifier corresponding to each PCIe device;

[0198] The processing module 502 is further configured to determine that the second PCIe device is incorrectly identified when it is determined that a parameter value of any parameter in the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device is equal to a preset threshold, wherein the second PCIe device is any PCIe device connected to the server; or determine that the second PCIe device is correctly identified when it is determined that the parameter values ​​corresponding to the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device are both not equal to the preset threshold.

[0199] The reading module 505 is configured to read register configuration information corresponding to the second PCIe device from a pre-configured register when it is determined that the second PCIe device is correctly identified;

[0200] The processing module 502 is further configured to determine, based on the register configuration information, whether the second PCIe device has the hardware capability for end-to-end cyclic redundancy check checking and whether it supports end-to-end cyclic redundancy check checking; and when it is determined that the second PCIe device has the hardware capability for end-to-end cyclic redundancy check checking and supports end-to-end cyclic redundancy check checking, determine, based on the first configuration information and the second configuration information, whether the second PCIe device performs end-to-end cyclic redundancy check processing.

[0201] In an optional example, the register configuration information includes a first flag bit and a second flag bit; wherein the first flag bit is used to indicate whether the second PCIe device has the hardware capability of end-to-end cyclic redundancy check; the second flag bit is used to indicate whether the second PCIe device supports end-to-end cyclic redundancy check.

[0202] In an optional example, the scanning module 503 is further configured to obtain the PCIe device bus number, PCIe device number, and PCIe device function number corresponding to each PCIe device by scanning the PCIe bus;

[0203] The processing module 502 is further configured to determine the location of the second PCIe device according to the PCIe device bus number, PCIe device number, and PCIe device function number corresponding to the PCIe device when it is determined that the second PCIe device is correctly identified.

[0204] In an optional example, when it is determined that any parameter value corresponding to the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device is a preset threshold, the following situations are included:

[0205] The connection between the second PCIe device and the PCIe bus fails;

[0206] and / or,

[0207] The second PCIe device is not initialized correctly or is not configured correctly by the server;

[0208] and / or,

[0209] The second PCIe device is incompatible with the server.

[0210] The device for dynamically adjusting the ECRC function in this embodiment is presented in the form of a functional module, where the module refers to an application-specific integrated circuit (ASIC), a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.

[0211] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0212] An embodiment of the present invention provides a device for dynamically adjusting the ECRC function. By pre-configuring first configuration information, the system can quickly identify which PCIe devices support the ECRC function. Using second configuration information, the system can identify which PCIe devices that support the ECRC function have the ECRC function enabled. This facilitates the execution of ECRC check processing on devices that support and have the ECRC function enabled after receiving data. This approach eliminates the need to indiscriminately perform the ECRC function on all PCIe devices. Instead, all PCIe devices are individually configured by adding the first and second configuration information. After the server is powered on, the system traverses all PCIe devices to identify which PCIe devices have specific capabilities and have the ECRC function enabled. The system then performs the corresponding ECRC processing on these PCIe devices. For PCIe devices that do not support the ECRC function or have the ECRC function disabled, the ECRC processing is not performed. This approach prevents downtime caused by PCIe devices lacking the ECRC function, improving system reliability and stability.

[0213] The embodiment of the present invention also provides a computer device having the above Figure 5The device for dynamically adjusting the ECRC function is shown.

[0214] See also Figure 6 , Figure 6 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.

[0215] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include an integrated circuit. The integrated circuit may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0216] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.

[0217] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created based on the use of a computer device for displaying a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0218] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0219] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 6 The bus connection is taken as an example.

[0220] The input device 30 can receive input digital or character information and generate key signal input related to user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0221] The embodiment of the present invention also provides a computer-readable storage medium. The method provided in the above embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0222] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0223] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for dynamically adjusting an end-to-end cyclic redundancy check function, characterized in that: The method is applied to a server, the server is connected to at least one PCIe device, and the method is executed by the server, and the method includes: After the machine is powered on, identifying first configuration information pre-configured on each of the PCIe devices, wherein the first configuration information is used to indicate whether an end-to-end cyclic redundancy check function is provided; When it is determined according to the first configuration information that the first PCIe device has the end-to-end cyclic redundancy check function, identifying second configuration information preconfigured by the first PCIe device, wherein the first PCIe device is any one of the at least one PCIe device, and the second configuration information is used to indicate whether to enable the end-to-end cyclic redundancy check function on the first PCIe device; When it is determined according to the second configuration information that the end-to-end cyclic redundancy check function is enabled on the first PCIe device, an end-to-end cyclic redundancy check process is performed on data transmitted between the server and the first PCIe device.

2. The method according to claim 1, characterized in that The first configuration information is configured by setting a target optional item based on the end-to-end cyclic redundancy check option configured by the first PCIe device, the target optional item corresponds to a first string, and the attribute value corresponding to the first string is used to indicate whether the first PCIe device has an end-to-end cyclic redundancy check function.

3. The method according to claim 1, characterized in that The second configuration information is configured by setting a target option on the PCIe device, the target option corresponds to a second string, and the attribute value corresponding to the second string is used to indicate whether the PCIe device enables the end-to-end cyclic redundancy check function.

4. The method according to any one of claims 1 to 3, characterized in that: After the power is turned on, before identifying the first configuration information pre-configured on each of the PCIe devices, the method further includes: By scanning the PCIe bus, each PCIe device connected to the server is obtained; Respectively obtain a PCIe device identifier corresponding to each of the PCIe devices and an identifier of a PCIe device manufacturer; Identify a PCIe device identifier and a PCIe device manufacturer identifier respectively corresponding to each of the PCIe devices; When it is determined that the parameter value of any parameter in the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device is a preset threshold, determining that the second PCIe device is incorrectly identified, wherein the second PCIe device is any PCIe device connected to the server; or, When it is determined that the parameter values ​​corresponding to the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device are not the preset thresholds, determining that the second PCIe device is correctly identified; When it is determined that the second PCIe device is correctly identified, reading register configuration information corresponding to the second PCIe device from a preconfigured register; Determining, according to the register configuration information, whether the second PCIe device has hardware capability for end-to-end cyclic redundancy check checking and whether it supports end-to-end cyclic redundancy check checking; When it is determined that the second PCIe device has the hardware capability of end-to-end cyclic redundancy check and supports end-to-end cyclic redundancy check, determine whether the second PCIe device performs the end-to-end cyclic redundancy check processing based on the first configuration information and the second configuration information.

5. The method according to claim 4, characterized in that The register configuration information includes a first flag bit and a second flag bit; wherein the first flag bit is used to indicate whether the second PCIe device has the hardware capability of end-to-end cyclic redundancy check; the second flag bit is used to indicate whether the second PCIe device supports end-to-end cyclic redundancy check.

6. The method according to claim 4, characterized in that The method further comprises: By scanning the PCIe bus, the PCIe device bus number, PCIe device number, and PCIe device function number corresponding to each of the PCIe devices are obtained; When it is determined that the second PCIe device is correctly identified, the location of the second PCIe device is determined according to the PCIe device bus number, PCIe device number, and PCIe device function number corresponding to the PCIe device.

7. The method according to claim 4, characterized in that When it is determined that any parameter value of the parameter values ​​corresponding to the PCIe device identifier corresponding to the second PCIe device and the identifier of the PCIe device manufacturer is the preset threshold, the following situations are included: The second PCIe device fails to connect to the PCIe bus; and / or, The second PCIe device is not correctly initialized or configured by the server; and / or, The second PCIe device is incompatible with the server.

8. A device for dynamically adjusting an end-to-end cyclic redundancy check function, characterized in that: The device corresponds to a server, the server is connected to at least one PCIe device, and the device includes: an identification module, configured to identify, after powering on, first configuration information pre-configured on each of the PCIe devices, wherein the first configuration information is used to indicate whether an end-to-end cyclic redundancy check function is provided; when it is determined according to the first configuration information that the first PCIe device has the end-to-end cyclic redundancy check function, identify second configuration information pre-configured on the first PCIe device, wherein the first PCIe device is any one of the at least one PCIe devices, and the second configuration information is used to indicate whether the end-to-end cyclic redundancy check function is enabled on the first PCIe device; A processing module is used to perform end-to-end cyclic redundancy check processing on data transmitted between the server and the first PCIe device when it is determined according to the second configuration information that the end-to-end cyclic redundancy check function is enabled on the first PCIe device.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for dynamically adjusting the end-to-end cyclic redundancy check function according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for dynamically adjusting an end-to-end cyclic redundancy check function according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Flexibly integrating endpoint logic into varipus platforms

    CN103297330A

  • Flexibly integrating endpoint logic into varied platforms

    CN103795615A

  • PCIe equipment signal parameter dynamic correction device and method

    CN111984477A

  • PCIe-based data transmission method and device

    CN113498595A

  • Method and architecture to prevent corrupt data propagation from a PCI express retry buffer

    US20090106636A1