A back pressure control method based on a PCIe switch and related equipment

CN117155878BActive Publication Date: 2026-08-11WELL CORE MICROELECTRONICS TECH (TIANJIN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

[0005]基于上述问题,为了解决在现有的PCIe反压机制下,PCIe交换机数据传输效率低下的问题,本申请提供了一种基于PCIe交换机的反压控制方法及相关设备

Benefits of technology

[0035]Compared to existing technologies, this application offers the following advantages: This application provides a backpressure control method and related equipment based on a PCIe switch. The backpressure control system includes multiple switch uplink ports and a central processing module. Each of the multiple switch uplink ports includes a corresponding counting module and a sending module. The counting module stores a preset data processing threshold corresponding to the switch uplink port; the preset data processing threshold indicates the maximum number of data packets that the corresponding switch uplink port can transmit. The sending module sends multiple sets of data packets to the central processing module according to the preset data processing threshold, and simultaneously sends a data transmission signal indicating the number of transmitted data packet sets to the counting module. After receiving multiple sets of data packets, the central processing module processes them and sends a memory release signal to the counting module when at least one set of data packets has been processed; the memory release signal indicates the number of data packet sets processed by the central processing module. The counting module performs backpressure control on the sending module based on the memory release signal, the data transmission signal, and the preset data processing threshold. Through the above system, the PCIe switch can determine whether the central processing module is in a ready state based on the preset data processing threshold stored in its uplink port. This shifts the core of backpressure control from the software side to the PCIe switch side. Data packet transmission no longer needs to use the ready signal sent by the software side as an indicator of whether transmission is possible, and multiple sets of data packets can be transmitted simultaneously, improving the efficiency of data packet transmission under the backpressure mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117155878B_ABST
    Figure CN117155878B_ABST
Patent Text Reader

Abstract

This application provides a backpressure control method and related equipment based on a PCIe switch. The sending module sends multiple sets of data packets to the central processing module according to a preset data processing threshold, while simultaneously sending a data transmission signal to a counting module. The central processing module sends a memory release signal to the counting module after processing at least one set of packets; this allows the counting module to finally perform backpressure control on the sending module based on the memory release signal, the data transmission signal, and the preset data processing threshold. Through this system, the PCIe switch can determine whether the central processing module is in a ready state based on the preset data processing threshold stored in its uplink port. This shifts the core of backpressure control from the software side to the PCIe switch side. Data packet transmission no longer needs to rely on the ready signal sent by the software side as an indicator of whether transmission is possible, thus improving the efficiency of data packet transmission under the backpressure mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wireless communication technology, and in particular to a reverse pressure control method and related equipment based on a PCIe switch. Background Technology

[0002] In the computer field, PCIe (Peripheral Component Interconnect Express) is a high-speed serial bus technology used to connect internal computer components. The PCIe backpressure mechanism is a mechanism used to notify the computer software of the status of connected devices. It can send messages to the software when important events occur at the PCIe switch, requesting the software to handle the event. However, when the software experiences insufficient computing resources or too many tasks, it will perform backpressure to prevent the PCIe switch from sending messages. The backpressure mechanism effectively controls the speed at which information is sent, ensuring that the speed of information transmission from the PCIe switch matches the processing speed of the software, thereby guaranteeing smooth data transmission.

[0003] Currently, the backpressure mechanism relies on a valid-ready mechanism. When the PCIe switch needs to send a data packet to the software, it first sends a valid signal. The software can only send a data packet if it is in a ready state and sends a ready signal back to the PCIe switch. If the software is currently processing a previous event and is not in a ready state by default, it will not send a ready signal, and the PCIe switch will be unable to send a data packet. The PCIe switch can only wait for the software to finish processing the previous data event and receive the ready signal before it can send a data packet, resulting in low data transmission efficiency.

[0004] Therefore, how to solve the problem of low data transmission efficiency of PCIe switches under the PCIe backpressure mechanism in the existing technology has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] To address the aforementioned issues and resolve the low data transmission efficiency of PCIe switches under existing PCIe backpressure mechanisms, this application provides a backpressure control method and related equipment based on PCIe switches.

[0006] The embodiments of this application disclose the following technical solutions:

[0007] In a first aspect, this application discloses a backpressure control system based on a PCIe switch, comprising: multiple switch uplink ports and a central processing module; the central processing module is located in software; each of the multiple switch uplink ports includes a corresponding counting module and a transmitting module; the counting module stores a preset data processing threshold corresponding to the switch uplink port; the preset data processing threshold is used to represent the maximum number of data packets that the corresponding switch uplink port can transmit;

[0008] The sending module is configured to send multiple sets of data packets to the central processing module according to the preset data processing threshold, and simultaneously send a data transmission signal to the counting module; the data transmission signal is used to indicate the number of sets of data packets sent by the sending module to the central processing module.

[0009] The central processing module is used to process the multiple sets of data packets, and send a memory release signal to the counting module when at least one set of data packets has been processed; the memory release signal is used to indicate the number of sets of data packets that the central processing module has processed.

[0010] The counting module is used to perform backpressure control on the sending module based on the memory release signal, the data transmission signal, and the preset data processing threshold.

[0011] Optionally, the counting module is specifically used for:

[0012] Based on the number of data packets sent by the sending module to the central processing module and the number of data packets processed by the central processing module, the preset data processing threshold stored in the module is adjusted in real time to obtain the adjusted preset data processing threshold.

[0013] If the adjusted preset data processing threshold reaches the preset threshold, a backpressure command is sent to the sending module. The backpressure command is used to prevent the sending module from sending the data packet to the central processing module.

[0014] Optionally, the sending module is specifically used for:

[0015] Determine whether the number of groups of the multiple sets of data packets is greater than the preset data processing threshold;

[0016] If the number of the multiple sets of data packets is not greater than the preset data processing threshold, then the multiple sets of data packets are sent to the central processing module, and the data transmission signal is sent to the counting module.

[0017] Optionally, the system further includes: multiple downlink ports and a message generation module;

[0018] The message generation module is used to, when a preset event is detected to be triggered by the downlink port, to assemble the preset event into a data packet, obtain a data packet corresponding to the preset event, and send the data packet corresponding to the preset event to the sending module.

[0019] Optionally, the uplink port of the switch includes: a data verification module;

[0020] The data verification module is used to verify the data packet. If the data packet passes the data verification, a data validity identifier corresponding to the data packet is generated, and the data validity identifier corresponding to the data packet is sent to the central processing module when the sending module sends the data packet to the central processing module.

[0021] Secondly, this application discloses a backpressure control method based on a PCIe switch, applied to a PCIe switch, the method comprising:

[0022] According to a first preset data processing threshold, multiple sets of data packets are sent to the central processing module on the software side, and a first data transmission signal is generated; the first data transmission signal is used to represent the number of sets of data packets; the first preset data processing threshold is used to represent the maximum number of sets of data packets that the PCIe switch can transmit to the central processing module.

[0023] Receive a first memory release signal sent from the central processing module; the first memory release signal is used to indicate the number of data packets that the central module has finished processing;

[0024] The PCIe switch is subjected to backpressure control based on the first data transmission signal, the first memory release signal, and the first preset data processing threshold.

[0025] Optionally, the step of performing backpressure control on the PCIe switch based on the first data transmission signal, the first memory release signal, and the first preset data processing threshold specifically includes:

[0026] Based on the number of data packets and the number of data packets processed by the central module, the first preset data processing threshold is adjusted in real time to obtain the adjusted first preset data processing threshold.

[0027] If the adjusted first preset data processing threshold reaches the preset threshold, then the PCIe switch is subjected to backpressure control.

[0028] Optionally, the step of sending multiple sets of data packets to the central processing module on the software side according to the first preset data processing threshold and generating a first data transmission signal specifically includes:

[0029] Determine whether the number of the multiple sets of data packets is greater than the first preset data processing threshold;

[0030] If the number of the multiple sets of data packets is not greater than the first preset data processing threshold, the multiple sets of data packets are sent to the central processing module, and a first data transmission signal is generated.

[0031] Thirdly, this application discloses an electronic device, which includes: a processor, a memory, and a system bus;

[0032] The processor and the memory are connected via the system bus;

[0033] The memory is used to store one or more programs, the one or more programs including instructions that, when executed by the processor, cause the processor to perform the PCIe switch-based backpressure control method.

[0034] 10. A computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the aforementioned backpressure control method based on a PCIe switch.

[0035] Compared to existing technologies, this application offers the following advantages: This application provides a backpressure control method and related equipment based on a PCIe switch. The backpressure control system includes multiple switch uplink ports and a central processing module. Each of the multiple switch uplink ports includes a corresponding counting module and a sending module. The counting module stores a preset data processing threshold corresponding to the switch uplink port; the preset data processing threshold indicates the maximum number of data packets that the corresponding switch uplink port can transmit. The sending module sends multiple sets of data packets to the central processing module according to the preset data processing threshold, and simultaneously sends a data transmission signal indicating the number of transmitted data packet sets to the counting module. After receiving multiple sets of data packets, the central processing module processes them and sends a memory release signal to the counting module when at least one set of data packets has been processed; the memory release signal indicates the number of data packet sets processed by the central processing module. The counting module performs backpressure control on the sending module based on the memory release signal, the data transmission signal, and the preset data processing threshold. Through the above system, the PCIe switch can determine whether the central processing module is in a ready state based on the preset data processing threshold stored in its uplink port. This shifts the core of backpressure control from the software side to the PCIe switch side. Data packet transmission no longer needs to use the ready signal sent by the software side as an indicator of whether transmission is possible, and multiple sets of data packets can be transmitted simultaneously, improving the efficiency of data packet transmission under the backpressure mechanism. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 A schematic diagram of a backpressure control system based on a PCIe switch provided in this application embodiment;

[0038] Figure 2 A schematic diagram of a backpressure control system based on a PCI switch provided in an embodiment of this application;

[0039] Figure 3 A flowchart illustrating a backpressure control method based on a PCIe switch provided in an embodiment of this application;

[0040] Figure 4This is a schematic diagram of a reverse pressure control electronic device based on a PCIe switch, provided as an embodiment of this application. Detailed Implementation

[0041] As described earlier, the PCIe backpressure mechanism is a mechanism used to notify the computer software of the status of connected devices. It can send messages to the software when important events occur at the PCIe switch, requesting the software to handle the events. However, when the software experiences problems such as insufficient computing resources or too many tasks, it will perform backpressure to prevent the PCIe switch from sending messages to it. The backpressure mechanism can effectively control the speed at which the information sender transmits information, ensuring that the speed at which the PCIe switch transmits information matches the processing speed of the software, thereby guaranteeing stable data transmission.

[0042] Currently, the backpressure mechanism relies on a valid-ready mechanism. When the PCIe switch needs to send a data packet to the software, it first sends a valid signal. The software can only send a data packet if it is in a ready state and sends a ready signal back to the PCIe switch. If the software is currently processing a previous event and is not in a ready state by default, it will not send a ready signal, and the PCIe switch will be unable to send a data packet. The PCIe switch can only wait for the software to finish processing the previous data event and receive the ready signal before it can send a data packet, resulting in low data transmission efficiency.

[0043] Therefore, how to solve the problem of low data transmission efficiency of PCIe switches under the PCIe backpressure mechanism in the existing technology has become a technical problem that urgently needs to be solved by those skilled in the art.

[0044] This application provides a backpressure control method and related equipment based on a PCIe switch. The backpressure control system includes multiple switch uplink ports and a central processing module. Each uplink port includes a corresponding counting module and a sending module. The counting module stores a preset data processing threshold corresponding to the uplink port; the preset data processing threshold indicates the maximum number of data packets that the corresponding uplink port can transmit. The sending module sends multiple sets of data packets to the central processing module according to the preset data processing threshold, and simultaneously sends a data transmission signal indicating the number of transmitted data packet sets to the counting module. After receiving multiple sets of data packets, the central processing module processes them and sends a memory release signal to the counting module when at least one set of data packets has been processed; the memory release signal indicates the number of data packet sets processed by the central processing module. The counting module performs backpressure control on the sending module based on the memory release signal, the data transmission signal, and the preset data processing threshold. Through the above system, the PCIe switch can determine whether the central processing module is in a ready state based on the preset data processing threshold stored in its uplink port. This shifts the core of backpressure control from the software side to the PCIe switch side. Data packet transmission no longer needs to use the ready signal sent by the software side as an indicator of whether transmission is possible, and multiple sets of data packets can be transmitted simultaneously, improving the efficiency of data packet transmission under the backpressure mechanism.

[0045] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0046] The following section will introduce the PCIe switch-based backpressure control system provided in this application, using specific application scenarios as examples. For details, please refer to [link / reference needed]. Figure 2 To further understand this, a schematic diagram of a PCI switch-based backpressure control system is provided. Figure 2 In this application, UP0-UP5 represent multiple uplink ports of the switch, cnt0-cnt5 represent the counting modules corresponding to each port, DP0-DP24 represent multiple downlink ports of the switch, which can be various external devices connected to the PCIe switch, rls represents the memory release signal, and vaild represents the data valid identifier; each uplink port of the switch represents a partition, and so on.

[0047] See Figure 1 The figure is a schematic diagram of a backpressure control system based on a PCIe switch provided in an embodiment of this application, specifically including the following ports and modules:

[0048] The PCIe switch-based backpressure control system provided in this application includes multiple switch uplink ports 100 and a central processing module 400; the central processing module 400 is located in software; each of the multiple switch uplink ports 100 includes a corresponding counting module 300 and a sending module 200; the counting module 300 stores a preset data processing threshold corresponding to the switch uplink port 100; the preset data processing threshold is used to represent the maximum number of data packets that the corresponding switch uplink port can transmit.

[0049] The sending module 200 is used to send multiple sets of data packets to the central processing module according to the preset data processing threshold, and at the same time send a data transmission signal to the counting module; the data transmission signal is used to indicate the number of sets of data packets sent by the sending module to the central processing module.

[0050] A PCIe switch contains multiple uplink ports. Each uplink port includes a transmission module for sending data packets and a counting module storing preset data processing thresholds. These preset data processing thresholds represent the maximum number of data packets that the corresponding uplink port can transmit. In practical applications, since each different uplink port connects to different downstream devices, different uplink ports have different maximum upload packet counts. This preset data processing threshold only indicates the maximum number of data packets that a corresponding uplink port can transmit, not the maximum number of packet counts that the central processing module can process. The preset data processing threshold can be set according to the data processing capabilities of the central processing module and specific task requirements.

[0051] When the sending module sends a data packet to the central processing module's data module, it obtains a preset data processing threshold from a counter module stored in the same port. Then, based on the maximum number of data packets the sending module can simultaneously send at any given time, it sends the data packet to the central processing module. Simultaneously, it sends a data transmission signal to the counter module. The purpose of this signal is to transmit the number of data packets sent by the sending module in this operation, allowing the counter module to update the preset data processing threshold accordingly. Specifically, the process of the sending module sending a data packet based on the preset data processing threshold and sending a data transmission signal to the counter module can be achieved through the following two steps:

[0052] Step 1: Determine whether the number of groups of the multiple sets of data packets is greater than the preset data processing threshold;

[0053] Step 2: If the number of data packets is not greater than the preset data processing threshold, then the multiple data packets are sent to the central processing module, and the data transmission signal is sent to the counting module.

[0054] During the process of sending data packets to the central processing module, the sending module compares the number of multiple sets of data packets sent with a preset data processing threshold. When it is determined that the number of sets is not greater than the preset data processing threshold, the sending module sends the multiple sets of data packets to the central processing module and sends a data transmission signal carrying the number of data packet sets to the counting module.

[0055] The central processing module 400 is used to process the multiple sets of data packets, and send a memory release signal to the counting module when at least one set of data packets has been processed; the memory release signal is used to indicate the number of sets of data packets that the central processing module has processed.

[0056] After receiving multiple sets of data packets from the sending module, the central processing module processes them. In actual processing, since multiple sets of data packets are received, it may not be able to process all of them simultaneously. Therefore, when the central processing module has completed processing at least one set of data packets, it sends a memory release signal to the counting module. This signal transmits the number of data packets processed to the counting module, allowing the counting module to adjust its preset data processing threshold.

[0057] The counting module 300 is used to perform backpressure control on the sending module based on the memory release signal, the data transmission signal, and the preset data processing threshold.

[0058] After receiving memory release and data transmission signals from the central processing module and the sending module, the counting module performs backpressure control on the sending module based on the number of data packet groups processed by the central processing module and the number of data packet groups sent by the sending module, as indicated by the signals. Specifically, this process can be implemented through the following two steps:

[0059] Step 1: Based on the number of data packets sent by the sending module to the central processing module and the number of data packets processed by the central processing module, adjust its own preset data processing threshold in real time to obtain the adjusted preset data processing threshold.

[0060] After receiving the memory release signal and the data transfer signal, the counting module adjusts the preset data processing threshold. For example, when the preset data processing threshold is 5, and the data represented by the memory release signal and the data transfer signal are 2 and 3 respectively, then the adjusted preset data processing threshold is: 5 - 3 + 2 = 4.

[0061] By adjusting the preset data processing thresholds stored in the switch in real time based on memory release signals and data transmission signals, the uplink port of the switch can plan the subsequent data packet transmission and backpressure control according to the number of data packets it sends and the actual data processing situation of the central processing module.

[0062] Step 2: If the adjusted preset data processing threshold reaches the preset threshold, a backpressure command is sent to the sending module. The backpressure command is used to prevent the sending module from sending the data packet to the central processing module.

[0063] After adjusting the preset data processing threshold, if the adjusted threshold reaches the set threshold, a backpressure command is sent to the sending module to prevent it from sending data packets. For example, if the preset threshold is set to 0, when the adjusted threshold is 0, it indicates that the central processing module is at full capacity and cannot perform any further data processing. In this case, the counting module sends a backpressure command to the sending module, thereby preventing the sending module from sending data packets to the central processing module, thus achieving backpressure control. This method shifts the core of backpressure control from the central processing module to the PCIe switch side. Data packet transmission no longer requires a software-sent preparation signal as an indicator of transmission, and multiple sets of data packets can be transmitted simultaneously, improving the efficiency of data packet transmission under the backpressure mechanism.

[0064] Furthermore, each uplink port has its own corresponding counting module. When transmitting data packets, the PCIe switch supports each sub-area, that is, each uplink port independently handles its own data packet transmission. When the sending module in a certain uplink port is back-pressured and unable to send data, it will not affect the data packet transmission of other uplink ports, effectively improving the independence and data transmission efficiency of PCIe data transmission.

[0065] As an optional implementation, the system further includes: multiple downlink ports and a message generation module;

[0066] The message generation module is used to, when a preset event is detected to be triggered by an external device connected to the downlink port, perform data packetization on the preset event to obtain a data message corresponding to the preset event, and send the data message corresponding to the preset event to the sending module.

[0067] In a typical PCIe switch, there are multiple downlink ports, which are usually used to connect to external devices such as graphics cards, network adapters, and storage controllers. The packet generation module continuously monitors the external devices connected to these downlink ports. When a preset event is triggered by an external device, the module assembles data packets corresponding to that event, generates a data packet, and sends it to the sending module. This data packet is then forwarded to the central processing module for further processing of the event triggered by the external device.

[0068] As another optional implementation, the uplink port of the switch includes: a data verification module;

[0069] The data verification module is used to verify the data packet. If the data packet passes the data verification, a data validity identifier corresponding to the data packet is generated, and the data validity identifier corresponding to the data packet is sent to the central processing module when the sending module sends the data packet to the central processing module.

[0070] To ensure the validity of output data, a data verification module is installed at the uplink port of the switch to verify the data packets to be sent. When the verification result of the corresponding data packet is passed, a corresponding data validity identifier is generated. This data validity identifier is sent to the central processing module along with the data packet during the transmission process. When the central processing module receives the data packet, it verifies the data validity identifier to determine the validity of the data packet, thereby improving the stability and reliability of data transmission.

[0071] This embodiment provides a backpressure control system based on a PCIe switch. The system includes multiple uplink ports of the switch and a central processing module. Each uplink port contains a corresponding counting module and a sending module. The counting module stores a preset data processing threshold corresponding to the uplink port, indicating the maximum number of data packets that the corresponding uplink port can transmit. The sending module sends multiple sets of data packets to the central processing module according to the preset data processing threshold, and simultaneously sends a data transmission signal indicating the number of data packet sets transmitted to the counting module. After receiving multiple sets of data packets, the central processing module processes them and sends a memory release signal to the counting module when at least one set of data packets has been processed. The memory release signal indicates the number of data packet sets processed by the central processing module. The counting module performs backpressure control on the sending module based on the memory release signal, the data transmission signal, and the preset data processing threshold. Through the above system, the PCIe switch can determine whether the central processing module is in a ready state based on the preset data processing threshold stored in its uplink port. This shifts the core of backpressure control from the software side to the PCIe switch side. Data packet transmission no longer needs to use the ready signal sent by the software side as an indicator of whether transmission is possible, and multiple sets of data packets can be transmitted simultaneously, improving the efficiency of data packet transmission under the backpressure mechanism.

[0072] The following describes a backpressure control method based on a PCIe switch provided in an embodiment of this application. The backpressure control method based on a PCIe switch described below and the backpressure control system based on a PCIe switch described above can be referred to and correspond to each other.

[0073] See Figure 3 The figure is a flowchart illustrating a backpressure control method based on a PCIe switch provided in an embodiment of this application, which specifically includes the following steps:

[0074] S101: According to the first preset data processing threshold, multiple sets of data packets are sent to the central processing module on the software side, and a first data transmission signal is generated; the first data transmission signal is used to represent the number of sets of data packets; the first preset data processing threshold is used to represent the maximum number of sets of data packets that the PCIe switch can transmit to the central processing module.

[0075] S102: Receive a first memory release signal sent from the central processing module; the first memory release signal is used to indicate the number of data packets that the central module has finished processing;

[0076] S103: Perform backpressure control on the PCIe switch based on the first data transmission signal, the first memory release signal, and the first preset data processing threshold.

[0077] Optionally, the step of performing backpressure control on the PCIe switch based on the first data transmission signal, the first memory release signal, and the first preset data processing threshold specifically includes:

[0078] Based on the number of data packets and the number of data packets processed by the central module, the first preset data processing threshold is adjusted in real time to obtain the adjusted first preset data processing threshold.

[0079] If the adjusted first preset data processing threshold reaches the preset threshold, then the PCIe switch is subjected to backpressure control.

[0080] Optionally, the step of sending multiple sets of data packets to the central processing module on the software side according to the first preset data processing threshold and generating a first data transmission signal specifically includes:

[0081] Determine whether the number of the multiple sets of data packets is greater than the first preset data processing threshold;

[0082] If the number of the multiple sets of data packets is not greater than the first preset data processing threshold, the multiple sets of data packets are sent to the central processing module, and a first data transmission signal is generated.

[0083] Optionally, the PCIe switch includes: multiple downlink ports; before sending multiple sets of data packets to the central processing module on the software side according to the first preset data processing threshold and generating the first data transmission signal, it further includes:

[0084] If a preset event is detected to be triggered by the downlink port, the preset event is packetized to obtain a data packet corresponding to the preset event.

[0085] Optionally, before sending multiple sets of data packets to the central processing module on the software side according to the first preset data processing threshold and generating the first data transmission signal, the method further includes:

[0086] The data packet is validated. If the data packet passes the validation, a valid data identifier corresponding to the data packet is generated and sent to the central processing module when the data packet is sent to the central processing module.

[0087] See Figure 4The figure is a schematic diagram of the structure of a reverse pressure control electronic device based on a PCIe switch provided in an embodiment of this application, including:

[0088] Memory 11 is used to store computer programs;

[0089] The processor 12 is used to implement the steps of the backpressure control method based on a PCIe switch as described in any of the above method embodiments when executing the computer program.

[0090] In this embodiment, the device can be an in-vehicle computer, a PC (Personal Computer), or a terminal device such as a smartphone, tablet computer, handheld computer, or portable computer.

[0091] The device may include a memory 11, a processor 12, and a bus 13.

[0092] The memory 11 includes at least one type of readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the device, such as the hard disk of the device. In other embodiments, the memory 11 may be an external storage device of the device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 11 may include both internal and external storage units of the device. The memory 11 can be used not only to store application software and various types of data installed on the device, such as program code for executing fault prediction methods, but also to temporarily store data that has been output or will be output. In some embodiments, the processor 12 may be a Central Processing Unit (CPU).

[0093] In some embodiments, processor 12 may be a central processing unit (CPU), controller, microcontroller, microprocessor or other data processing chip, used to run program code stored in memory 11 or process data, such as program code for executing a fault prediction method.

[0094] This bus 13 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0095] Furthermore, the device may also include a network interface 14, which may optionally include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), typically used to establish communication connections between the device and other electronic devices.

[0096] Optionally, the device may further include a user interface 15, which may include a display, an input unit such as a keyboard, and optionally, a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the device and to display a visual user interface.

[0097] Figure 4 Only devices with components 11-15 are shown; those skilled in the art will understand that... Figure 4 The structure shown does not constitute a limitation on the device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0098] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the method apparatus, electronic device, and vehicle, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The method apparatus, electronic device, and vehicle described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components indicated as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

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

Claims

1. A PCIe switch based back pressure control system, characterized in that, include: The system includes multiple uplink ports of a switch and a central processing module; the central processing module is located in software; each of the multiple uplink ports of the switch includes a corresponding counting module and a transmitting module; the counting module stores a preset data processing threshold corresponding to the uplink port of the switch; the preset data processing threshold is used to represent the maximum number of data packets that the corresponding uplink port of the switch can transmit. The sending module is configured to send multiple sets of data packets to the central processing module according to the preset data processing threshold, and simultaneously send a data transmission signal to the counting module; the data transmission signal is used to indicate the number of sets of data packets sent by the sending module to the central processing module. The central processing module is used to process the multiple sets of data packets, and send a memory release signal to the counting module when at least one set of data packets has been processed; the memory release signal is used to indicate the number of sets of data packets that the central processing module has processed. The counting module is used to perform backpressure control on the sending module based on the memory release signal, the data transmission signal, and the preset data processing threshold.

2. The system of claim 1, wherein, The counting module is specifically used for: Based on the number of data packets sent by the sending module to the central processing module and the number of data packets processed by the central processing module, the preset data processing threshold stored in the module is adjusted in real time to obtain the adjusted preset data processing threshold. If the adjusted preset data processing threshold reaches the preset threshold, a backpressure command is sent to the sending module. The backpressure command is used to prevent the sending module from sending the data packet to the central processing module.

3. The system of claim 1, wherein, The sending module is specifically used for: Determine whether the number of groups of the multiple sets of data packets is greater than the preset data processing threshold; If the number of the multiple sets of data packets is not greater than the preset data processing threshold, then the multiple sets of data packets are sent to the central processing module, and the data transmission signal is sent to the counting module.

4. The system of claim 1, wherein, Also includes: Multiple downlink ports and packet generation modules; The message generation module is used to, when a preset event is detected to be triggered by the downlink port, to assemble the preset event into a data packet, obtain a data packet corresponding to the preset event, and send the data packet corresponding to the preset event to the sending module.

5. The system according to claim 1, characterized in that, The uplink port of the switch includes: a data verification module; The data verification module is used to verify the data packet. If the data packet passes the data verification, a data validity identifier corresponding to the data packet is generated, and the data validity identifier corresponding to the data packet is sent to the central processing module when the sending module sends the data packet to the central processing module.

6. A backpressure control method based on a PCIe switch, characterized in that, Applied to PCIe switches, the method includes: According to a first preset data processing threshold, multiple sets of data packets are sent to the central processing module on the software side, and a first data transmission signal is generated; the first data transmission signal is used to represent the number of sets of data packets; the first preset data processing threshold is used to represent the maximum number of sets of data packets that the PCIe switch can transmit to the central processing module. Receive a first memory release signal sent from the central processing module; the first memory release signal is used to indicate the number of data packets that the central module has finished processing; The PCIe switch is subjected to backpressure control based on the first data transmission signal, the first memory release signal, and the first preset data processing threshold.

7. The method according to claim 6, characterized in that, The backpressure control of the PCIe switch based on the first data transmission signal, the first memory release signal, and the first preset data processing threshold specifically includes: Based on the number of data packets and the number of data packets processed by the central module, the first preset data processing threshold is adjusted in real time to obtain the adjusted first preset data processing threshold. If the adjusted first preset data processing threshold reaches the preset threshold, then the PCIe switch is subjected to backpressure control.

8. The method according to claim 6, characterized in that, The step of sending multiple sets of data packets to the central processing module on the software side according to a first preset data processing threshold and generating a first data transmission signal specifically includes: Determine whether the number of the multiple sets of data packets is greater than the first preset data processing threshold; If the number of the multiple sets of data packets is not greater than the first preset data processing threshold, the multiple sets of data packets are sent to the central processing module, and a first data transmission signal is generated.

9. An electronic device, characterized in that, The device includes: a processor, a memory, and a system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, the one or more programs including instructions that, when executed by the processor, cause the processor to perform the backpressure control method based on a PCIe switch as described in any one of claims 6-8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the backpressure control method based on a PCIe switch as described in any one of claims 6-8.

Citation Information

Patent Citations

  • Pressure-reversion method, system and switching node of multi-level switching network

    CN101035076A

  • Configuration of a process control system

    CN101719866A