Method, device and equipment for dynamically adjusting end-to-end cyclic redundancy check function
By identifying the configuration information of PCIe devices and dynamically adjusting the end-to-end cyclic redundancy check (ECCRC) function, the check process is only performed on devices that support ECRC, thus solving the downtime problem caused by PCIe devices lacking ECRC functionality and improving the reliability and stability of the system.
Patent Information
- Application Number
- CN202411591748.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-11-08
AI Technical Summary
In the existing technology, if PCIe devices do not have end-to-end cyclic redundancy check (CRC) functionality, enabling this function indiscriminately can easily trigger PCIe UCE, causing the machine to crash and interrupting ongoing tasks.
By identifying the configuration information of each PCIe device, the end-to-end cyclic redundancy check function is dynamically adjusted, and ECRC check processing is performed only on devices that support the ECRC function, avoiding performing ECRC processing on devices that do not support the ECRC function.
It improves the reliability and stability of the system, prevents downtime caused by PCIe devices lacking ECRC functionality, simplifies the device configuration process, and improves management efficiency and compatibility.
Smart Images

Figure CN119718765B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically to a method, apparatus, and equipment for dynamically adjusting end-to-end cyclic redundancy check (CRC) functionality. Background Art
[0002] In the PCIe (PCI Express) protocol, End-to-End Cyclic Redundancy Check (CRC) is a mechanism used for end-to-end data integrity verification. The full name of End-to-End Cyclic Redundancy Check is End-to-End CRC. Its principle is to perform a CRC (Cyclic Redundancy Check) calculation on the data during transmission and append 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 whether an error occurred during data transmission.
[0003] In related technologies, when performing end-to-end cyclic redundancy check (CRC) on PCIe devices, this function is performed indiscriminately on all PCIe devices. However, in certain special cases, if a PCIe device lacks end-to-end CRC check capability, it will trigger PCIe UCE, causing machine crashes, interrupting ongoing tasks, and resulting in 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, in order to solve the problem that if some PCIe devices do not have end-to-end cyclic redundancy check capability, the PCIe UCE may be easily triggered when the function is enabled indiscriminately, causing the machine to crash and interrupting the ongoing task.
[0005] In a first aspect, the present invention provides a method for dynamically adjusting the end-to-end cyclic redundancy check function. This method is applied to a server, which is connected to at least one PCIe device. The method is executed by the server and includes:
[0006] Upon power-on, the system identifies the first configuration information pre-configured on each PCIe device, where the first configuration information is used to indicate whether end-to-end cyclic redundancy check functionality is available.
[0007] When it is determined that the first PCIe device has end-to-end cyclic redundancy check function according to the first configuration information, the second configuration information pre-configured by the first PCIe device is identified, wherein the first PCIe device is any one of at least one PCIe device, 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 that the end-to-end cyclic redundancy check function is enabled on the first PCIe device based on the second configuration information, end-to-end cyclic redundancy check processing is performed on the data transmitted between the server and the first PCIe device.
[0009] The present invention provides a method for dynamically adjusting the end-to-end cyclic redundancy check function, which has the following advantages:
[0010] By pre-configuring the first configuration information, the system can quickly identify which PCIe devices support ECRC functionality. Using the second configuration information, the system can identify which PCIe devices that support ECRC and have it enabled. This facilitates ECRC verification processing on devices that support ECRC and have it enabled at the sender and receiver after receiving data. This approach avoids indiscriminately performing ECRC on all PCIe devices. Instead, by adding the first and second configuration information, each PCIe device is configured individually. After the server powers on, it iterates through all PCIe devices, identifies which have specific capabilities and have enabled ECRC, and performs the corresponding ECRC processing on these devices. For PCIe devices that do not support ECRC or have not enabled ECRC, no ECRC processing is performed. This method prevents downtime caused by PCIe devices lacking ECRC functionality, improving system reliability and stability.
[0011] In one optional implementation, the first configuration information is configured by setting a target option based on the ECRC option configured in the first PCIe device. The target 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 ECRC functionality.
[0012] Specifically, the configuration process becomes simple and intuitive by using predefined target options and strings. System administrators do not need to delve into the complex details of ECRC; they can simply select the corresponding string to set device functions, thus simplifying the configuration process. Furthermore, using strings and attribute values facilitates configuration and maintenance for administrators. This configuration method makes device configuration more standardized, facilitating batch management and updates. Moreover, using standardized strings to indicate ECRC functions helps ensure compatibility between different devices. If devices from different manufacturers follow the same configuration standard, interaction between devices will be smoother.
[0013] In one alternative implementation, the target option can be expressed as: Per Port Support;
[0014] The first string can be expressed as: STR_PER_PORT_SUPPORT.
[0015] In one alternative 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 / disabled status of the ECRC function makes the device configuration process more intuitive and easier to understand. This helps system administrators quickly identify and adjust device configurations. By using predefined strings to control the enabling / disabled status of the ECRC function, configuration errors caused by manual input mistakes or misunderstandings of technical terms can be reduced. This configuration method provides flexible control, allowing system administrators to easily enable or disable the ECRC function according to specific application needs and performance requirements. For system administrators, using strings to manage the device's ECRC function configuration simplifies system management tasks and improves management efficiency. For software developers, using simple string configurations instead of complex binary or structured configurations can accelerate development progress and reduce error rates. When system problems occur, checking the ECRC function configuration status allows for quick diagnosis of the problem's source and appropriate recovery measures.
[0017] In one alternative implementation, the target option is expressed as: IIO Per Port ECRCSupport;
[0018] The second string can be expressed in the form of: STR_IIO_PRR_PORT_ECRC_SUPPORT.
[0019] In one alternative implementation, before identifying the pre-configured first configuration information on each PCIe device after power-on, the method further includes:
[0020] By scanning the PCIe bus, each PCIe device that has established a connection with the server can be identified;
[0021] Obtain the PCIe device identifier and the PCIe device manufacturer identifier for each PCIe device.
[0022] Identify the PCIe device identifier and PCIe device manufacturer identifier corresponding to each PCIe device;
[0023] When the parameter value of any parameter in the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device is determined to be a preset threshold, it is determined that the second PCIe device is incorrectly identified. Here, the second PCIe device is any PCIe device that has established a connection with 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 of the second PCIe device are not at the preset threshold, the second PCIe device is determined to be correctly identified.
[0026] When it is determined that the second PCIe device is correctly identified, the register configuration information corresponding to the second PCIe device is read from the pre-configured registers;
[0027] Based on the register configuration information, determine whether the second PCIe device has the hardware capability for end-to-end cyclic redundancy check and whether it supports end-to-end cyclic redundancy check.
[0028] When it is determined that the second PCIe device has the 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 based on 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, the system can ensure complete identification of all connected devices. Obtaining the PCIe device identifier and manufacturer identifier helps the system accurately identify and distinguish different devices, preventing identification errors. Determining whether the device identifier and manufacturer identifier reach preset thresholds can automatically detect identification errors and improve the system's self-checking capability regarding device status. Once the device is confirmed to be correctly identified, register configuration information is read from pre-configured registers. Based on this information, the system determines whether the device has the hardware capability for ECRC checking and whether it supports end-to-end cyclic redundancy check (CRC) checking. The hardware characteristics confirm whether the PCIe device has ECRC functionality and whether it supports this function. If a device lacks the hardware capability for ECRC, the system can automatically adjust the configuration to disable the ECRC function, avoiding unnecessary configuration errors later.
[0030] In one optional implementation, 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 for end-to-end cyclic redundancy check; and 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 indicates 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 first flag acts as a capability declaration, telling the system whether the second PCIe device can support ECRC checks, but does not necessarily mean that the function is currently enabled. The second flag 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 to perform ECRC checks, the ECRC check function will not be enabled. Both work together at the hardware level to ensure the correct configuration and use of the data integrity verification function.
[0032] In one alternative implementation, 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 can be obtained.
[0034] Once it is confirmed that the second PCIe device is correctly identified, the location of the second PCIe device is determined based on 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 PCIe devices, the physical location and identification of each PCIe device can be accurately determined, which is helpful for system management and fault diagnosis. When a system problem occurs, the specific PCIe device can be quickly located, facilitating rapid fault diagnosis and troubleshooting.
[0036] In one optional implementation, when it is determined that either the parameter value corresponding to the PCIe device identifier and the PCIe device manufacturer identifier of the second PCIe device is a preset threshold, the following situations apply:
[0037] The second PCIe device failed to connect to the PCIe bus;
[0038] And / or,
[0039] The second PCIe device was not correctly initialized or configured 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 an apparatus for dynamically adjusting the ECRC function, the apparatus corresponding to a server, the server being connected to at least one PCIe device, the apparatus comprising:
[0043] The identification module is used to identify the first configuration information pre-configured on each PCIe device after power-on, wherein the first configuration information is used to indicate whether end-to-end cyclic redundancy check (CRC) function is available; when it is determined that the first PCIe device has CRC function based on the first configuration information, the module identifies the second configuration information pre-configured on the first PCIe device, wherein the first PCIe device is any one of at least one PCIe device, and the second configuration information is used to indicate whether end-to-end CRC function is enabled on the first PCIe device.
[0044] The processing module is used to perform end-to-end cyclic redundancy check processing on the data transmitted between the server and the first PCIe device when it is determined from the second configuration information that the end-to-end cyclic redundancy check function is enabled on the first PCIe device.
[0045] The device for dynamically adjusting the ECRC function provided by this invention has the following advantages:
[0046] By pre-configuring the first configuration information, the system can quickly identify which PCIe devices support ECRC functionality. Using the second configuration information, the system can identify which PCIe devices that support ECRC and have it enabled. This facilitates ECRC verification processing on devices that support ECRC and have it enabled at the sender and receiver after receiving data. This approach avoids indiscriminately performing ECRC on all PCIe devices. Instead, by adding the first and second configuration information, each PCIe device is configured individually. After the server powers on, it iterates through all PCIe devices, identifies which have specific capabilities and have enabled ECRC, and performs the corresponding ECRC processing on these devices. For PCIe devices that do not support ECRC or have not enabled ECRC, no ECRC processing is performed. This method prevents downtime caused by PCIe devices lacking ECRC functionality, improving system reliability and stability.
[0047] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the method for dynamically adjusting the ECRC function described in the first aspect or any corresponding embodiment.
[0048] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the method for dynamically adjusting the ECRC function described in the first aspect or any corresponding embodiment thereof.
[0049] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to perform the method for dynamically adjusting the ECRC function described in the first aspect or any corresponding embodiment. Attached Figure Description
[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 This is a flowchart illustrating a method for dynamically adjusting the ECRC function provided in an embodiment of the present invention;
[0052] Figure 2 This is a conceptual flow diagram of transaction-level data packets at each layer during the data transmission process provided by the present invention;
[0053] Figure 3 This is a flowchart illustrating another method for dynamically adjusting the ECRC function provided in an embodiment of the present invention;
[0054] Figure 4 This is a schematic diagram of the 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 the ECRC function provided in an embodiment of the present invention;
[0056] Figure 6 This is a schematic diagram of the hardware structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0058] In the PCIe (PCI Express) protocol, ECRC (End-to-End CRC) is a mechanism for end-to-end data integrity verification. ECRC stands for End-to-End Cyclic Redundancy Check. Its principle is to perform a CRC (Cyclic Redundancy Check) calculation on the data during transmission and append 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 whether an error occurred during transmission.
[0059] ECRC calculation is based on the header and data payload of the TLP. Upon receiving the TLP, the receiver calculates its ECRC value in the transaction layer and appends it to the end of the transaction layer packet (TLP). The receiver then recalculates the ECRC value for this content and compares it with the ECRC value in the received TLP to verify the correctness of the message content. If the comparison results are inconsistent, the receiver discards the TLP and records the error.
[0060] This mechanism can effectively detect errors during data transmission. If the CRC calculated by the receiver does not match the CRC appended by the sender, it means that an error has occurred during data transmission. The receiver can then request retransmission of the data or perform other error handling. This helps the system to promptly detect and correct errors during data transmission, improving the system's reliability and stability.
[0061] In the PCIe protocol, the ECRC insertion and verification functions 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). An ECRC Check Capable value of 1 indicates that the EP (Electronic Processing Unit) has the capability to detect ECRC, while an ECRC Check Enable value of 1 indicates that ECRC detection is supported.
[0062] Furthermore, 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] In the PCIe protocol, ECRC is used to improve the reliability of data transmission. It detects errors during transmission by appending a check field to the end of the TLP, ensuring the integrity and correctness of the data.
[0064] The current ECRC option sets all IIO ports; turning it on or off applies to all PCIe devices on the machine.
[0065] Specifically, the ECRC option configures all IIO ports; enabling or disabling it applies to all PCIe devices on the machine. When the ECRC option is enabled, if a device lacks ECRC check capabilities, it will trigger PCIe UCE, causing the machine to crash, interrupting ongoing tasks, and resulting in a poor user experience.
[0066] To address the aforementioned problems, this invention provides an embodiment for dynamically adjusting the ECRC function. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system (computer device) including a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0067] This embodiment provides a method for dynamically adjusting the ECRC function, which can be used in the aforementioned terminal devices, such as mobile phones and tablet computers. Figure 1 This is a flowchart illustrating a method for dynamically adjusting the ECRC function provided in an embodiment of the present invention, as shown below. Figure 1 As shown, this method is applied to a server, which is connected to at least one PCIe device, and the method process is executed by the server.
[0068] Before introducing the method steps of the embodiments of this application, we will first introduce the preparatory work and related information before performing the method steps. See below for details:
[0069] PCI Express (PCIe) is a high-speed serial computer expansion bus standard. PCIe is the standard interface for connecting various internal components of 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 for data transfer between the server and its internal or external devices. In some practical applications, PCIe is typically used for internal server expansion, such as for graphics cards (GPUs), network adapters (NICs), storage controllers, and input / output (I / O) cards. Furthermore, through PCIe external expansion slots, servers can connect external devices, such as USB 3.0 expansion cards and SATA storage expansion enclosures.
[0070] In addition to the above, PCIe also includes the following functions:
[0071] PCIe provides allocatable 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 execution of graphics processing tasks. It also provides error detection and recovery mechanisms to 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 a computer or server via the PCIe bus. Here are some common PCIe device types:
[0073] 1. Graphics card (GPU): This is one of the most typical PCIe devices.
[0074] High-performance graphics cards offer faster graphics processing capabilities, supporting complex 3D graphics rendering, gaming, and video editing.
[0075] 2. Network Adapter: PCIe network adapters provide high-speed network connectivity, including Ethernet and wireless network adapters.
[0076] They support higher data transmission rates and are suitable for applications that require fast network communication.
[0077] 3. Storage controllers: These devices include solid-state drive (SSD) controllers, independent disk redundant array controllers, and storage expansion cards, which provide high-speed data storage and access capabilities.
[0078] 4. Sound Card: PCIe sound cards provide high-quality audio output and input functions, and support 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 offer more advanced functions and higher precision.
[0081] 7. Communication cards: These cards are used for specific communication needs, such as fiber channel adapters, wireless communication modules, etc.
[0082] 8. Other external devices: External devices connected via PCIe expansion slots, such as external storage arrays, USB 3.0 docking stations, etc.
[0083] During data transfer, PCI Express (High-Speed Serial Computer Expansion Bus standard) uses data packets to pass information between components.
[0084] Data packets are formed at the transaction and data link layers to transmit information from the transmission component to the receiving component;
[0085] At the receiving end, the data packet is converted from its physical layer representation to its data link layer representation, and finally to a form that the transaction layer of the receiving device can process.
[0086] See details Figure 2 As shown, Figure 2 The diagram illustrates the conceptual flow of transaction-level data packets at each layer.
[0087] Specifically, it includes:
[0088] Framing: At the sender, this is the process of constructing data into PCIe frames. At the receiver, the received frames are parsed to extract the data. This data processing is implemented at the Physical Layer.
[0089] Sequence number header data: Included in the header of a PCIe packet, this data sequence number identifies the order of the 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. The corresponding processing is implemented at the Data Link Layer, which is Layer 2 in the OSI model. It sits above the Physical Layer and below the Network Layer.
[0090] Also at the data link layer is the Link Control Redundancy Check (LCRC) at the receiving end, which is also performed at the data link layer.
[0091] When a PCIe device sends data, the Transaction Layer calculates the 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 will send a 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 at the receiving end recalculates the ECRC of the TLP header and data payload. The receiving end then 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 transmission.
[0096] The receiver will discard this erroneous TLP and may log the error information for troubleshooting.
[0097] ECRC is a key feature of the PCIe protocol. It is calculated at the transaction layer and appended to the end of each Transmission Link Buffer (TLP) to detect errors in data transmission. The receiving end verifies data integrity by recalculating the ECRC and comparing it with the received value. If an error is detected, the receiving end discards the packet and logs the error. This process involves the transaction layer, data link layer, and physical layer.
[0098] The following describes the preparatory work for the method described in this application, specifically 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 option based on the ECRC option configured on the first PCIe device. The target 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 target options on the PCIe device. The target options correspond to the second string, and the attribute value corresponding to the second string is used to indicate whether the PCIe device enables end-to-end cyclic redundancy check function.
[0102] In a specific example, the target options could be expressed as: Per Port Support;
[0103] The first string can be expressed as: STR_PER_PORT_SUPPORT.
[0104] The target options can be expressed as: IIO Per Port ECRC Support;
[0105] The second string can be expressed in the form of: STR_IIO_PRR_PORT_ECRC_SUPPORT.
[0106] The "Per Port Support" option is optional for ECRC. In practical applications, when all PCIe devices have ECRC verification functionality, it's advisable to change the default value of the ECRC option to "Per Port Support." Furthermore, the "Per Port Support" attribute value should be configured to indicate that ECRC functionality is enabled, for example, to be 2.
[0107] For IIO Per Port ECRC Support, the same options are configured for the threshold. For example, the first option is Disabled, which is defined as “STR_DISABLED” and has a value of “0”, indicating that the ECRC function is not enabled. The second option is Enabled, which is defined as “STR_ENABLED” and has a value of “1”, indicating that the ECRC function is enabled.
[0108] In practical applications, if all PCIe devices have ECRC verification functionality and all need to have this functionality enabled, the default value of the IIO Per Port ECRC Support option can be set to "Enabled".
[0109] In practice, the specific procedures will be determined based on the actual circumstances.
[0110] The following section details the method and process of this application, including the following steps:
[0111] Step S101: After power-on, identify the first configuration information pre-configured on each PCIe device.
[0112] The first configuration information is used to indicate whether end-to-end cyclic redundancy check (CRC) is enabled.
[0113] As mentioned earlier, the first configuration information is used to indicate whether a PCIe device has ECRC functionality. To prevent subsequent system crashes caused by enabling ECRC functionality on a PCIe device that does not have it, after the server powers on, it first iterates through each PCIe device to identify whether each PCIe device has the first configuration information.
[0114] Step S102: When it is determined that the first PCIe device has end-to-end cyclic redundancy check function based on the first configuration information, the second configuration information pre-configured by the first PCIe device is identified.
[0115] Specifically, when, based on the first configuration information, it is determined that among the at least one PCIe device establishing a PCIe connection with the server, the first PCIe device has ECRC functionality, it is further necessary to determine whether the device has already enabled ECRC functionality. Therefore, it is also necessary to identify the second configuration information of the first PCIe device. Here, the first PCIe device can be any one of the at least one PCIe device, and the second configuration information is used to indicate whether end-to-end cyclic redundancy check (ECR) functionality is enabled on the first PCIe device.
[0116] Step S103: 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, end-to-end cyclic redundancy check processing is performed on the data transmitted between the server and the first PCIe device.
[0117] Specifically, when it is determined that the ECRC function is enabled on the first PCIe device based on the second configuration information, ECRC processing can be performed on the data transmitted between the server and the first PCIe device in the future.
[0118] The method for dynamically adjusting the ECRC function provided in this embodiment allows the system to quickly identify which PCIe devices support ECRC functionality through pre-configured first configuration information. Second configuration information allows the system to identify which PCIe devices supporting ECRC functionality have enabled ECRC. This facilitates ECRC verification processing on devices that support ECRC and have enabled it after receiving data. This approach avoids indiscriminately performing ECRC on all PCIe devices. Instead, by adding first and second configuration information, each PCIe device is configured individually. After the server powers on, it iterates through all PCIe devices, identifies which have specific capabilities and individually enabled ECRC, and performs corresponding ECRC processing on these devices. For PCIe devices that do not support ECRC or have not enabled ECRC, no ECRC processing is performed. This method prevents system crashes caused by PCIe devices lacking ECRC functionality, improving system reliability and stability.
[0119] This embodiment provides a method for dynamically adjusting the ECRC function, which can be used in the aforementioned mobile terminals, such as mobile phones and tablets. Figure 3 This is a flowchart illustrating another method for dynamically adjusting the ECRC function provided in an embodiment of the present invention, as shown below. Figure 3As shown, based on the aforementioned method embodiments, after the server is powered on and before executing the identification of the first configuration information pre-configured on each PCIe device, the method further includes the following method steps, as detailed below:
[0120] Step S301: Scan the PCIe bus to obtain each PCIe device that has established a connection with the server.
[0121] Specifically, after the server is powered on, it first performs the initialization, enumeration, and configuration of all devices (including PCIe devices). Among these, enumeration refers to the process of identifying and configuring newly connected devices.
[0122] For PCIe devices, enumeration includes the following steps:
[0123] Bus scanning: The server scans the PCIe bus to find connected devices.
[0124] For PCIe devices, the server scans them using a depth-first algorithm.
[0125] In PCIe, scanning is typically performed in a tree structure, using a depth-first algorithm to traverse all devices. This means the system starts from the root bus and scans each device layer by layer downwards.
[0126] Step S302: Obtain the PCIe device identifier corresponding to each PCIe device, and the PCIe device manufacturer identifier.
[0127] Specifically, pre-configured software can be used to obtain the PCIe device identifier corresponding to each PCIe device, as well as the PCIe device manufacturer's identifier. In an optional example, the software mentioned here could include hardware detection tools built into the operating system, such as Device Manager in Windows, the lspci command in Linux, or graphical hardware detection tools such as gnome-discoveries or kcmshell5 / plasmashell. Alternatively, it could be third-party system management software such as HWM, CPU-Z, or GPU-Z.
[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 identified incorrectly.
[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 of the second PCIe device are not both at the preset threshold, it is determined that the second PCIe device is correctly identified.
[0132] Specifically, after the software reads the PCIe Device Identifier (DID) and the PCIe Device Manufacturer Identifier (VID), these two values are used together to identify the device, since the DID is the unique identifier of the device and the VID is the identifier of the device manufacturer.
[0133] If the value of any parameter in the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device is determined to be a preset threshold, then the second PCIe device is determined to be 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 typically 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 indicates a recognition error. Otherwise, it indicates a correct recognition.
[0136] Step S306: When it is determined that the second PCIe device is correctly identified, read the register configuration information corresponding to the second PCIe device from the pre-configured register.
[0137] Step S307: Based on the register configuration information, determine whether the second PCIe device has the 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 the 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 based on the first configuration information and the second configuration information.
[0139] Specifically, if a second PCIe device is confirmed to exist, the register configuration information in the Advanced Error Capabilities and Control Register (AECR) can 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 for end-to-end cyclic redundancy check; and 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 diagram illustrates the field allocation of the AECR register. The register includes fields such as First Error Pointer, ECRC Generation Capable, ECRC Generation Enable, ECRC Check Capable, ECRC Check Enable, Multiple Header Recording Capable, Multiple Header Recording Enable, TLP Prefix Log Present, and Completion Timeout Prefix / Header LogCapble.
[0142] 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] The first flag indicates whether the second PCIe device has the hardware capability to perform ECRC checks. If this bit is set, it means the second PCIe device has the hardware resources to perform ECRC checks. The first flag acts as a capability declaration, telling the system whether the second PCIe device can support ECRC checks, but does not necessarily mean the function is currently enabled. The second flag controls the actual enabled state of the ECRC check function. If this bit is set to an invalid state, the ECRC check function will not be enabled even if the second PCIe device has the capability. Both flags work together at the hardware level to ensure the correct configuration and use of the data integrity verification function.
[0144] In a specific example, if the ECRC Check Capable bit of the AECR register is 0, the PCIe device does not have ECRC checking capability; if the ECRC Check Capable bit of the Advanced Error Capabilities and ControlRegister register is 1, the PCIe device has ECRC checking capability.
[0145] Similarly, if the ECRC Check Enable bit in the register is 0, then the ECRC function is not supported; conversely, if the ECRC Check Enable bit is 1, then the ECRC function is supported.
[0146] For devices that do not have ECRC checking capabilities, the "IIO Per Port ECRC Support" option value for 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 capabilities, the software will not force the "IIO Per Port ECRCSupport" option value corresponding to this device to be disabled by writing 0, i.e., "IIO Per Port ECRC Support" will be enabled.
[0148] In other words, the configuration information in the registers determines whether ECRC checking capability and ECRC processing are available at the hardware level. If the hardware does not support or does not have this capability, even if the IIO Per Port ECRC Support option and the Per Port Support option are configured at the software level, the PCIe device still cannot perform ECRC operations.
[0149] In an optional example, when it is determined that either the parameter value corresponding to the PCIe device identifier and the PCIe device manufacturer identifier of the second PCIe device is a preset threshold, the following situations are typically included:
[0150] The second PCIe device failed to connect to the PCIe bus;
[0151] And / or,
[0152] The second PCIe device was not correctly initialized or configured by the server;
[0153] And / or,
[0154] The second PCIe device is incompatible with the server.
[0155] If either the parameter value corresponding to the PCIe device identifier and the PCIe device manufacturer identifier of the second PCIe device is a preset threshold, the following measures can be taken to handle the situation:
[0156] For example, 1) for connection failures:
[0157] Yes, try reconnecting the second PCIe device.
[0158] For example, by physically resetting the PCIe interface or by forcibly restarting the device via software commands.
[0159] Check physical connections:
[0160] Ensure all connecting cables are in good working order and undamaged; replace cables if necessary.
[0161] Bus check:
[0162] Check the PCIe bus for other device malfunctions or resource conflicts. If a device malfunction or resource conflict is identified, reallocate PCIe resources as needed.
[0163] 2) For cases where initialization or configuration was not performed correctly:
[0164] Driver update:
[0165] Ensure that the correct driver is installed on the server and that it is the latest version.
[0166] BIOS / UEFI settings:
[0167] Check the server BIOS / UEFI settings to ensure that PCIe devices are not disabled and are configured correctly.
[0168] Manual configuration:
[0169] If automatic configuration fails, try manually setting the configuration parameters of the PCIe device, such as interrupt request (IRQ) and memory address.
[0170] 3) For situations where the devices are incompatible:
[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 drivers are compatible with the server operating system.
[0175] Upgrade hardware:
[0176] If the device is incompatible, consider upgrading the server hardware or replacing it with a compatible PCIe device.
[0177] In practice, automated diagnostic tools can be used first to detect and isolate problems, helping to identify issues such as connection failures, initialization errors, or incompatibility. An optional example could include accessing and configuring PCIe devices via remote management tools, reducing the need for physical access. By analyzing the log files of the server and PCIe devices, error messages and fault codes can be found to pinpoint the root cause of the problem. Then, the aforementioned measures can be used to resolve the technical issues.
[0178] In addition, if the PCIe device supports hot-swapping, you can try reinserting the device, which can sometimes resolve initialization issues.
[0179] In an optional example, the method also 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 can be obtained.
[0181] Once it is confirmed that the second PCIe device is correctly identified, the location of the second PCIe device is determined based on 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 PCIe devices, the physical location and identification of each PCIe device can be accurately determined, which is helpful for system management and fault diagnosis. When a system problem occurs, the specific PCIe device can be quickly located, facilitating rapid fault diagnosis and troubleshooting.
[0183] This embodiment also provides a device for dynamically adjusting the ECRC function. This device is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0184] This embodiment provides a device for dynamically adjusting the ECRC function. This device corresponds to a server, which is connected to at least one PCIe device, such as... Figure 5 The system 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 used to identify the first configuration information pre-configured on each PCIe device after power-on, wherein the first configuration information is used to indicate whether end-to-end cyclic redundancy check (CRRS) function is available; when it is determined that the first PCIe device has CRRS function based on the first configuration information, the module identifies the second configuration information pre-configured on the first PCIe device, wherein the first PCIe device is any one of at least one PCIe device, and the second configuration information is used to indicate whether end-to-end CRRS function is enabled on the first PCIe device.
[0187] The processing module 502 is used to perform end-to-end cyclic redundancy check processing on the data transmitted between the server and the first PCIe device when it is determined from 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 option based on the ECRC option configured on the first PCIe device. The target 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 ECRC functionality.
[0189] In an optional example, the target options can be expressed as: Per Port Support;
[0190] The first string can be expressed as: 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 of the second string is used to indicate whether the PCIe device enables the ECRC function.
[0192] In an optional example, the target option can be expressed as: IIO Per Port ECRC Support;
[0193] The second string can be expressed in the form of: STR_IIO_PRR_PORT_ECRC_SUPPORT.
[0194] In an optional example, the device further includes: a scanning module 503, an acquisition module 504, and a reading module 505;
[0195] The scanning module 503 is used to scan the PCIe bus to obtain each PCIe device that has established a connection with the server.
[0196] The acquisition module 504 is used to acquire the PCIe device identifier corresponding to each PCIe device and the PCIe device manufacturer identifier, respectively.
[0197] The identification module 501 is also used to identify the PCIe device identifier and the 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 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, wherein the second PCIe device is any PCIe device that has established a connection with the server; or, when the parameter values corresponding to the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device are not both preset thresholds, the second PCIe device is correctly identified.
[0199] The reading module 505 is used to read the register configuration information corresponding to the second PCIe device from the 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 (CRBC) and whether it supports CRBC; when it is determined that the second PCIe device has the hardware capability for end-to-end CRBC and supports CRBC, it determines, based on the first configuration information and the second configuration information, whether the second PCIe device performs end-to-end CRBC 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 for end-to-end cyclic redundancy check; and 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 also used 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 also used to determine the location of the second PCIe device based on 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 either the parameter value corresponding to the PCIe device identifier and the PCIe device manufacturer identifier of the second PCIe device is a preset threshold, including the following cases:
[0205] The second PCIe device failed to connect to the PCIe bus;
[0206] And / or,
[0207] The second PCIe device was not correctly initialized or configured by the server;
[0208] And / or,
[0209] The second PCIe device is incompatible with the server.
[0210] In this embodiment, the device for dynamically adjusting the ECRC function is presented in the form of a functional module. Here, a module refers to an application-specific integrated circuit (ASIC), a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.
[0211] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0212] This invention provides a device for dynamically adjusting ECRC functionality. By pre-configuring first configuration information, the system can quickly identify which PCIe devices support ECRC. Through second configuration information, the system can identify which PCIe devices supporting ECRC have enabled ECRC. This facilitates ECRC verification processing on devices that support ECRC and have enabled it after receiving data. Instead of indiscriminately performing ECRC on all PCIe devices, this method configures each device individually by adding first and second configuration information. After the server powers on, it iterates through all PCIe devices, identifies which have specific capabilities and individually enabled ECRC, and performs corresponding ECRC processing on these devices. For PCIe devices that do not support ECRC or have not enabled ECRC, no ECRC processing is performed. This method prevents system crashes caused by PCIe devices lacking ECRC functionality, improving system reliability and stability.
[0213] This invention also provides a computer device having the above-described features. Figure 5The device shown is for dynamically adjusting the ECRC function.
[0214] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in 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 the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take a processor 10 as an example.
[0215] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include an integrated circuit. The integrated circuit may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPRS), or any combination thereof.
[0216] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0217] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device as shown by a landing page for an app. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0218] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0219] The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.
[0220] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.
[0221] This invention also provides a computer-readable storage medium. The methods provided in the above embodiments can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0222] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0223] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for dynamically adjusting the end-to-end cyclic redundancy check function, characterized in that, The method is applied to a server connected to at least one PCIe device, and the method is performed by the server, comprising: Upon power-on, the first configuration information pre-configured on each PCIe device is identified, wherein the first configuration information is used to indicate whether end-to-end cyclic redundancy check function is available. When it is determined that the first PCIe device has the end-to-end cyclic redundancy check function according to the first configuration information, the second configuration information pre-configured by the first PCIe device is identified, wherein the first PCIe device is any one of at least one of the 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. When it is determined, based on the second configuration information, that the end-to-end cyclic redundancy check function is enabled on the first PCIe device, end-to-end cyclic redundancy check processing is performed on the data transmitted between the server and the first PCIe device. Before identifying the pre-configured first configuration information on each PCIe device after power-on, the method further includes: By scanning the PCIe bus, each PCIe device that has established a connection with the server can be identified; Obtain the PCIe device identifier corresponding to each PCIe device, and the PCIe device manufacturer identifier; Identify the PCIe device identifier and the PCIe device manufacturer identifier corresponding to each of the PCIe devices; When the parameter value of any parameter in the PCIe device identifier and the PCIe device manufacturer identifier corresponding to the second PCIe device is determined to be a preset threshold, it is determined that the second PCIe device is incorrectly identified, wherein the second PCIe device is any PCIe device that has established a connection with the server. or, When it is determined that the parameter values corresponding to the PCIe device identifier and the PCIe device manufacturer identifier of the second PCIe device are not the preset threshold, it is determined that the second PCIe device is correctly identified. When it is determined that the second PCIe device is correctly identified, the register configuration information corresponding to the second PCIe device is read from the pre-configured register; Based on the register configuration information, determine whether the second PCIe device has the hardware capability for end-to-end cyclic redundancy check and whether it supports end-to-end cyclic redundancy check. When it is determined that the second PCIe device has the 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 the end-to-end cyclic redundancy check process based on the first configuration information and the second configuration information.
2. The method according to claim 1, characterized in that, The first configuration information is configured by setting a target option based on the end-to-end cyclic redundancy check option configured in the first PCIe device. The target 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 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 claim 1, 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 for 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.
5. The method according to claim 1, characterized in that, The method further includes: 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; 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.
6. The method according to claim 1, characterized in that, When it is determined that either the parameter value corresponding to the PCIe device identifier and the PCIe device manufacturer identifier of the second PCIe device is equal to the preset threshold, including the following cases: The second PCIe device failed to connect to the PCIe bus; And / or, The second PCIe device was not correctly initialized or configured by the server; And / or, The second PCIe device is incompatible with the server.
7. A device for dynamically adjusting end-to-end cyclic redundancy check function, characterized in that, The device corresponds to a server, the server being connected to at least one PCIe device, and the device includes: The identification module is configured to identify, upon power-on, pre-configured first configuration information on each of the PCIe devices, wherein the first configuration information is used to indicate whether end-to-end cyclic redundancy check (CRC) functionality is present; when it is determined, based on the first configuration information, that the first PCIe device has the CRC functionality, the module identifies pre-configured second configuration information on the first PCIe device, wherein the first PCIe device is any one of at least one of the PCIe devices, and the second configuration information is used to indicate whether the CRC functionality is enabled on the first PCIe device. The processing module is configured to perform end-to-end cyclic redundancy check processing on the data transmitted between the server and the first PCIe device when it is determined, based on the second configuration information, that the end-to-end cyclic redundancy check function is enabled on the first PCIe device. The device further includes: a scanning module, an acquisition module, and a reading module; The scanning module is used to obtain each PCIe device that has established a connection with the server by scanning the PCIe bus after the power is turned on and before the identification module identifies the first configuration information pre-configured on each PCIe device. The acquisition module is used to acquire the PCIe device identifier corresponding to each PCIe device, and the PCIe device manufacturer identifier. The identification module is used to identify the PCIe device identifier and the PCIe device manufacturer identifier corresponding to each PCIe device. The processing module is configured to determine that the second PCIe device is incorrectly identified when any parameter value of either the PCIe device identifier or the PCIe device manufacturer identifier corresponding to the second PCIe device is a preset threshold value, wherein the second PCIe device is any PCIe device that has established a connection with the server; or, when it is determined that the parameter values corresponding to neither the PCIe device identifier nor the PCIe device manufacturer identifier corresponding to the second PCIe device are the preset threshold values, the processing module is configured to determine that the second PCIe device is correctly identified. The reading module is used to read the register configuration information corresponding to the second PCIe device from the pre-configured register when it is determined that the second PCIe device is correctly identified. The processing module 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 (CRUD) and whether it supports CRUD; when it is determined that the second PCIe device has the hardware capability for end-to-end CRUD and supports CRUD, it determines, based on the first configuration information and the second configuration information, whether the second PCIe device performs the end-to-end CRUD processing.
8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the method for dynamically adjusting end-to-end cyclic redundancy check function as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the method for dynamically adjusting the end-to-end cyclic redundancy check function as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Supporting global input / output interconnect features on ports of a midpoint device
US20110099456A1