Request processing method, device and communication equipment

By introducing a tag cooling pool in the communication device, the tag reuse problem caused by transaction request timeout is solved, and the reliability of the communication link is improved.

CN119766787APending Publication Date: 2025-04-04T HEAD (CHENGDU) SEMICONDUCTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411833279.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In communication equipment, due to abnormal situations such as communication link failure, equipment failure or traffic congestion, the transaction request may time out and not respond, resulting in reuse of the tag, and the transaction response cannot be accurately identified, which may cause system abnormality.

Method used

A tag cooling pool is introduced to store the tags corresponding to the timeout transaction request. After the response timeout, the tags are placed in the cooling pool for cooling, and the cooling time reaches a predetermined time limit before being released into the original tag pool.

Benefits of technology

Through the use of the tag cooling pool, transaction confusion and system exceptions caused by tag reuse are avoided, and the reliability of the communication link is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766787A_ABST
    Figure CN119766787A_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a request processing method, apparatus and communication equipment, wherein the communication equipment maintains an original label pool and a cooling label pool. The embodiment of the present invention obtains a first label from the original label pool, generates and sends a first transaction request carrying the first label of the target transaction to be processed, and in response to not receiving a request response corresponding to the first transaction request within a first predetermined time period, puts the first label into the cooling label pool for cooling, and in response to the cooling time of the first label reaching a second predetermined time period, releases the first label to the original label pool. Therefore, the embodiment of the present invention sets a label cooling pool so that the used label can be released to the original label pool for resumption of use after a sufficient cooling time in the event of a response timeout, thereby avoiding transaction confusion or even system abnormality caused by repeated use of labels in the communication link, and ensuring the reliability of the communication link.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of semiconductor technology, and more specifically, to a request processing method, device and communication equipment. Background Art

[0002] In communication devices that use corresponding communication protocols (such as PCIe protocols), a tag pool is usually maintained. The tags in the tag pool are used to uniquely identify each transaction request. When a communication device needs to initiate a transaction request, it selects an unused tag from the tag pool and adds it to the transaction request before sending it. When the transaction request is completed and the corresponding completion message (Completion, CPL or CPLD) is received, the corresponding tag is released to the tag pool for use by subsequent transaction requests.

[0003] In some cases, due to possible abnormal situations such as communication link failure, equipment failure, traffic congestion, etc., the transaction request issued by the device may time out and not respond. Normally, when the communication device still does not receive a response to a transaction request after a predetermined time, the label corresponding to the transaction request is directly released to the label pool. Afterwards, if the transaction request returns a corresponding response after a predetermined time, and the new transaction request selects the same label, then there are two transaction requests in the communication link using the same label, which means that the label is reused and the real transaction response cannot be accurately identified, which may also cause system abnormalities. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a request processing method, apparatus and communication equipment, which sets a label cooling pool so that the used labels can be cooled for a sufficient time in the event of a response timeout before being released to the original label pool for resumption of use, thereby avoiding transaction confusion and even system abnormalities caused by repeated use of labels in the communication link, and ensuring the reliability of the communication link.

[0005] In a first aspect, an embodiment of the present invention provides a request processing method, which is applied to a communication device, wherein the communication device maintains an original label pool and a cooling label pool, and the method includes:

[0006] Acquire a first label from the original label pool;

[0007] Generate and send a first transaction request for a target transaction to be processed, where the first transaction request carries the first tag;

[0008] In response to not receiving a request response corresponding to the first transaction request within a first predetermined time period, placing the first tag into the cooling tag pool for cooling;

[0009] In response to the cooling time of the first tag reaching a second predetermined time period, the first tag is released to the original tag pool.

[0010] Furthermore, the second predetermined time period is greater than the first predetermined time period.

[0011] Furthermore, the method further comprises:

[0012] In response to not receiving a request response corresponding to the first transaction request within the first predetermined time period, marking the first tag as an invalid tag;

[0013] In response to the first tag being released to the original tag pool, the validity of the first tag is restored.

[0014] Furthermore, the method further comprises:

[0015] receiving a transaction request response, wherein the transaction request response includes a corresponding tag;

[0016] Determining whether the tag of the transaction request response is a valid tag to perform validity verification on the transaction request response;

[0017] In response to the tag of the transaction request response being an invalid tag, the transaction request response is discarded.

[0018] Furthermore, the method further comprises:

[0019] In response to the tag of the transaction request response being a valid tag, releasing the tag of the transaction request response to the original tag pool.

[0020] Furthermore, the method further comprises:

[0021] In response to not receiving a request response corresponding to the first transaction request within a first predetermined time period, acquiring a second tag from the original tag pool;

[0022] A second transaction request of the target transaction is generated and sent, where the second transaction request carries the second tag.

[0023] Furthermore, the communication device communicates using the PCIe protocol.

[0024] In a second aspect, an embodiment of the present invention provides a communication device, wherein the communication device maintains an original label pool and a cooling label pool, and the communication device is used to execute the request processing method as described above.

[0025] In a third aspect, an embodiment of the present invention provides a request processing device, which is applied to a communication device, wherein the communication device maintains an original label pool and a cooling label pool, and the device includes:

[0026] A label acquisition unit, configured to acquire a first label from the original label pool;

[0027] a request processing unit, configured to generate and send a first transaction request for a target transaction to be processed, wherein the first transaction request carries the first tag;

[0028] a cooling unit, configured to, in response to not receiving a request response corresponding to the first transaction request within a first predetermined time period, place the first tag into the cooling tag pool for cooling;

[0029] A releasing unit is configured to release the first tag to the original tag pool in response to the cooling time of the first tag reaching a second predetermined time period.

[0030] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0031] The communication device of the embodiment of the present invention maintains an original label pool and a cooling label pool, which obtains a first label from the original label pool, generates and sends a first transaction request carrying the first label of the target transaction to be processed, and in response to not receiving a request response corresponding to the first transaction request within a first predetermined time period, puts the first label into the cooling label pool for cooling, and in response to the cooling time of the first label reaching a second predetermined time period, releases the first label to the original label pool. Therefore, the embodiment of the present invention sets a label cooling pool so that the used label can be released to the original label pool for resumption of use after a sufficient cooling time in the event of a response timeout, thereby avoiding transaction confusion or even system abnormality caused by repeated use of labels in the communication link, and ensuring the reliability of the communication link. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0033] Figure 1 is a schematic diagram of a request processing process of the prior art;

[0034] Figure 2 is a flow chart of a request processing method according to an embodiment of the present invention;

[0035] Figure 3 is a flow chart of a label marking adjustment method according to an embodiment of the present invention;

[0036] Figure 4 is a flow chart of a request response validity verification method according to an embodiment of the present invention;

[0037] Figure 5 is a flowchart of a request retry method according to an embodiment of the present invention;

[0038] Figure 6 is a flowchart of another request processing method according to an embodiment of the present invention;

[0039] Figure 7 is a schematic diagram of a request processing process of an embodiment of the present invention;

[0040] Figure 8 is a schematic diagram of a request processing device according to an embodiment of the present invention;

[0041] Fig. 9 is a schematic diagram of a communication device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0042] The present application is described below based on embodiments, but the present application is not limited to these embodiments. In the detailed description of the present application below, some specific details are described in detail. It is possible for those skilled in the art to fully understand the present application without the description of these details. In order to avoid confusing the essence of the present application, known methods, processes, flows, components and circuits are not described in detail.

[0043] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.

[0044] Unless the context clearly requires otherwise, the words "include", "comprising" and similar words throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, the meaning is "including but not limited to".

[0045] In the description of this application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" is two or more.

[0046] The solutions described in this specification and in the examples, if they involve the processing of personal information, will be processed on the premise of having a legal basis (such as obtaining the consent of the subject of personal information, or being necessary for the performance of a contract, etc.), and will only be processed within the scope of regulations or agreements. If a user refuses to process personal information other than the necessary information for basic functions, it will not affect the user's use of basic functions.

[0047] In some communication protocols, the communication devices in the communication device link maintain a tag pool. When the communication link endpoint (Endpoint, EP) needs to process the corresponding transaction, a transaction request is initiated, and each transaction request carries a unique identifier (Tag). Taking the PCIe (PCI Express) protocol as an example, when the communication link endpoint initiates a transaction request with a specific tag (such as MEM-RD, memory read request, etc.), it is expected to receive the corresponding completion message (Completion, CPL or CPLD) within a certain time. If the response to the corresponding transaction request is not received after the predetermined time limit, it is considered that a response timeout has occurred. For such situations, in the prior art, in order to avoid these timed-out transaction requests occupying the tag, the tag corresponding to the transaction request will be directly released to the tag pool. Afterwards, if the transaction request returns the corresponding response after exceeding the predetermined time, and the new transaction request selects the same tag, then there are two transaction requests in the communication link using the same tag, which causes the tag to be reused, and the real transaction response cannot be accurately identified, and may cause system abnormalities.

[0048] Figure 1 The following is a schematic diagram of a request processing process in the prior art. Figure 1 As shown, if the communication device (such as the endpoint EP in the above communication link) needs to process transaction A at time t1, it selects tag Tag1 from the tag pool p1 it maintains to generate transaction request req1, and sends transaction request req1 for processing. After a certain time T1 (that is, at time t2), if no response to transaction request req1 (that is, a response including tag Tag1) is received, it is considered that the response has timed out, and tag Tag1 is released to the tag pool p1 for subsequent transaction requests. Afterwards, the communication device needs to process transaction B at time t3, and still selects tag Tag1 from the tag pool p1 it maintains to generate transaction request req2, and sends transaction request req2 for processing. After the communication device sends transaction request req2, the transaction request req1 that times out at time t4 returns a corresponding response. At this time, there are responses to transaction request req1 and transaction request req2 containing the same tag Tag1 in the communication link, which creates a conflict, causing transaction A to pollute transaction B (that is, the response to transaction B may not be accurately identified), which may cause system abnormalities in severe cases.

[0049] Therefore, the embodiments of the present invention provide a request processing method, apparatus and communication equipment, which can set a label cooling pool so that the used labels can be cooled for a sufficient time before being released to the original label pool for resumption of use in the event of a response timeout, thereby avoiding transaction confusion or even system abnormalities caused by repeated use of labels in the communication link, and ensuring the reliability of the communication link.

[0050] Figure 2 : is a flowchart of a request processing method of an embodiment of the present invention. The request processing method of the embodiment of the present invention is applied to a communication device in a communication link. Among them, the communication device can be a device that uses a corresponding communication protocol and needs to maintain a corresponding label pool. This embodiment is mainly described by taking the PCIe protocol as an example. It should be understood that the request processing method of the embodiment of the present invention can also be used in communication links of other communication protocols that need to maintain a label pool, and examples are not given one by one here. Further, the communication device of this embodiment can be an endpoint device (EP), a root complex (RC), a switch, or a bridge. Among them, the endpoint device can be a network card, a storage controller, a GPU, an FPGA, or an I / O device. The root complex is a core component in the PCIe architecture and is usually located in the host system. The switch is used to expand the PCIe topology and connect multiple endpoint devices or root complexes. The bridge is used to connect different types of buses or different versions of PCIe links. It should be understood that this embodiment does not limit the communication equipment used in the communication link of the corresponding protocol. If it is necessary to maintain a label pool to ensure the sending and processing of transaction requests, the request processing method of the embodiment of the present invention can be adopted, and examples will not be given one by one here.

[0051] Furthermore, the communication device in the embodiment of the present invention maintains an original label pool and a cooling label pool. The labels in the original label pool are available labels, and the labels in the cooling label pool are temporarily unavailable labels waiting to be cooled. Figure 2 As shown, the request processing method of the embodiment of the present invention includes the following steps:

[0052] Step S110, obtaining a first tag from an original tag pool. When transaction processing is required, obtaining an available first tag from an original tag pool.

[0053] In an optional implementation, the present embodiment may randomly select a label from the original label pool as the first label. In another optional implementation, the original label pool of the present embodiment may adopt a first-in-first-out queue, so that the present embodiment may select the label released first in the original label pool as the first label. It should be understood that the present embodiment does not limit the selection method of the first label, and it may also adopt other available existing object selection methods or object selection methods that will appear in the future development process, which will not be illustrated one by one here.

[0054] Step S120, generating and sending a first transaction request of a target transaction to be processed. The first transaction request carries a first tag. Optionally, the transaction to be processed in this embodiment may be a read, write, delete, or other data operation transaction, and the transaction type is not limited here.

[0055] Taking a memory read request (MEM-RD REQ) as an example, this embodiment generates a corresponding first transaction request for reading memory data based on the first tag, and sends it to the corresponding memory to read the corresponding data. The first transaction request also includes information such as a memory address to enable reading of the corresponding data.

[0056] Step S130, in response to not receiving a request response corresponding to the first transaction request within the first predetermined time period, the first tag is placed in a cooling tag pool for cooling. The first predetermined time period is a time period used to determine whether the transaction request has timed out, that is, if a request response corresponding to the corresponding transaction request is received within the first predetermined time period, then the response has not timed out; if a request response corresponding to the corresponding transaction request is not received within the first predetermined time period, then the response has timed out. Further, in this embodiment, in response to receiving a request response corresponding to the first transaction request within the first predetermined time period, the processing result of the target transaction corresponding to the transaction request is fed back, and the first tag corresponding to the first transaction request is released to the original tag pool for use by subsequent transaction requests.

[0057] Usually, transaction requests need to be responded to within a certain period of time. If there are link failures, equipment failures, traffic congestion, etc. in the communication system, the response may time out. Therefore, it is necessary to set a predetermined time for judging response timeout in the communication system to ensure the reliability of transaction requests and the stability of the communication system.

[0058] A standard timeout period is configured in some communication protocols. This embodiment may adopt the timeout period configured in the communication protocol as the first predetermined period, or may determine the timeout period based on the timeout period configured in the communication protocol and the specific application scenario and characteristics of the communication device. For example, a performance test is performed on a specific communication system based on the timeout period configured in the communication protocol, so as to adjust the timeout period based on system performance such as the average response time and maximum response time under different load conditions, thereby determining the first predetermined period.

[0059] Furthermore, the present embodiment may also determine the first predetermined duration according to the specific conditions of the communication system such as the delay duration of the communication link, the processing capacity of the communication device, and / or the system load. Among them, the longer the communication link, the longer the signal transmission time, so it is necessary to set a reasonable first predetermined duration to ensure that the communication system does not frequently time out during long-term operation. Due to the different processing capabilities of different communication devices, high-performance devices can process and complete transaction requests in a shorter time, and low-performance devices require a longer time to process transaction requests, so the first predetermined duration corresponding to the communication device can be determined according to the processing capacity and maximum response time of the corresponding communication device. In addition, when the communication system is highly loaded, the transaction processing time in the communication system may increase, so the present embodiment may also refer to the influence of the system load to set the first predetermined duration. It should be understood that the present embodiment does not limit the determination method of the first predetermined duration, and it can also be determined by any existing or future method newly added in the process of technological development.

[0060] Furthermore, this embodiment can also perform periodic performance tests on the communication system and the communication devices in the communication system to dynamically adjust the first predetermined duration based on performance parameters such as the average response duration or the maximum response duration of the communication system under different loads, thereby ensuring the stability of the communication system. Further optionally, based on the processing capabilities of different communication devices and other specific features, the first predetermined durations corresponding to different communication devices can be the same or different.

[0061] In this embodiment, if the request response corresponding to the first transaction request is not received within the first predetermined time period, that is, the response of the first transaction request times out, the first tag in the first transaction request needs to be released. Further, in order to avoid the situation where the response is not received in time due to continuous communication delays or excessive system load, but the response can be returned after the first predetermined time period, resulting in the reuse of the tag, this embodiment first puts the first tag corresponding to the timed-out response into the cooling tag pool for cooling. At this time, although the first tag is released, it cannot be used, thereby avoiding the problem of transaction confusion or even system abnormality caused by the reuse of tags in the communication link, and ensuring the reliability of the communication link.

[0062] Step S140: in response to the cooling time of the first tag reaching the second predetermined time period, releasing the first tag to the original tag pool.

[0063] In this embodiment, the cooling time threshold of the tags in the cooling tag pool is the second predetermined time. Optionally, the second predetermined time is a custom timeout time, which can be determined according to the specific performance of the communication system. Further, in this embodiment, the second predetermined time is greater than the first predetermined time, for example, the second predetermined time is N (N>1) times the first predetermined time. Since the second predetermined time is long enough, if a transaction request still does not feedback the corresponding request response after issuing (the first predetermined time + the second predetermined time), it is considered impossible to receive the response corresponding to the transaction request. Therefore, in this embodiment, after the cooling time of the first tag reaches the second predetermined time, the first tag is released from the tag cooling pool to the original tag pool for subsequent transaction requests. At this time, since there will be no request response for the same tag, the problem of transaction confusion or even system abnormality caused by the repeated use of tags in the communication link is avoided, thereby ensuring the reliability of the communication link.

[0064] Since it is possible to receive a request response to the transaction request after the response to the transaction request times out, but the request response at this time is invalid, the present embodiment needs to perform validity check on the received request response to determine whether the request response is returned within the corresponding first predetermined time (i.e., the timeout time) or after the corresponding first predetermined time. Furthermore, the present embodiment determines the validity of the request response according to the validity of the tag in the received request response by marking the validity of the tag.

[0065] Figure 3 FIG. 1 is a flow chart of a label marking adjustment method according to an embodiment of the present invention. Figure 3 As shown, the label marking adjustment method of this embodiment includes the following steps:

[0066] Step S210: In response to not receiving a request response corresponding to the first transaction request within a first predetermined time period, marking the first tag as an invalid tag.

[0067] Step S220: in response to the first tag being released to the original tag pool, the validity of the first tag is restored, that is, the first tag is restored to a valid tag.

[0068] That is to say, if the response to the first transaction request times out, the first tag corresponding to the first transaction request is placed in the cooling tag pool for cooling, and the first tag is marked as an invalid tag. Thus, even if a request response containing the first tag is received when the cooling time of the first tag does not reach the threshold, the request response will be judged invalid and discarded to avoid affecting transaction processing. Furthermore, after the cooling time of the first tag reaches the second predetermined duration, the first tag is released from the cooling tag pool to the original tag pool. At this time, the first tag is in an available state. Therefore, the validity of the first tag is restored at this time for use by subsequent transaction requests.

[0069] Figure 4 is a flow chart of a request response validity verification method according to an embodiment of the present invention. Figure 4 As shown, the request response validity verification method of this embodiment includes the following steps:

[0070] Step S310: receiving a transaction request response, wherein the transaction request response includes a corresponding tag.

[0071] Step S320, determine whether the tag of the transaction request response is a valid tag to perform validity check on the transaction request response. If the tag of the transaction request response is a valid tag, execute step S330; if the tag of the transaction request response is an invalid tag, execute step S340.

[0072] Step S330: In response to the tag of the transaction request response being a valid tag, the tag of the transaction request response is released to the original tag pool. At the same time, in response to the tag of the transaction request response being a valid tag, the transaction request response is received. For example, if the transaction corresponding to the transaction request response is a read data transaction, the data in the transaction request response is received.

[0073] Step S340: In response to the tag of the transaction request response being an invalid tag, the transaction request response is discarded.

[0074] The embodiment of the present invention can mark the corresponding label as an invalid label when the response times out, and restore the label to a valid label when the label is released from the cooling label pool to the original label pool. Therefore, the present embodiment can determine the validity of the corresponding transaction request response by verifying the validity of the label in the transaction request response, and discard the invalid transaction request response, further avoiding the impact of the invalid response received after the first predetermined period of time on the communication system, and improving the reliability and performance of the communication system.

[0075] Figure 5 is a flow chart of a request retry method according to an embodiment of the present invention. Further, for a first transaction request with a timeout response, this embodiment may also use a retry mechanism to reprocess the corresponding target transaction. Figure 5 As shown, the request retry method of this embodiment includes the following steps:

[0076] Step S410: In response to not receiving a request response corresponding to the first transaction request within a first predetermined time period, obtaining a second tag from the original tag pool.

[0077] Step S420: Generate and send a second transaction request corresponding to the target transaction, wherein the second transaction request carries a second tag.

[0078] In this embodiment, after the response to the first transaction request corresponding to the target transaction times out, the target transaction is retried, that is, an available second tag is reselected from the original tag pool to generate a new transaction request for the target transaction, and the transaction request is sent for transaction processing.

[0079] Furthermore, this embodiment can also set a retry threshold. In response to the retry count of a target transaction reaching the retry threshold, a message indicating that the target transaction processing failed is fed back to avoid the target transaction being retried continuously, causing a burden on the communication system and failing to timely feedback the transaction processing results.

[0080] In an optional implementation, if the communication device currently needs to process a transaction but the original tag pool is empty, it waits for a valid transaction response to release the corresponding tag to the original tag pool, or after the tag in the cooling tag pool is released to the original tag pool, selects an available tag to generate a corresponding transaction request.

[0081] Further optionally, if the cooling time of the tag in the cooling tag pool does not reach the second predetermined duration, but a request response corresponding to the tag is received, after the request response is discarded, the tag can be released to the original tag pool in advance for use in subsequent transaction requests.

[0082] In other optional implementations, if the communication device currently needs to process a transaction, but the original tag pool is empty, it can query whether there is a tag in the cooling tag pool whose request response has been returned and discarded. If a tag whose request response has been returned and discarded is queried in the cooling tag pool, the tag can be restored to a valid state, and a transaction request for the pending transaction is generated based on the tag. Alternatively, if a tag whose request response has been returned and discarded is queried in the cooling tag pool, the tag is released to the original tag pool in advance, and the tag is restored to a valid state, and the tag is selected from the original tag pool to generate a transaction request corresponding to the pending transaction.

[0083] Therefore, this embodiment can restore the labels whose request responses have been returned and discarded in the cooling label pool to a usable state in advance, so as to ensure that the labels will not be reused and avoid the situation where the labels are occupied for a long time and become missing.

[0084] The embodiment of the present invention obtains the first tag from the original tag pool, generates and sends the first transaction request carrying the first tag of the target transaction to be processed, puts the first tag into the cooling tag pool for cooling in response to not receiving the request response corresponding to the first transaction request within the first predetermined time, and releases the first tag to the original tag pool in response to the cooling time of the first tag reaching the second predetermined time. Therefore, the embodiment of the present invention sets a tag cooling pool so that the used tag can be released to the original tag pool for recovery after cooling for a sufficient time in the case of a response timeout, thereby avoiding the problem of transaction confusion or even system abnormality caused by repeated use of tags in the communication link, and ensuring the reliability of the communication link.

[0085] Figure 6 FIG. 1 is a flowchart of another request processing method according to an embodiment of the present invention. Figure 6 As shown, the request processing method of the embodiment of the present invention includes the following steps:

[0086] Step S510, determine the target transaction. That is, the communication device determines the target transaction to be processed according to the corresponding requirements. Optionally, the target transaction to be processed in this embodiment can be a read, write, delete transaction, or other data operation transaction, and the transaction type is not limited here.

[0087] Step S520, obtain the first tag from the original tag pool. After determining the target transaction, obtain the available first tag from the original tag pool to uniquely identify the first transaction request corresponding to the target transaction. Optionally, this embodiment can randomly select a tag from the original tag pool as the first tag, or select the first released tag in the original tag pool as the first tag. This embodiment does not limit the selection method of the first tag.

[0088] Step S530: Generate and send a first transaction request of the target transaction to be processed, wherein the first transaction request carries the first tag.

[0089] Step S540, determining whether a request response corresponding to the first transaction request is received within the first predetermined time period. If a request response corresponding to the first transaction request is received within the first predetermined time period, executing step S550; if a request response corresponding to the first transaction request is not received within the first predetermined time period, executing steps S560-S570.

[0090] It should be understood that there may be multiple target transactions that the communication device needs to process within the same time period. Therefore, within the first predetermined time period after it issues the first transaction request, it may receive a request response corresponding to the first transaction request, and may also receive request responses corresponding to other transaction requests. After receiving the request response to the transaction, this embodiment can determine whether it is the first tag based on the tag in the request response to determine whether it is the request response corresponding to the first transaction request, thereby determining whether the request response to the first transaction is received within the first predetermined time period after the first transaction request is issued. If the request response received by the communication device within the first predetermined time period after the first transaction request is issued is not the request response corresponding to the first transaction request, the validity of the response can be judged based on the validity of the tag carried therein, so as to receive the request response if it is valid and discard the request response if it is invalid. For details, please refer to Figure 4 The illustrated embodiment will not be described in detail here.

[0091] Step 550, in response to receiving a request response corresponding to the first transaction request within the first predetermined time period, if the response has not timed out, release the first tag to the original tag pool for use by subsequent transaction requests, and feed back the processing result of the target transaction corresponding to the transaction request.

[0092] Step 560: In response to not receiving a request response corresponding to the first transaction request within the first predetermined time period, the first tag is placed in a cooling tag pool for cooling, and the first tag is marked as an invalid tag, so as to perform validity verification on the request response carrying the first tag returned when in the cooling state. For example, if a request response is received after the first transaction request is issued for a first predetermined time period, and the tag carried by the request response is the first tag, since the current first tag is not marked as an invalid tag, the request response is determined to be an invalid response and is discarded. Thus, this embodiment can avoid the impact of the request response of the transaction request with a timeout response on the communication system.

[0093] Step S570 , in response to the cooling time of the first tag reaching the second predetermined time period, releasing the first tag to the original tag pool, and restoring the first tag to a valid tag for use in subsequent transaction requests.

[0094] In this embodiment, the cooling time threshold of the tags in the cooling tag pool is the second predetermined time. Optionally, the second predetermined time is a custom timeout time, which can be determined according to the specific performance of the communication system. Further, in this embodiment, the second predetermined time is greater than the first predetermined time, for example, the second predetermined time is N (N>1) times the first predetermined time. Since the second predetermined time is long enough, if a transaction request still does not feedback the corresponding request response after issuing (the first predetermined time + the second predetermined time), it is considered impossible to receive the response corresponding to the transaction request. Therefore, in this embodiment, after the cooling time of the first tag reaches the second predetermined time, the first tag is released from the tag cooling pool to the original tag pool for subsequent transaction requests. At this time, since there will be no request response for the same tag, the problem of transaction confusion or even system abnormality caused by the repeated use of tags in the communication link is avoided, thereby ensuring the reliability of the communication link.

[0095] Furthermore, after the response to the first transaction request corresponding to the target transaction times out, this embodiment can retry the target transaction, that is, reselect an available second tag from the original tag pool to generate a new transaction request for the target transaction, and send the transaction request for transaction processing. Further optionally, this embodiment can also set a retry count threshold. In response to the number of retries of a certain target transaction reaching the retry count threshold, a message of the target transaction processing failure is fed back to avoid the target transaction being retried continuously, causing a burden on the communication system and failing to timely feedback the transaction processing results.

[0096] The embodiment of the present invention obtains the first tag from the original tag pool, generates and sends the first transaction request carrying the first tag of the target transaction to be processed, puts the first tag into the cooling tag pool for cooling in response to not receiving the request response corresponding to the first transaction request within the first predetermined time, and releases the first tag to the original tag pool in response to the cooling time of the first tag reaching the second predetermined time. Therefore, the embodiment of the present invention sets a tag cooling pool so that the used tag can be released to the original tag pool for recovery after cooling for a sufficient time in the case of a response timeout, thereby avoiding the problem of transaction confusion or even system abnormality caused by repeated use of tags in the communication link, and ensuring the reliability of the communication link.

[0097] Figure 7 FIG. 1 is a schematic diagram of a request processing process according to an embodiment of the present invention. Figure 7As shown, if the communication device (such as the endpoint EP in the above communication link) needs to process transaction A at time t1', it selects tag Tag1 from the original tag pool p1 maintained by it to generate transaction request req1, and sends transaction request req1 for processing. After the first predetermined time length T1 (that is, at time t2'), the response to the transaction request req1 (that is, the response including tag Tag1) is still not received, and the response is considered to have timed out, and tag Tag1 is placed in the cooling tag pool p2 maintained by the communication device, and tag Tag1 is marked as an invalid tag. Afterwards, the communication device needs to process transaction B at time t3', selects tag Tag2 from the tag pool p1 maintained by it to generate transaction request req2, and sends transaction request req2 for processing. After the communication device sends transaction request req2, the transaction request req1 that times out at time t4' returns the corresponding response. Since the tag Tag1 carried in the response is in an invalid state, the response is determined to be an invalid response and is discarded. Therefore, in this embodiment, since the tag Tag1 is still in the cooling tag pool for cooling at time t3', even if the communication device needs to process transaction B, it will not select tag Tag1 to generate the corresponding transaction request. This means that even if the transaction request req1 returns a timeout response, it will not cause the problem of tag reuse. At the same time, the tag in the cooling state is marked invalid to verify the validity of the returned request response, avoiding the impact of the timeout returned response on the communication system. Further, after the transaction request req1 times out for the second predetermined period T2 (that is, after the transaction request req1 is initiated T1+T2), that is, at time t5', the cooling time of tag Tag1 ends, and tag Tag1 is released from the cooling tag pool p2 to the original tag pool p1 for use by subsequent transaction requests.

[0098] Optionally, in the present embodiment, the second predetermined time length is a custom timeout time length, which can be determined according to the specific performance of the communication system. Further, in the present embodiment, the second predetermined time length is greater than the first predetermined time length, for example, the second predetermined time length is N (N>1) times the first predetermined time length. Since the second predetermined time length is long enough, if a transaction request still does not feedback the corresponding request response after issuing (the first predetermined time length + the second predetermined time length), it is considered impossible to receive the response corresponding to the transaction request. Therefore, in the present embodiment, after the cooling time of the first tag reaches the second predetermined time length, the first tag is released from the tag cooling pool to the original tag pool for use by subsequent transaction requests. At this time, since there will be no more request responses for the same tag, the problem of transaction confusion or even system abnormality caused by the repeated use of tags in the communication link is avoided, thereby ensuring the reliability of the communication link.

[0099] The embodiment of the present invention obtains the first tag from the original tag pool, generates and sends the first transaction request carrying the first tag of the target transaction to be processed, puts the first tag into the cooling tag pool for cooling in response to not receiving the request response corresponding to the first transaction request within the first predetermined time, and releases the first tag to the original tag pool in response to the cooling time of the first tag reaching the second predetermined time. Therefore, the embodiment of the present invention sets a tag cooling pool so that the used tag can be released to the original tag pool for recovery after cooling for a sufficient time in the case of a response timeout, thereby avoiding the problem of transaction confusion or even system abnormality caused by repeated use of tags in the communication link, and ensuring the reliability of the communication link.

[0100] Figure 8 Schematic diagram of a request processing device according to an embodiment of the present invention. The request processing device according to the embodiment of the present invention is applied to a communication device using a predetermined communication protocol (such as PCIe, etc.). The communication device maintains an original label pool and a cooling label pool. Figure 8 As shown, the request processing device 8 of the embodiment of the present invention includes a label acquisition unit 81, a request processing unit 82, a cooling unit 83 and a releasing unit 84.

[0101] The tag acquisition unit 81 is configured to acquire a first tag from the original tag pool. The request processing unit 82 is configured to generate and send a first transaction request for a target transaction to be processed, and the first transaction request carries the first tag. The cooling unit 83 is configured to put the first tag into the cooling tag pool for cooling in response to not receiving a request response corresponding to the first transaction request within a first predetermined time. The release unit 84 is configured to release the first tag to the original tag pool in response to the cooling time of the first tag reaching a second predetermined time.

[0102] In an optional implementation, the second predetermined time period is greater than the first predetermined time period.

[0103] In an optional implementation, the request processing device 8 also includes a label marking unit, which is configured to perform: in response to not receiving a request response corresponding to the first transaction request within the first predetermined time period, marking the first label as an invalid label; in response to the first label being released to the original label pool, restoring the validity of the first label.

[0104] In an optional implementation, the request processing device 8 also includes a validity verification unit, which is configured to execute: receiving a transaction request response, the transaction request response including a corresponding tag, determining whether the tag of the transaction request response is a valid tag, performing validity verification on the transaction request response, and discarding the transaction request response in response to the tag of the transaction request response being an invalid tag.

[0105] In an optional implementation, the validity checking unit is further configured to execute: in response to the tag of the transaction request response being a valid tag, releasing the tag of the transaction request response to the original tag pool.

[0106] In an optional implementation, the request processing device 8 also includes a retry unit, which is configured to execute: in response to not receiving a request response corresponding to the first transaction request within a first predetermined time period, obtaining a second tag from the original tag pool, generating and sending a second transaction request for the target transaction, and the second transaction request carries the second tag.

[0107] The embodiment of the present invention obtains the first tag from the original tag pool, generates and sends the first transaction request carrying the first tag of the target transaction to be processed, puts the first tag into the cooling tag pool for cooling in response to not receiving the request response corresponding to the first transaction request within the first predetermined time, and releases the first tag to the original tag pool in response to the cooling time of the first tag reaching the second predetermined time. Therefore, the embodiment of the present invention sets a tag cooling pool so that the used tag can be released to the original tag pool for recovery after cooling for a sufficient time in the case of a response timeout, thereby avoiding the problem of transaction confusion or even system abnormality caused by repeated use of tags in the communication link, and ensuring the reliability of the communication link.

[0108] Fig. 9 Schematic diagram of the communication device of the embodiment of the present invention. The communication device may be a device that uses a corresponding communication protocol and needs to maintain a corresponding label pool. Optionally, the communication device uses a PCIe communication protocol. The communication device of this embodiment may be an endpoint device (EP), a root complex (RC), a switch, or a bridge. Among them, the endpoint device may be a network card, a storage controller, a GPU, an FPGA, or an I / O device. Fig. 9 As shown, the communication device 9 includes a controller 91, a memory 92 connected to the controller 91 for communication, and a communication component 93 for communication, and the communication component 93 receives and sends data under the control of the controller 91. Among them, the memory 92 can store the original tag pool and the cooling tag pool maintained by the communication device 9, and can also store instructions that can be executed by the controller 91, and the instructions are executed by the controller 91 to implement the above-mentioned request processing method. In other optional implementations, the original tag pool and the cooling tag pool can also be stored in independent storage modules, and this embodiment does not limit this.

[0109] Furthermore, the controller 91 deploys a VSI (Virtual Switch Interface) module to implement management and allocation of the original label pool and the cooling label pool, that is, to implement allocation and release and recycling of labels in the original label pool and the cooling label pool by executing the above request processing method.

[0110] Furthermore, the controller 91 and the memory 92 may be connected via a bus or other means. Fig. 9 In the example, the bus connection is used. The memory 92 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The controller 91 executes various functional applications and data processing of the device by running the non-volatile software programs, instructions and modules stored in the memory 92, that is, realizing the above-mentioned request processing method.

[0111] The memory 92 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store an original tag pool and a cooling tag pool, an option list, etc. In addition, the memory 92 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 92 may optionally include a memory remotely arranged relative to the controller 91, and these remote memories may be connected to an external device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0112] One or more modules are stored in the memory 92, and when executed by one or more controllers 91, the request processing method in any of the above method embodiments is executed.

[0113] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of the present application.

[0114] The communication device of the embodiment of the present invention maintains an original label pool and a cooling label pool, which obtains a first label from the original label pool, generates and sends a first transaction request carrying the first label of the target transaction to be processed, and in response to not receiving a request response corresponding to the first transaction request within a first predetermined time period, puts the first label into the cooling label pool for cooling, and in response to the cooling time of the first label reaching a second predetermined time period, releases the first label to the original label pool. Therefore, the embodiment of the present invention sets a label cooling pool so that the used label can be released to the original label pool for resumption of use after a sufficient cooling time in the event of a response timeout, thereby avoiding transaction confusion or even system abnormality caused by repeated use of labels in the communication link, and ensuring the reliability of the communication link.

[0115] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program, wherein the computer-readable program is used for a computer to execute part or all of the above method embodiments.

[0116] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0117] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A request processing method, applied to a communication device, characterized in that: The communication device maintains an original label pool and a cooling label pool, and the method includes: Acquire a first label from the original label pool; Generate and send a first transaction request for a target transaction to be processed, where the first transaction request carries the first tag; In response to not receiving a request response corresponding to the first transaction request within a first predetermined time period, placing the first tag into the cooling tag pool for cooling; In response to the cooling time of the first tag reaching a second predetermined time period, the first tag is released to the original tag pool.

2. The method according to claim 1, characterized in that The second predetermined time period is greater than the first predetermined time period.

3. The method according to claim 1, characterized in that The method further comprises: In response to not receiving a request response corresponding to the first transaction request within the first predetermined time period, marking the first tag as an invalid tag; In response to the first tag being released to the original tag pool, the validity of the first tag is restored.

4. The method according to claim 3, characterized in that The method further comprises: receiving a transaction request response, wherein the transaction request response includes a corresponding tag; Determining whether the tag of the transaction request response is a valid tag to perform validity verification on the transaction request response; In response to the tag of the transaction request response being an invalid tag, the transaction request response is discarded.

5. The method according to claim 4, characterized in that The method further comprises: In response to the tag of the transaction request response being a valid tag, releasing the tag of the transaction request response to the original tag pool.

6. The method according to claim 1, characterized in that The method further comprises: In response to not receiving a request response corresponding to the first transaction request within a first predetermined time period, acquiring a second tag from the original tag pool; A second transaction request of the target transaction is generated and sent, where the second transaction request carries the second tag.

7. The method according to claim 1, characterized in that The communication device communicates using the PCIe protocol.

8. A communication device, characterized in that: The communication device maintains an original label pool and a cooling label pool, and the communication device is used to execute the request processing method according to any one of claims 1 to 7.

9. A request processing device, applied to a communication device, characterized in that: The communication device maintains an original label pool and a cooling label pool, and the device includes: A label acquisition unit, configured to acquire a first label from the original label pool; a request processing unit, configured to generate and send a first transaction request for a target transaction to be processed, wherein the first transaction request carries the first tag; a cooling unit, configured to, in response to not receiving a request response corresponding to the first transaction request within a first predetermined time period, place the first tag into the cooling tag pool for cooling; A releasing unit is configured to release the first tag to the original tag pool in response to the cooling time of the first tag reaching a second predetermined time period.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.