Flow control management method and device, communication system and readable storage medium
By dynamically adjusting the credit allocation of virtual channel shutt based on the average message length and expected bandwidth in the communication system between devices, the problem of low cache utilization efficiency of the reception buffer is solved, and efficient data transmission and reliable cache management are achieved.
Patent Information
- Application Number
- CN202311589376.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-23
- Publication Date
- 2025-05-23
AI Technical Summary
When transmitting data through links between devices, how to improve the utilization efficiency of the receiving buffer cache and avoid cache overflow.
By dynamically adjusting the credit allocation of the virtual channel shuttle in the second device according to the average message length and the desired bandwidth, and sending the updated credit allocation information to the first device, the first device updates its locally maintained credit allocation to ensure effective utilization of the receiving buffer.
It realizes the efficiency of the use of the receiving buffer while meeting the transmission needs, avoids cache overflow, and improves the reliability of data transmission.
Smart Images

Figure CN120034488A_ABST
Abstract
Description
Technical Field
[0001] 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
[0002] The device includes multiple adapters. When data is transmitted between devices through a link, the multiple adapters can be used for data transmission adaptation, data reception adaptation, third-party protocol adaptation (protocol tunnel adaptation) or management 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.
[0003] How to improve the utilization efficiency of the receive buffer cache during data transmission has become an urgent problem to be solved. Summary of the invention
[0004] 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 receiving buffer cache during the data transmission process.
[0005] In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:
[0006] In a first aspect of an embodiment of the present application, a flow control management method is provided, the method comprising: a first device receives a credit allocation message sent by a second device, the credit allocation message comprising a credit allocation field, the credit allocation field being used to indicate the credit allocation of a virtual channel 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 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.
[0007] Based on this solution, the second device determines the credit allocation of the shuttle according to the average message length and the expected bandwidth and sends it to the first device. The first device updates the credit allocation maintained locally by the first device to the credit allocation of the shuttle. The second device can determine the capacity of the RBuff cache space according to the average message length and the expected bandwidth, and dynamically adjust the credit allocation of the shuttle in the second device, thereby improving the utilization efficiency of the RBuff while meeting the transmission requirements.
[0008] In combination with the first aspect, in a possible implementation, the method further includes: the first device receives a credit recovery message, the credit recovery message includes a credit recovery field, and the credit recovery field is used to indicate the credit recovery of shuttle. The first device updates the credit recovery locally maintained by the first device to the credit recovery of shuttle.
[0009] In combination with the first aspect, in a possible implementation manner, the method further includes: the first device sends a data message 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.
[0010] Based on this solution, the first device sends a data message 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 causing the RBuff cache of the first device to overflow and improve the reliability of data transmission.
[0011] In combination with the first aspect, in a possible implementation manner, 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.
[0012] In combination with the first aspect, in a possible implementation, the first device is coupled to the second device 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, and the credit consumption field is used to indicate the credit consumption of the shuttle.
[0013] Based on this solution, 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 does not send the credit consumption message at a fixed period, thereby reducing the frequency of sending credit consumption messages and reducing power consumption.
[0014] In combination with the first aspect, in a possible implementation, the method also includes: if the credit allocation of shuttle is less than the credit allocation locally maintained by the first device, after waiting for the cache to release the credit allocation to shuttle, the first device sends a credit allocation response message, and the credit allocation response message includes confirmation information of the credit allocation of shuttle.
[0015] In combination with the first aspect, in a possible implementation, the method further includes: the first device determines the flow control time of the shuttle. When the flow control time of the shuttle exceeds the first preset time, the first device sends a flow control abnormality notification message, the flow control abnormality notification message includes a flow control abnormality field, and the flow control abnormality field is used to indicate the shuttle flow control abnormality.
[0016] In combination with the first aspect, in a possible implementation manner, 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 receiving buffer.
[0017] In combination with the first aspect, in a possible implementation manner, 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.
[0018] In combination with the first aspect, in a possible implementation method, 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.
[0019] In a second aspect of an embodiment of the present application, a flow control management method is provided, the method comprising: a second device determines a credit allocation of a virtual channel shuttle in a port of the second device according to an average message length and an expected bandwidth. The second device sends a credit allocation message to the first device, the credit allocation message comprising a credit allocation field, the credit allocation field being used to indicate the credit allocation of the shuttle.
[0020] In conjunction with the second aspect, in a possible implementation manner, 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:
[0021]
[0022] Among them, "Credits_Allocated_Shuttle" represents the credit allocation domain, "tRound" is the flow control loop delay, "ExpBW" is the expected bandwidth, "TLDP average message length" is the average message length, and "A", "B" and "C" are preset values.
[0023] In conjunction with the second aspect, in a possible implementation, the method further includes: the second device receives confirmation information of the credit allocation of the shuttle. The second device receives a data message, which 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.
[0024] In conjunction with the second aspect, in a possible implementation, the method further includes: the second device determines the credit recovery of the shuttle. The second device sends a credit recovery message, the credit recovery message includes a credit recovery field, and the credit recovery field is used to indicate the credit recovery of the shuttle.
[0025] 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 waits for the auxiliary link response message for a timeout, the second device sends a credit recovery message.
[0026] 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 does not send the third message at a fixed period, thereby reducing the frequency of sending the third message and reducing power consumption.
[0027] In conjunction with the second aspect, in a possible implementation, the method further includes: the second device receives a credit consumption message, the credit consumption message includes a credit consumption field, and the credit consumption field is used to indicate the 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.
[0028] In combination with the second aspect, in a possible implementation manner, 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.
[0029] In combination with the second aspect, in a possible implementation manner, the method further includes: the second device receives a credit allocation response message, where the credit allocation response message includes confirmation information of the shuttle's credit allocation.
[0030] In combination with the second aspect, in a possible implementation manner, 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, the second device sending the credit allocation message.
[0031] In combination with the second aspect, in a possible implementation manner, 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.
[0032] In combination with the second aspect, in a possible implementation manner, the second device sends a credit recovery message, including: when receiving a flow control exception notification message, sending a credit recovery message.
[0033] In conjunction with the second aspect, in a possible implementation manner, 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 receiving buffer.
[0034] In combination 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.
[0035] In combination with the second aspect, in a possible implementation method, 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.
[0036] In a third aspect of an embodiment of the present application, a flow control management device is provided, the device comprising: a transceiver port for receiving a credit allocation message sent by a second device, the credit allocation message comprising a credit allocation field, the credit allocation field being used to indicate the credit allocation of a virtual channel shuttle in the port of the second device, the credit allocation of shuttle being determined based on an average message length and an expected bandwidth. A processing circuit is used to send confirmation information of the credit allocation of shuttle through the transceiver port when the credit allocation of shuttle is greater than or equal to the credit allocation locally maintained by the flow control management device. The processing circuit is also used to update the credit allocation locally maintained by the flow control management device to the credit allocation of shuttle.
[0037] In combination with the third aspect, in a possible implementation, the apparatus is coupled to the second device via a main link and an auxiliary link. The processing circuit is further configured to send a credit consumption message via a transceiver port when the main link recovers from abnormality to normal, or when the auxiliary link times out waiting for a response message. The credit consumption message includes a credit consumption field, and the credit consumption field is used to indicate the credit consumption of the shuttle.
[0038] In combination with the third aspect, in one possible implementation, the processing circuit is also used to send a credit allocation response message through the transceiver port when the credit allocation of the shuttle is less than the credit allocation locally maintained by the flow control management device, after waiting for the cache to be released to the credit allocation of the shuttle, and the credit allocation response message includes confirmation information of the credit allocation of the shuttle.
[0039] In conjunction with the third aspect, in a possible implementation, the processing circuit is further used to determine the flow control time of the shuttle. The processing circuit is also used to send a flow control abnormality notification message through the transceiver port when the flow control time of the shuttle exceeds the first preset time, and the flow control abnormality notification message includes a flow control abnormality domain, and the flow control abnormality domain is used to indicate the shuttle flow control abnormality.
[0040] In a fourth aspect of the embodiment of the present application, a flow control management device is provided, the device comprising: a processing circuit for determining the credit allocation of a virtual channel shuttle in a port of the 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 a first device, the credit allocation message comprising a credit allocation field, and the credit allocation field is used to indicate the credit allocation of the shuttle.
[0041] In conjunction with the fourth aspect, in a possible implementation, 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, the credit recovery message includes a credit recovery field, and the credit recovery field is used to indicate the credit recovery of the shuttle.
[0042] 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.
[0043] In conjunction with the fourth aspect, in a possible implementation, the transceiver port is further used to receive a credit allocation response message, where the credit allocation response message includes a credit allocation confirmation message of shuttle and confirmation information of the credit allocation.
[0044] In conjunction with the fourth aspect, in a possible implementation manner, 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.
[0045] In combination 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.
[0046] In conjunction with the fourth aspect, in a possible implementation, the transceiver port is specifically used to send a credit recovery message when receiving a flow control exception notification message.
[0047] 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, the chip includes a flow control management device, the flow control management device 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.
[0048] In a sixth aspect of an embodiment of the present application, an electronic device is provided, comprising a processor, and a flow control management device coupled to the processor, wherein the flow control management device is a 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 a flow control management device as described in the fourth aspect or any possible implementation of the fourth aspect.
[0049] 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, wherein 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.
[0050] 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.
[0051] 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.
[0052] The descriptions of the second to ninth aspects of the present 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 beneficial effect analysis of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 A schematic diagram of the structure of a communication system provided in an embodiment of the present application;
[0054] Figure 2 A schematic diagram of the structure of another communication system provided in an embodiment of the present application;
[0055] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0056] Figure 4 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application;
[0057] Figure 5 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application;
[0058] Figure 6 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application;
[0059] Figure 7 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application;
[0060] Figure 8 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application;
[0061] Fig. 9 A schematic diagram of the structure of another communication system provided in an embodiment of the present application;
[0062] Fig.10 A schematic diagram of the structure of another communication system provided in an embodiment of the present application;
[0063] Fig.11 A schematic diagram of the structure of another communication system provided in an embodiment of the present application;
[0064] Fig.12 A schematic diagram of the structure of another communication system provided in an embodiment of the present application;
[0065] Fig.13 A schematic diagram of the structure of a protocol stack provided in an embodiment of the present application;
[0066] Fig.14 A schematic diagram of a port structure provided in an embodiment of the present application;
[0067] Fig.15 A flow chart of a flow control management method provided in an embodiment of the present application;
[0068] Fig.16 A schematic diagram of a verification circuit provided in an embodiment of the present application;
[0069] Fig.17 A schematic diagram of the structure of another verification circuit provided in an embodiment of the present application;
[0070] Fig.18 A flow chart of another flow control management method provided in an embodiment of the present application;
[0071] Fig.19 A flow chart of another flow control management method provided in an embodiment of the present application;
[0072] Fig. 20 A flow chart of another flow control management method provided in an embodiment of the present application;
[0073] Fig.21 A flow chart of another flow control management method provided in an embodiment of the present application;
[0074] Fig. 22 A flow chart of another flow control management method provided in an embodiment of the present application;
[0075] Fig.23 A schematic diagram of the structure of a flow control management device is provided for an embodiment of the present application;
[0076] Fig.24 A structural schematic diagram of another flow control management device is provided for an embodiment of the present application;
[0077] Fig.25 A schematic diagram of the structure of a chip module is provided for an embodiment of the present application;
[0078] Fig.26 A schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] The following will discuss the making and use of each embodiment in detail. However, it should be understood that many applicable inventive concepts provided by this application can be implemented in a variety of specific environments. The specific embodiments discussed are only used to illustrate the specific ways to implement and use this description and this technology, and do not limit the scope of this application.
[0080] 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.
[0081] 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 the 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 circuits that perform an operation, etc.
[0082] The technical scheme in the embodiment of the present application will be described below in conjunction with the accompanying drawings in the embodiment of the present application. In the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there may be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists 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 its similar expressions refers to any combination of these items, including any combination of single items 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 embodiment of the present application, the words "first", "second" and the like do not limit the quantity and order.
[0083] In this application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the words "exemplary" or "for example" is intended to present the related concepts in a concrete way.
[0084] Before introducing the embodiments of the present application, the technical terms and background technologies involved in the present application are first introduced.
[0085] Lane: A lane is a path for transmitting signals. The lane can be unidirectional or bidirectional. A unidirectional lane includes a pair of differential signal lines, and a bidirectional lane includes two pairs of differential signal lines.
[0086] Link: A link is a collection of channels or a conductor line 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 both ends of the channel, and data (signals) are transmitted from the transmitter to the receiver. The side where the transmitter of the link is located is called the transmitter side (or the transmitter side (Tx Side)), and the side where the receiver of the link is located is called the receiver side (or the receiver side (Rx Side)). Links can be divided into uplinks and downlinks. An uplink refers to a link when a slave device (e.g., a game controller) sends a signal to a master device (e.g., a display), and a downlink refers to a link when a master device (e.g., a routing device) sends a signal to a slave device (e.g., a display).
[0087] 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.
[0088] Sideband link (SL): Sideband link is used for low-speed data transmission, such as device management signals, port management signals, bandwidth management signals, power management signals, etc. It is also used for the transmission of control messages. The reliability of data transmission on the sideband link is higher than that on the main link.
[0089] Hamming Code: A linear debugging code used in telecommunications. Hamming Code inserts verification codes into the transmitted message stream. When a computer stores or moves data, data bit errors may occur to detect and correct single-bit errors. Extended Hamming Code can detect and correct multi-bit errors.
[0090] 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.
[0091] Modulus: It can also be called modular operation, or Mod, which means remainder.
[0092] 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 can be connected through a routing device. Signals can be transmitted (sent and received) between devices by wired means, or by wireless means. In addition, signals can be transmitted directly between devices, or signals can be transmitted between devices through an interface device, and the signals can be transmitted to the processing unit inside the device through a bus inside the device.
[0093] For example, Figure 1 The figure shows 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, and the first device 110 and the second device 120 are directly connected via a cable to achieve 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, and audio and video data may be transmitted between the set-top box and the display via a cable, or the first device 110 may be a display, and the second device 120 may be a game controller, and control information may be transmitted between the display and the game controller via a cable.
[0094] 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 implement signal transmission between the devices 110 and 120 .
[0095] For example, Figure 2 The structure diagram of another communication system 200 is shown. The communication system 200 includes multiple devices 210 and a routing device 220. Among them, any two devices 210 in the multiple devices 210 can transmit signals through the routing device 220, such as transmitting audio and video data or transmitting charging signals. For example, the multiple devices 210 may include a display, a set-top box and an audio player (for example, a moving picture experts group audio layer iii (MP3) device), the set-top box can transmit audio and video data to the display through the routing device 220, and the set-top box can also transmit audio data to the audio player through the routing device 220. In addition, there may be two directly connected devices in the multiple devices 210, for example, the multiple devices 210 may also include a game controller, which may be directly connected to the display through a cable and transmit control information to the display.
[0096] Optionally, each of the multiple devices 210 may include an interface device, and the routing device 220 may include multiple interface devices, and 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, and the multiple interface devices of the routing device 220 may include a first interface device to a third interface device, 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.
[0097] In the above two communication systems, the interconnected devices can be called communication devices. When the communication device is an electronic device, the communication device can be deployed on land, including indoors or outdoors, handheld or vehicle-mounted. The communication device can also be deployed on the water (such as a ship, etc.), and can also be deployed in the air (such as an airplane, a balloon, and a satellite, etc.). 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, a vehicle-mounted 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. Home), flying equipment (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, etc.
[0098] When the communication device is an interface device, the interface device can be a chip. It can be understood that the communication system is a system in which chips are interconnected, and the chip can be an interface chip on an electronic device / cable / dock / adapter / router. The dock can be connected with a Gigabit Ethernet port, a video graphics array (VGA) interface, a high definition multimedia interface (HDMI), a TF card (trans-flash card), an SD card (secure digital memory card), a charging port, and a universal serial bus (USB) interface.
[0099] In this application, when the communication device is a chip, the chip may include an interface module, that is, the application may be applied to the interface module for interconnecting chips. The interface module may be understood as an IP integrated inside the chip. Alternatively, the interface module may also be sold separately as an IP.
[0100] For example, when the chip can be a system on chip (SoC), a central processing unit (CPU), a graphics processing unit (GPU), etc., 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 sending circuit and / or receiving circuit in the die, and the chip can also be an input / output (I / O) die that only includes interface functions.
[0101] In the embodiment of the present application, when the signal is transmitted between devices in the communication system, the interface specifications adopted may include but are not limited to: universal serial bus (USB) interface specifications, HDMI specifications, display port (DP) specifications, unified multimedia interconnection (UMMI) interface specifications and high-speed serial computer expansion bus (Peripheral Component Interconnect Express, PCIE) interface specifications, etc. Correspondingly, 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 and a type-C interface, etc.
[0102] 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 TV, the set-top box and the TV can be connected via an HDMI cable, and the interface standard followed is 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, and the USB interface specification is followed.
[0103] The embodiment of the present application also provides another interface standard that can replace the above-mentioned interface standards (such as USB interface or HDMI interface): unified media interconnecter (UMI) interface. The UMI interface also supports direct connection between devices, or multi-device networking connection (for example, devices are connected through routing devices, or devices are connected through docking stations). For example, the 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 the transmission of data, but also realize the charging function. Of course, the UMI interface can also be other interface names. When the UMI interface is replaced with other interface names, other interfaces can be used to realize the functions of the UMI interface in the present application. The embodiment of the present application does not limit this. The following embodiments of the present application take the UMI interface as an example for exemplary description.
[0104] like Figure 3 As shown, it is a schematic diagram of the structure 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 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 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 control adapter 311 is coupled to the management control component 330 outside the interface chip 310, and 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.
[0105] The management control adapter 311 is used to adapt the control information. For example, when the port 312 is a downlink port, the management control adapter 311 is used to adapt the control information to be sent, and the port 312 is used to send the adapted control information. When the port 312 is an uplink port, the port 312 is used to receive the control information, and the management control adapter 311 is used to adapt the control information received by the port 312.
[0106] 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 the audio and video format, and the third-party protocol adapter is used for adapting the third-party protocol. 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, which is not limited in the embodiment of the present application. 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.
[0107] The types of electronic devices 300 in the present application include source devices, sink devices, docks, router devices, or composite devices, which are not limited in the embodiments of the present application.
[0108] like Figure 4 As shown, 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 and video transmission adapter), and 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. At this time, the type of the electronic device 300 may include a digital versatile / video disc (DVD) player, a set-top box, or a split TV host, and the electronic device 300 may be used to transmit 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, and 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 downstream port 314 is used to send the adapted third-party protocol standard data.
[0109] In some possible embodiments, the interface chip 310 may include multiple data transmission adapters 315 and multiple downstream ports 314 , which may support the simultaneous transmission of multiple data streams, such as multiple audio and video data streams.
[0110] like Figure 5 As shown, 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), and 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. At this time, the type of the electronic device 300 includes a television, a display or a speaker, and 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, and 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 of the third-party protocol standard received by the uplink port 317 to the data of the protocol standard supported by the electronic device 300.
[0111] In some possible embodiments, the interface chip 310 may include multiple data receiving adapters 318 and multiple upstream ports 317 , which may support simultaneous reception of multiple data streams, such as multiple audio and video data streams.
[0112] like Figure 6 As shown, 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, and 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, and the data receiving adapter 318 and the data conversion component 370 are used to perform data conversion on the 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 control component 330, a third-party protocol hub 390 and a plurality of third-party interfaces 3100, and the interface chip 310 may also include a management control adapter 311 and a third-party protocol adapter 316, the management control adapter 311 is coupled to the management control component 330, the third-party protocol adapter 316 is coupled to the third-party protocol hub 390, and 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, and the converted data can be transmitted to the third-party interface 3100 through the third-party protocol hub 390 for transmission.
[0113] like Figure 7As shown, when the electronic device 300 is a routing device, the electronic device 300 may include multiple connectors 320, the interface chip 310 may include multiple downstream ports 314 and multiple upstream ports 317, and the multiple downstream ports 314 and 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 and the specific number of downstream ports 314 and upstream ports 317 included in the interface chip 310. The electronic device 300 may also include a management control component 330, and the interface chip 310 may also include a management control adapter 311, which is coupled to the management control component 330.
[0114] In a possible embodiment, when the electronic device 300 is a routing device, the electronic device 300 may support routing forwarding of UMI messages, but does not support encryption / decryption, encapsulation / decapsulation processing of UMI messages.
[0115] like Figure 8 As shown, when the electronic device 300 is a composite device, the electronic device 300 may be a source device or a sink device having both an upstream port 317 and a downstream port 314, and the electronic device 300 may support bidirectional transmission of data. Specifically, the electronic device 300 may include a data processing component 360, a data acquisition component 3110, a management control component 330, and a third-party protocol component 350, and the interface chip 310 may include an upstream port 317, a downstream port 314, a data receiving adapter 318, a data sending 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 sending adapter 315 is coupled to the data acquisition component 3110, the management control adapter 311 is coupled to the management control component 330, and the third-party protocol adapter 316 is coupled to the third-party protocol component 350. The data receiving adapter 318 may adapt the data received by the upstream port 317, for example, to data of 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, adapt the data to the UMI protocol, and the adapted data can be sent through the downlink port 314 .
[0116] Based on this, Fig. 9As shown, the 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, one of which is a source device, and the interface chip 310 includes a downlink port 314 (excluding an uplink port 317), and the other electronic device 300 is a sink device, and the 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.
[0117] In a possible embodiment, Fig.10 As shown, the two electronic devices 300 in the communication system 400 can both be composite devices, and the interface chips in the two electronic devices 300 can include a downstream port 314 and an upstream port 317 at the same time. For the sake of distinction, one of the electronic devices 300 is called a source device, and the other electronic device 300 is called a sink device. The source device can send data to the sink device through the downstream port 314, and can also receive data sent by the sink device through 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 through 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 through the downstream port 314 of the sink device. The audio and video receiving adapter in the source device can process the UMI message and then send it to the audio and video processing component.
[0118] In a possible embodiment, Fig.11 As shown, 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.
[0119] In a possible embodiment, the multiple electronic devices 300 may be a routing device and multiple composite devices, and the multiple composite devices may communicate through 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 and video data to the display, the data may be sent to the upstream port of the display through the downstream port of the speaker, and the data may be exchanged through the routing device in the middle. The display may also return data through the downstream port, and the data may be returned to the upstream port of the speaker through the routing device.
[0120] like Fig.12As shown, 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 link is used to transmit electrical energy. The cable information link can be used to transmit cable information, such as the cable model, cable capability information, etc.
[0121] like Fig.13 As shown, it is a schematic diagram of the structure of the protocol stack when data is transmitted through a link between electronic devices 300, and the protocol stack includes an adapter layer, a transport layer, a logic layer and an electrical layer. Among them, the adapter layer is responsible for the docking between the interface chip (switch) and the external components. The functions that can be executed by the adaptation layer include data transmission adaptation, data reception adaptation, third-party protocol adaptation (protocol tunnel adaptation) and management control adaptation. Data transmission adaptation is to send the source data received from the application of the device to the transport layer after transmission adaptation. Data reception adaptation is to send the data received from the transport layer to the application for data processing after receiving adaptation. Third-party protocol adaptation can be used to receive data from the transport layer and obtain third-party protocol data after protocol adaptation, and transmit it to the application for processing, or receive third-party protocol data from the application and send it to the transport layer after adaptation. Management control adaptation is to adapt the control information received from the transport layer, and then perform management control according to the adapted control information, or adapt the control information generated from the management control process and send it to the transport layer.
[0122] The transport layer is responsible for processing and forwarding service information or control information, etc. For example, it can process and forward service flows and management control information such as video, audio, and third-party protocol tunnels, and perform bandwidth management for all service flows.
[0123] The logic layer is responsible for line encoding and decoding, scrambling and descrambling, forward error correction (FEC) encoding and decoding, and link training.
[0124] The electrical layer is responsible for signal equalization, spread spectrum, clock recovery, etc. The logical layer and electrical layer can also be collectively referred to as the physical layer.
[0125] When the electronic device 300 sends data through the port, the transport layer receives the message from the corresponding adaptation layer, integrates the service flows, and passes the data to the physical layer. When the electronic device 300 receives data through the port, the transport layer splits the data from the physical layer into messages corresponding to each service flow, and then passes the message to the corresponding adaptation layer.
[0126] The electronic device 300 may include one or more adapters. All the adapters in the electronic device 300 may constitute a virtual port. Each adapter is a shuttle on the port. It can be understood that the adapter identity document (ID) is the virtual shuttle ID. Fig.14 As shown, for example, communication is carried out between port 0 and port 1, and port 0 and port 1 each include multiple shuttles, including virtual channel ID = 4, virtual channel ID = 5 to virtual channel ID = n, where n is a positive integer. Each shuttle is configured with RBuff (receive buffer) and TBuff (send buffer). When forwarding a message, Fig.14 As shown in the forwarding message line in , the transport layer can take a message from the RBuff of the virtual channel ID = 4 of port 0, and forward or copy the message to the TBuff of other shuttles according to the routing information. For example, it can be forwarded to the TBuff of the virtual channel ID = 5 of Port 0, or it can be forwarded to the TBuff of the virtual channel ID = 4 of Port 1.
[0127] In the process of transmitting data, in order to avoid RBuff cache overflow, a credit-based flow control mechanism can be adopted, but how to improve the utilization efficiency of RBuff has become an urgent problem to be solved.
[0128] Based on this, an embodiment of the present application provides a flow control management method. During flow control management, the method determines the credit allocation of the virtual channel shuttle according to the average message length and the expected bandwidth to dynamically adjust the credit allocation of the shuttle, wherein 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 rate of the RBuff.
[0129] like Fig.15As shown, it is a flow chart of a flow control management method provided in an embodiment of the present application, 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 message 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 exemplary description.
[0130] S1501: The second device 120 determines credit allocation of a shuttle in a port of the second device 120 according to an average message length and an expected bandwidth.
[0131] Wherein, shuttle corresponds to the adapter in the second device 120, and the credit allocation of shuttle is also used to indicate the capacity allocated to the adapter receiving buffer RBuff. In the following, the credit recovery of shuttle refers to the buffer capacity released in RBuff when the message is forwarded from RBuff, and the credit consumption of shuttle refers to the buffer capacity occupied in RBuff when the message is stored in RBuff.
[0132] In a possible embodiment, when the second device 120 determines the credit allocation of the shuttle according to the average message length and the expected bandwidth, the following formula is satisfied:
[0133]
[0134] Among them, "Credits_Allocated" indicates the credit allocation of shuttle, "tRound" is the flow control loop delay, "ExpBW" is the expected bandwidth, "TLDP average message length" is the average message length, and "A", "B" and "C" are preset values.
[0135] In a possible embodiment, the maximum message length is 512 bytes, one credit can be 32 bytes, 1 byte is 8 bits, 16 credits correspond to one packet, so "A" can be "32" and "B" can be "8". For the convenience of processing in the Tx direction, when sending, regardless of the message length, it is directly determined whether there are 16 credits. The real message may be 1 credit, so 15 more should be reserved, so "C" can be "15". The embodiments of the present application do not limit the specific values of "A", "B" and "C". In the following embodiments, "A" is taken as "32", "B" is "8", and "C" is taken as an example for exemplary description.
[0136] In a possible embodiment, when determining "tRound", the following formula must be satisfied:
[0137] tRound=tTLDP2TLCRP+2*tCable+tTLCRP2TLDP+tTLCRP+tTLDP
[0138] 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 recycling 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.
[0139] 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 according to 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 according to the flow control mechanism of the shuttle, the average message length and the expected bandwidth.
[0140] 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 flow control mechanism specifically included in the flow control mechanism of shuttle.
[0141] 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 message. The data message can also be called a transport layer data packet (transport layer data packet, TLDP), the second device 120 can also be called a TLDP receiving end, and the first device 110 can also be called a TLDP sending end. 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 message. The flow control disabled mechanism means that the second device 120 provides a flow control disabled buffer space for all shuttles of the flow control disabled mechanism, does not perform flow control on the first device 110, and the second device 120 discards the message after the flow control disabled buffer space is full.
[0142] In a possible embodiment, when the flow control mechanism of the 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:
[0143]
[0144] Among them, "Credits_Allocated_Shuttle" indicates the credit allocation of the shuttle, which can also be called the cache credit of the exclusive flow control mechanism. "tRound" is the flow control loop delay, in nanoseconds (ns). "ExpBW" is the expected bandwidth of the shuttle, in gigabits per second (Gbps). The expected bandwidth refers to the bandwidth set according to demand and expected to be achieved. "TLDP average message length" is the average message length, which can also be called the average message length of the transport layer data message. The average message length is determined by calculating the average of the lengths of multiple messages received by the shuttle within a preset time.
[0145] In a possible embodiment, when the flow control mechanism of the shuttle is a shared flow control mechanism, the second device 120 determines the credit allocation domain The difference is that in this case, "ExpBW" is the sum of the expected bandwidths of all shuttles that share the flow control mechanism, and the TLDP average packet length is the average packet length of all shuttles.
[0146] In a possible embodiment, the management adapter in the second device 120 determines the credit allocation of the shuttle according to the average message length and the expected bandwidth.
[0147] 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 of a shuttle.
[0148] The above credit allocation message may also be called a transport layer credit allocation message (transport layer creditallocated packet, TLCAP).
[0149] In a possible embodiment, the format of the credit allocation message may be as shown in Table 1 below.
[0150] Table 1
[0151]
[0152] 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. The embodiment of the present application takes the credit allocation message and other messages including a 32-bit message header, a payload including at least one entry, and each entry including 32 bits as an example for illustrative explanation.
[0153] 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.
[0154] The Rsvd field is fixedly 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.
[0155] The TLMP Type field is used to indicate the type of transport layer management message. 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 referred to as a transport layer credit allocation message (TLCAP). 1 can be used to represent a credit allocation response message, which can also be referred to as an acknowledgement for transport layer credit allocated packet (TLCAP_ACK). 2 can be used to represent a credit consumption message, which can also be referred to as a transport layer credit consumed packet (TLCCP). 3 can be used to represent a credit recovery message, which can also be referred to as a transport layer credit recovery packet (TLCRP). 4 can be used to represent a flow control exception message, which can also be referred to as a transport layer flow control error notification packet (TLFCENP). The embodiments of the present application do not limit this.
[0156] Length is used to indicate the length of the message.
[0157] 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 packet TLDP, and 0 can be used to indicate that the message is a transport layer management message TLMP. The embodiments of the present application do not limit this.
[0158] Each entry in the payload can include an ST field, an Rsvd field, a Credits_Allocated field, and a shuttle ID field. Each entry can also include other fields. The embodiments of the present application do not limit this.
[0159] 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. The embodiments of the present application do not limit this.
[0160] The Credits_Allocated field is used to indicate the credit allocation of the shuttle.
[0161] Shuttle ID is used to indicate different shuttles.
[0162] In a possible embodiment, the message header and each entry in the credit allocation message may include an error checking and correcting (ECC) field, and the ECC field is used to indicate whether an error occurs in the credit allocation message.
[0163] In a possible embodiment, during the process of checking the message header or entry in the credit allocation message through the ECC field, if a single-bit ECC error can be corrected, the message header or entry is deemed to have no error after correction. If an uncorrectable error is detected, the corresponding message header or entry is discarded, and the discarded message header or entry is deemed not to have been received.
[0164] 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 are not limited to this. The embodiments of the present application are illustrative by taking the message header and each entry using the same check method, and the ECC fields all include extended Hamming codes.
[0165] Specifically, the ECC field contains 6 bits of check bits (which can be called ECC6), and the check is performed from bit31 to bit6, using the extended Hamming code (32,26). Among them, the Hamming code (31,26) is used to perform single-bit ECC error correction on bit31 to bit6, and 1 bit is extended for 2 bits of error detection.
[0166] In a possible embodiment, ECC6 may be implemented as follows:
[0167] Calculate the 5-bit checksum field (called ECC5) of the Hamming code (31, 26) according to the following rules;
[0168] Generator polynomial is generated: G(x) = x^5 + x^2 + 1, "^" represents power operation;
[0169] Check code width: 5 bits;
[0170] Initial value: 0x00h;
[0171] Input data: no inversion;
[0172] Output checksum: no inversion;
[0173] Output check code XOR: 0x00h.
[0174] In a possible embodiment, Fig.16The figure shows an ECC5 generation circuit, which includes a first exclusive OR (XOR) circuit XOR1, a second exclusive OR circuit XOR2, and a first D flip-flop D1 to a fifth D flip-flop D5. When bit31 to bit6 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 domain c[0], thereby obtaining the ECC6 check domain c[5:0].
[0175] In a possible embodiment, when the flow control mechanism of the 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 the 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).
[0176] S1503 . The first device 110 receives a credit allocation message sent by the second device 120 .
[0177] 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.
[0178] 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.
[0179] In a possible embodiment, the first device 110 sends confirmation information of shuttle's credit allocation, including: the first device 110 sends a credit allocation response message, the credit allocation response message includes confirmation information of shuttle's credit allocation, and the credit allocation response message can also be called a transport layer credit allocation response message TLCAP_ACK.
[0180] In a possible embodiment, the format of the credit allocation response message may be as shown in Table 2 below.
[0181] Table 2
[0182]
[0183]
[0184] The Rsvd field in the header of the credit allocation response message includes the SH_ACK field, which is used to indicate the confirmation information of the credit allocation of the shared flow control mechanism shuttle. Each entry may include the confirmation information of the credit allocation corresponding to 32 exclusive flow control mechanism shuttles, for example, ST_ACK[127:96] is used to indicate the confirmation information of the credit allocation corresponding to the 32 shuttles from shuttle ID127 to shuttle ID96. The credit allocation response message may also include other fields or entries, which are not limited in the embodiments of the present application.
[0185] In a 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, and 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 by the ECC field, and the ST_ACK in each entry is verified by the CRC32 field, so that after the second device 120 receives the credit allocation response message, it can be verified by an independent verification method, and the two do not affect each other, which can improve the reliability of the received message.
[0186] Specifically, the CRC32 field is used to check the other payload areas in the payload except the CRC32 field. Starting from the double word (DW) 0 ([31:0]) of the payload area, the check result is generated from bit31 to bit0 in each DW according to the following rules:
[0187] 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;
[0188] The initial value is: 0xFFFF_FFFF;
[0189] Input data: reverse;
[0190] Output data: reverse;
[0191] Output check code XOR: 0xFFFF_FFFF.
[0192] In a possible embodiment, Fig.17The figure shows a CRC32 check circuit, which includes a first XOR circuit XOR1 to a fourteenth XOR circuit XOR14, a first D flip-flop D1 to a thirty-second D flip-flop D32, and a first NOT (N in the embodiment of the present application) gate N1 to a thirty-second NOT gate N32. When all the 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 bit24 to bit31, bit16 to bit23, bit8 to bit15, and bit0 to bit7, c[31:0] is the generated check field.
[0193] In a possible embodiment, if the credit allocation of shuttle is less than the credit allocation locally maintained by the first device 110, the first device 110 may wait for the credit allocation of shuttle to be released from the cache, and then send a credit allocation response message, the credit allocation response message including confirmation information of the credit allocation of shuttle. The second device 120 may receive the credit allocation response message.
[0194] In a possible embodiment, the second device 120 sending the credit allocation message includes: when the second device 120 does not receive the credit allocation response message within the second preset time, sending the credit allocation message. The second preset time may also be referred to as tTLCAP_ACK, and 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 response message (transport layer credit allocation response 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.
[0195] Specifically, when the flow control mechanism of shuttle is an exclusive flow control mechanism, when 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 through a credit allocation message. When the flow control mechanism of shuttle is a shared flow control mechanism, when 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 through a credit allocation message.
[0196] For ease of understanding, Fig.18As shown, it is a schematic diagram of the process of sending messages between the second device 120 and the first device 110. First, the second device 120 (TLDP receiving end) sends a credit allocation message (also called a transport layer credit allocation message TLCAP) to the first device 110 (TLDP sending end). The credit allocation message may include an exclusive credit allocation field Credits_Allocated_Shuttle, and / or, Credits_Allocated_Shared shared credit allocation field. Then, the first device 110 may send a credit allocation response message (also called a transport layer credit allocation response message TLCAP_ACK) according to the credit allocation of the shuttle and the credit allocation maintained locally by the first device. The credit allocation response message may include SH_ACK, and / or, ST_ACK.
[0197] S1505. The first device 110 updates the credit allocation locally maintained by the first device 110 to the credit allocation of shuttle.
[0198] Specifically, when the flow control mechanism of the shuttle 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 exclusive flow control mechanism of the shuttle 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 exclusive flow control mechanism of the shuttle. When the flow control mechanism of the shuttle 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 shared flow control mechanism of the shuttle 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 shared flow control mechanism of the shuttle.
[0199] In the flow control management method provided in the embodiment of the present application, the second device 120 determines the credit allocation of the shuttle according to the average message length and the expected bandwidth and sends it to the first device 110. The first device 110 updates the credit allocation locally maintained by the first device 110 to the credit allocation of the shuttle. The second device 120 can determine the capacity of the RBuff cache space according to the average message length and the expected bandwidth, and dynamically adjust the credit allocation of the shuttle in the second device 110, so as to improve the utilization efficiency of the RBuff while meeting the transmission requirements.
[0200] In a possible embodiment, Fig.19As shown, after the above step S1505, the flow control management method provided in the embodiment of the present application also includes steps S1506-S1507.
[0201] 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 .
[0202] The above data packet may also be referred to as a transport layer data packet TLDP.
[0203] 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 message:
[0204] (Tx_Credits_Consumed_Shuttle-Tx_Credits_Recycled_Shuttle+16384)%16384+16<=Tx_Credits_Allocated_Shuttle
[0205] 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, and "16384" is related to the size of the RBuff cache space, which is 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.
[0206] When the flow control mechanism of shuttle is a shared flow control mechanism and satisfies the following formula, the first device 110 can send a data message:
[0207] (Tx_Credits_Consumed_Shared-Tx_Credits_Recycled_Shared+16384)%16384+16<=Tx_Credits_Allocated_Shared
[0208] 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.
[0209] 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.
[0210] In a 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 according to 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 according to 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 can be understood that the execution of step S1506 is independent of the above steps S1501-S1505.
[0211] S1507. The second device 120 receives the data message.
[0212] The flow control management method provided in the embodiment of the present application, 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, which can avoid causing the RBuff cache of the first device to overflow and improve the reliability of data transmission.
[0213] 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.
[0214] In a possible embodiment, 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.
[0215] In a possible embodiment, Fig.19 As shown, if the second device 120 forwards part or all of the messages in the RBuff, the buffer released by the sent message can be recycled, 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 the above step S1502. When executing, steps S1508-S1511 and steps S1503-S1507 may not distinguish between the order of precedence, for example, they may be executed simultaneously.
[0216] S1508. The second device 120 determines credit recovery of shuttle.
[0217] Specifically, when the flow control mechanism of the shuttle is an exclusive flow control mechanism, when the management adapter in the second device 120 establishes the shuttle, the credit recovery field can be determined to be 0, and the credit recovery field is used to indicate that the credit recovery of the shuttle is 0. After the data message (transport layer data message TLDP) is output from the RBuff of the shuttle, the credit recovery of the shuttle satisfies the following formula, and the second device 120 can determine the credit recovery of the shuttle according to the formula:
[0218] Rx_Credits_Recycled_Shuttle = (Rx_Credits_Recycled_Shuttle + credits contained in output TLDP) modulo 16384
[0219] Among them, "Rx_Credits_Recycled_Shuttle" represents the exclusive credit recovery of shuttle, "Credits included in the output TLDP" represents the messages received from the first device 110 using the exclusive flow control mechanism, such as when data messages are output from the RBuff of shuttle, the credits increased by the exclusive credit recovery of shuttle, and "16384" is a preset constant, which is not limited to the embodiments of the present application.
[0220] When the flow control mechanism of the shuttle is a shared flow control mechanism, when the management adapter in the second device 120 establishes the first shuttle of the shared flow control mechanism, the credit recovery field can be determined to be 0, and the credit recovery field is used to indicate that the credit recovery of the shuttle is 0. After the data message (transport layer data message TLDP) is output from the RBuff of the shuttle, the credit recovery of the shuttle satisfies the following formula, and the second device 120 can determine the credit recovery of the shuttle according to the formula:
[0221] Rx_Credits_Recycled_Shared=(Rx_Credits_Recycled_Shared+credits included in output TLDP) modulo 16384.
[0222] Among them, "Rx_Credits_Recycled_Shared" represents the shared credit recovery of shuttle, "Credits included in the output TLDP" represents the message received from the first device 110 using the shared flow control mechanism, such as when a data message is output from the RBuff of shuttle, the shared credit recovery of shuttle increases the credit, and "16384" is a preset constant, which is not limited to the embodiments of the present application.
[0223] 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 shuttle.
[0224] The credit recovery message may also be referred to as a transport layer credit recovery message TLCRP.
[0225] In a possible embodiment, the format of the credit recovery message may be as shown in Table 3 below.
[0226] Table 3
[0227]
[0228] 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, a message 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.
[0229] When the ST field indicates that the flow control management mechanism of the shuttle is an exclusive flow control management mechanism, the Shuttle ID field is used to indicate different shuttles. When the ST field indicates that the flow control management mechanism of the shuttle is a shared flow control management mechanism, the Shuttle ID field is used as a reserved field.
[0230] 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 embodiments of the present application will not be repeated here.
[0231] In one possible embodiment, combining Fig.12 , the second device 120 and the first device 110 in the communication system 100 can also be coupled through the main link, the auxiliary link, the power supply link and the cable information link, and the functions of each link will not be repeated here in the 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.
[0232] Specifically, when the credit recovery of a shuttle of the exclusive flow control mechanism changes, the second device 120 may send the exclusive credit recovery of the shuttle through a credit recovery message. When the credit recovery of a shuttle of the shared flow control mechanism changes, the second device 120 may send the shared credit recovery of the shuttle through a credit recovery message. 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 120 may send the exclusive credit recovery and shared credit recovery of all shuttles through a credit recovery message.
[0233] In a possible embodiment, if a credit recovery message cannot be sent immediately after a data message is output from the RBuff of the shuttle, an additional buffer compensation delay needs to be reserved to avoid buffer overflow due to the transmission and reception delay.
[0234] S1510. The first device 110 receives a credit recovery message.
[0235] S1511. The first device 110 updates the credit recovery locally maintained by the first device 110 to the credit recovery of shuttle.
[0236] 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.
[0237] 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_Recy cled field of the credit recovery message, and update the credit recovery Tx_Credits_Recycled_Shuttle (also referred to 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.
[0238] 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 (also called shared credit recovery maintained locally by the first device 110) maintained locally by the first device 110 to the credit recovery of shuttle.
[0239] In a possible embodiment, when the flow control mechanism of the shuttle is an exclusive flow control mechanism, when the management adapter in the first device 110 establishes the shuttle, the credit recovery locally maintained by the first device 110 may be set to 0. When the flow control mechanism of the shuttle is a shared flow control mechanism, when the management adapter in the first device 110 establishes the first shuttle of the shared flow control mechanism, the credit recovery locally maintained by the first device 110 may be set to 0.
[0240] The flow control management method provided in the embodiment of the present application is that the second device 120 sends a credit recovery message when a condition is 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 according to 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.
[0241] In a possible embodiment, Fig. 20 As shown, after sending the 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 step S1507. When executing, steps S1512-S1515 and steps S1508-S1511 may not distinguish the execution order, for example, they may be executed simultaneously. Fig.12 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, and the functions of each link will not be described in detail in the embodiment of the present application.
[0242] S1512: The first device 110 updates the credit consumption of the shuttle according to the data message.
[0243] Specifically, when the flow control mechanism of shuttle is an exclusive flow control mechanism, after the first device 110 sends a data message, the credit consumption of shuttle satisfies the following formula, and the first device 110 can update the credit consumption of shuttle according to the formula:
[0244] Tx_Credits_Consumed_Shuttle = (Tx_Credits_Consumed_Shuttle + credits included in sending the TLDP) modulo 16384
[0245] Among them, "Tx_Credits_Consumed_Shuttle" represents the exclusive credit consumption of shuttle, "Sending the credits contained in the TLDP" represents that 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, the exclusive credit consumption of the shuttle is increased by the credits, and "16384" is a preset constant, which is not limited in the embodiments of the present application.
[0246] When the flow control mechanism of shuttle is a shared flow control mechanism, after the first device 110 sends a data message, the credit consumption of shuttle satisfies the following formula, and the first device 110 can update the credit consumption of shuttle according to the formula:
[0247] Tx_Credits_Consumed_Shared = Tx_Credits_Consumed_Shared + credits contained in the TLDP sent) modulo 16384
[0248] Among them, "Tx_Credits_Consumed_Shared" represents the shared credit consumption of shuttle, "Sending the credits contained in the TLDP" means that 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, the shared credit consumption of shuttle increases by the credits, and "16384" is a preset constant, which is not limited in the embodiments of the present application.
[0249] In a possible embodiment, when the flow control mechanism of a shuttle is an exclusive flow control mechanism, when the management adapter in the first device 110 establishes the shuttle, the exclusive credit consumption of the shuttle can be set to 0. When the flow control mechanism of a shuttle is a shared flow control mechanism, when the management adapter in the first device 110 establishes the first shuttle, the shared credit consumption of the shuttle can be set to 0.
[0250] S1513: When the main 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, where the credit consumption message includes a credit consumption field, where the credit consumption field is used to indicate credit consumption of the shuttle.
[0251] The credit consumption message may be referred to as a transport layer credit consumption message TLCCP.
[0252] In a possible embodiment, the format of the credit consumption message may be as shown in Table 4 below.
[0253] Table 4
[0254]
[0255] Each entry in the payload of the credit consumption message includes a Credits_Consumed field, where the Credits_Consumed field 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.
[0256] When the ST field indicates that the flow control management mechanism of the shuttle is an exclusive flow control management mechanism, the Shuttle ID field is used to indicate different shuttles. When the ST field indicates that the flow control management mechanism of the shuttle is a shared flow control management mechanism, the Shuttle ID field is used as a reserved field.
[0257] 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.
[0258] In a possible embodiment, the credit consumption message includes the exclusive consumption credits of all shuttles that have an exclusive flow control mechanism and the shared consumption credits of all shuttles that have a shared flow control mechanism.
[0259] In a possible embodiment, in order to avoid the consumption credit entry of the shuttle in the credit consumption message being discarded due to link bit errors, the credit consumption of each shuttle can be sent multiple times, for example, 3 times, through 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.
[0260] Further, when the flow control mechanism of the shuttle is an exclusive flow control mechanism, if the flow control time of the shuttle (also referred to as insufficient credit 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.
[0261] S1514. The second device 120 receives the credit consumption message.
[0262] S1515. The second device 120 updates the credit consumption locally maintained by the second device 120 to the credit consumption of shuttle.
[0263] Specifically, when the flow control mechanism of 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:
[0264] Rx_Credits_Consumed_Shuttle=Credits_Consumed
[0265] 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.
[0266] When the flow control mechanism of 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:
[0267] Rx_Credits_Consumed_Shared=Credits_Consumed
[0268] Among them, “Rx_Credits_Consumed_Shared” indicates the credit consumption maintained locally by the second device 120, which may also be referred to as the shared credit consumption maintained locally by the second device 120, and “Credits_Consumed” indicates the Credits_Consumed field in the credit consumption entry.
[0269] 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.
[0270] Specifically, when the flow control mechanism of shuttle 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, and the second device 120 can update the credit recovery locally maintained by the second device 120 according to the formula:
[0271] Rx_Credits_Recycled_Shuttle=(Rx_Credits_Recycled_Shuttle+16384+Credits_Consumed-Rx_Credits_Consumed_Shuttle) modulo 16384
[0272] 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.
[0273] When the flow control mechanism of shuttle 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, and the second device 120 can update the credit recovery locally maintained by the second device 120 according to the formula:
[0274] Rx_Credits_Recycled_Shared=(Rx_Credits_Recycled_Shared+16384+Credits_Consumed-Rx_Credits_Consumed_Shared) modulo 16384
[0275] 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.
[0276] 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).
[0277] Specifically, when the shuttle flow control mechanism is an exclusive flow control mechanism, after the second device 120 receives the data 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:
[0278] Rx_Credits_Consumed_Shuttle = (Rx_Credits_Consumed_Shuttle + credits contained in received TLDP) modulo 16384
[0279] Among them, "Rx_Credits_Consumed_Shuttle" represents the credit consumption maintained locally by the second device 120, and can also be called the exclusive credit consumption maintained locally by the second device 120, "Credits included in the received TLDP" means that after the second device 120 receives the data packet, when the data packet is stored in the RBuff of the shuttle, the credit increased by the exclusive credit consumption maintained locally by the second device 120, and "16384" is a preset constant, which is not limited to the embodiment of the present application.
[0280] When the flow control mechanism of shuttle is a shared flow control mechanism, after the second device 120 receives the data 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:
[0281] Rx_Credits_Consumed_Shared = (Rx_Credits_Consumed_Shared + credits contained in received TLDP) modulo 16384
[0282] 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" means that after the second device 120 receives the data packet, when the data packet is stored in the RBuff of shuttle, the credit increased by the shared credit consumption maintained locally by the second device 120, "16384" is a preset constant, and the embodiment of the present application does not limit this.
[0283] In a possible embodiment, when the flow control mechanism of the shuttle 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 flow control mechanism of the shuttle 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 of the shared flow control mechanism.
[0284] According to the flow control management method provided in the embodiment of the present application, 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.
[0285] In a possible embodiment, Fig.21 As shown, 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.
[0286] S1516: The first device 110 determines the flow controlled time of the shuttle.
[0287] S1517: When the flow control time of the shuttle exceeds the first preset time, the first device 110 sends a flow control abnormality notification message, where the flow control abnormality notification message includes a flow control abnormality field, where the flow control abnormality field is used to indicate the flow control abnormality of the shuttle.
[0288] The first preset time may be the above-mentioned tTxErrFC, and the embodiment of the present application does not limit the specific duration of the tTxErrFC.
[0289] The flow control exception notification message may be referred to as a transport layer flow control exception notification message TLFCENP.
[0290] In a possible embodiment, the format of the flow control exception notification message may be as shown in Table 5 below.
[0291] Table 5
[0292]
[0293] The Rsvd field in the message header of the flow control anomaly notification message 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 may 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 ID127 to shuttle ID96. 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.
[0294] 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, wherein the ECC field is used to verify the message header of the flow control exception notification message, and the CRC32 field is used to verify the entries in the credit allocation response message payload.
[0295] In a possible embodiment, after the first device 110 sends a flow control abnormality notification message to the second device 120, the flow control time is started again. If the flow control time of the shuttle exceeds the first preset time again, it can be determined that the shuttle has flow control abnormality again. If the shuttle has flow control abnormality for multiple consecutive times, for example, 3 times, a serious flow control abnormality error is reported to the management adapter.
[0296] S1518. The second device 120 receives the flow control abnormality notification message.
[0297] Specifically, after the second device 120 receives the flow control exception notification message, it can check the SH_ERRFC field through the ECC field, and check the ST_ERRFC in each entry through the CRC32 field. It can be checked through an independent verification method, and the two do not affect each other, which can improve the reliability of the received message.
[0298] 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.
[0299] 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 the shared credit recovery of shuttle through the credit recovery message.
[0300] 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 the credit recovery message.
[0301] 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 an error exists, the second device 120 can send exclusive credit recovery of all exclusive flow control mechanisms shuttle through a credit recovery message.
[0302] For ease of understanding, Fig. 22 As shown, it is a flow chart of sending messages between the second device 120 and the first device 110. The first device 110 (TLDP sending end) can send a credit consumption message (transport layer credit consumption message TLCCP) to the second device 120 (TLDP receiving end), and the credit consumption message includes shuttle's exclusive credit consumption Credits_Consumed_Shuttle, and / or, 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, and the credit recovery message includes shuttle's exclusive credit recovery Credits_Recycled_Shuttle, and / or, shuttle's shared credit recovery. 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, and the flow control exception notification message may include SH_ERRFC and / or ST_ERRFC.
[0303] In the flow control management method provided in the embodiment of the present application, 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 the shuttle flow control exception. The second device 120 sends a credit recovery message according to the flow control exception notification message. The first device 110 can update the credit recovery locally maintained by the first device 110 according to 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.
[0304] Fig.23 A structural schematic diagram of a flow control management device 2300 is shown. The flow control management device 2300 can be the sending device in the above-mentioned embodiments, or 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-mentioned embodiments.
[0305] 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 to send and receive signals, or to communicate 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 embodiments. 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 implements the methods and functions involved in any of the above-mentioned embodiments.
[0306] Exemplarily, the processing circuit 2301 may be used to perform, for example, Fig.15 Step S1501 in, and / or other processes for the technology described herein. The transceiver port 2302 can be used to perform, for example Fig.15 Steps S1502 and S1507 in the embodiment, and / or other processes for the technology described herein. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0307] 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-mentioned each functional unit.
[0308] Fig.24 A structural schematic diagram of a flow control management device 2400 is shown. The flow control management device 2400 can be the receiving device in the above-mentioned embodiments, or 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-mentioned embodiments.
[0309] 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 to send and receive signals, or to communicate 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 embodiments. 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 implements the methods and functions involved in any of the above-mentioned embodiments.
[0310] Exemplarily, the processing circuit 2401 may be used to perform, for example, Fig.15 Step S1505 in, and / or other processes for the technology described herein. The transceiver port 2402 can be used to perform, for example Fig.15 Steps S1503, S1504 and S1506 in the embodiment, and / or other processes for the technology described herein. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0311] 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-mentioned each functional unit.
[0312] like Fig.25 As shown, the embodiment of the present application further provides a chip module 2500, the chip module 2500 includes a chip 2510 and a packaging substrate 2520, the chip 2510 is fixed to the packaging substrate 2520, the chip 2510 includes Fig.23 The flow control management device 2300 shown, or, including Fig.24 The flow control management device 2400 shown is not limited to this embodiment of the present application.
[0313] like Fig.26 As shown, the embodiment of the present application further provides an electronic device 2600, the electronic device 2600 includes a processor 2610, and a flow control management device 2620 coupled to the processor 2610, the flow control management device 2620 can be as follows Fig.23 The flow control management device 2300 shown in FIG. 2 may also be a flow control management device 2300 as shown in FIG. Fig.24The flow control management device 2400 shown is not limited to this embodiment of the present application.
[0314] 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.
[0315] The embodiment of the present application also provides a communication system, which includes a first electronic device and a second electronic device communicating with the first electronic device, wherein the first electronic device and the second electronic device are as follows: Fig.26 The electronic device 2600 shown in the figure, wherein the first electronic device includes the flow control management device 2300, and the second electronic device includes the flow control management device 2400. Exemplarily, the communication system can be as follows Figure 1 In the communication system 100 shown, the first electronic device may be the second device 120 , and the second electronic device may be the first device 110 .
[0316] Based on this, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program code is stored. When the above processor executes the computer program code, the electronic device executes Fig.15 , Fig.19 , Fig. 20 or Fig.21 The steps performed by the second device 120 in the flow control management method shown.
[0317] The embodiment of the present application further provides a computer-readable storage medium in which a computer program code is stored. When the processor executes the computer program code, the electronic device executes Fig.15 , Fig.19 , Fig. 20 or Fig.21 Steps performed by the first device 110 in the flow control management method shown.
[0318] 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 Fig.15 , Fig.19 , Fig. 20 or Fig.21 The steps performed by the second device 120 in the flow control management method shown.
[0319] 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 Fig.15 , Fig.19 , Fig. 20 or Fig.21 Steps performed by the first device 110 in the flow control management method shown.
[0320] 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.
[0321] 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:
[0322] The UMI network adopts a distributed flow control management mechanism. The sender and receiver of the TLDP of each UMI physical link adopt 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.
[0323] Table 6
[0324]
[0325] Note: The same Shuttle at both ends of the link needs to be configured with the same flow control mechanism.
[0326] TLMDP uses an exclusive flow control mechanism.
[0327] The multicast shuttle can only use the flow control disabling mechanism.
[0328] The one-way shuttle can only use the flow control disabling mechanism.
[0329] Note: For an established Shuttle, the management adapter is not allowed to change the flow control mechanism.
[0330] The TLDP receiver and transmitter of each link independently manage the flow control of the link.
[0331] A Shuttle with flow control disabled does not track credits and does not send credit entries.
[0332] Cache space
[0333] The RBuff at the TLDP receiving end is the TLDP buffer space. The RBuff buffer space is divided into the "shared buffer" space, the "flow control disabled buffer" space, and the "exclusive buffer" space of each Shuttle.
[0334] Messages of the flow control disabled mechanism share the "flow control disabled cache" space, messages of the shared flow control mechanism share the "shared cache" space, and messages of the exclusive flow control mechanism exclusively use the "exclusive cache" space of each shuttle.
[0335] The cache space of RBuff is tracked by credit, and 1 credit represents 32 bytes. The number of credits occupied by a message is (number of message bytes / 32) rounded up. TLMP is not stored in RBuff and does not participate in flow control. The credit of the shuttle with flow control disabled mechanism is not tracked. The exclusive credit of the shuttle is tracked for the shuttle with exclusive flow control mechanism. The credit of the shuttle in the shared cache is tracked for the shuttle with shared flow control mechanism. The TLDP receiving end of each link tracks credit independently.
[0336] The management adapter configures "shared cache credit" (Credits_Allocated_Shared), "flow control disabled cache credit" (Credits_Allocated_Disabled), and "exclusive cache credit" (Credits_Allocated_Shuttle) of each shuttle except shuttleID 0 according to the total credit (Credits_Total) of the RBuff of the TLDP receiving end.
[0337] NOTE: Once Shuttle is established, the management adapter may change these cache credits as needed.
[0338] RBuff allocates at least 32 "exclusive cache credits" to ShttleID 0 and informs the management adapter.
[0339] The credits occupied by a shuttle with exclusive flow control mechanism in the cache cannot exceed the Credits_Allocated_Shuttle allocated to the shuttle. The credits occupied by all shuttles with shared flow control mechanism in the cache cannot exceed the allocated Credits_Allocated_Shared. The credits occupied by all shuttles with flow control disabled mechanism in the cache cannot exceed the allocated Credits_Allocated_Disabled.
[0340] 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.
[0341] Credit Allocation
[0342] The TLDP receiving end sends the exclusive cache allocation credit and shared cache allocation credit of each Shuttle to the TLDP sending end through TLCAP (see 1.1.4.2.1 for the TLCAP message format).
[0343] The TLDP sender receives TLCAP, performs ECC check on each entry, extracts the credit allocation information, and replies with TLCAP_ACK.
[0344] TLDP Receiver
[0345] 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 of the exclusive cache mechanism to the TLDP sending end through TLCAP.
[0346] After the TLDP receiver receives the TLCAP_ACK (see 1.1.4.2.2 for the TLCAP_ACK message format), it performs a CRC check on the payload area of the TLCAP_ACK. When a CRC check error occurs, all the Shuttle ACKs (ST_ACKs) carried by the TLCAP_ACK are discarded and counted to TLCAPACK_CRC_Error_Cnt. After the ST_ACK is discarded, it is treated as not received. The CRC check does not affect the shared buffer ACK (SH_ACK).
[0347] When any of the following conditions is met, the TLDP receiver sends exclusive buffer allocation credits to each shuttle that has an exclusive flow control mechanism:
[0348] Management adapter to establish Shuttle;
[0349] MANAGE_ADAPTER CHANGE "Credits_Allocated_Shuttle";
[0350] After sending the "exclusive cache credit" allocation entry through TLCAP, no TLCAP_ACK is received from the corresponding Shuttle within tTLCAP_ACK time.
[0351] The TLDP receiver sends a shared cache allocation credit when any of the following conditions are met:
[0352] The management adapter establishes the first shared flow control mechanism Shuttle;
[0353] MANAGE_ADDITCH ALTER 'Credits_Allocated_Shared';
[0354] After sending a "shared cache credit" allocation entry via TLCAP, no TLCAP_ACK for the shared cache credit is received within tTLCAP_ACK time.
[0355] Credit_Allocated_Shuttle and Credit_Allocated_Shared are carried in the Credits_Allocated field of the corresponding credit allocation entry.
[0356] TLDP sender
[0357] After receiving TLCAP, the TLDP transmitter performs ECC check on each TLCAP entry. Correct any single-bit ECC error and count it in TLCAP_ECC_Correct_Cnt. The entry after ECC error correction is treated as error-free. If an uncorrectable error is detected, the corresponding entry is discarded and counted in TLCAP_ECC_Uncorrect_Cnt. After the TLCAP entry is discarded, it is treated as not received.
[0358] The TLDP transmitter maintains the allocated credits (Tx_Credits_Allocated_Shuttle) of each shuttle that has an exclusive flow control mechanism as follows:
[0359] When the management adapter establishes the Shuttle, it is set to 0;
[0360] After receiving the TLCAP entry of each Shuttle, the Credit_Allocated field is extracted as the latest allocated credit of the Shuttle.
[0361] The TLDP transmitter maintains the allocated credits (Tx_Credits_Allocated_Shared) of the shared flow control mechanism as follows:
[0362] When the management adapter establishes the first shared flow control mechanism Shuttle, it is set to 0;
[0363] 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.
[0364] After the TLDP sender extracts the credit allocation information from the credit allocation entry, if the allocated credit is more than the locally maintained allocated credit, or if the allocated credit is equal to the locally maintained allocated credit, it directly replies with the Ack of the corresponding entry. Otherwise, it means that the cache is compressed and needs to wait until the cache is released to the newly allocated credit before replying with Ack.
[0365] Credit Tracking and Synchronization
[0366] The TLDP sender tracks the consumed credits (including exclusive flow control mechanisms and shared flow control mechanisms) and synchronizes them to the TLDP receiver through TLCCP (see 1.1.4.2.3 for the TLCCP format). The TLDP receiver tracks the recovered credits (including exclusive flow control mechanisms and shared flow control mechanisms) and synchronizes them to the TLDP sender through TLCRP (see 1.1.4.2.4 for the TLCRP format). When a flow control exception occurs at the TLDP sender, the flow control exception status is synchronized to the TLDP receiver through TLFCENP (see 1.1.4.2.5 for the TLFCENP format).
[0367] TLDP sender
[0368] The TLDP sender uses the following method to track the credits consumed by each shuttle of the exclusive flow control mechanism (Tx_Credits_Consumed_Shuttle):
[0369] When the management adapter establishes the Shuttle, it is set to 0;
[0370] After each TLDP that exclusively uses the 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.
[0371] The TLDP sender tracks the credits consumed by all shuttles in the shared flow control mechanism (Tx_Credits_Consumed_Shared) in the following way:
[0372] When the management adapter establishes the first shuttle of the shared flow control mechanism, it is set to 0;
[0373] After each 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.
[0374] When any of the following conditions is met, the TLDP sender sends all the credits consumed by the shuttles of the exclusive flow control mechanism and the credits consumed by the shared flow control mechanism to the TLDP receiver through TLCCP:
[0375] The main link in the TLDP sending direction recovers from abnormality to normal;
[0376] The auxiliary link in the TLDP sending direction times out while waiting for TLSAP.
[0377] Tx_Credits_Consumed_Shuttle and Tx_Credits_Consumed_Shared are carried in the Credits_Consumed field of the corresponding credit consumption entry.
[0378] 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 being separated by tTxTLCCPItv time.
[0379] NOTE: The Credits_Consumed field for each credit consumption entry is the most recent value tracked.
[0380] When the flow control time of the shuttle of the exclusive flow control mechanism exceeds tTxErrFC, the flow control of the shuttle is judged to be abnormal, and a TLCCP carrying the credit consumption entry of the shuttle is sent. When the flow control time of the shuttle of the shared flow control mechanism exceeds tTxErrFC, the shared flow control is judged to be abnormal, and a TLCCP carrying the credit consumption entry of the shared flow control mechanism is sent.
[0381] When a flow control exception occurs, the TLDP transmitter sends the flow control exception status to the TLDP receiver through a TLFCENP message.
[0382] When the TLDP transmitter sends the abnormal status to the TLDP receiver, the flow control time is restarted. If the flow control time reaches tTxErrFC, the flow control abnormality is judged again. If the flow control abnormality is judged for three consecutive times (the flow control has not been released during this period), a serious flow control abnormality error is reported to the management adapter.
[0383] TLDP Receiver
[0384] After receiving the TLCCP, the TLDP receiver performs ECC check on each credit consumption entry, corrects any single-bit ECC error, and counts it in TLCCP_ECC_Correct_Cnt. The entry after ECC error correction is processed as if there is no error. If an uncorrectable error is detected, the corresponding entry is discarded and counted in TLCCP_ECC_Uncorrect_Cnt. After the credit consumption entry is discarded, it is treated as not received in the future.
[0385] After receiving 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 by TLFCENP are discarded and counted to ErrFC_CRC_Error_Cnt. The CRC check does not affect the status indication (SH_ErrFC) of the shared flow control mechanism.
[0386] The TLDP receiver maintains the credits consumed by the TLDP received by each Shuttle that has an exclusive flow control mechanism (Rx_Credits_Consumed_Shuttle) in the following manner:
[0387] When the management adapter establishes the Shuttle, it is set to 0;
[0388] After receiving a TLDP 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) modulo 16384;
[0389] After each 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.
[0390] The TLDP receiver maintains the credits recycled by each shuttle in the exclusive flow control mechanism (Rx_Credits_Recycled_Shuttle) as follows:
[0391] When the management adapter establishes the Shuttle, it is set to 0;
[0392] After the TLDP of the exclusive flow control mechanism is output from the receiving buffer, the corresponding Shuttle increases 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.
[0393] Note: The packets output from RBuff may be discarded or continue to be transmitted.
[0394] 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 the credit consumption entry - Rx_Credits_Consumed_Shuttle) modulo 16384.
[0395] The TLDP receiver maintains the TLDP consumed credits (Rx_Credits_Consumed_Shared) of the receive shared flow control mechanism as follows:
[0396] When the management adapter establishes the first shuttle of the shared flow control mechanism, it is set to 0;
[0397] After receiving each 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;
[0398] After each credit consumption entry of the shared flow control mechanism is received, Rx_Credits_Consumed_Shared is refreshed: Rx_Credits_Consumed_Shared = Credits_Consumed field in the credit consumption entry.
[0399] The TLDP receiver maintains the recycled credits (Rx_Credits_Recycled_Shared) of the shared flow control mechanism as follows:
[0400] When the management adapter establishes the first shuttle of the shared flow control mechanism, it is set to 0;
[0401] After the TLDP of the shared flow control mechanism is output from the receiving 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.
[0402] Note: The packets output from RBuff may be discarded or continue to be transmitted.
[0403] 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.
[0404] The TLDP receiver sends the recovered credits to the TLDP sender via TLCRP as follows:
[0405] When Rx_Credits_Recycled_Shuttle of the Shuttle with exclusive flow control mechanism changes, the recycled credits of the corresponding Shuttle are sent; for the message with exclusive flow control mechanism, if the recycled credits cannot be sent immediately after the message is output from RBuff, additional buffer compensation delay needs to be reserved.
[0406] 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.
[0407] 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;
[0408] 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 TLFCENP, the recovery credits of the shuttles with valid abnormal status indications are sent.
[0409] When any of the following conditions is met, the TLDP receiver sends the recycled credits of all Shuttles of the exclusive flow control mechanism and the recycled credits of the shared flow control mechanism to the TLDP sender:
[0410] The primary link in the TLCRP sending direction recovers from abnormality to normal;
[0411] The secondary link in the TLCRP sending direction timed out waiting for TLSAP.
[0412] Rx_Credits_Recycled_Shuttle and Rx_Credits_Recycled_Shared are carried in the Credits_Recycled field of the corresponding credit recovery entry.
[0413] TLDP sending rules
[0414] After receiving TLCRP, the TLDP sender performs ECC check on each credit recovery entry, corrects any single-bit ECC error, and counts it in TLCRP_ECC_Correct_Cnt. The entry after ECC error correction is processed as if there is no error. If an uncorrectable error is detected, the corresponding entry is discarded and counted in TLCRP_ECC_Uncorrect_Cnt. After the credit recovery entry is discarded, it is subsequently treated as not received.
[0415] TLDP extracts the recycled credit information from each credit recycling entry and maintains the recycled credits (Tx_Credits_Recycled_Shuttle) of each Shuttle that has an exclusive flow control mechanism according to the following rules:
[0416] When the management adapter establishes the Shuttle, it is set to 0;
[0417] After receiving the TLCRP entry of each Shuttle, extract the Credit_Recycled field as the latest recycled credit of the Shuttle.
[0418] TLDP extracts recycled credit information from each credit recycling entry and maintains the recycled credits (Tx_Credits_Recycled_Shared) of the shared flow control mechanism according to the following rules:
[0419] When the management adapter establishes the first shared flow control mechanism Shuttle, it is set to 0;
[0420] After receiving the TLCRP entry of the shared flow control mechanism, the Credit_Recycled field is extracted as the latest recycled credit.
[0421] The TLDP sending end generates the TLDP sending conditions shown in Table 7 according to the recovered credits, consumed credits and allocated credits.
[0422] Table 7
[0423]
[0424]
[0425] Suppose the TLDP sender cannot send TLDP due to insufficient credit. Then, when the received credit allocation entry meets the message sending condition, if there are no other messages or control frames to be sent, the TLDP sender needs to send the TLDP within the tTLCRPtoTLDP time.
[0426] As described above, it is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claimed rights.
Claims
1. A flow control management method, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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" represents the credit allocation of the shuttle, "tRound" is the flow control loop delay, "ExpBW" is the expected bandwidth, "TLDP average message length" is the average message length, and "A", "B" and "C" are preset values.
13. The method according to claim 11 or 12, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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 a response message, wherein the credit consumption message includes a credit consumption field, and the credit consumption field is used to indicate the credit consumption of the shuttle.
27. The device according to claim 25 or 26, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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, It is 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
Cited By
Data caching method and device, electronic equipment, storage medium and program product
CN121116613A