Flow control management method and apparatus, and communication system and readable storage medium
By dynamically adjusting the credit allocation of virtual channel shuttle based on the average message length and expected bandwidth, the problem of low utilization efficiency of receiving buffers in data transmission between devices is solved, and more efficient data transmission and more reliable flow control management are achieved.
Patent Information
- Application Number
- PCT/CN2024/132118
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-23
- Filing Date
- 2024-11-14
- Publication Date
- 2025-05-30
AI Technical Summary
When data is transmitted through links between devices, how to improve the utilization efficiency of the receiving buffer cache, avoid cache overflow and improve the reliability of data transmission.
During the process of transmitting data, the credit allocation of the virtual channel shuttle is determined based on the average message length and the expected bandwidth, and the credit allocation of the shuttle is dynamically adjusted to improve the utilization efficiency of the reception buffer. The specific implementation includes the first device receiving the credit allocation message sent by the second device, updating the locally maintained credit allocation, and sending data messages according to the credit allocation.
By dynamically adjusting the credit allocation of shuttle, the utilization efficiency of the receiving buffer can be improved while meeting transmission needs, avoid cache overflow, and improve the reliability of data transmission.
Smart Images

Figure CN2024132118_30052025_PF_FP_ABST
Abstract
Description
A flow control management method, device, communication system and readable storage medium
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on November 23, 2023, with application number 202311589376.6 and application name “A flow control management method, device, communication system and readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communication technology, and in particular to a flow control management method, device, communication system and readable storage medium. Background Art
[0003] The device includes multiple adapters. When data is transmitted between devices over a link, these adapters can be used for data transmission adaptation, data reception adaptation, third-party protocol adaptation (protocol tunneling adaptation), or management and control adaptation. Each adapter is configured with a receive buffer (RBuff) and a transmit buffer (TBuff). When data is transmitted between devices, data is sent from the transmit buffer corresponding to the adapter of one device to the receive buffer corresponding to the adapter of another device.
[0004] How to improve the utilization efficiency of the receive buffer cache during data transmission has become an urgent problem to be solved.
[0005] Summary of the Invention
[0006] The embodiments of the present application provide a flow control management method, device, communication system and readable storage medium, which can improve the utilization efficiency of the receive buffer cache during data transmission.
[0007] To achieve the above objectives, the present invention adopts the following technical solutions:
[0008] In a first aspect of an embodiment of the present application, a flow control management method is provided, comprising: a first device receiving a credit allocation message sent by a second device, the credit allocation message including a credit allocation field, the credit allocation field being used to indicate the credit allocation of a virtual channel, a shuttle, in a port of the second device, the credit allocation of the shuttle being determined based on an average message length and an expected bandwidth. If the credit allocation of the shuttle is greater than or equal to the credit allocation locally maintained by the first device, the first device transmits confirmation information of the credit allocation of the shuttle. The first device updates the credit allocation locally maintained by the first device to the credit allocation of the shuttle.
[0009] In this solution, the second device determines the shuttle's credit allocation based on the average packet length and expected bandwidth and sends it to the first device. The first device updates the shuttle's credit allocation, which it maintains locally. The second device can determine the RBuff buffer capacity based on the average packet length and expected bandwidth and dynamically adjust the shuttle's credit allocation in the second device, thereby improving RBuff utilization while meeting transmission requirements.
[0010] In conjunction with the first aspect, in one possible implementation, the method further includes: the first device receiving a credit recovery message, the credit recovery message including a credit recovery field, the credit recovery field being used to indicate credit recovery for Shuttle; and the first device updating the credit recovery locally maintained by the first device to the credit recovery for Shuttle.
[0011] In combination with the first aspect, in a possible implementation, the method further includes: the first device sending a data message according to the credit allocation locally maintained by the first device, the credit consumption of the shuttle, and the credit recovery locally maintained by the first device.
[0012] Based on this solution, the first device sends data packets according to the credit allocation maintained locally by the first device, the credit consumption of the shuttle, and the credit recovery maintained locally by the first device, which can avoid overflowing the RBuff cache of the first device and improve the reliability of data transmission.
[0013] In combination with the first aspect, in a possible implementation, after the first device sends the data message, the method further includes: the first device updating the credit consumption of the shuttle according to the data message.
[0014] In combination with the first aspect, in a possible implementation, the first device and the second device are coupled through a main link and an auxiliary link, and the method also includes: when the main link recovers from abnormality to normal, or when the auxiliary link times out waiting for a response message, the first device sends a credit consumption message, and the credit consumption message includes a credit consumption field, which is used to indicate the credit consumption of the shuttle.
[0015] Based on this solution, when the main link recovers from abnormality to normal, or when the auxiliary link times out while waiting for a response message, the first device sends a credit consumption message, and does not send the credit consumption message at a fixed period, thereby reducing the frequency of sending the credit consumption message and reducing power consumption.
[0016] In combination with the first aspect, in one possible implementation, the method further includes: if the credit allocation of the shuttle is less than the credit allocation locally maintained by the first device, after waiting for the cache to release the credit allocation to the shuttle, the first device sends a credit allocation response message, and the credit allocation response message includes confirmation information of the credit allocation of the shuttle.
[0017] In conjunction with the first aspect, in one possible implementation, the method further includes: the first device determining a flow controlled duration of the shuttle. When the flow controlled duration of the shuttle exceeds a first preset time, the first device sending a flow control exception notification message, the flow control exception notification message including a flow control exception field, the flow control exception field being used to indicate a flow control exception of the shuttle.
[0018] In combination with the first aspect, in a possible implementation, the shuttle corresponds to an adapter in the second device, and the credit allocation of the shuttle is further used to indicate the capacity allocated to the adapter receive buffer.
[0019] In combination with the first aspect, in a possible implementation, the flow control mechanism of Shuttle includes at least one of an exclusive flow control mechanism, a shared flow control mechanism, or a flow control disabled mechanism.
[0020] In combination with the first aspect, in one possible implementation, when the shuttle's flow control mechanism is a shared flow control mechanism, the shuttle's credit allocation is a shared credit allocation, the shuttle's credit consumption is a shared credit consumption, and the shuttle's credit recovery is a shared credit recovery; when the shuttle's flow control mechanism is an exclusive flow control mechanism, the shuttle's credit allocation is an exclusive credit allocation, the shuttle's credit consumption is an exclusive credit consumption, and the shuttle's credit recovery is an exclusive credit recovery.
[0021] In a second aspect of an embodiment of the present application, a flow control management method is provided, comprising: a second device determining a credit allocation for a virtual channel shuttle on a port of the second device based on an average packet length and an expected bandwidth; and the second device sending a credit allocation message to a first device, the credit allocation message including a credit allocation field for indicating the credit allocation for the shuttle.
[0022] In conjunction with the second aspect, in one possible implementation, when the second device determines the shuttle credit allocation based on the average message length and the expected bandwidth, the following formula is satisfied:
[0023] Among them, "Credits_Allocated_Shuttle" indicates the credit allocation domain, "tRound" is the flow control loop delay, "ExpBW" is the expected bandwidth, "TLDP average packet length" is the average packet length, and "A", "B", and "C" are preset values.
[0024] In conjunction with the second aspect, in one possible implementation, the method further includes: the second device receiving confirmation information of the shuttle's credit allocation. The second device receives a data message, where the data message is sent by the first device based on the credit allocation locally maintained by the first device, the shuttle's credit consumption, and the credit recovery locally maintained by the first device.
[0025] In conjunction with the second aspect, in a possible implementation, the method further includes: the second device determining credit recovery for the shuttle, and the second device sending a credit recovery message, the credit recovery message including a credit recovery field, the credit recovery field being used to indicate credit recovery for the shuttle.
[0026] In combination with the second aspect, in a possible implementation method, the second device sends a credit recovery message, including: when the credit recovery of the shuttle changes, or when the main link recovers from abnormality to normal, or when the auxiliary link times out waiting for the auxiliary link response message, the second device sends a credit recovery message.
[0027] Based on this solution, when the credit recovery of the shuttle changes, or when the main link recovers from abnormality to normal, or when the auxiliary link times out while waiting for the auxiliary link response message, the second device sends a third message, and the third message is not sent at a fixed period, thereby reducing the frequency of sending the third message and reducing power consumption.
[0028] In conjunction with the second aspect, in one possible implementation, the method further includes: the second device receiving a credit consumption message, the credit consumption message including a credit consumption field, the credit consumption field being used to indicate the credit consumption of the shuttle, and the second device updating the credit consumption locally maintained by the second device to the credit consumption of the shuttle.
[0029] In combination with the second aspect, in a possible implementation, after the second device receives the data message, the method further includes: the second device updates the credit consumption locally maintained by the second device according to the data message.
[0030] In conjunction with the second aspect, in a possible implementation, the method further includes: the second device receiving a credit allocation response message, where the credit allocation response message includes confirmation information of the shuttle's credit allocation.
[0031] With reference to the second aspect, in a possible implementation, the second device sending the credit allocation message includes: when the second device does not receive the credit allocation response message within the second preset time, sending the credit allocation message.
[0032] In combination with the second aspect, in a possible implementation, the method further includes: the second device receives a flow control exception notification message, the flow control exception notification message includes a flow control exception field, and the flow control exception field is used to indicate a shuttle flow control exception.
[0033] In combination with the second aspect, in a possible implementation, the second device sends a credit recovery message, including: sending a credit recovery message when receiving a flow control exception notification message.
[0034] In conjunction with the second aspect, in a possible implementation, the shuttle corresponds to an adapter in the second device, and the credit allocation of the shuttle is further used to indicate the capacity allocated to the adapter receive buffer.
[0035] In conjunction with the second aspect, in a possible implementation, the flow control mechanism of Shuttle includes at least one of an exclusive flow control mechanism, a shared flow control mechanism, or a flow control disabled mechanism.
[0036] In combination with the second aspect, in one possible implementation, when the shuttle's flow control mechanism is a shared flow control mechanism, the shuttle's credit allocation is a shared credit allocation, the shuttle's credit consumption is a shared credit consumption, and the shuttle's credit recovery is a shared credit recovery; when the shuttle's flow control mechanism is an exclusive flow control mechanism, the shuttle's credit allocation is an exclusive credit allocation, the shuttle's credit consumption is an exclusive credit consumption, and the shuttle's credit recovery is an exclusive credit recovery.
[0037] In a third aspect of an embodiment of the present application, a flow control management device is provided, comprising: a transceiver port for receiving a credit allocation message sent by a second device, the credit allocation message including a credit allocation field for indicating the credit allocation of a virtual channel, a shuttle, in the port of the second device, the credit allocation of the shuttle being determined based on an average message length and an expected bandwidth. A processing circuit is configured to, when the credit allocation of the shuttle is greater than or equal to the credit allocation locally maintained by the flow control management device, send confirmation information of the credit allocation of the shuttle via the transceiver port. The processing circuit is further configured to update the credit allocation locally maintained by the flow control management device to the credit allocation of the shuttle.
[0038] In conjunction with the third aspect, in one possible implementation, the apparatus is coupled to the second device via a primary link and an auxiliary link. The processing circuit is further configured to send a credit consumption message via the transceiver port when the primary link recovers from an abnormality or when the auxiliary link times out waiting for a response message. The credit consumption message includes a credit consumption field, which is used to indicate shuttle credit consumption.
[0039] In combination with the third aspect, in one possible implementation, the processing circuit is further configured to, when the credit allocation of the shuttle is less than the credit allocation locally maintained by the flow control management device, wait for the cache to release the credit allocation to the shuttle, and then send a credit allocation response message through the transceiver port, the credit allocation response message including confirmation information of the credit allocation of the shuttle.
[0040] In conjunction with the third aspect, in one possible implementation, the processing circuit is further configured to determine a flow control duration of the shuttle. The processing circuit is further configured to send a flow control exception notification message via the transceiver port when the flow control duration of the shuttle exceeds a first preset time. The flow control exception notification message includes a flow control exception field, which is used to indicate a flow control exception of the shuttle.
[0041] In a fourth aspect, embodiments of the present application provide a flow control management device, comprising: a processing circuit configured to determine a credit allocation for a virtual channel shuttle in a port of the flow control management device based on an average message length and an expected bandwidth; and a transceiver port configured to send a credit allocation message to a first device, the credit allocation message including a credit allocation field for indicating the credit allocation for the shuttle.
[0042] In conjunction with the fourth aspect, in one possible implementation, the processing circuit is further configured to determine credit recovery for the shuttle. The transceiver port is further configured to send a credit recovery message, the credit recovery message including a credit recovery field, and the credit recovery field is configured to indicate credit recovery for the shuttle.
[0043] In combination with the fourth aspect, in one possible implementation, the processing circuit is specifically used to send a credit recovery message through the transceiver port when the credit recovery of the shuttle changes, or when the main link recovers from abnormality to normal, or when the auxiliary link times out waiting for the auxiliary link response message.
[0044] In conjunction with the fourth aspect, in a possible implementation, the transceiver port is further configured to receive a credit allocation response message, where the credit allocation response message includes a credit allocation confirmation message of Shuttle, including confirmation information of the credit allocation.
[0045] In conjunction with the fourth aspect, in a possible implementation, the transceiver port is further configured to send a credit allocation message when no credit allocation response message is received within a second preset time.
[0046] In conjunction with the fourth aspect, in a possible implementation, the transceiver port is further used to receive a flow control exception notification message, the flow control exception notification message includes a flow control exception field, and the flow control exception field is used to indicate a shuttle flow control exception.
[0047] In conjunction with the fourth aspect, in a possible implementation, the transceiver port is specifically configured to send a credit recovery message when receiving a flow control exception notification message.
[0048] In a fifth aspect of an embodiment of the present application, a chip module is provided, which includes: a chip and a packaging substrate, the chip is fixed to the packaging substrate, and the chip includes a flow control management device, which is the flow control management device as described in the third aspect or any possible implementation of the third aspect, or the flow control management device is the flow control management device as described in the fourth aspect or any possible implementation of the fourth aspect.
[0049] In a sixth aspect of an embodiment of the present application, an electronic device is provided, which includes a processor and a flow control management device coupled to the processor. The flow control management device is the flow control management device described in the third aspect or any possible implementation of the third aspect, or the flow control management device is the flow control management device described in the fourth aspect or any possible implementation of the fourth aspect.
[0050] In a seventh aspect of an embodiment of the present application, a communication system is provided, which includes a first electronic device and a second electronic device that communicates with the first electronic device. The first electronic device and the second electronic device are electronic devices as described in the sixth aspect or any possible implementation of the sixth aspect.
[0051] In an eighth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program. When the computer program runs on an electronic device, the electronic device executes the flow control management method as described in the first aspect or any possible implementation of the first aspect, or the electronic device executes the flow control management method as described in the second aspect or any possible implementation of the second aspect.
[0052] In a ninth aspect of an embodiment of the present application, a computer program product is provided. When at least one processor of an electronic device runs the computer program product, the electronic device executes the flow control management method as described in the first aspect or any possible implementation of the first aspect, or the electronic device executes the flow control management method as described in the second aspect or any possible implementation of the second aspect.
[0053] The descriptions of the second to ninth aspects of this application can refer to the detailed description of the first aspect; and the beneficial effects described in the second to ninth aspects can refer to the analysis of the beneficial effects of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] FIG1 is a schematic diagram of the structure of a communication system provided in an embodiment of the present application;
[0055] FIG2 is a schematic diagram of the structure of another communication system provided in an embodiment of the present application;
[0056] FIG3 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0057] FIG4 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;
[0058] FIG5 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;
[0059] FIG6 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;
[0060] FIG7 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;
[0061] FIG8 is a schematic structural diagram of another electronic device provided in an embodiment of the present application;
[0062] FIG9 is a schematic structural diagram of another communication system provided in an embodiment of the present application;
[0063] FIG10 is a schematic structural diagram of another communication system provided in an embodiment of the present application;
[0064] FIG11 is a schematic structural diagram of another communication system provided in an embodiment of the present application;
[0065] FIG12 is a schematic structural diagram of another communication system provided in an embodiment of the present application;
[0066] FIG13 is a schematic diagram of the structure of a protocol stack provided in an embodiment of the present application;
[0067] FIG14 is a schematic diagram of a port structure provided in an embodiment of the present application;
[0068] FIG15 is a flow chart of a flow control management method provided in an embodiment of the present application;
[0069] FIG16 is a schematic diagram of the structure of a verification circuit provided in an embodiment of the present application;
[0070] FIG17 is a schematic diagram of the structure of another verification circuit provided in an embodiment of the present application;
[0071] FIG18 is a flow chart of another flow control management method provided in an embodiment of the present application;
[0072] FIG19 is a flow chart of another flow control management method provided in an embodiment of the present application;
[0073] FIG20 is a flow chart of another flow control management method provided in an embodiment of the present application;
[0074] FIG21 is a flow chart of another flow control management method provided in an embodiment of the present application;
[0075] FIG22 is a flow chart of another flow control management method provided in an embodiment of the present application;
[0076] FIG23 is a schematic structural diagram of a flow control management device provided in an embodiment of the present application;
[0077] FIG24 is a schematic diagram of the structure of another flow control management device provided in an embodiment of the present application;
[0078] FIG25 is a schematic structural diagram of a chip module provided in an embodiment of the present application;
[0079] FIG26 is a schematic structural diagram of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0080] The following sections discuss the making and use of various embodiments in detail. However, it should be understood that many applicable inventive concepts provided herein can be implemented in a variety of specific contexts. The specific embodiments discussed are intended merely to illustrate specific ways to implement and use the present description and technology and are not intended to limit the scope of this application.
[0081] Unless defined otherwise, all technical and scientific terms used herein have the same meanings as commonly understood by one of ordinary skill in the art.
[0082] Various circuits or other components may be described or referred to as being "configured to" perform one or more tasks. In this case, "configured to" is used to imply structure by indicating that the circuit / component includes structure (e.g., circuitry) that performs the one or more tasks during operation. Thus, even when a specified circuit / component is not currently operational (e.g., not turned on), the circuit / component may be referred to as being configured to perform the task. Circuits / components used with the phrase "configured to" include hardware, such as circuitry that performs an operation, etc.
[0083] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c or a, b and c, where a, b and c can be single or multiple. In addition, in the embodiments of the present application, words such as "first" and "second" do not limit the quantity and order.
[0084] Throughout this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0085] Before introducing the embodiments of the present application, the technical terms and background technologies involved in the present application are first introduced.
[0086] Lane: A lane is a path for signal transmission. It can be unidirectional or bidirectional. A unidirectional lane consists of a pair of differential signal lines, while a bidirectional lane consists of two pairs of differential signal lines.
[0087] Link: A link is a collection of channels or a conductor line used for power supply. A link generally includes one channel or multiple channels. When a channel in a link is working, a transmitter and a receiver are turned on at each end of the channel, and data (signals) are transmitted from the transmitter to the receiver. The side of the link where the transmitter is located is called the transmitter side (or the transmitter side (Tx Side)), and the side of the link where the receiver is located is called the receiver side (or the receiver side (Rx Side)). Links can be divided into uplinks and downlinks. The uplink refers to the link when a slave device (for example, a game controller) sends a signal to a master device (for example, a display), and the downlink refers to the link when a master device (for example, a routing device) sends a signal to a slave device (for example, a display).
[0088] Main link (ML): The main link is used for high-speed data transmission, such as audio and video signals, third-party protocol data, and other high-speed data transmission.
[0089] Sideband Link (SL): A sideband link is used to transmit low-speed data, such as device management signals, port management signals, bandwidth management signals, and power management signals. It is also used to transmit control messages. The reliability of data transmission on the sideband link is higher than that on the main link.
[0090] Hamming Code: A linear debugging code used in telecommunications. Hamming Code inserts a verification code into a transmitted message stream. This code detects and corrects single-bit errors, which can occur when computers store or move data. Extended Hamming Code can detect and correct multiple-bit errors.
[0091] Cyclic redundancy check (CRC) is a channel coding technology that generates a short fixed-bit check code based on data such as network packets or computer files. It is mainly used to detect or verify errors that may occur after data transmission or storage.
[0092] Modulus: It can also be called modular operation, or Mod, which means remainder.
[0093] The technical solution provided in the embodiment of the present application can be applied to a communication system including multiple devices, in which the devices in the communication system can be directly connected to each other or connected through a routing device. Signals can be transmitted (sent and received) between devices in a wired manner or wirelessly. In addition, signals can be transmitted directly between devices or between devices through an interface device, and the signals can be transmitted to the processing unit inside the device through a bus within the device.
[0094] For example, FIG1 is a schematic diagram of the structure of a communication system 100. The communication system 100 includes a first device 110 and a second device 120. The first device 110 and the second device 120 are directly connected via a cable to implement signal transmission between the first device 110 and the second device 120. For example, the first device 110 may be a set-top box, and the second device 120 may be a display. Audio and video data may be transmitted between the set-top box and the display via the cable. Alternatively, the first device 110 may be a display, and the second device 120 may be a game controller. Control information may be transmitted between the display and the game controller via the cable.
[0095] Optionally, the device 110 may include an interface device 111 , and the device 120 may include an interface device 121 . The interface device 111 in the device 110 and the interface device 121 in the device 120 are directly connected via a cable to achieve signal transmission between the devices 110 and 120 .
[0096] As another example, FIG2 shows a schematic diagram of the structure of another communication system 200. The communication system 200 includes multiple devices 210 and a routing device 220. Any two of the multiple devices 210 can transmit signals via the routing device 220, such as transmitting audio and video data or charging signals. For example, the multiple devices 210 may include a display, a set-top box, and an audio player (e.g., a Moving Picture Experts Group Audio Layer III (MP3) device). The set-top box can transmit audio and video data to the display via the routing device 220, and the set-top box can also transmit audio data to the audio player via the routing device 220. In addition, two devices in the multiple devices 210 may be directly connected. For example, the multiple devices 210 may also include a game controller, which can be directly connected to the display via a cable and transmit control information to the display.
[0097] Optionally, each of the multiple devices 210 may include an interface device, and the routing device 220 may include multiple interface devices. The interface device of each of the multiple devices 210 may be connected to one of the multiple interface devices of the routing device 220. For example, the multiple devices 210 may include a display, a set-top box, and an audio player. The multiple interface devices of the routing device 220 may include first to third interface devices. The interface device of the display is connected to the first interface device of the routing device 220 via a cable, the interface device of the set-top box is connected to the second interface device of the routing device 220 via a cable, and the interface device of the audio player is connected to the third interface device of the routing device 220 via a cable.
[0098] In the two aforementioned communication systems, the interconnected devices can be referred to as communication devices. When the communication devices are electronic devices, they can be deployed on land, including indoors or outdoors, and can be handheld or vehicle-mounted. They can also be deployed on water (such as ships) or in the air (such as aircraft, balloons, and satellites). Exemplarily, the communication device may include, but is not limited to: a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile internet device (MID), a camera, a wearable device (such as a smart watch, a smart bracelet, a pedometer, etc.), an audio device, an audio and video player, a set-top box, a game console, a printer, a mouse, a keyboard, an in-vehicle device (such as a car, a bicycle, an electric car, an airplane, a ship, a train, a high-speed train, etc.), a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a smart home device (such as a refrigerator, a television, an air conditioner, an electric meter, etc.), an intelligent robot, a workshop device, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, or a smart home. Wireless terminals in homes, flying devices (e.g., smart robots, hot air balloons, drones, airplanes), etc. Optionally, the signals transmitted between the above communication devices may include, but are not limited to: audio and video signals, radio frequency signals, IoT data, and charging signals.
[0099] When the communication device is an interface device, the interface device may be a chip. It is understood that the communication system is a chip-to-chip interconnection system, and the chip may be an interface chip on an electronic device, cable, docking station, adapter, or router. The docking station may be connected to a gigabit Ethernet port, a video graphics array (VGA) port, a high-definition multimedia interface (HDMI) port, a TF card (trans-flash card), an SD card (secure digital memory card), a charging port, and a universal serial bus (USB) port, among others.
[0100] In this application, when the communication device is a chip, the chip may include an interface module. That is, this application can be applied to the interface module that interconnects two chips. This interface module can be understood as an IP integrated within the chip. Alternatively, the interface module can be sold separately as an independent IP.
[0101] For example, when the chip can be a system on chip (SoC), a central processing unit (CPU), or a graphics processing unit (GPU), the present application can be applied to the interface modules of chips such as SoC, CPU, and GPU. When the chip is a small chip such as a die, the interface module can be understood as the transmitting circuit and / or receiving circuit in the die. The chip can also be an input / output (I / O) die that only includes interface functions.
[0102] In the embodiments of the present application, when signals are transmitted between devices in a communication system, the interface specifications adopted may include, but are not limited to, the Universal Serial Bus (USB) interface specification, the HDMI specification, the Display Port (DP) specification, the Unified Multimedia Interconnection (UMMI) interface specification, and the Peripheral Component Interconnect Express (PCIE) interface specification. Accordingly, the high-speed signal transmission interface may be an HDMI interface, a miniHDMI interface, a micro HDMI interface, a Type-A interface, a Type-B interface, a Micro-B interface, and a Type-C interface.
[0103] For example, in the above communication system 100, when the first device 110 is a set-top box and the second device 120 is a television, the set-top box and the television can be connected via an HDMI cable, following the HDMI interface specification. When the first device 110 is a game controller and the second device 120 is a display, the game controller and the display can be connected via a USB cable, following the USB interface specification.
[0104] The embodiments of the present application also provide another interface standard that can replace the above-mentioned interface standards (such as USB interface or HDMI interface): unified media interconnecter (UMI) interface. This UMI interface also supports direct connection between devices or multi-device networking connection (for example, connection between devices through a routing device, or connection between devices through a docking station). For example, this UMI interface can be applied to the devices in the above-mentioned communication system 100, or to the devices in the communication system 200. The UMI interface can not only adapt data transmission, but also realize charging functions. Of course, the UMI interface can also be other interface names. When the UMI interface is replaced with other interface names, the other interface can be used to realize the functions of the UMI interface in this application. The embodiments of the present application are not limited to this. The following embodiments of the present application use the UMI interface as an example for illustrative description.
[0105] As shown in Figure 3, it is a structural diagram of an electronic device 300 provided in an embodiment of the present application. The electronic device 300 includes an interface chip 310, a connector 320, a management and control component 330 and multiple external components 340. The embodiment of the present application does not limit the specific number of external components 340 included in the electronic device 300. The interface chip 310 includes a management and control adapter 311, a port 312 and multiple adapters 313. The embodiment of the present application does not limit the specific number of adapters 313 included in the interface chip 310. The management and control adapter 311 is coupled to the management and control component 330 outside the interface chip 310, the multiple adapters 313 are respectively coupled to the multiple external components 340 outside the interface chip 310, the port 312 is coupled to the connector 320, and the connector 320 is used to connect other electronic devices.
[0106] Management and control adapter 311 is used to adapt control information. For example, when port 312 is a downlink port, management and control adapter 311 is used to adapt control information to be sent, and port 312 is used to send the adapted control information. When port 312 is an uplink port, port 312 is used to receive control information, and management and control adapter 311 is used to adapt the control information received by port 312.
[0107] The types of multiple adapters 313 include audio and video adapters or third-party protocol adapters. The audio and video adapter is used for adapting audio and video formats, and the third-party protocol adapter is used for adapting third-party protocols. The embodiment of the present application does not limit the specific types of multiple adapters 313. Any one of the multiple adapters 313 can be a sending adapter and / or a receiving adapter. The embodiment of the present application does not limit this. For example, when the adapter 313 is an audio and video adapter, the adapter 313 can be an audio and video sending adapter, or it can be an audio receiving adapter. When the adapter 313 is a third-party protocol adapter, the adapter 313 can be a third-party protocol sending adapter, or it can be a third-party protocol receiving adapter.
[0108] The types of electronic devices 300 in this application include source devices, sink devices, docks, router devices, or composite devices, which are not limited in the embodiments of this application.
[0109] As shown in FIG4 , when the electronic device 300 is a source device, the interface chip 310 may include a downstream port 314 and at least one data transmission adapter 315 (e.g., an audio / video transmission adapter). The data transmission adapter 315 is used to adapt the source data so that the adapted source data can be transmitted through the downstream port 314. In this case, the electronic device 300 may be a digital versatile / video disc (DVD) player, a set-top box, or a split-type TV host. The electronic device 300 may be used to transmit audio and video data. The specific type of the electronic device 300 is not limited in this embodiment of the present application. The electronic device 300 may also include a third-party protocol component 350 and a management control component 330. The interface chip 310 may also include a third-party protocol adapter 316 and a management control adapter 311. The third-party protocol adapter 316 is coupled to the third-party protocol component 350, and the management control adapter 311 is coupled to the management control component 330. The third-party protocol adapter 316 and the third-party protocol component 350 are used to be compatible with the third-party protocol and adapt the data to be sent to the third-party protocol standard data. The downlink port 314 is used to send the adapted third-party protocol standard data.
[0110] In some possible embodiments, the interface chip 310 may include multiple data transmission adapters 315 and multiple downstream ports 314 . The multiple data transmission adapters 315 and multiple downstream ports 314 may support simultaneous transmission of multiple data streams, such as multiple audio and video data streams.
[0111] As shown in Figure 5, when the electronic device 300 is a sink device, the interface chip 310 may include an uplink port 317 and at least one data receiving adapter 318 (e.g., an audio and video receiving adapter). The data receiving adapter 318 is used to adapt the data received by the uplink port 317 so that the data processing component 360 can process the adapted data. In this case, the type of the electronic device 300 includes a television, a display, or a speaker. The electronic device 300 can be used to receive audio and video data. The embodiment of the present application does not limit the specific type of the electronic device 300. The electronic device 300 may also include a third-party protocol component 350 and a management control component 330. The interface chip 310 may also include a third-party protocol adapter 316 and a management control adapter 311. The third-party protocol adapter 316 is coupled to the third-party protocol component 350, and the management control adapter 311 is coupled to the management control component 330. The third-party protocol adapter 316 and the third-party protocol component 350 are used to be compatible with third-party protocols and adapt the data of the third-party protocol standard received by the uplink port 317 to data of the protocol standard supported by the electronic device 300.
[0112] In some possible embodiments, the interface chip 310 may include multiple data receiving adapters 318 and multiple upstream ports 317 . The multiple data receiving adapters 318 and the multiple upstream ports 317 may support simultaneous reception of multiple data streams, such as multiple audio and video data streams.
[0113] As shown in FIG6 , when the electronic device 300 is a docking station, the electronic device 300 may include a data conversion component 370 and a traditional data interface 380. The interface chip 310 may include an upstream port 317 and a data receiving adapter 318. The data receiving adapter 318 is coupled to the data conversion component. The data receiving adapter 318 and the data conversion component 370 are configured to convert data received from the upstream port 317 so that the converted data can be transmitted through the traditional data interface 380. The electronic device 300 may also include a management and control component 330, a third-party protocol hub 390, and multiple third-party interfaces 3100. The interface chip 310 may also include a management and control adapter 311 and a third-party protocol adapter 316. The management and control adapter 311 is coupled to the management and control component 330. The third-party protocol adapter 316 is coupled to the third-party protocol hub 390. The third-party protocol hub 390 is also coupled to the third-party interface 3100. The third-party protocol adapter 316 can convert the audio and video data received by the uplink port 317 into data of a third-party protocol standard. The converted data can be transmitted to the third-party interface 3100 through the third-party protocol hub 390 for transmission.
[0114] As shown in FIG7 , when the electronic device 300 is a routing device, the electronic device 300 may include multiple connectors 320, and the interface chip 310 may include multiple downstream ports 314 and multiple upstream ports 317. The multiple downstream ports 314 and the multiple upstream ports 317 may be coupled to the multiple connectors 320, respectively. The embodiment of the present application does not limit the specific number of connectors 320 included in the electronic device 300 or the specific number of downstream ports 314 and upstream ports 317 included in the interface chip 310. The electronic device 300 may further include a management and control component 330, and the interface chip 310 may further include a management and control adapter 311. The management and control adapter 311 is coupled to the management and control component 330.
[0115] In a possible embodiment, when the electronic device 300 is a routing device, the electronic device 300 may support routing and forwarding of UMI messages, but may not support encryption / decryption, and encapsulation / decapsulation processing of UMI messages.
[0116] As shown in FIG8 , when the electronic device 300 is a composite device, it can be a source device or a sink device having both an upstream port 317 and a downstream port 314. The electronic device 300 can support bidirectional data transmission. Specifically, the electronic device 300 can include a data processing component 360, a data acquisition component 3110, a management and control component 330, and a third-party protocol component 350. The interface chip 310 can include an upstream port 317, a downstream port 314, a data receiving adapter 318, a data transmitting adapter 315, a management adapter 311, and a third-party protocol adapter 316. The data receiving adapter 318 is coupled to the data processing component 360, the data transmitting adapter 315 is coupled to the data acquisition component 3110, the management and control adapter 311 is coupled to the management and control component 330, and the third-party protocol adapter 316 is coupled to the third-party protocol component 350. The data receiving adapter 318 can adapt data received at the upstream port 317, for example, to data in the UMI protocol, and then process the adapted data. The data transmission adapter 315 can adapt the data collected from the data collection component 3110, for example, to data in the UMI protocol. The adapted data can be sent through the downlink port 314.
[0117] Based on this, as shown in FIG9 , an embodiment of the present application further provides a communication system 400, which includes the above-mentioned electronic device 300. Specifically, the communication system 400 includes two electronic devices 300 coupled to each other, wherein one electronic device 300 is a source device, and its interface chip 310 includes a downlink port 314 (excluding an uplink port 317). The other electronic device 300 is a sink device, and its interface chip 310 includes an uplink port 317 (excluding the downlink port 314). The downlink port 314 of the source device can send data to the uplink port 317 of the sink device 31.
[0118] In one possible embodiment, as shown in FIG10 , both electronic devices 300 in the communication system 400 can be composite devices. The interface chips in the two electronic devices 300 can include both a downstream port 314 and an upstream port 317. For ease of distinction, one electronic device 300 is referred to as a source device, and the other electronic device 300 is referred to as a sink device. The source device can send data to the sink device via the downstream port 314, and can also receive data from the sink device via the upstream port 317. For example, in an audio and video transmission scenario, the source device can send audio and video data to the upstream port 317 of the sink device via the downstream port 314. The audio and video acquisition component in the sink device can obtain the audio and video data, and the audio and video transmission adapter can encapsulate the audio and video data into a UMI message and transmit it back to the upstream port 317 of the source device via the downstream port 314 of the sink device. The audio and video reception adapter in the source device can process the UMI message and then transmit it to the audio and video processing component.
[0119] In a possible embodiment, as shown in FIG11 , the communication system 400 may include multiple electronic devices 300 , which may be routing devices, source devices, and sink devices. Multiple source devices may communicate with multiple sink devices through the routing device.
[0120] In one possible embodiment, the multiple electronic devices 300 may be a routing device and multiple composite devices, and the multiple composite devices may communicate via the routing device. For example, the source device may be a speaker, and the sink device may be a display. When the speaker sends audio or video data to the display, the data may be sent via the speaker's downstream port to the display's upstream port, with the routing device performing the intermediate switching. The display may also transmit data back through the downstream port, with the data being transmitted back to the speaker's upstream port via the routing device.
[0121] As shown in Figure 12, when the electronic devices 300 are interconnected using the above-mentioned high-speed signal transmission interface, the links between the electronic devices 300 include a main link, an auxiliary link, a power bus link (PL) and a cable information link (CL). The main link is used to transmit high-speed data such as audio and video signals and third-party protocol data, and the auxiliary link is used to transmit low-speed data such as device management signals, port management signals, bandwidth management signals, device control signals, content protection signals and power management signals, as well as control messages. The power bus link is used to transmit electrical energy. The cable information link can be used to transmit cable information, such as cable model, cable capability information, etc.
[0122] Figure 13 shows a schematic diagram of the protocol stack used for data transmission between electronic devices 300 via a link. The protocol stack includes an adapter layer, a transport layer, a logic layer, and an electrical layer. The adapter layer is responsible for interfacing between the interface chip (switch) and external components. The functions performed by the adaptation layer include data transmission adaptation, data reception adaptation, third-party protocol adaptation (protocol tunnel adaptation), and management and control adaptation. Data transmission adaptation involves performing transmission adaptation on the source data received from the device's application and sending it to the transport layer. Data reception adaptation involves performing reception adaptation on the data received from the transport layer and sending it to the application for data processing. Third-party protocol adaptation can be used to receive data from the transport layer, perform protocol adaptation on it, obtain third-party protocol data, and transmit it to the application for processing, or receive third-party protocol data from the application, adapt it, and send it to the transport layer. Management and control adaptation involves adapting control information received from the transport layer and performing management and control based on the adapted control information, or adapting control information generated during the management and control process and sending it to the transport layer.
[0123] The transport layer is responsible for processing and forwarding service information or control information. For example, it can process and forward service flows such as video, audio, and third-party protocol tunnels, as well as management and control information, and perform bandwidth management for all service flows.
[0124] The logic layer is responsible for line encoding and decoding, scrambling and descrambling, forward error correction (FEC) encoding and decoding, and link training.
[0125] The electrical layer is responsible for signal equalization, spread spectrum, and clock recovery. The logical layer and the electrical layer can also be collectively referred to as the physical layer.
[0126] When the electronic device 300 sends data through a port, the transport layer receives messages from the corresponding adaptation layer, integrates the various service flows, and passes the data to the physical layer. When the electronic device 300 receives data through a port, the transport layer splits the data from the physical layer into messages corresponding to the various service flows and then passes the messages to the corresponding adaptation layer.
[0127] Electronic device 300 may include one or more adapters. All adapters in electronic device 300 may collectively constitute a virtual port. Each adapter is a shuttle (virtual channel) on that port. It is understood that the adapter identity document (ID) is the virtual channel ID (shuttle ID). As shown in FIG14 , for example, communication occurs between port 0 and port 1, where each port 0 and port 1 includes multiple shuttles, including virtual channel ID=4, virtual channel ID=5, and virtual channel ID=n, where n is a positive integer. Each shuttle is configured with an RBuff (receive buffer) and a TBuff (transmit buffer). When forwarding a message, as shown by the forwarded message line in FIG14 , the transport layer may retrieve a message from the RBuff of virtual channel ID=4 on port 0 and, based on routing information, forward or copy the message to the TBuff of another shuttle. For example, the message may be forwarded to the TBuff of virtual channel ID=5 on port 0, or to the TBuff of virtual channel ID=4 on port 1.
[0128] In the process of data transmission, in order to avoid RBuff cache overflow, a credit-based flow control mechanism can be adopted. However, how to improve the utilization efficiency of RBuff has become an urgent problem that needs to be solved.
[0129] Based on this, an embodiment of the present application provides a flow control management method. During flow control management, this method determines the credit allocation of a virtual channel shuttle based on the average packet length and the expected bandwidth to dynamically adjust the credit allocation of the shuttle. The credit allocation of the shuttle is used to indicate the capacity of the RBuff cache space allocated to the shuttle, thereby improving the utilization of the RBuff.
[0130] As shown in Figure 15, a flow chart of a flow control management method provided in an embodiment of the present application is provided, and the method includes steps S1501-S1505. The method can be applied to a communication system including a first device and a second device, such as the above-mentioned communication system 100, communication system 200, or communication system 400. In the embodiment of the present application, the method is applied to the above-mentioned communication system 100, the first device 110 sends a data packet to the second device 120, the second device 120 is a receiving device, and the first device 110 is a sending device. The flow control management method is used to manage the credit allocation allocated to the shuttle in the second device 120 as an example for illustrative description.
[0131] S1501: The second device 120 determines credit allocation for a shuttle in a port of the second device 120 according to an average packet length and an expected bandwidth.
[0132] The shuttle corresponds to the adapter in the second device 120. The shuttle's credit allocation also indicates the capacity allocated to the adapter's receive buffer (RBuff). Hereinafter, shuttle credit recovery refers to the buffer capacity released when a message is forwarded from the RBuff, and shuttle credit consumption refers to the buffer capacity occupied when a message is stored in the RBuff.
[0133] In a possible embodiment, when the second device 120 determines the credit allocation of the shuttle according to the average packet length and the expected bandwidth, the following formula is satisfied:
[0134] Among them, "Credits_Allocated" indicates the credit allocation of the shuttle, "tRound" is the flow control loop delay, "ExpBW" is the expected bandwidth, "TLDP average packet length" is the average packet length, and "A", "B", and "C" are preset values.
[0135] In one possible embodiment, the maximum message length is 512 bytes, one credit can be 32 bytes, one byte is 8 bits, and 16 credits correspond to one packet. Therefore, "A" can be "32" and "B" can be "8". For ease of processing in the Tx direction, when sending, regardless of the message length, a direct determination is made as to whether there are 16 credits. The actual message may be 1 credit, so 15 extra credits are reserved. Therefore, "C" can be "15". The embodiments of this application do not limit the specific values of "A", "B", and "C". The following embodiments use "A" as "32", "B" as "8", and "C" as examples for illustrative purposes.
[0136] In a possible embodiment, when determining "tRound", the following formula must be satisfied: tRound = tTLDP2TLCRP + 2*tCable + tTLCRP2TLDP + tTLCRP + tTLDP
[0137] Among them, "tTLDP2TLCRP" is the delay from the second device 120 (TLDP receiving end) receiving the last bit of TLDP from the cable to sending the first bit of the transport layer credit recycled packet (TLCRP) carrying the credit recovery entry of the TLDP to the cable. This delay does not include the time when the message cannot be dequeued due to downstream back pressure or scheduling other messages. "tCable" is the cable delay. "tTLCRP2TLDP" is the delay from the first device 110 (TLDP sending end) receiving the last bit of TLCRP from the cable to sending the first bit of TLDP to the cable. This delay does not take into account the delay introduced by scheduling other messages. "tTLCRP" is the time from the first bit to the last bit of TLCRP transmitted on the link. "tTLDP" is the time from the first bit to the last bit of TLDP transmitted on the link.
[0138] In a possible embodiment, the credit allocation of the shuttle is related to the flow control mechanism adopted by the second device 120 when allocating credit for the shuttle, and the second device 120 determines the credit allocation of the shuttle in the second device 120 based on the average message length and the expected bandwidth, including: the second device 120 determines the credit allocation of the shuttle in the second device 120 based on the flow control mechanism of the shuttle, the average message length, and the expected bandwidth.
[0139] Optionally, the flow control mechanism of shuttle includes at least one of an exclusive flow control mechanism, a shared flow control mechanism, or a flow control disabled mechanism. The embodiment of the present application does not limit the specific flow control mechanisms included in the flow control mechanism of shuttle.
[0140] Among them, the exclusive flow control mechanism means that the second device 120 (receiving device) allocates an independent buffer space for each shuttle. When the independent buffer space has sufficient credit, or, it can also be said that when the independent buffer space has sufficient buffer space, the first device 110 (sending device) can send a data packet. The data packet can also be called a transport layer data packet (TLDP), the second device 120 can also be called a TLDP receiver, and the first device 110 can also be called a TLDP sender. The shared flow control mechanism means that the second device 120 provides a shared buffer space for all shuttles of the shared flow control mechanism. When the shared buffer space has sufficient credit, the first device 110 can send a data packet. The flow control disable mechanism means that the second device 120 provides a flow control disable buffer space for all shuttles of the flow control disable mechanism, does not perform flow control on the first device 110, and the second device 120 discards the message after the flow control disable buffer space is full.
[0141] In a possible embodiment, when the flow control mechanism of a shuttle is an exclusive flow control mechanism, the second device 120 needs to satisfy the following formula when determining the credit allocation of the shuttle:
[0142] Among them, "Credits_Allocated_Shuttle" represents the credit allocation for this shuttle, also known as the cache credits for the exclusive flow control mechanism. "tRound" is the flow control loop delay, measured in nanoseconds (ns). "ExpBW" is the expected bandwidth for this shuttle, measured in gigabits per second (Gbps). Expected bandwidth refers to the bandwidth set based on demand and expected to be achieved. "TLDP Average Packet Length" is the average packet length, also known as the average packet length of transport layer data packets. This average packet length is determined by calculating the average of the lengths of multiple packets received by the shuttle within a preset time.
[0143] In a possible embodiment, when the flow control mechanism of Shuttle is a shared flow control mechanism, the second device 120 needs to satisfy the following formula when determining the credit allocation domain:
[0144] Credits_Allocated_Shared indicates the credit allocation for the shuttle, also known as the buffer credits for the shared flow control mechanism. The difference is that ExpBW is the sum of the expected bandwidth of all shuttles in the shared flow control mechanism, and the average TLDP packet length is the average packet length of all shuttles.
[0145] In a possible embodiment, the management adapter in the second device 120 determines shuttle credit allocation according to the average packet length and the expected bandwidth.
[0146] S1502: The second device 120 sends a credit allocation message to the first device 110. The credit allocation message includes a credit allocation field, where the credit allocation field is used to indicate credit allocation for the shuttle.
[0147] The above credit allocation message may also be referred to as a transport layer credit allocation message (TLCAP).
[0148] In a possible embodiment, the format of the credit allocation message may be as shown in Table 1 below.
[0149] Table 1
[0150] The credit allocation message includes a message header and a payload of a certain length. The embodiment of the present application does not limit the length of the message header and the payload. In the embodiment of the present application, the credit allocation message and other messages include a 32-bit message header, and the payload includes at least one entry, and each entry includes 32 bits. As an example, it is illustrated.
[0151] Among them, the message header includes a reserved (Rsvd) field, a transport layer management packet type (TLMP Type) field, a length (Length) and a data packet identifier D. The message header may also include other fields, which are not limited in the embodiments of the present application.
[0152] The Rsvd field is always filled with 0 when a message is generated. It is ignored when a message is received and cannot be modified when a message is forwarded.
[0153] The TLMP Type field is used to indicate the transport layer management message type. For example, 0 can be used to represent a credit allocation message. Since the message is transmitted at the transport layer, this message can also be called a transport layer credit allocation message (TLCAP). 1 can be used to represent a credit allocation acknowledgment message. This message can also be called an acknowledgment for transport layer credit allocated packet (TLCAP_ACK). 2 can be used to represent a credit consumption message. This message can also be called a transport layer credit consumed packet (TLCCP). 3 can be used to represent a credit recovery message. This message can also be called a transport layer credit recovery message (TLCRP). 4 can be used to represent a flow control exception message. This message can also be called a transport layer flow control error notification packet (TLFCENP). This is not limited to the embodiments of the present application.
[0154] Length is used to indicate the length of the message.
[0155] The data packet identifier D is used to indicate whether the message is a data packet. For example, 1 can be used to indicate that the message is a transport layer data message TLDP, and 0 can be used to indicate that the message is a transport layer management message TLMP. This embodiment of the present application does not limit this.
[0156] Each entry in the payload may include an ST field, an Rsvd field, a Credits_Allocated field, and a shuttle ID field. Each entry may also include other fields, which are not limited in this embodiment of the present application.
[0157] The ST field is used to indicate the flow control management mechanism of the shuttle. For example, 1 can be used to indicate that the flow control management mechanism of the shuttle is an exclusive flow control management mechanism, and 0 can be used to indicate that the flow control management mechanism of the shuttle is a shared flow control management mechanism. This embodiment of the present application does not limit this.
[0158] The Credits_Allocated field is used to indicate the credit allocation for the shuttle.
[0159] Shuttle ID is used to identify different shuttles.
[0160] In a possible embodiment, the message header and each entry in the credit allocation message may include an error checking and correcting (ECC) field, where the ECC field is used to indicate whether an error occurs in the credit allocation message.
[0161] In one possible embodiment, during the process of checking the message header or entry in the credit allocation message using the ECC field, if a single-bit ECC error can be corrected, the message header or entry is considered error-free after the correction. If an uncorrectable error is detected, the corresponding message header or entry is discarded, and the discarded message header or entry is considered not received.
[0162] Optionally, the check fields in the message header and each entry may include a Hamming code, or an extended Hamming code. The embodiments of the present application do not limit this. The embodiments of the present application use the example of the message header and each entry using the same check method, and the ECC fields all include extended Hamming codes.
[0163] Specifically, the ECC field contains 6 check bits (referred to as ECC6) for bits 31 through 6, using an extended Hamming code (32, 26). Single-bit ECC error correction is performed on bits 31 through 6 using the Hamming code (31, 26), extending the 1-bit field for 2-bit error detection.
[0164] In a possible embodiment, ECC6 may be implemented as follows:
[0165] Calculate the 5-bit parity check field (called ECC5) of the Hamming code (31, 26) according to the following rules:
[0166] Generator polynomial: G(x) = x^5 + x^2 + 1, "^" represents the exponentiation operation;
[0167] Check code width: 5 bits;
[0168] Initial value: 0x00h;
[0169] Input data: no inversion;
[0170] Output check code: no inversion;
[0171] Output check code XOR: 0x00h.
[0172] In one possible embodiment, as shown in FIG16 , an ECC5 generation circuit includes a first exclusive OR (XOR) circuit XOR1, a second exclusive OR circuit XOR2, and first through fifth D flip-flops D1 through D5. When bits 31 through 6 are sequentially input into the ECC5 generation circuit, each bit of the generated c[5:1] is XORed with all input data to generate an extended field c[0], thereby obtaining the ECC6 check field c[5:0].
[0173] In one possible embodiment, when the flow control mechanism of a shuttle is an exclusive flow control mechanism, the second device 120 may send the credit allocation message when establishing the shuttle, or may send the credit allocation message when the management adapter changes the credit allocation of the shuttle (also referred to as exclusive credit allocation Credits_Allocated_Shuttle). When the flow control mechanism of a shuttle is a shared flow control mechanism and the shuttle is the first shuttle of the shared flow control mechanism, the second device 120 may send the credit allocation message, or may send the credit allocation message when the management adapter changes the credit allocation of the shuttle (also referred to as Credits_Allocated_Shared shared credit allocation).
[0174] S1503 : The first device 110 receives the credit allocation message sent by the second device 120 .
[0175] S1504: If the credit allocation of shuttle is greater than or equal to the credit allocation locally maintained by the first device 110, the first device 110 sends confirmation information of the credit allocation of shuttle.
[0176] The credit allocation locally maintained by the first device 110 refers to the credit allocation of the shuttle maintained by the first device 110 before the first device 110 receives the credit allocation message.
[0177] In a possible embodiment, the first device 110 sends confirmation information of the credit allocation of shuttle, including: the first device 110 sends a credit allocation response message, which includes confirmation information of the credit allocation of shuttle. The credit allocation response message can also be called a transport layer credit allocation response message TLCAP_ACK.
[0178] In a possible embodiment, the format of the credit allocation response message may be as shown in Table 2 below.
[0179] Table 2
[0180] The Rsvd field in the Credit Allocation Response message header includes an SH_ACK field, which is used to indicate confirmation information for the credit allocation of the shared flow control mechanism shuttle. Each entry may include confirmation information for the credit allocation corresponding to 32 exclusive flow control mechanism shuttles. For example, ST_ACK[127:96] is used to indicate confirmation information for the credit allocation corresponding to the 32 shuttles with shuttle IDs 127 to 96. The Credit Allocation Response message may also include other fields or entries, which are not limited in this embodiment of the present application.
[0181] In one possible embodiment, the message header in the credit allocation response message may further include an ECC field, and the payload may further include a CRC32 field, wherein the CRC32 field is used to verify the entries in the payload of the credit allocation response message. In the credit allocation response message provided in the embodiment of the present application, the SH_ACK field is verified using the ECC field, and the ST_ACK in each entry is verified using the CRC32 field. Therefore, after the second device 120 receives the credit allocation response message, it can perform verification using an independent verification method, and the two do not affect each other, thereby improving the reliability of the received message.
[0182] Specifically, the CRC32 field is used to check the payload area other than the CRC32 field. Starting from double word (DW) 0 ([31:0]) of the payload area, the check result is generated from bit 31 to bit 0 in each DW according to the following rules:
[0183] Generating polynomial: G(x) = x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1;
[0184] The initial value is: 0xFFFF_FFFF;
[0185] Input data: reverse;
[0186] Output data: reverse;
[0187] Output check code XOR: 0xFFFF_FFFF.
[0188] In one possible embodiment, as shown in FIG17 , a CRC32 check circuit is shown. The CRC32 check circuit includes first to fourteenth exclusive-OR circuits XOR1 to XOR14, first to thirty-second D flip-flops D1 to D32, and first to thirty-second NOT gates N1 to N32. When all bits to be checked are in the order of DW0 ([31:0]) to DW3 ([127:96]), and each DW is input into the CRC32 check circuit in the order of bits 24 to 31, bits 16 to 23, bits 8 to 15, and bits 0 to 7, c[31:0] is the generated check field.
[0189] In one possible embodiment, if the credit allocation for Shuttle is less than the credit allocation locally maintained by first device 110, first device 110 may wait for the credit allocation to be released from the cache to Shuttle and then send a credit allocation response message including confirmation information of the credit allocation for Shuttle. Second device 120 may receive the credit allocation response message.
[0190] In one possible embodiment, the second device 120 sending the credit allocation message includes: when the second device 120 does not receive a credit allocation acknowledgment message within a second preset time, sending the credit allocation message. The second preset time may also be referred to as tTLCAP_ACK. The second preset time refers to the time from the first bit of the credit allocation message (transport layer credit allocation message TLCAP) sent by the first device to the last bit of the credit allocation acknowledgment message (transport layer credit allocation acknowledgment message TLCAP_ACK) received by the first device. The embodiment of the present application does not limit the specific duration of the second preset time.
[0191] Specifically, when Shuttle's flow control mechanism is an exclusive flow control mechanism, if the second device 120 does not receive a credit allocation response message within the second preset time, the second device 120 may send Shuttle's exclusive credit allocation via a credit allocation message. When Shuttle's flow control mechanism is a shared flow control mechanism, if the second device 120 does not receive a credit allocation response message within the second preset time, the second device 120 may send Shuttle's shared credit allocation via a credit allocation message.
[0192] For ease of understanding, FIG18 illustrates a flow diagram of message transmission between the second device 120 and the first device 110. First, the second device 120 (TLDP receiver) sends a credit allocation message (also referred to as a transport layer credit allocation message TLCAP) to the first device 110 (TLDP transmitter). This credit allocation message may include an exclusive credit allocation field, Credits_Allocated_Shuttle, and / or a shared credit allocation field, Credits_Allocated_Shared. Then, the first device 110 may send a credit allocation acknowledgment message (also referred to as a transport layer credit allocation acknowledgment message TLCAP_ACK) based on the shuttle's credit allocation and the credit allocation maintained locally by the first device. This credit allocation acknowledgment message may include an SH_ACK and / or an ST_ACK.
[0193] S1505: The first device 110 updates the credit allocation locally maintained by the first device 110 to the credit allocation of shuttle.
[0194] Specifically, when the shuttle's flow control mechanism is an exclusive flow control mechanism and the credit allocation message includes the Credit_Allocated field of the exclusive flow control mechanism, the first device 110 can extract the credit allocation of the shuttle's exclusive flow control mechanism from the Credit_Allocated field of the exclusive flow control mechanism in the credit allocation message, and update the credit allocation locally maintained by the first device 110 to the credit allocation of the shuttle's exclusive flow control mechanism. When the shuttle's flow control mechanism is a shared flow control mechanism and the credit allocation message includes the Credit_Allocated field of the shared flow control mechanism, the first device 110 can extract the credit allocation of the shuttle's shared flow control mechanism from the Credit_Allocated field of the shared flow control mechanism in the credit allocation message, and update the credit allocation locally maintained by the first device 110 to the credit allocation of the shuttle's shared flow control mechanism.
[0195] In the flow control management method provided in this embodiment of the present application, second device 120 determines a shuttle credit allocation based on the average packet length and expected bandwidth and sends the allocation to first device 110. First device 110 updates the shuttle credit allocation with the credit allocation maintained locally by first device 110. Second device 120 can determine the RBuff buffer capacity based on the average packet length and expected bandwidth and dynamically adjust the shuttle credit allocation in second device 110, thereby improving RBuff utilization while meeting transmission requirements.
[0196] In a possible embodiment, as shown in FIG19 , after the above-mentioned step S1505 , the flow control management method provided in the embodiment of the present application further includes steps S1506 - S1507 .
[0197] S1506 . The first device 110 sends a data message according to the credit allocation maintained locally by the first device 110 , the credit consumption of the shuttle, and the credit recovery maintained locally by the first device 110 .
[0198] The above data packet may also be referred to as a transport layer data packet TLDP.
[0199] Specifically, when the flow control mechanism of Shuttle is an exclusive flow control mechanism and satisfies the following formula, the first device 110 can send a data packet:
[0200] (Tx_Credits_Consumed_Shuttle-Tx_Credits_Recycled_Shuttle+16384)%16384+16<=Tx_Credits_Allocated_Shuttle
[0201] Among them, "Tx_Credits_Consumed_Shuttle" is the credit consumption of the shuttle, "Tx_Credits_Recycled_Shuttle" is the credit recovery maintained locally by the first device, and "Tx_Credits_Allocated_Shuttle" is the credit allocation maintained locally by the first device. "16384" and "16" are preset constants. "16384" is related to the size of the RBuff cache space, and the embodiment of the present application does not limit this. When the above formula is not satisfied, the second device 120 cannot send data packets. At this time, the second device 120 is flow controlled and the flow control timer of the shuttle is started. When the second device 120 can send data packets, the flow control timer of the shuttle is reset to 0.
[0202] When the shuttle flow control mechanism is a shared flow control mechanism and the following formula is satisfied, the first device 110 can send a data packet:
[0203] (Tx_Credits_Consumed_Shared-Tx_Credits_Recycled_Shared+16384)%16384+16<=Tx_Credits_Allocated_Shared
[0204] Among them, "Tx_Credits_Consumed_Shared" is the credit consumption of all shuttles in the shared flow control mechanism, "Tx_Credits_Recycl ed_Shared" is the credit recovery maintained locally by all shuttles in the shared flow control mechanism, and "Tx_Credits_Allocated_Shared" is the credit allocation maintained locally by all first devices in the shared flow control mechanism. "16384" and "16" are preset constants, which are not limited in the embodiments of the present application. When the above formula is not satisfied, the second device 120 cannot send data packets. At this time, the second device 120 is flow controlled and the flow control timer of the shuttle is started. When the second device 120 can send data packets, the flow control timer of the shuttle is reset to 0.
[0205] In a possible embodiment, when the flow control mechanism of shuttle is a flow control disabled mechanism, the first device 110 may directly send the data packet.
[0206] In one possible embodiment, when the second device 120 sends a credit allocation message to the first device 110 to adjust the credit allocation of the shuttle, the first device 110 sends a data message based on the credit consumption of the shuttle, the credit recovery locally maintained by the first device 110, and the updated credit allocation locally maintained by the first device 110. When the second device 120 does not send a credit allocation message to the first device 110 to adjust the credit allocation of the shuttle, the first device 110 sends a data message based on the credit allocation locally maintained by the first device 110, the credit consumption of the shuttle, and the credit recovery locally maintained by the first device 110. It will be understood that the execution of step S1506 is independent of steps S1501-S1505 described above.
[0207] S1507. The second device 120 receives the data message.
[0208] The flow control management method provided in the embodiment of the present application is that the first device 110 sends data packets based on the credit allocation maintained locally by the first device 110, the credit consumption of the shuttle, and the credit recovery maintained locally by the first device 110, which can avoid overflowing the RBuff cache of the first device and improve the reliability of data transmission.
[0209] In a possible embodiment, the second device 120 can send the credit recovery of the shuttle to the first device 110, and the first device 110 can send the credit consumption of the shuttle to the second device 120, so that the second device 120 can update the credit consumption locally maintained by the second device 120 according to the credit consumption of the shuttle, and the first device 110 can update the credit recovery locally maintained by the first device 110 according to the credit recovery of the shuttle. The second device 120 and the first device 110 can determine the exact value of the RBuff cache space capacity of the shuttle in the second device 120. When the first device 110 sends a message to the second device 120, cache overflow can be avoided and the reliability of data transmission can be improved.
[0210] In one possible embodiment, when the shuttle's flow control mechanism is a shared flow control mechanism, the shuttle's credit allocation is a shared credit allocation, the shuttle's credit consumption is a shared credit consumption, and the shuttle's credit recovery is a shared credit recovery. When the shuttle's flow control mechanism is an exclusive flow control mechanism, the shuttle's credit allocation is an exclusive credit allocation, the shuttle's credit consumption is an exclusive credit consumption, and the shuttle's credit recovery is an exclusive credit recovery.
[0211] In one possible embodiment, as shown in FIG19 , if the second device 120 forwards some or all of the packets in the RBuff, the buffer released by the sent packets can be reclaimed, and the first device 110 can send a shuttle credit recovery to the second device 120. When the second device 120 sends a shuttle credit recovery to the first device 110, the method may further include steps S1508-S1511 after step S1502. During execution, steps S1508-S1511 and steps S1503-S1507 may not be sequenced, and may be executed simultaneously, for example.
[0212] S1508: The second device 120 determines credit recovery for the shuttle.
[0213] Specifically, when the shuttle's flow control mechanism is an exclusive flow control mechanism, the management adapter in the second device 120 may determine that the credit recovery field is 0 when establishing the shuttle. The credit recovery field is used to indicate that the shuttle's credit recovery is 0. After the data packet (transport layer data packet TLDP) is output from the shuttle's RBuff, the shuttle's credit recovery satisfies the following formula. The second device 120 may determine the shuttle's credit recovery based on the formula:
[0214] Rx_Credits_Recycled_Shuttle = (Rx_Credits_Recycled_Shuttle + credits contained in output TLDP) modulo 16384
[0215] Among them, "Rx_Credits_Recycled_Shuttle" represents the exclusive credit recovery of the shuttle, "Credits included in the output TLDP" represents the messages received from the first device 110 using the exclusive flow control mechanism, such as the credits increased by the exclusive credit recovery of the shuttle when the data message is output from the RBuff of the shuttle, and "16384" is a preset constant, which is not limited in the embodiments of the present application.
[0216] When the shuttle's flow control mechanism is a shared flow control mechanism, the management adapter in the second device 120 may determine that the credit recovery field is 0 when establishing the first shared flow control mechanism shuttle. The credit recovery field is used to indicate that the shuttle's credit recovery is 0. After the data packet (transport layer data packet TLDP) is output from the shuttle's RBuff, the shuttle's credit recovery satisfies the following formula. The second device 120 may determine the shuttle's credit recovery based on the formula:
[0217] Rx_Credits_Recycled_Shared=(Rx_Credits_Recycled_Shared+credits included in output TLDP) modulo 16384.
[0218] Among them, "Rx_Credits_Recycled_Shared" represents the shared credit recovery of shuttle, "Credits included in the output TLDP" represents the messages received from the first device 110 using the shared flow control mechanism, such as the credits increased by the shared credit recovery of shuttle when a data message is output from the RBuff of shuttle, and "16384" is a preset constant, which is not limited in the embodiments of the present application.
[0219] S1509. The second device 120 sends a credit recovery message, where the credit recovery message includes a credit recovery field, where the credit recovery field is used to indicate credit recovery of the shuttle.
[0220] The credit recovery message may also be referred to as a transport layer credit recovery message TLCRP.
[0221] In a possible embodiment, the format of the credit recovery message may be as shown in Table 3 below.
[0222] Table 3
[0223] Each entry in the payload of the credit recovery message includes a Credits_Recycled field, which is used to indicate the credit recovery of the shuttle. The header of the credit recovery message, and each entry may also include other fields, which are not limited in the embodiments of the present application.
[0224] When the ST field indicates that the shuttle's flow control management mechanism is exclusive, the Shuttle ID field is used to identify different shuttles. When the ST field indicates that the shuttle's flow control management mechanism is shared, the Shuttle ID field is reserved.
[0225] In a possible embodiment, the message header of the credit recovery message and each entry may also include an ECC field, relevant descriptions of the EEC field, and relevant descriptions of other fields. Please refer to the above description, and the embodiment of the present application will not be repeated here.
[0226] In a possible embodiment, in combination with Figure 12, the second device 120 and the first device 110 in the communication system 100 can also be coupled through a main link, an auxiliary link, a power supply link and a cable information link, and the functions of each link will not be repeated here in this embodiment of the present application. The second device 120 sends a credit recovery message, including: when the credit recovery of the shuttle changes, or when the main link recovers from abnormality to normal, or when the auxiliary link times out waiting for the auxiliary link response message, a credit recovery message is sent. It can be understood that in the flow control management method provided in the embodiment of the present application, the second device 120 sends a credit recovery message when the conditions are met, rather than sending a credit recovery message at a fixed period, thereby reducing the frequency of sending credit recovery messages and reducing power consumption.
[0227] Specifically, when the credit recovery of a shuttle in the exclusive flow control mechanism changes, the second device 120 can send a credit recovery message to recover the exclusive credit of the shuttle. When the credit recovery of a shuttle in the shared flow control mechanism changes, the second device 120 can send a credit recovery message to recover the shared credit of the shuttle. When the primary link recovers from an abnormality, or when the auxiliary link times out while waiting for the auxiliary link response message, the second device 120 can send a credit recovery message to recover the exclusive credit and shared credit of all shuttles.
[0228] In a possible embodiment, if a credit recovery message cannot be sent immediately after a data message is output from the RBuff of a shuttle, an additional buffer compensation delay needs to be reserved to avoid buffer overflow due to the transmission and reception delay.
[0229] S1510: The first device 110 receives a credit recovery message.
[0230] S1511. The first device 110 updates the credit recovery locally maintained by the first device 110 to the credit recovery of shuttle.
[0231] The credit recovery locally maintained by the first device 110 refers to the credit recovery locally maintained by the first device 110 before the first device 110 receives the credit recovery message.
[0232] Specifically, when the flow control mechanism of the shuttle is an exclusive flow control mechanism, the first device 110 can extract the credit recovery of the shuttle from the Credits_Recycled field of the credit recovery message, and update the credit recovery Tx_Credits_Recycled_Shuttle (also known as the exclusive credit recovery maintained locally by the first device 110) maintained locally by the first device 110 to the credit recovery of the shuttle.
[0233] When the flow control mechanism of shuttle is a shared flow control mechanism, the first device 110 can extract the credit recovery of shuttle from the Credits_Recycled field of the credit recovery message, and update the credit recovery Tx_Credits_Recycled_Shared maintained locally by the first device 110 (also known as the shared credit recovery maintained locally by the first device 110) to the credit recovery of shuttle.
[0234] In one possible embodiment, when the shuttle's flow control mechanism is an exclusive flow control mechanism, the management adapter in the first device 110 may set the credit recovery locally maintained by the first device 110 to 0 when establishing the shuttle. When the shuttle's flow control mechanism is a shared flow control mechanism, the management adapter in the first device 110 may set the credit recovery locally maintained by the first device 110 to 0 when establishing the first shuttle with the shared flow control mechanism.
[0235] In the flow control management method provided in the embodiment of the present application, the second device 120 sends a credit recovery message when the conditions are met, and the credit recovery message includes the credit recovery of the shuttle. The first device 110 can update the credit recovery locally maintained by the first device 110 based on the credit recovery message. The second device 120 and the first device 110 can determine the exact value of the RBuff cache space capacity of the shuttle in the second device 120. When the first device 110 sends a message to the second device 120, cache overflow can be avoided, the reliability of data transmission can be improved, and the credit recovery message is not sent at a fixed period, thereby reducing the frequency of sending the credit recovery message and reducing power consumption.
[0236] In a possible embodiment, as shown in FIG20 , after sending a data message (transport layer data message TLDP), when the first device 110 sends the credit consumption of the shuttle to the second device 120, the method may further include steps S1512-S1515 after the above-mentioned step S1507. When executing, steps S1512-S1515 and steps S1508-S1511 may not distinguish the order of execution, for example, they may be executed simultaneously. In conjunction with FIG12 , the second device 120 and the first device 110 in the communication system 100 may also be coupled through a main link, an auxiliary link, a power supply link, and a cable information link. The functions of each link are not further described in this embodiment of the present application.
[0237] S1512: The first device 110 updates the credit consumption of the shuttle according to the data message.
[0238] Specifically, when the shuttle flow control mechanism is an exclusive flow control mechanism, after the first device 110 sends a data packet, the shuttle credit consumption satisfies the following formula. The first device 110 can update the shuttle credit consumption according to the formula:
[0239] Tx_Credits_Consumed_Shuttle = (Tx_Credits_Consumed_Shuttle + credits included in sending the TLDP) modulo 16384
[0240] Among them, "Tx_Credits_Consumed_Shuttle" represents the exclusive credit consumption of the shuttle, "Sending the credits contained in the TLDP" represents the credits increased by the exclusive credit consumption of the shuttle when the first device 110 sends a data packet to the second device 120 and the second device 120 stores the data packet into the RBuff of the shuttle, and "16384" is a preset constant, which is not limited in the embodiments of the present application.
[0241] When the shuttle flow control mechanism is a shared flow control mechanism, after the first device 110 sends a data packet, the shuttle credit consumption satisfies the following formula. The first device 110 can update the shuttle credit consumption according to the formula:
[0242] Tx_Credits_Consumed_Shared = Tx_Credits_Consumed_Shared + credits included in sending the TLDP) modulo 16384
[0243] Among them, "Tx_Credits_Consumed_Shared" represents the shared credit consumption of shuttle, "Sending the credits contained in the TLDP" represents the credits increased by the shared credit consumption of shuttle when the first device 110 sends a data packet to the second device 120 and the second device 120 stores the data packet into the RBuff of shuttle, and "16384" is a preset constant, which is not limited in the embodiments of the present application.
[0244] In one possible embodiment, when the shuttle's flow control mechanism is an exclusive flow control mechanism, the management adapter in the first device 110 may set the shuttle's exclusive credit consumption to 0 when establishing the shuttle. When the shuttle's flow control mechanism is a shared flow control mechanism, the management adapter in the first device 110 may set the shuttle's shared credit consumption to 0 when establishing the first shuttle.
[0245] S1513. When the primary link recovers from abnormality to normal, or when the auxiliary link times out waiting for a response message, the first device 110 sends a credit consumption message, which includes a credit consumption field, and the credit consumption field is used to indicate shuttle credit consumption.
[0246] The credit consumption message may be referred to as a transport layer credit consumption message TLCCP.
[0247] In a possible embodiment, the format of the credit consumption message may be as shown in Table 4 below.
[0248] Table 4
[0249] Each entry in the credit consumption message payload includes a Credits_Consumed field, which is used to indicate the credit consumption of the shuttle, a message header of the credit consumption message, and each entry may also include other fields, which are not limited in the embodiments of the present application.
[0250] When the ST field indicates that the shuttle's flow control management mechanism is exclusive, the Shuttle ID field is used to identify different shuttles. When the ST field indicates that the shuttle's flow control management mechanism is shared, the Shuttle ID field is reserved.
[0251] In a possible embodiment, the message header of the credit consumption message and each entry may also include an ECC field, relevant descriptions of the EEC field, and relevant descriptions of other fields. Please refer to the above description and the embodiment of the present application will not be repeated here.
[0252] In a possible embodiment, the credit consumption message includes the exclusive consumption credits of all shuttles using the exclusive flow control mechanism and the shared consumption credits of all shuttles using the shared flow control mechanism.
[0253] In one possible embodiment, to prevent the shuttle's credit consumption entries in the credit consumption message from being discarded due to link errors, the credit consumption of each shuttle can be sent multiple times, for example, three times, via a credit consumption message (transport layer credit consumption message TLCCP). The time interval between the multiple sent credit consumption messages can be tTxTLCCPItv, where tTxTLCCPItv represents the time interval for sending credit consumption messages. The embodiment of the present application does not limit the specific value of tTxTLCCPItv.
[0254] Furthermore, when the flow control mechanism of the shuttle is an exclusive flow control mechanism, if the flow control time of the shuttle (also known as the credit shortage time) exceeds tTxErrFC, the first device 110 can determine that the flow control of the shuttle is abnormal, and the first device 110 can send the exclusive credit consumption of the shuttle through a credit consumption message. When the flow control mechanism of the shuttle is a shared flow control mechanism, if the flow control time of the shuttle exceeds tTxErrFC, the first device 110 can determine that the flow control of the shuttle is abnormal, and the first device 110 can send the shared credit consumption of the shuttle through a credit consumption message. Among them, tTxErrFC is a preset duration, and the embodiment of the present application does not limit the specific duration of tTxErrFC.
[0255] S1514. The second device 120 receives the credit consumption message.
[0256] S1515: The second device 120 updates the credit consumption locally maintained by the second device 120 to the credit consumption of the shuttle.
[0257] Specifically, when the flow control mechanism of the shuttle is an exclusive flow control mechanism, after the second device 120 receives the credit consumption message, the credit consumption locally maintained by the second device 120 satisfies the following formula, and the second device 120 can update the credit consumption locally maintained by the second device 120 according to the formula: Rx_Credits_Consumed_Shuttle = Credits_Consumed
[0258] Among them, "Rx_Credits_Consumed_Shuttle" represents the credit consumption locally maintained by the second device 120, which can also be called the exclusive credit consumption locally maintained by the second device 120, and "Credits_Consumed" represents the Credits_Consumed field in the credit consumption entry.
[0259] When the flow control mechanism of the shuttle is a shared flow control mechanism, after the second device 120 receives the credit consumption message, the credit consumption locally maintained by the second device 120 satisfies the following formula, and the second device 120 can update the credit consumption locally maintained by the second device 120 according to the formula: Rx_Credits_Consumed_Shared=Credits_Consumed
[0260] Among them, “Rx_Credits_Consumed_Shared” represents the credit consumption locally maintained by the second device 120, which can also be called the shared credit consumption locally maintained by the second device 120, and “Credits_Consumed” represents the Credits_Consumed field in the credit consumption entry.
[0261] In a possible embodiment, before the second device 120 updates the credit consumption locally maintained by the second device 120 according to the credit consumption message, the second device 120 may update the credit recovery locally maintained by the second device 120 according to the credit consumption message.
[0262] Specifically, when the shuttle flow control mechanism is an exclusive flow control mechanism, after the second device 120 receives the credit consumption message, the credit recovery locally maintained by the second device 120 satisfies the following formula. The second device 120 can update the credit recovery locally maintained by the second device 120 according to the formula:
[0263] Rx_Credits_Recycled_Shuttle=(Rx_Credits_Recycled_Shuttle+16384+Credits_Consumed-Rx_Credits_Consumed_Shuttle) modulo 16384
[0264] Among them, "Rx_Credits_Recycled_Shuttl" represents the credit recovery maintained locally by the second device 120, "Credits_Consumed" represents the Credits_Consumed field of the credit consumption entry, "Rx_Credits_Consumed_Shuttle" represents the credit consumption maintained locally by the second device 120, and "16384" is a preset constant, which is not limited in the embodiment of the present application.
[0265] When the shuttle flow control mechanism is a shared flow control mechanism, after the second device 120 receives the credit consumption message, the credit recovery locally maintained by the second device 120 satisfies the following formula. The second device 120 can update the credit recovery locally maintained by the second device 120 according to the formula:
[0266] Rx_Credits_Recycled_Shared=(Rx_Credits_Recycled_Shared+16384+Credits_Consumed-Rx_Credits_Consumed_Shared) modulo 16384
[0267] Among them, "Rx_Credits_Recycled_Shared" represents the credit recovery maintained locally by the second device 120, "Credits_Consumed" represents the Credits_Consumed field of the credit consumption entry, "Rx_Credits_Consumed_Shared" represents the credit consumption maintained locally by the second device 120, and "16384" is a preset constant, which is not limited in the embodiment of the present application.
[0268] In a possible embodiment, the second device 120 may also update the credit consumption locally maintained by the second device 120 according to the received data packet (transport layer data packet TLDP).
[0269] Specifically, when the shuttle flow control mechanism is an exclusive flow control mechanism, after the second device 120 receives the data packet, the credit consumption locally maintained by the second device 120 satisfies the following formula. The second device 120 can update the credit consumption locally maintained by the second device 120 according to the formula:
[0270] Rx_Credits_Consumed_Shuttle = (Rx_Credits_Consumed_Shuttle + credits contained in received TLDP) modulo 16384
[0271] Among them, "Rx_Credits_Consumed_Shuttle" represents the credit consumption maintained locally by the second device 120, which can also be called the exclusive credit consumption maintained locally by the second device 120, "Credits included in the received TLDP" represents the credits increased by the exclusive credit consumption maintained locally by the second device 120 when the second device 120 stores the data packet into the RBuff of the shuttle after receiving the data packet, and "16384" is a preset constant, which is not limited to the embodiment of the present application.
[0272] When the flow control mechanism of Shuttle is a shared flow control mechanism, after the second device 120 receives the data packet, the credit consumption locally maintained by the second device 120 satisfies the following formula. The second device 120 can update the credit consumption locally maintained by the second device 120 according to the formula:
[0273] Rx_Credits_Consumed_Shared = (Rx_Credits_Consumed_Shared + credits contained in received TLDP) modulo 16384
[0274] Among them, "Rx_Credits_Consumed_Shared" represents the credit consumption maintained locally by the second device 120, which can also be called the shared credit consumption maintained locally by the second device 120, "Credits included in the received TLDP" represents the credits increased by the shared credit consumption maintained locally by the second device 120 when the second device 120 receives the data packet and stores the data packet in the RBuff of the shuttle, and "16384" is a preset constant, which is not limited in the embodiment of the present application.
[0275] In one possible embodiment, when the shuttle's flow control mechanism is an exclusive flow control mechanism, the management adapter in the second device 120 may set the credit consumption locally maintained by the second device 120 to 0 when establishing the shuttle. When the shuttle's flow control mechanism is a shared flow control mechanism, the management adapter in the second device 120 may set the credit consumption locally maintained by the second device 120 to 0 when establishing the first shuttle with the shared flow control mechanism.
[0276] The flow control management method provided in the embodiment of the present application is that the first device 110 sends a credit consumption message when a condition is met, and the credit consumption message includes the credit consumption of the shuttle. The second device 120 can update the credit consumption locally maintained by the second device 120 according to the credit consumption message. The second device 120 and the first device 110 can determine the exact value of the RBuff cache space capacity of the shuttle in the second device 120. When the first device 110 sends a message to the second device 120, cache overflow can be avoided, the reliability of data transmission can be improved, and the credit consumption message is not sent at a fixed period, thereby reducing the frequency of sending the credit consumption message and reducing power consumption.
[0277] In a possible embodiment, as shown in FIG21 , the method may further include steps S1516-S1518 after the above-mentioned step S1502. When executed, the steps S1516-S1518 and the above-mentioned steps S1503-S1507, steps S1508-S1511 and steps S1512-S1515 may not be executed in a specific order, for example, they may be executed simultaneously.
[0278] S1516: The first device 110 determines the flow controlled time of the shuttle.
[0279] S1517: When the flow control time of the shuttle exceeds the first preset time, the first device 110 sends a flow control exception notification message, where the flow control exception notification message includes a flow control exception field, where the flow control exception field is used to indicate the flow control exception of the shuttle.
[0280] The first preset time may be the aforementioned tTxErrFC. The embodiment of the present application does not limit the specific duration of tTxErrFC.
[0281] The flow control exception notification message may be referred to as a transport layer flow control exception notification message TLFCENP.
[0282] In a possible embodiment, the format of the flow control exception notification message may be as shown in Table 5 below.
[0283] Table 5
[0284] The Rsvd field in the flow control anomaly notification message header includes the SH_ERRFC field (also referred to as the flow control anomaly field), which is used to indicate the flow control anomaly of the shared flow control mechanism shuttle. Each entry can include 32 flow control anomaly indication information corresponding to the exclusive flow control mechanism shuttle (also referred to as the flow control anomaly field). For example, ST_ERRFC[127:96] is used to indicate the flow control anomaly indication information corresponding to the 32 shuttles from shuttle ID 127 to shuttle ID 96. The flow control anomaly notification message may also include other fields or entries, which are not described in detail in the embodiments of the present application.
[0285] In a possible embodiment, the message header in the flow control exception notification message may further include an ECC field, and the payload may further include a CRC32 field, the ECC field being used to verify the message header of the flow control exception notification message, and the CRC32 field being used to verify the entries in the payload of the credit allocation response message.
[0286] In one possible embodiment, after the first device 110 sends a flow control anomaly notification message to the second device 120, the flow control timer is restarted. If the flow control time of the shuttle exceeds the first preset time again, it can be determined that the shuttle has experienced a flow control anomaly again. If the shuttle has experienced flow control anomalies multiple times in a row, for example, three times, a serious flow control anomaly error is reported to the management adapter.
[0287] S1518. The second device 120 receives the flow control exception notification message.
[0288] Specifically, after the second device 120 receives the flow control exception notification message, it can verify the SH_ERRFC field through the ECC field and verify the ST_ERRFC in each entry through the CRC32 field. It can be verified through independent verification methods, and the two do not affect each other, which can improve the reliability of the received message.
[0289] In a possible embodiment, the second device 120 sends a credit recovery message (transport layer credit recovery message TLCRP), including: when the second device 120 receives a flow control exception notification message, sending a credit recovery message.
[0290] Specifically, when the flow control mechanism of Shuttle is a shared flow control mechanism, when the second device 120 receives the flow control exception notification message, it can send a shared credit recovery message for Shuttle.
[0291] When the flow control mechanism of Shuttle is an exclusive flow control mechanism, when the second device 120 receives the flow control exception notification message, it can send the exclusive credit recovery of Shuttle through a credit recovery message.
[0292] In a possible embodiment, after the second device 120 receives the flow control exception notification message, if the ST_ERRFC in each entry is checked through the CRC32 field and it is determined that there is an error, the second device 120 can send exclusive credit recovery of all exclusive flow control mechanisms shuttle through a credit recovery message.
[0293] For ease of understanding, FIG22 shows a flow diagram of message transmission between the second device 120 and the first device 110. The first device 110 (TLDP transmitter) can send a credit consumption message (Transport Layer Credit Consumption Message TLCCP) to the second device 120 (TLDP receiver). The credit consumption message includes the shuttle's exclusive credit consumption (Credits_Consumed_Shuttle) and / or the shuttle's shared credit consumption (Credits_Consumed_Shared). The second device 120 can send a credit recovery message (Transport Layer Credit Recovery Message TLCRP) to the first device 110. The credit recovery message includes the shuttle's exclusive credit recovery (Credits_Recycled_Shuttle) and / or the shuttle's shared credit recovery (Credits_Recycled_Shuttle). The first device 110 can also send a flow control exception notification message (Transport Layer Flow Control Exception Notification Message TLFCENP) to the second device 120. The flow control exception notification message may include SH_ERRFC and / or ST_ERRFC.
[0294] The flow control management method provided in the embodiment of the present application is as follows: the first device 110 sends a flow control exception notification message to the second device 120, and the flow control exception notification message is used to indicate a shuttle flow control exception. The second device 120 sends a credit recovery message based on the flow control exception notification message. The first device 110 can update the credit recovery locally maintained by the first device 110 based on the credit recovery message. The second device 120 and the first device 110 can determine the exact value of the RBuff cache space capacity of the shuttle in the second device 120. When the first device 110 sends a message to the second device 120, cache overflow can be avoided, the reliability of data transmission can be improved, and the credit recovery message is not sent at a fixed period, thereby reducing the frequency of sending credit recovery messages and reducing power consumption.
[0295] Figure 23 shows a structural diagram of a flow control management device 2300. The flow control management device 2300 can be the sending device in the above embodiments, or it can be a chip, processor or software in the sending device. The flow control management device 2300 can be used to implement the flow control management method of any of the above embodiments.
[0296] The flow control management device 2300 includes: a processing circuit 2301 and a transceiver port 2302, and the transceiver port 2302 can be an uplink port or a downlink port. Exemplarily, the transceiver port 2302 is used to support the flow control management device 2300 in sending and receiving signals, or for communicating with other devices. The processing circuit 2301 is used to control and manage the actions of the above-mentioned flow control management device 2300, and to execute the processing performed by the flow control management device 2300 in the above-mentioned embodiment. Optionally, if the flow control management device 2300 includes a storage unit, the processing circuit 2301 can also execute the program or instructions stored in the memory, so that the flow control management device 2300 can implement the methods and functions involved in any of the above-mentioned embodiments.
[0297] For example, the processing circuit 2301 can be used to execute, for example, step S1501 in FIG. 15 , and / or other processes for the technology described herein. The transceiver port 2302 can be used to execute, for example, steps S1502 and S1507 in FIG. 15 , and / or other processes for the technology described herein. All relevant details of each step involved in the above method embodiment can be referenced in the functional description of the corresponding functional module and will not be repeated here.
[0298] Exemplarily, in hardware implementation, the functions of the processing circuit 2301 can be executed by a processor, and the functions of the transceiver port 2302 can be executed by a transceiver (transmitter / receiver) and / or a communication interface, wherein the processing circuit 2301 can be embedded in or independent of the processor of the flow control management device 2300 in the form of hardware, or can be stored in the memory of the flow control management device 2300 in the form of software, so that the processor can call and execute the operations corresponding to the above functional units.
[0299] Figure 24 shows a structural diagram of a flow control management device 2400. The flow control management device 2400 can be the receiving device in the above embodiments, or it can be a chip, processor or software in the receiving device. The flow control management device 2400 can be used to implement the flow control management method of any of the above embodiments.
[0300] The flow control management device 2400 includes: a processing circuit 2401 and a transceiver port 2402, and the transceiver port 2402 can be an uplink port or a downlink port. Exemplarily, the transceiver port 2402 is used to support the flow control management device 2400 in sending and receiving signals, or for communicating with other devices. The processing circuit 2401 is used to control and manage the actions of the above-mentioned flow control management device 2400, and to execute the processing performed by the flow control management device 2400 in the above-mentioned embodiment. Optionally, if the flow control management device 2400 includes a storage unit, the processing circuit 2401 can also execute the program or instructions stored in the memory, so that the flow control management device 2400 can implement the methods and functions involved in any of the above-mentioned embodiments.
[0301] For example, the processing circuit 2401 can be used to execute, for example, step S1505 in FIG. 15 , and / or other processes for the technology described herein. The transceiver port 2402 can be used to execute, for example, steps S1503, S1504, and S1506 in FIG. 15 , and / or other processes for the technology described herein. All relevant details of each step involved in the above method embodiment can be referenced in the functional description of the corresponding functional module and will not be repeated here.
[0302] Exemplarily, in hardware implementation, the functions of the processing circuit 2401 can be executed by a processor, and the functions of the transceiver port 2402 can be executed by a transceiver (transmitter / receiver) and / or a communication interface, wherein the processing circuit 2401 can be embedded in or independent of the processor of the flow control management device 2400 in the form of hardware, or can be stored in the memory of the flow control management device 2400 in the form of software, so that the processor can call and execute the operations corresponding to the above functional units.
[0303] As shown in Figure 25, an embodiment of the present application also provides a chip module 2500, which includes a chip 2510 and a packaging substrate 2520. The chip 2510 is fixed to the packaging substrate 2520. The chip 2510 includes a flow control management device 2300 as shown in Figure 23, or includes a flow control management device 2400 as shown in Figure 24. The embodiment of the present application does not limit this.
[0304] As shown in Figure 26, an embodiment of the present application also provides an electronic device 2600, which includes a processor 2610 and a flow control management device 2620 coupled to the processor 2610. The flow control management device 2620 can be the flow control management device 2300 shown in Figure 23, or it can be the flow control management device 2400 shown in Figure 24. The embodiment of the present application does not limit this.
[0305] Optionally, the processor 2610 may be a system-on-chip, or may be a central processing unit, which is not limited in the embodiments of the present application.
[0306] An embodiment of the present application further provides a communication system, comprising a first electronic device and a second electronic device communicating with the first electronic device, wherein the first and second electronic devices are electronic devices 2600 as shown in FIG26 , wherein the first electronic device includes a flow control management device 2300, and the second electronic device includes a flow control management device 2400. For example, the communication system may be the communication system 100 as shown in FIG1 , the first electronic device may be the second device 120, and the second electronic device may be the first device 110.
[0307] Based on this, an embodiment of the present application also provides a computer-readable storage medium, which stores computer program code. When the above-mentioned processor executes the computer program code, the electronic device executes the steps performed by the second device 120 in the flow control management method shown in Figures 15, 19, 20 or 21.
[0308] An embodiment of the present application also provides a computer-readable storage medium, which stores computer program code. When the above-mentioned processor executes the computer program code, the electronic device executes the steps performed by the first device 110 in the flow control management method shown in Figures 15, 19, 20 or 21.
[0309] An embodiment of the present application also provides a computer program product. When at least one processor of an electronic device runs the computer program product, the electronic device executes the steps performed by the second device 120 in the flow control management method shown in Figures 15, 19, 20 or 21.
[0310] An embodiment of the present application also provides a computer program product. When at least one processor of an electronic device runs the computer program product, the electronic device executes the steps performed by the first device 110 in the flow control management method shown in Figures 15, 19, 20 or 21.
[0311] The above detailed description of the flow control management method and the analysis of beneficial effects can be correspondingly referred to the flow control management device 2300, the flow control management device 2400, the chip module 2500, the electronic device 2600, the communication system and the computer-readable storage medium, and the embodiments of the present application will not be repeated here.
[0312] The above description of the flow control management method can also refer to the relevant description of flow control management in the UMI protocol, which includes:
[0313] The UMI network employs a distributed flow control management mechanism. The TLDP sender and receiver of each UMI physical link employ a credit-based flow control mechanism to ensure that the RBuff at the receiving end of the link does not overflow. The management adapter provides an independent flow control mechanism for each shuttle. The transport layer supports the three flow control mechanisms shown in Table 6.
[0314] Table 6
[0315] Note: The same flow control mechanism must be configured on the same shuttle at both ends of the link.
[0316] TLMDP uses an exclusive flow control mechanism.
[0317] The multicast shuttle can only use the flow control disable mechanism.
[0318] A one-way shuttle can only use the flow control disabling mechanism.
[0319] Note: For an established Shuttle, the management adapter is not allowed to change the flow control mechanism.
[0320] The TLDP receiver and transmitter of each link independently manage the flow control of the link.
[0321] Shuttles with flow control disabled do not track credits and do not send credit entries.
[0322] Cache space
[0323] The RBuff on the TLDP receiver is the TLDP buffer space. The RBuff buffer space is divided into a shared buffer, a flow control disabled buffer, and a dedicated buffer for each shuttle.
[0324] Messages using the flow control disabled mechanism share the "flow control disabled cache" space, messages using the shared flow control mechanism share the "shared cache" space, and messages using the exclusive flow control mechanism use the "exclusive cache" space of each shuttle.
[0325] Credits are used to track the RBuff cache space, with 1 credit representing 32 bytes. The number of credits occupied by a packet is (number of packet bytes / 32), rounded up. TLMP is not stored in the RBuff and does not participate in flow control. Credits are not tracked for shuttles with flow control disabled. For shuttles with exclusive flow control, their exclusive credits are tracked. For shuttles with shared flow control, their credits in the shared cache are tracked. The TLMP receiver on each link tracks credits independently.
[0326] The management adapter configures "shared cache credits" (Credits_Allocated_Shared), "flow control disabled cache credits" (Credits_Allocated_Disabled), and "exclusive cache credits" (Credits_Allocated_Shuttle) of each shuttle except shuttle ID 0 according to the total credits (Credits_Total) of the RBuff on the TLDP receiver.
[0327] NOTE: For established Shuttle, the management adapter may change these cache credits as needed.
[0328] RBuff allocates at least 32 exclusive cache credits to ShttleID 0 and informs the management adapter.
[0329] The credits used by a shuttle using the exclusive flow control mechanism cannot exceed the Credits_Allocated_Shuttle allocated to it. The credits used by all shuttles using the shared flow control mechanism cannot exceed the allocated Credits_Allocated_Shared. The credits used by all shuttles using the flow control disabled mechanism cannot exceed the allocated Credits_Allocated_Disabled.
[0330] When receiving the TLDP, if there is not enough credit to buffer the message, the entire message is discarded and a buffer abnormality alarm (RxBuf_Err) is reported to the management adapter.
[0331] Credit Allocation
[0332] The TLDP receiver sends the exclusive cache allocation credits and shared cache allocation credits of each shuttle to the TLDP sender through TLCAP (see 1.1.4.2.1 for the TLCAP message format).
[0333] The TLDP sender receives the TLCAP, performs ECC check on each entry, extracts the credit allocation information, and replies with TLCAP_ACK.
[0334] TLDP receiver
[0335] The TLDP receiving end sends the exclusive cache allocation credit (Credit_Allocated_Shuttle) and the shared cache allocation credit (Credit_Allocated_Shared) of each shuttle in the exclusive cache mechanism to the TLDP sending end through TLCAP.
[0336] After receiving the TLCAP_ACK (see 1.1.4.2.2 for the TLCAP_ACK message format), the TLDP receiver performs a CRC check on the payload area of the TLCAP_ACK. If a CRC check error occurs, all Shuttle ACKs (ST_ACKs) carried in the TLCAP_ACK are discarded and counted in the TLCAPACK_CRC_Error_Cnt. After the ST_ACK is discarded, it is subsequently treated as if it had not been received. The CRC check does not affect the shared buffer ACK (SH_ACK).
[0337] When any of the following conditions is met, the TLDP receiver allocates exclusive buffer credits to each shuttle using the exclusive flow control mechanism:
[0338] Management adapter to establish Shuttle;
[0339] ManageAdapterChange "Credits_Allocated_Shuttle";
[0340] After sending an "exclusive cache credit" allocation entry through TLCAP, no TLCAP_ACK is received from the corresponding Shuttle within tTLCAP_ACK time.
[0341] The TLDP receiver sends a shared cache allocation credit when any of the following conditions are met:
[0342] The management adapter establishes the first shared flow control mechanism Shuttle;
[0343] ManagementAdapterChange "Credits_Allocated_Shared";
[0344] After sending a "shared cache credit" allocation entry via TLCAP, no TLCAP_ACK for the shared cache credit is received within tTLCAP_ACK time.
[0345] Credit_Allocated_Shuttle and Credit_Allocated_Shared are carried in the Credits_Allocated field of the corresponding credit allocation entry.
[0346] TLDP sender
[0347] After receiving the TLCAP packet, the TLDP transmitter performs an ECC check on each TLCAP entry. Any single-bit ECC errors are corrected and counted in TLCAP_ECC_Correct_Cnt. Corrected ECC errors are treated as if they were error-free. If an uncorrectable error is detected, the corresponding entry is discarded and counted in TLCAP_ECC_Uncorrect_Cnt. Once a TLCAP entry is discarded, it is treated as if it had not been received.
[0348] The TLDP sender maintains the allocated credits (Tx_Credits_Allocated_Shuttle) of each shuttle in the exclusive flow control mechanism as follows:
[0349] When the management adapter establishes the Shuttle, it is set to 0;
[0350] After receiving the TLCAP entry of each Shuttle, the Credit_Allocated field is extracted as the latest allocated credit of the Shuttle.
[0351] The TLDP sender maintains the allocated credits (Tx_Credits_Allocated_Shared) of the shared flow control mechanism as follows:
[0352] When the management adapter establishes the first shared flow control mechanism Shuttle, it is set to 0;
[0353] After receiving the TLCAP entry of the shared flow control mechanism, the Credit_Allocated field of the shared cache mechanism is extracted as the latest shared flow control allocation credit.
[0354] After extracting the credit allocation information from the credit allocation entry, the TLDP sender directly responds with an Ack for the corresponding entry if the allocated credits are greater than the locally maintained allocated credits, or if the allocated credits are equal to the locally maintained allocated credits. Otherwise, it indicates that the cache is compressed and needs to wait until the cache is freed up to the newly allocated credits before responding with an Ack.
[0355] Credit Tracking and Synchronization
[0356] The TLDP sender tracks consumed credits (including exclusive and shared flow control mechanisms) and synchronizes them with the TLDP receiver via TLCCP (see 1.1.4.2.3 for the TLCCP format). The TLDP receiver tracks recovered credits (including exclusive and shared flow control mechanisms) and synchronizes them with the TLDP sender via TLCRP (see 1.1.4.2.4 for the TLCRP format). If a flow control exception occurs on the TLDP sender, it synchronizes the flow control exception status to the TLDP receiver via TLFCENP (see 1.1.4.2.5 for the TLFCENP format).
[0357] TLDP sender
[0358] The TLDP sender uses the following method to track the credits consumed by each shuttle in the exclusive flow control mechanism (Tx_Credits_Consumed_Shuttle):
[0359] When the management adapter establishes the Shuttle, it is set to 0;
[0360] Each time a TLDP with exclusive flow control mechanism is sent, the corresponding Shuttle increases the number of credits included in the TLDP message: Tx_Credits_Consumed_Shuttle = (Tx_Credits_Consumed_Shuttle + the credits included in sending the TLDP) modulo 16384.
[0361] The TLDP sender tracks the credits consumed by all shuttles in the shared flow control mechanism (Tx_Credits_Consumed_Shared) as follows:
[0362] When the management adapter establishes the first shuttle of the shared flow control mechanism, it is set to 0;
[0363] Each time a TLDP sharing the flow control mechanism is sent, the number of credits included in the TLDP message is increased: Tx_Credits_Consumed_Shared = Tx_Credits_Consumed_Shared + the credits included in sending the TLDP) modulo 16384.
[0364] When any of the following conditions is met, the TLDP sender sends all credits consumed by the exclusive flow control mechanism and the credits consumed by the shared flow control mechanism to the TLDP receiver through TLCCP:
[0365] The primary link in the TLDP sending direction recovers from abnormality to normal.
[0366] The wait for TLSAP on the auxiliary link in the TLDP sending direction times out.
[0367] Tx_Credits_Consumed_Shuttle and Tx_Credits_Consumed_Shared are carried in the Credits_Consumed field of the corresponding credit consumption entry.
[0368] To avoid credit consumption entries being discarded due to link errors, each consumed credit is sent three times and included in three TLCCPs, with each TLCCP interval being tTxTLCCPItv time.
[0369] NOTE: The Credits_Consumed field for each credit consumption entry is the most recent value tracked.
[0370] When a shuttle in the exclusive flow control mechanism is flow controlled for longer than tTxErrFC, the shuttle is considered to have flow control anomaly and a TLCCP message carrying the shuttle's credit consumption entry is sent. When a shuttle in the shared flow control mechanism is flow controlled for longer than tTxErrFC, the shared flow control is considered to have flow control anomaly and a TLCCP message carrying the shared flow control mechanism's credit consumption entry is sent.
[0371] When a flow control exception occurs, the TLDP transmitter sends the flow control exception status to the TLDP receiver through a TLFCENP message.
[0372] After the TLDP transmitter sends the abnormal status to the TLDP receiver, it restarts the flow control timer. If the flow control time reaches tTxErrFC, it detects a flow control abnormality again. If a flow control abnormality is detected three times in a row (without releasing the flow control during this period), a serious flow control abnormality error is reported to the management adapter.
[0373] TLDP receiver
[0374] After receiving the TLCCP, the TLDP receiver performs ECC checking on each credit consumption entry, corrects any single-bit ECC errors, and counts them in TLCCP_ECC_Correct_Cnt. Corrected ECC errors are treated as error-free. If an uncorrectable error is detected, the corresponding entry is discarded and counted in TLCCP_ECC_Uncorrect_Cnt. Once a credit consumption entry is discarded, it is treated as if it had not been received.
[0375] After receiving the TLFCENP, the TLDP receiver performs a CRC check on the payload. If a CRC check error occurs, the status indications (ST_ErrFC) of all shuttles carried in the TLFCENP are discarded and counted as ErrFC_CRC_Error_Cnt. The CRC check does not affect the status indication (SH_ErrFC) of the shared flow control mechanism.
[0376] The TLDP receiver maintains the credits consumed by each shuttle receiving the exclusive flow control mechanism (Rx_Credits_Consumed_Shuttle) as follows:
[0377] When the management adapter establishes the Shuttle, it is set to 0;
[0378] After receiving a TLDP message with exclusive flow control mechanism, the corresponding Shuttle increases the number of credits contained in the TLDP message: Rx_Credits_Consumed_Shuttle = (Rx_Credits_Consumed_Shuttle + credits contained in the received TLDP message) modulo 16384;
[0379] Every time a credit consumption entry of the exclusive flow control mechanism is received, the Rx_Credits_Consumed_Shuttle of the corresponding Shuttle is refreshed: Rx_Credits_Consumed_Shuttle = the Credits_Consumed field in the credit consumption entry.
[0380] The TLDP receiver maintains the credits recycled by each shuttle (Rx_Credits_Recycled_Shuttle) in the exclusive flow control mechanism as follows:
[0381] When the management adapter establishes the Shuttle, it is set to 0;
[0382] After the TLDP of the exclusive flow control mechanism is output from the receive buffer, the corresponding Shuttle is increased by the number of credits included in the output TLDP: Rx_Credits_Recycled_Shuttle = (Rx_Credits_Recycled_Shuttle + credits included in the output TLDP) modulo 16384.
[0383] Note: The packets output from RBuff may be discarded or continue to be transmitted.
[0384] After receiving the credit consumption entry of the exclusive flow control mechanism, before refreshing Rx_Credits_Consumed_Shuttle, update Rx_Credits_Recycled_Shuttle: Rx_Credits_Recycled_Shuttle = (Rx_Credits_Recycled_Shuttle + 16384 + Credits_Consumed field of credit consumption entry - Rx_Credits_Consumed_Shuttle) modulo 16384.
[0385] The TLDP receiver maintains the TLDP consumed credits (Rx_Credits_Consumed_Shared) of the receive shared flow control mechanism as follows:
[0386] When the management adapter establishes the first shuttle of the shared flow control mechanism, it is set to 0;
[0387] After receiving a TLDP of the shared flow control mechanism, increase the number of credits contained in the TLDP message: Rx_Credits_Consumed_Shared = (Rx_Credits_Consumed_Shared + credits contained in the received TLDP) modulo 16384;
[0388] Every time a credit consumption entry of the shared flow control mechanism is received, Rx_Credits_Consumed_Shared is refreshed: Rx_Credits_Consumed_Shared = the Credits_Consumed field in the credit consumption entry.
[0389] The TLDP receiver maintains the recycled credits (Rx_Credits_Recycled_Shared) of the shared flow control mechanism as follows:
[0390] When the management adapter establishes the first shuttle of the shared flow control mechanism, it is set to 0;
[0391] After the TLDP of the shared flow control mechanism is output from the receive buffer, the credit number of the output message is increased: Rx_Credits_Recycled_Shared = (Rx_Credits_Recycled_Shared + credits included in the output TLDP) modulo 16384.
[0392] Note: The packets output from RBuff may be discarded or continue to be transmitted.
[0393] After receiving the credit consumption entry of the shared flow control mechanism, before refreshing Rx_Credits_Consumed_Shared, update Rx_Credits_Recycled_Shared: Rx_Credits_Recycled_Shared = (Rx_Credits_Recycled_Shared + 16384 + Credits_Consumed field in the credit consumption entry - Rx_Credits_Consumed_Shared) modulo 16384.
[0394] The TLDP receiver sends the recovered credits to the TLDP sender via TLCRP as follows:
[0395] When the Rx_Credits_Recycled_Shuttle of the shuttle with exclusive flow control mechanism changes, the recycled credits of the corresponding shuttle are sent. For messages with exclusive flow control mechanism, if the recycled credits cannot be sent immediately after the message is output from RBuff, additional buffer compensation delay must be reserved.
[0396] When the Rx_Credits_Recycled_Shared of the shared flow control mechanism changes, the recycled credits of the shared flow control mechanism are sent; for messages of the shared flow control mechanism, if the shared flow control recycled credits cannot be sent immediately after the message is output from RBuff, additional buffer compensation delay needs to be reserved.
[0397] When the abnormal status indication (SH_ErrFC) of the shared flow control mechanism of the TLFCENP message is valid, the recovery credit of the shared flow control mechanism is sent;
[0398] When the CRC check of the TLFCENP message is wrong, the recovery credits of all shuttles that have exclusive flow control mechanisms are sent; otherwise, according to the abnormal indications of each shuttle of the TLFCENP, the recovery credits of the shuttles with valid abnormal status indications are sent.
[0399] When any of the following conditions is met, the TLDP receiver sends the recycled credits of all shuttles in the exclusive flow control mechanism and the recycled credits of the shared flow control mechanism to the TLDP sender:
[0400] The primary link in the TLCRP sending direction recovers from abnormality to normal.
[0401] The secondary link in the TLCRP sending direction timed out while waiting for TLSAP.
[0402] Rx_Credits_Recycled_Shuttle and Rx_Credits_Recycled_Shared are carried in the Credits_Recycled field of the corresponding credit recovery entry.
[0403] TLDP sending rules
[0404] After receiving the TLCRP, the TLDP sender performs ECC checking on each credit recovery entry, corrects any single-bit ECC errors, and counts them in TLCRP_ECC_Correct_Cnt. Entries with corrected ECC errors are treated as error-free. If an uncorrectable error is detected, the corresponding entry is discarded and counted in TLCRP_ECC_Uncorrect_Cnt. Once a credit recovery entry is discarded, it is treated as if it had not been received.
[0405] TLDP extracts recycled credit information from each credit recycling entry and maintains the recycled credits (Tx_Credits_Recycled_Shuttle) of each shuttle that has a dedicated flow control mechanism according to the following rules:
[0406] When the management adapter establishes the Shuttle, it is set to 0;
[0407] After receiving the TLCRP entry for each Shuttle, the Credit_Recycled field is extracted as the latest recycled credit for the Shuttle.
[0408] TLDP extracts recycled credit information from each credit recycling entry and maintains the recycled credits of the shared flow control mechanism (Tx_Credits_Recycled_Shared) according to the following rules:
[0409] When the management adapter establishes the first shared flow control mechanism Shuttle, it is set to 0;
[0410] After receiving the TLCRP entry of the shared flow control mechanism, the Credit_Recycled field is extracted as the latest recycled credit.
[0411] The TLDP sender generates the TLDP sending conditions shown in Table 7 based on the recovered credits, consumed credits, and allocated credits.
[0412] Table 7
[0413] Assuming that the TLDP sender cannot send the TLDP due to insufficient credit, then after receiving a credit allocation entry that meets the message sending conditions, if there are no other messages or control frames to be sent, the TLDP sender needs to send the TLDP within the tTLCRPtoTLDP time.
[0414] The above is only a specific embodiment of the present application, but the scope of protection of this application is not limited to this. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A flow control management method, characterized in that: The method comprises: The first device receives a credit allocation message sent by the second device, wherein the credit allocation message includes a credit allocation field, wherein the credit allocation field is used to indicate a credit allocation of a virtual channel shuttle in a port of the second device, wherein the credit allocation of the shuttle is determined according to an average message length and an expected bandwidth; If the credit allocation of the shuttle is greater than or equal to the credit allocation locally maintained by the first device, the first device sends confirmation information of the credit allocation of the shuttle; The first device updates the credit allocation locally maintained by the first device to the credit allocation of the shuttle.
2. The method according to claim 1, characterized in that The method further comprises: The first device receives a credit recovery message, where the credit recovery message includes a credit recovery field, where the credit recovery field is used to indicate credit recovery of the shuttle; The first device updates the credit recovery locally maintained by the first device to the credit recovery of the shuttle.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: The first device sends the data message according to the credit allocation locally maintained by the first device, the credit consumption of the shuttle, and the credit recovery locally maintained by the first device.
4. The method according to any one of claims 1 to 3, characterized in that After the first device sends the data message, the method further includes: The first device updates the credit consumption of the shuttle according to the data message.
5. The method according to any one of claims 1 to 4, characterized in that The first device is coupled to the second device via a main link and an auxiliary link, and the method further includes: When the main link recovers from abnormality to normal, or when the auxiliary link times out waiting for a response message, the first device sends a credit consumption message, where the credit consumption message includes a credit consumption field, and the credit consumption field is used to indicate the credit consumption of the shuttle.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: If the credit allocation of the shuttle is less than the credit allocation locally maintained by the first device, after waiting for the cache to release the credit allocation to the shuttle, the first device sends a credit allocation response message, where the credit allocation response message includes confirmation information of the credit allocation of the shuttle.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: The first device determines the flow controlled time of the shuttle; When the flow control time of the shuttle exceeds a first preset time, the first device sends a flow control exception notification message, where the flow control exception notification message includes a flow control exception field, where the flow control exception field is used to indicate the flow control exception of the shuttle.
8. The method according to any one of claims 1 to 7, characterized in that The shuttle corresponds to an adapter in the second device, and the credit allocation of the shuttle is also used to indicate the capacity allocated to the receiving buffer of the adapter.
9. The method according to any one of claims 1 to 8, characterized in that The flow control mechanism of the shuttle includes at least one of an exclusive flow control mechanism, a shared flow control mechanism or a flow control disabled mechanism.
10. The method according to claim 9, characterized in that When the flow control mechanism of the shuttle is a shared flow control mechanism, the credit allocation of the shuttle is a shared credit allocation, the credit consumption of the shuttle is a shared credit consumption, and the credit recovery of the shuttle is a shared credit recovery; when the flow control mechanism of the shuttle is an exclusive flow control mechanism, the credit allocation of the shuttle is an exclusive credit allocation, the credit consumption of the shuttle is an exclusive credit consumption, and the credit recovery of the shuttle is an exclusive credit recovery.
11. A flow control management method, characterized in that: The method comprises: The second device determines the credit allocation of the virtual channel shuttle in the port of the second device according to the average message length and the expected bandwidth; The second device sends a credit allocation message to the first device, where the credit allocation message includes a credit allocation field, where the credit allocation field is used to indicate credit allocation of the shuttle.
12. The method according to claim 11, characterized in that When the second device determines the credit allocation of the shuttle according to the average message length and the expected bandwidth, the following formula is satisfied: Among them, "Credits_Allocated" indicates the credit allocation of the shuttle, "tRound" is the flow control loop delay, and "ExpBW" is the expected Bandwidth, "TLDP average packet length" is the average packet length, "A", "B", and "C" are preset values.
13. The method according to claim 11 or 12, characterized in that: The method further comprises: The second device receives confirmation information of the credit allocation of the shuttle; The second device receives a data message, where the data message is sent by the first device according to the credit allocation locally maintained by the first device, the credit consumption of the shuttle, and the credit recovery locally maintained by the first device.
14. The method according to any one of claims 11 to 13, characterized in that The method further comprises: The second device determines a credit recovery for the shuttle; The second device sends a credit recovery message, where the credit recovery message includes a credit recovery field, where the credit recovery field is used to indicate credit recovery of the shuttle.
15. The method according to claim 14, characterized in that The second device sends a credit recovery message, including: When the credit recovery of the shuttle changes, or when the main link recovers from abnormality to normal, or when the auxiliary link times out waiting for the auxiliary link response message, the second device sends the credit recovery message.
16. The method according to any one of claims 11 to 15, characterized in that The method further comprises: The second device receives a credit consumption message, where the credit consumption message includes a credit consumption field, where the credit consumption field is used to indicate credit consumption of the shuttle; The second device updates the credit consumption locally maintained by the second device to the credit consumption of the shuttle.
17. The method according to claim 13, characterized in that After the second device receives the data message, the method further includes: The second device updates the credit consumption locally maintained by the second device according to the data message.
18. The method according to any one of claims 11 to 17, characterized in that The method further comprises: The second device receives a credit allocation response message, where the credit allocation response message includes confirmation information of the credit allocation of the shuttle.
19. The method according to claim 18, characterized in that The second device sends a credit allocation message, including: When the credit allocation response message is not received within the second preset time, the second device sends the credit allocation message.
20. The method according to claim 14, characterized in that The method further comprises: The second device receives a flow control exception notification message, where the flow control exception notification message includes a flow control exception field, where the flow control exception field is used to indicate the shuttle flow control exception.
21. The method according to claim 20, characterized in that The second device sends a credit recovery message, including: When the flow control exception notification message is received, the credit recovery message is sent.
22. The method according to any one of claims 11 to 21, characterized in that The shuttle corresponds to an adapter in the second device, and the credit allocation of the shuttle is also used to indicate the capacity allocated to the receiving buffer of the adapter.
23. The method according to any one of claims 11 to 21, characterized in that The flow control mechanism of the shuttle includes at least one of an exclusive flow control mechanism, a shared flow control mechanism or a flow control disabled mechanism.
24. The method according to claim 22, characterized in that When the flow control mechanism of the shuttle is a shared flow control mechanism, the credit allocation of the shuttle is a shared credit allocation, the credit consumption of the shuttle is a shared credit consumption, and the credit recovery of the shuttle is a shared credit recovery; when the flow control mechanism of the shuttle is an exclusive flow control mechanism, the credit allocation of the shuttle is an exclusive credit allocation, the credit consumption of the shuttle is an exclusive credit consumption, and the credit recovery of the shuttle is an exclusive credit recovery.
25. A flow control management device, characterized in that: The device comprises: a transceiver port, used to receive a credit allocation message sent by a second device, wherein the credit allocation message includes a credit allocation field, wherein the credit allocation field is used to indicate a credit allocation of a virtual channel shuttle in the port of the second device, wherein the credit allocation of the shuttle is determined according to an average message length and an expected bandwidth; a processing circuit, configured to send confirmation information of the credit allocation of the shuttle through the transceiver port when the credit allocation of the shuttle is greater than or equal to the credit allocation locally maintained by the flow control management device; The processing circuit is further used to update the credit allocation locally maintained by the flow control management device to the credit allocation of the shuttle.
26. The device according to claim 25, characterized in that The apparatus is coupled to the second device via a primary link and an auxiliary link; The processing circuit is further used to send a credit consumption message through the transceiver port when the main link recovers from abnormality to normal, or when the auxiliary link times out waiting for the response message. The credit consumption message includes a credit consumption field, and the credit consumption field is used to indicate Indicates the credit consumption of the shuttle.
27. The device according to claim 25 or 26, characterized in that The processing circuit is further configured to, when the credit allocation of the shuttle is less than the credit allocation locally maintained by the flow control management device, wait for the cache to be released to the credit allocation of the shuttle, and then send a credit allocation response message through the transceiver port, wherein the credit allocation response message includes confirmation information of the credit allocation of the shuttle.
28. The device according to any one of claims 25 to 27, characterized in that The processing circuit is further used to determine the flow control time of the shuttle; The processing circuit is further used to send a flow control exception notification message through the transceiver port when the flow control time of the shuttle exceeds a first preset time, and the flow control exception notification message includes a flow control exception field, and the flow control exception field is used to indicate the flow control exception of the shuttle.
29. A flow control management device, characterized in that: The device comprises: A processing circuit for determining credit allocation of a virtual channel shuttle in a port of a flow control management device according to an average message length and an expected bandwidth; The transceiver port is used to send a credit allocation message to the first device, wherein the credit allocation message includes a credit allocation field, and the credit allocation field is used to indicate the credit allocation of the shuttle.
30. The device according to claim 29, characterized in that The processing circuit is further used to determine the credit recovery of the shuttle; The transceiver port is further used to send a credit recovery message, wherein the credit recovery message includes a credit recovery field, and the credit recovery field is used to indicate the credit recovery of the shuttle.
31. The device according to claim 30, characterized in that The processing circuit is specifically used to send the credit recovery message through the transceiver port when the credit recovery of the shuttle changes, or when the main link recovers from abnormality to normal, or when the auxiliary link times out waiting for the auxiliary link response message.
32. The device according to any one of claims 29 to 31, characterized in that The transceiver port is further used to receive a credit allocation response message, wherein the credit allocation response message includes confirmation information of the credit allocation confirmation message of the shuttle.
33. The device according to claim 32, characterized in that The transceiver port is further configured to send the credit allocation message when the credit allocation response message is not received within a second preset time.
34. The device according to any one of claims 29 to 32, characterized in that The transceiver port is further used to receive a flow control exception notification message, wherein the flow control exception notification message includes the flow control exception field, and the flow control exception field is used to indicate the shuttle flow control exception.
35. The device according to claim 34, characterized in that The transceiver port is specifically used to send the credit recovery message when receiving the flow control exception notification message.
36. A chip module, characterized in that: The chip module includes: a chip and a packaging substrate, the chip is fixed to the packaging substrate, and the chip includes the flow control management device as described in any one of claims 25-28, or includes the flow control management device as described in any one of claims 29-35.
37. An electronic device, characterized in that: The electronic device includes a processor and a flow control management device coupled to the processor, wherein the flow control management device includes the flow control management device as described in any one of claims 25-28, or includes the flow control management device as described in any one of claims 29-35.
38. A communication system, characterized in that: The communication system includes a first electronic device and a second electronic device that communicates with the first electronic device, and the first electronic device and the second electronic device are the electronic devices as described in claim 37.
39. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program runs on an electronic device, the electronic device executes the flow control management method as described in any one of claims 1-10, or executes the flow control management method as described in any one of claims 11-24.
Citation Information
Patent Citations
Method and device for transmitting and receiving data
CN113014498A
Circuit module, credit control method, integrated circuit, and storage medium
CN114490456A
Scalable traffic management for multiple levels of quality of service
US20190199646A1
Data traffic control method, pcie controller and pcie device
WO2021142679A1