A data processing method, a network interface card, an electronic device, and a storage medium

CN115344405BActive Publication Date: 2026-10-20BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210957229.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-10
Publication Date
2026-10-20
Estimated Expiration
2042-08-10

AI Technical Summary

Technical Problem

[0003]在基于远程直接内存访问(remote direct memory access,缩写:RDMA)的数据读取过程中,网络接口卡经常会盲目的安排队列执行调度,同时在调度过程中受拥塞控制影响,以使被调度的队列未获取到允许发送的消息字节数(即没有取得拥塞控制的授权),导致此次调度不能生效,浪费了产生的调度时间,且降低了性能

Benefits of technology

[0016]本公开实施例提供的上述技术方案与现有技术相比具有如下优点:本公开实施例提供的方法,通过目标主机发送的门铃信号确定待调度的目标调度队列后,首先通过目标队列中目标工作队列元素对应的活跃度以及信用值确定目标调度队列的目标调度状态;其次,利用目标调度状态确定目标调度队列对应的调度机制是否生效;通过调度机制是否生效再决定后续是否能够对目标调度队列进行调度。以此在队列调度之前通过调度状态确定调度机制是否生效,有效保证发送队列的每次调度能够有效进行。相比现有技术无需再进行盲目调度,提高了队列调度的成功率,同时避免产生不必要的调度时间,增强了网络接口卡的服务性能。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115344405B_ABST
    Figure CN115344405B_ABST
Patent Text Reader

Abstract

The present disclosure discloses a data processing method, a network interface card, an electronic device and a storage medium. The method provided by the present disclosure first determines the target scheduling state of the target scheduling queue through the liveliness and credit value corresponding to the target work queue element in the target queue after determining the target scheduling queue through the doorbell signal sent by the target host. Secondly, whether the scheduling mechanism corresponding to the target scheduling queue is effective is determined by using the target scheduling state. Whether the target scheduling queue can be scheduled is determined again by whether the scheduling mechanism is effective. In this way, whether the scheduling mechanism is effective is determined by the scheduling state before the queue scheduling, which effectively ensures that each scheduling of the sending queue can be effectively performed. Compared with the prior art, the method does not need to perform blind scheduling again, improves the success rate of queue scheduling, avoids unnecessary scheduling time, and enhances the service performance of the network interface card.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and in particular to a data processing method, a network interface card, an electronic device, and a storage medium. Background Technology

[0002] Currently, much data is not stored locally, but rather on remote data storage devices. Existing data storage systems mainly consist of data storage devices, host clients, and switches. The storage device is connected to the switch via a front-end network, and the switch is connected to at least one host client. The storage device can provide data storage services to multiple host clients. The storage device includes a central processing unit and at least one network interface card.

[0003] During data reading based on remote direct memory access (RDMA), the network interface card often blindly arranges queues for scheduling. At the same time, the scheduling process is affected by congestion control, which may cause the scheduled queue to fail to obtain the number of message bytes allowed to be sent (i.e., it does not obtain the authorization for congestion control), resulting in the scheduling failing to take effect, wasting the scheduling time, and reducing performance. Summary of the Invention

[0004] To solve the above-mentioned technical problems, or at least partially solve them, this disclosure provides a data processing method, a network interface card, an electronic device, and a storage medium.

[0005] According to one aspect of the embodiments of this disclosure, a data processing method is provided, comprising:

[0006] In response to a doorbell signal sent by the target host, a target scheduling queue to be scheduled is determined from the host memory, wherein the doorbell signal is used to indicate that at least one target work queue element in the target scheduling queue has a target message to be sent;

[0007] Determine the current target scheduling state of the target scheduling queue, wherein the target scheduling state is obtained based on the activity level and credit value corresponding to the target work queue element;

[0008] Based on the target scheduling status, it is determined whether the scheduling mechanism corresponding to the target scheduling queue is effective, and the scheduling mechanism is used to indicate whether the target scheduling queue is allowed to be scheduled.

[0009] When the scheduling mechanism is in effect, scheduling operations are performed on the target work queue element and the target message.

[0010] According to another aspect of the embodiments of this disclosure, a network interface card is also provided, including: a direct memory access engine module and a transmission module;

[0011] The direct memory access engine module is configured to, in response to a doorbell signal sent by the target host, determine a target scheduling queue to be scheduled from the host memory, wherein the doorbell signal is used to indicate that at least one target work queue element in the target scheduling queue has a target message to be sent; determine the current target scheduling state of the target scheduling queue, wherein the target scheduling state is obtained based on the activity level and credit value corresponding to the target work queue element; and determine whether the scheduling mechanism corresponding to the target scheduling queue is effective based on the target scheduling state, wherein the scheduling mechanism is used to indicate whether the target scheduling queue is allowed to be scheduled.

[0012] The transmission module is used to perform scheduling operations on the target work queue element and the target message when the scheduling mechanism is in effect.

[0013] According to another aspect of the embodiments of this disclosure, a computer-readable storage medium is also provided, the storage medium including a stored program that performs the above-described steps when the program is executed.

[0014] According to another aspect of the present disclosure, an electronic device is also provided, characterized in that it includes a processor, a communication interface, a memory, a communication bus, and the aforementioned network interface card.

[0015] This disclosure also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps in the above-described method.

[0016] Compared with the prior art, the technical solution provided in this disclosure has the following advantages: The method provided in this disclosure, after determining the target scheduling queue to be scheduled through the doorbell signal sent by the target host, firstly determines the target scheduling status of the target scheduling queue through the activity and credit value corresponding to the target work queue elements in the target queue; secondly, it uses the target scheduling status to determine whether the scheduling mechanism corresponding to the target scheduling queue is effective; and then determines whether the target scheduling queue can be scheduled subsequently based on whether the scheduling mechanism is effective. This effectively ensures that each scheduling of the sending queue can be effectively performed by determining whether the scheduling mechanism is effective before queue scheduling. Compared with the prior art, there is no need for blind scheduling, which improves the success rate of queue scheduling, avoids unnecessary scheduling time, and enhances the service performance of the network interface card. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0018] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A flowchart of a data processing method provided in an embodiment of this disclosure;

[0020] Figure 2 A schematic diagram of a target host provided in an embodiment of this disclosure;

[0021] Figure 3 A flowchart illustrating a data processing method provided in another embodiment of this disclosure;

[0022] Figure 4 A schematic diagram of a queue scheduling process provided in an embodiment of this disclosure;

[0023] Figure 5 A flowchart illustrating a data processing method provided in another embodiment of this disclosure;

[0024] Figure 6 A flowchart illustrating a data processing method provided in another embodiment of this disclosure;

[0025] Figure 7 A schematic diagram illustrating a data packet retransmission provided in an embodiment of this disclosure;

[0026] Figure 8 A block diagram of a network interface card provided for another embodiment of this disclosure;

[0027] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. The illustrative embodiments and their descriptions are used to explain this disclosure and do not constitute an improper limitation of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.

[0029] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another similar entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0030] This disclosure provides a data processing method, a data storage device, and a network interface card. The method provided in this disclosure can be applied to any electronic device as needed, such as a server, a terminal, or other electronic device. No specific limitation is made here, and for ease of description, it will be referred to as an electronic device below.

[0031] According to one aspect of the embodiments of this disclosure, a method embodiment for adjusting data processing is provided. Figure 1 A flowchart of a data processing method provided in this disclosure embodiment is shown below. Figure 1 As shown, the method includes:

[0032] Step S11: In response to the doorbell signal sent by the target host, determine the target scheduling queue to be scheduled from the host memory, wherein the doorbell signal is used to indicate that at least one target work queue element in the target scheduling queue has a target message to be sent.

[0033] The method provided in this disclosure is applied to a network interface card (RNIC) in a data storage device. This RNIC is based on Remote Direct Memory Access (RDMA). The network interface card is connected to the target host via a communication bus.

[0034] Queue pairs (QPs) are used on the target host to send and receive data (as messages) from the requester. Each QP contains a send queue (SQ) and a receive queue (RQ), where the SQ is responsible for sending messages and the RQ is responsible for receiving messages. Each QP's SQ and RQ can be associated with a completion queue (CQ).

[0035] In the application scenario of this disclosure embodiment, the target host has multiple sending queues, and each sending queue includes at least one work queue element, with each work queue element associated with at least one message. For example, when a new work queue element (i.e., the target work queue element) exists in a certain sending queue and there are messages to be sent in the storage space pointed to by the target work queue element, the target host will automatically trigger a doorbell signal and send the doorbell signal to the network interface card.

[0036] like Figure 2 As shown, the target host includes multiple sending queues SQ1, SQ2, SQ3 and SQ4. When there is a target message to be sent in the storage space pointed to by a target work queue element (WQE) in SQ1, a doorbell signal will be sent to the network interface card. The storage space is located in the buffer.

[0037] In this embodiment of the disclosure, the network interface card responds to a doorbell signal sent by the target host and determines the target scheduling queue to be scheduled from multiple sending queues in the host memory.

[0038] Step S12: Determine the current target scheduling status of the target scheduling queue, wherein the target scheduling status is obtained based on the activity level and credit value of the target work queue element.

[0039] In this embodiment of the disclosure, after determining the target scheduling queue, the network interface card first queries the activity level and credit value corresponding to the target work queue element in the target scheduling queue, and determines the current target scheduling status of the target scheduling queue based on the activity level and credit value. Specifically, if the activity level is greater than or equal to a preset activity level and the credit value is greater than or equal to a preset credit value, the target scheduling status of the target scheduling queue is determined to be a scheduling ready state; if the activity level is less than the preset activity level and / or the credit value is less than the preset credit value, the target scheduling status of the target scheduling queue is determined to be a scheduling paused state.

[0040] Step S13: Determine whether the scheduling mechanism corresponding to the target scheduling queue is effective based on the target scheduling status. The scheduling mechanism is used to indicate whether the target scheduling queue is allowed to be scheduled.

[0041] In this embodiment of the disclosure, before it can be determined whether the scheduling mechanism corresponding to the target scheduling queue is effective through the target scheduling status, target scheduling information corresponding to the target scheduling queue is first generated. The target scheduling information includes the target scheduling sequence number and the target scheduling status. The target scheduling sequence number is obtained based on the trigger time of the doorbell signal.

[0042] For example: if the target scheduling state is in the scheduling ready state and the target scheduling sequence number is less than or equal to the preset scheduling sequence number, the scheduling mechanism corresponding to the target scheduling queue is determined to be effective; if the target scheduling state is in the scheduling ready state and the target scheduling sequence number is greater than the preset scheduling sequence number, the scheduling mechanism corresponding to the target scheduling queue is determined to be ineffective.

[0043] Step S14: If the scheduling mechanism is in effect, perform scheduling operations on the target work queue elements and the target message.

[0044] In this embodiment of the disclosure, when the scheduling mechanism is in effect, the network interface card will move the target work queue elements and target messages of the target scheduling queue from the host memory, and perform scheduling operations on the target work queue elements and target messages.

[0045] In this embodiment of the disclosure, if the scheduling sequence number is greater than the preset scheduling sequence number, it is determined whether the target scheduling queue has a priority. If the target scheduling queue has a priority, the scheduling operation on the target work queue elements and the target message is performed based on the priority. If the target scheduling queue does not have a priority, the scheduling operation on the target work queue elements and the target message is performed in the order of the preset scheduling list.

[0046] The method provided in this disclosure, after determining the target scheduling queue to be scheduled through the doorbell signal sent by the target host, firstly determines the target scheduling status of the target scheduling queue by the activity level and credit value corresponding to the target work queue elements in the target queue; secondly, it uses the target scheduling status to determine whether the scheduling mechanism corresponding to the target scheduling queue is effective; and then, it determines whether the target scheduling queue can be scheduled subsequently based on whether the scheduling mechanism is effective. In this way, by determining whether the scheduling mechanism is effective through the scheduling status before queue scheduling, it effectively ensures that each scheduling of the sending queue can be carried out effectively. Compared with the prior art, it eliminates the need for blind scheduling, improves the success rate of queue scheduling, avoids unnecessary scheduling time, and enhances the service performance of the network interface card.

[0047] According to one aspect of the embodiments of this disclosure, a method embodiment for adjusting data processing is provided. Figure 3 A flowchart of a data processing method provided in this disclosure embodiment is shown below. Figure 3As shown, the method includes:

[0048] Step S21: In response to the doorbell signal sent by the target host, determine the target scheduling queue to be scheduled from the host memory, wherein the doorbell signal is used to indicate that at least one target work queue element in the target scheduling queue contains a target message to be sent. For detailed explanation, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.

[0049] Step S22: Determine the current target scheduling status of the target scheduling queue, wherein the target scheduling status is obtained based on the activity level and credit value of the target work queue element.

[0050] In this embodiment of the disclosure, step S22, determining the current target scheduling state of the target scheduling queue, includes the following steps A1-A3:

[0051] Step A1: Generate initial scheduling information corresponding to the target scheduling queue in the preset scheduling list. The initial scheduling information includes the target scheduling sequence number, which is obtained based on the trigger time of the doorbell signal.

[0052] In this embodiment, after determining the target scheduling queue using the doorbell signal, the network interface card uses the doorbell signal's departure time to determine the target scheduling sequence number in the preset scheduling list, and simultaneously generates initial scheduling information for the target scheduling queue. For example, the initial scheduling information is QP1: active0, credit0, ready0. Here, active indicates the activity level of the work queue element, credit indicates whether the message corresponding to the work queue element has received the allowed number of message bytes to be sent, i.e., whether message sending authorization has been obtained, and 0 is the initial value for each parameter.

[0053] Step A2: Query the activity level and credit value of the target work queue element in the target scheduling queue, and determine the target scheduling status of the target scheduling queue based on the activity level and the number of message bytes.

[0054] In this embodiment, the network interface card (NIC) can obtain the activity level of a target work queue element from the target host, and can also query the credit value of the target work queue element from the congestion control center set up within the NIC. The credit value indicates whether the target message corresponding to the target queue element has been allowed to send a certain number of message bytes. It should be noted that when querying the credit value of a target work queue element through the congestion control center, if a credit value exists, the number of message bytes allowed to be sent for the target message corresponding to the target work queue element will also be obtained.

[0055] In this embodiment of the disclosure, the target scheduling state includes a scheduling ready state and a scheduling paused state. Specifically, determining the target scheduling state of the target scheduling queue based on activity level and message byte count includes: determining the target scheduling state of the target scheduling queue as a scheduling ready state when the activity level is greater than or equal to a preset activity level and the credit value is greater than or equal to a preset credit value; or, determining the target scheduling state of the target scheduling queue as a scheduling paused state when the activity level is less than a preset activity level and / or the credit value is less than a preset credit value.

[0056] In this embodiment of the disclosure, in order to facilitate quick confirmation of the target scheduling status of the target scheduling queue, a first identifier is first determined using activity level, and a second identifier is determined using the presence or absence of allowed message bytes. Then, based on a preset correspondence, a third identifier is determined from the first and second identifiers, and the third identifier is used to represent the target scheduling status.

[0057] In this embodiment of the disclosure, if the queried activity level is greater than or equal to a preset activity level, the first identifier corresponding to the activity level is "1"; if the queried activity level is less than the preset activity level, the first identifier corresponding to the activity level is "0". If the number of allowed message bytes to be sent is greater than or equal to a preset number of message bytes, the second identifier corresponding to the number of allowed message bytes to be sent is "1"; if the number of allowed message bytes to be sent is less than the preset number of message bytes, the second identifier corresponding to the number of allowed message bytes to be sent is "0".

[0058] When both the first and second flags are 1, the third flag is 1, indicating that the target scheduling state is in the scheduling ready state. When the first flag is 0, and / or the second flag is 0, the third flag is 0, indicating that the target scheduling state is in the scheduling paused state.

[0059] Step A3: Update the initial scheduling information using the target scheduling state to obtain the target scheduling information.

[0060] In this embodiment of the disclosure, after obtaining the target scheduling state, the target scheduling state is written into the initial scheduling information, thus completing the update of the initial scheduling information. For example, by writing the third identifier into the initial scheduling information, the obtained target scheduling information is: QP1: active1, credit1, ready1.

[0061] Step S23: Determine whether the scheduling mechanism corresponding to the target scheduling queue is effective based on the target scheduling status. The scheduling mechanism is used to indicate whether the target scheduling queue is allowed to be scheduled. For detailed explanation, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.

[0062] Step S24: If the scheduling mechanism is in effect, perform scheduling operations on the target work queue elements and the target message. The preset quantity is the maximum quantity supported by this scheduling. For detailed explanation, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.

[0063] As an example, such as Figure 4 As shown, the target scheduling queue SQ1 in the target host sends a doorbell signal to the network interface card. The event manager (Event Mux) in the network interface card queries the credit value from the Congestion Control Center and the activity level of the work queue elements from the target host. It then writes the credit value and activity level into a preset scheduling list, determining the target scheduling status corresponding to the target scheduling queue in the preset scheduling list. If the event manager (Event Mux) determines that the scheduling mechanism corresponding to the target scheduling queue is in effect based on the target scheduling status in the target scheduling information, it executes scheduling operations on the target work queue elements and the target messages.

[0064] This embodiment generates target scheduling information for target scheduling queues in a preset scheduling list. By using the target scheduling status and target scheduling sequence number in the target scheduling information, it is possible to quickly determine whether the target scheduling queue can be scheduled. At the same time, for queues that cannot meet the scheduling mechanism, their corresponding scheduling information can be deleted in a timely manner, effectively ensuring scheduling efficiency.

[0065] Figure 5 A flowchart of a data processing method provided in this disclosure embodiment is shown below. Figure 5 As shown, performing scheduling operations on work queue elements and messages to be sent includes the following steps:

[0066] Step S31: Obtain no more than a preset number of first work queue elements from at least one target work queue element in the target scheduling queue, and determine the first message associated with the first work queue element from the target message.

[0067] In this embodiment of the disclosure, because the high-speed serial computer expansion bus (Peripheral Component Interconnect express, abbreviated as PCIe) has a high round-trip latency, and because each scheduling requires two PCIe transmissions, the communication performance and effect will be very poor if not properly designed.

[0068] Based on this, the present invention obtains n work queue elements from at least one target work queue element in the target scheduling queue as the first work queue element, where n is the maximum number that can be obtained in this scheduling. Then, the first message associated with the first work queue element is determined from the target message. In this way, the target work queue element is obtained using a cache-free method, without the need for prefetching and caching work queue elements, thereby improving the scalability of the network interface card.

[0069] Step S32: Obtain the total number of message bytes corresponding to the first message, compare the total number of message bytes with the preset number of message bytes, and obtain the comparison result. The preset number of message bytes is obtained based on the credit value.

[0070] In this embodiment, after determining the first message to be sent, the total number of message bytes corresponding to the first message is obtained, and compared with a preset number of message bytes to obtain a comparison result. It should be noted that the purpose of using the preset number of message bytes is to maximize message sending by utilizing the limited memory of the network interface card. It should also be noted that since there are thousands of queues in the central processing unit, and the memory of the network interface card is very limited, if congestion occurs, it cannot be guaranteed that all messages in the sending queue will be sent completely, and this will also lead to a decrease in the performance of the network interface card.

[0071] Step S33: Perform a scheduling operation on the first message based on the comparison results.

[0072] In this embodiment of the disclosure, the scheduling operation is performed on the first message based on the comparison result, including the following steps B1-B2:

[0073] Step B1: If the comparison result shows that the total number of message bytes is less than or equal to the preset number of message bytes, the first message is encapsulated to obtain the first data packet;

[0074] Step B2: Send the first data packet to the receiving device.

[0075] In this embodiment of the disclosure, if the comparison result shows that the total number of message bytes is less than or equal to the preset number of message bytes, it indicates that the messages currently to be sent in the target scheduling queue can be completely sent. At this time, the network interface card encapsulates the first message to be sent to obtain the first data packet and sends the first data packet to the receiving device.

[0076] It should be noted that since the first message contains multiple consecutive message contents, the network interface card (NIC) will write these multiple message contents into multiple data packets and send them separately during the encapsulation process. Simultaneously, it will modify the RoCEv2 header of each data packet. Specifically, the NIC will query the storage address of each message in the host's memory, generate consecutive packet sequence numbers using these addresses, and then encapsulate them in the RoCEv2 header to obtain the final first data packet. By encapsulating the storage address of the messages to be sent in the form of packet sequence numbers in the RoCEv2 header, the order of each data packet can be clearly identified during remote data access. Furthermore, during subsequent retransmissions, the data packets to be retransmitted can be directly located based on the retransmission requirements.

[0077] In this embodiment of the disclosure, a scheduling operation is performed on the first message based on the comparison result, including the following steps C1-C3:

[0078] Step C1: If the comparison result shows that the total number of message bytes is greater than the preset number of message bytes, obtain the preset number of second messages to be sent from the first message.

[0079] Step C2: Encapsulate the second message to be sent to obtain the second data packet.

[0080] Step C3: Send the second data packet to the receiving device and discard the remaining unencapsulated messages in the first message.

[0081] In this embodiment of the disclosure, if the comparison result shows that the total number of message bytes is greater than the preset number of message bytes, it indicates that the messages currently waiting to be sent in the target scheduling queue cannot be completely sent. The second message is obtained from the first message according to the preset number of message bytes, and then the second message is encapsulated to obtain the second data packet.

[0082] It should be noted that, since the second message may contain multiple consecutive message contents, the network interface card (NIC) will write multiple data packets based on these message contents and send them separately during the encapsulation process. Simultaneously, it will modify the RoCEv2 header of each data packet. Specifically, the NIC will query the storage address of each message in the host's memory, generate consecutive packet sequence numbers using these addresses, and then encapsulate them in the RoCEv2 header to obtain the final second data packet. By encapsulating the storage address of the messages to be sent in the form of packet sequence numbers in the RoCEv2 header, the order of each data packet can be clearly identified during remote data access. Furthermore, during subsequent retransmissions, the data packets to be retransmitted can be directly located based on the retransmission requirements.

[0083] As an example, the network interface card first queries the queue address of the target scheduling queue in the host memory. Then, based on the queue address, it moves multiple target work queue elements, retrieves n first work queue elements from the target work queue elements, and determines the first message corresponding to the n first work queue elements. The total message size for the first message is m bytes. The total message size m is compared with the preset message size burst_size. If m is less than or equal to burst_size, the first message is directly encapsulated to obtain the first data packet and sent. If m is greater than burst_size, the second message is retrieved from the total message size m according to the preset message size burst_size, encapsulated to obtain the second data packet, and sent.

[0084] It's important to note two key parameters: `n` and `burst_size`. `n` represents the maximum number of work queue elements currently available, and `burst_size` is the number of message bytes allowed to be retrieved in each scheduling iteration. This embodiment utilizes `n` to reflect the balance between PCIe bandwidth utilization and PCIe latency hiding. If the value of `n` is too small, it can indeed lead to better bandwidth utilization in the PCIe fetch-and-drop strategy, but it cannot hide PCIe latency. If the value of `n` is too large, the opposite of what is expected will occur. Therefore, this embodiment sets `n` to 8 to balance PCIe bandwidth utilization and latency hiding.

[0085] The burst_size reflects the balance between PCIe bandwidth usage and frequency, as well as head-end congestion. A smaller burst_size allows for finer scheduling granularity, thus reducing head-end congestion, but can saturate PCIe bandwidth. A larger burst_size, on the other hand, has the opposite effect. Based on this analysis, the embodiments of this disclosure set the burst_size to 16KB to balance performance and scheduling granularity.

[0086] In this embodiment of the disclosure, after performing scheduling operations on the target work queue element and the target message corresponding to the target work queue element, as follows: Figure 6 As shown, the method also includes:

[0087] Step S41: Receive the third data packet and parse the header of the third data packet to obtain the target packet sequence number corresponding to the third data packet.

[0088] In this embodiment of the disclosure, after receiving the third data packet, the network interface card will parse the third data packet and extract the target packet sequence number corresponding to the third data packet from the packet header.

[0089] Step S42: Obtain the first expected packet sequence number corresponding to the third data packet from the preset scheduling list, and compare the target packet sequence number with the first expected packet sequence number.

[0090] In this embodiment, the network interface card obtains the first expected packet sequence number corresponding to the third data packet from a preset scheduling list, and then compares the first expected packet sequence number with the target packet sequence number. It should be noted that the preset scheduling list stores expected packet sequence numbers corresponding to multiple data packets.

[0091] As an example, the preset scheduling list stores expected packet sequence numbers: A-003, B-002, and C-006. Here, A-003 represents the expected packet sequence number of the 3rd data packet corresponding to message A, B-002 represents the expected packet sequence number of the 2nd data packet corresponding to message B, and C-006 represents the expected packet sequence number of the 6th data packet corresponding to message C. The target packet sequence number obtained from the header of the 3rd data packet is "B-004", and the first expected packet sequence number corresponding to the 3rd data packet is "B-002". Compare the target packet sequence number "B-004" with the first expected packet sequence number "B-002".

[0092] Step S43: If the target packet sequence number does not match the first expected packet sequence number, confirm that the packet loss recovery state has been entered, and perform a retransmission operation based on the target packet sequence number and the first expected packet sequence number.

[0093] In this embodiment of the disclosure, the retransmission operation is performed based on the target packet sequence number and the first expected packet sequence number, including the following steps D1-D2:

[0094] Step D1: Send the target packet sequence number and the first expected packet sequence number to the central processing unit of the target host, so that the central processing unit can obtain the packet sequence number corresponding to the lost data packet from the bitmap based on the target packet sequence number and the first expected packet sequence number.

[0095] Step D2: Receive the retransmission request sent by the central processing unit and send the retransmission request to the sender corresponding to the third data packet. The retransmission request is generated based on the packet sequence number corresponding to the lost data packet and sent through the target retransmission queue, which is the retransmission queue corresponding to the sending queue associated with the lost data packet.

[0096] In this embodiment of the disclosure, if the target packet sequence number does not match the first expected packet sequence number, it indicates that there is a packet loss. At this time, the network interface card enters the packet loss recovery state and sends the target packet sequence number and the first expected packet sequence number to the central processing unit of the target host.

[0097] In this embodiment, the central processing unit of the target host updates the bitmap corresponding to the message to which the third data packet belongs based on the target packet sequence number and the first expected packet sequence number, and queries the packet sequence number corresponding to the currently lost data packet from the updated bitmap. The bitmap stores the reception status of multiple data packets corresponding to the message to which the third data packet belongs. Then, a retransmission request is generated based on the packet sequence number corresponding to the lost data packet, and the target retransmission queue corresponding to the sending queue associated with the lost data packet / third data packet is queried. Finally, the retransmission request is sent to the target retransmission queue, and the retransmission request is issued through the target retransmission queue.

[0098] In this embodiment of the disclosure, after receiving a retransmission request from the central processing unit of the target host, the network interface card directly sends the retransmission request to the sending device corresponding to the third data packet.

[0099] As an example, suppose the target packet sequence number of the third data packet is "B-004" and the expected packet sequence number is "B-002". The updated bitmap then includes "1, 0, 0, 1". The first "1" indicates that the first data packet corresponding to the message was successfully received; the second "0" indicates that the second data packet corresponding to the message was not successfully received; the third "0" indicates that the third data packet corresponding to the message was not successfully received; and the fourth "1" indicates that the fourth data packet corresponding to the message was successfully received. Based on this, the packet sequence numbers of the lost data packets can be determined as "B-002" and "B-003". Then, the target retransmission queue corresponding to the lost data packet's associated sending queue is queried, and a retransmission request generated based on the lost data packet's packet sequence number is sent to the target retransmission queue, so that the target retransmission queue will issue the retransmission request.

[0100] In this embodiment of the disclosure, after sending the target packet sequence number and the first expected packet sequence number to the target host, the method further includes the following steps E1-E2:

[0101] Step E1: Receive the fourth data packet. If the sequence number carried by the fourth data packet matches the sequence number of the lost data packet, send the fourth data packet to the target host.

[0102] Step E2: Receive the second expected packet sequence number sent by the target host and write the second expected packet sequence number into the preset scheduling list. The second expected packet sequence number is sent by the target host after receiving the fourth data packet.

[0103] In this embodiment, after the network interface card sends a retransmission request to the sending device corresponding to the third data packet, it listens to whether the sending device corresponding to the third data packet has sent a fourth data packet. When the fourth data packet is received, it is parsed to obtain the packet sequence number corresponding to the fourth data packet, and then compared with the packet sequence number corresponding to the lost data packet. If the packet sequence number carried by the fourth data packet matches the packet sequence number corresponding to the lost data packet, it is determined that the lost data packet has been recovered. At this time, the fourth data packet is sent to the central processing unit of the target host, and the network interface card cancels the lost data recovery state.

[0104] In this embodiment, after receiving the fourth data packet, the central processing unit determines that the lost data packet has been recovered based on the packet sequence number of the fourth data packet, updates the bitmap accordingly, and then sends the second expected packet sequence number to the network interface card. The second expected packet sequence number is the sequence number of the next data packet corresponding to the currently received data packet. After receiving the second expected packet sequence number, the network interface card writes the second expected data packet into a preset scheduling list and waits to receive the corresponding data packet.

[0105] As an example, the process of packet retransmission is as follows: Figure 7 As shown:

[0106] (1) After receiving the data packet, the network interface card parses the data packet to obtain the packet sequence number (PSN) carried by the data packet, and obtains the expected packet sequence number (e PSN) corresponding to the data packet from the preset scheduling list.

[0107] (2) Compare the packet sequence number with the expected packet sequence number. If they match, the data packet is sent directly to the central processing unit of the target host for normal processing, such as being stored in the receiving queue.

[0108] (3) If the two are inconsistent, it is determined that packet loss has occurred. At this time, the packet sequence number and the expected packet sequence number are sent to the central processing unit of the target host. The central processing unit determines the packet sequence number corresponding to the lost data packet from the bitmap (Per QPbitmaps) based on the packet sequence number and the expected packet sequence number, and generates a retransmission request based on the packet sequence number corresponding to the lost data packet. The retransmission request is sent to the retransmission queue (Retry Q), and the retransmission request is transmitted to the network interface card through the retransmission queue, and then sent by the network interface card.

[0109] (4) After the network interface card sends a retransmission request, if it receives a new data packet, it determines whether the packet sequence number of the new data packet is consistent with the packet sequence number of the lost data packet. If they are consistent, it determines that the lost data packet has been recovered, and then sends the new data packet to the central processing unit of the target host.

[0110] (5) After receiving a new data packet, the central processing unit will send a new expected packet sequence number to the network interface card according to the packet sequence number of the new data packet.

[0111] like Figure 8 As shown, this embodiment of the disclosure also provides a network interface card, which includes: a direct memory access engine module 100 and a transmission module 200;

[0112] The direct memory access engine module 100 is used to respond to a doorbell signal sent by the target host, determine the target scheduling queue to be scheduled from the host memory, wherein the doorbell signal is used to indicate that at least one target work queue element in the target scheduling queue has a target message to be sent; determine the current target scheduling status of the target scheduling queue, wherein the target scheduling status is obtained based on the activity level and credit value of the target work queue element; and determine whether the scheduling mechanism corresponding to the target scheduling queue is effective based on the target scheduling status, wherein the scheduling mechanism is used to indicate whether the target scheduling queue is allowed to be scheduled.

[0113] The transmission module 200 is used to perform scheduling operations on target work queue elements and target messages when the scheduling mechanism is in effect.

[0114] In this embodiment of the disclosure, the direct memory access engine module 100 is used to determine the target scheduling state of the target scheduling queue as a scheduling ready state when the activity level is greater than or equal to a preset activity level and the credit value is greater than or equal to a preset credit value; or,

[0115] The direct memory access engine module 100 is used to determine the target scheduling state of the target scheduling queue as a scheduling pause state when the activity level is less than a preset activity level and / or the credit value is less than a preset credit value.

[0116] In this embodiment of the disclosure, the direct memory access engine module 100 includes: a scheduler 1001;

[0117] Scheduler 1001 is used to generate target scheduling information corresponding to the target scheduling queue. The target scheduling information includes the target scheduling sequence number and the target scheduling status. The target scheduling sequence number is obtained based on the trigger time of the doorbell signal.

[0118] In this embodiment of the disclosure, the scheduler 1001 is used to determine that the scheduling mechanism is effective when the target scheduling state is in the scheduling ready state and the target scheduling sequence number is less than or equal to the preset scheduling sequence number. The preset scheduling sequence number is used to represent the scheduling limit of the network interface card.

[0119] In this embodiment of the disclosure, the direct memory access engine module 100 further includes: a data transporter 1002;

[0120] Data transporter 1002 is used to obtain no more than a preset number of first work queue elements from at least one target work queue element of the target scheduling queue, determine the first message associated with the first work queue element from the target message, obtain the total number of message bytes corresponding to the first message, compare the total number of message bytes with the preset number of message bytes, and obtain a comparison result, wherein the preset number of message bytes is obtained based on the credit value;

[0121] The transmission module 200 is used to perform a scheduling operation on the first message based on the comparison result.

[0122] In this embodiment of the disclosure, the transmission module 200 is used to encapsulate the first message to obtain a first data packet when the comparison result shows that the total number of message bytes is less than or equal to the preset number of message bytes; and send the first data packet to the receiving device.

[0123] In this embodiment of the disclosure, the data transporter 1002 is used to obtain a second message to be sent from the first message that meets the preset number of bytes when the comparison result shows that the total number of message bytes is greater than the preset number of message bytes.

[0124] The transmission module 200 is used to encapsulate the second message to be sent to obtain a second data packet; send the second data packet to the receiving device; and discard the remaining unencapsulated messages in the first message.

[0125] In this embodiment of the disclosure, the transmission module 200 includes: a retransmission module 2002, configured to receive a third data packet and parse the header of the third data packet to obtain the target packet sequence number corresponding to the third data packet; obtain the first expected packet sequence number corresponding to the third data packet from a preset scheduling list and compare the target packet sequence number with the first expected packet sequence number; if the target packet sequence number and the first expected packet sequence number do not match, confirm that the data packet loss recovery state has been entered, and perform a retransmission operation based on the target packet sequence number and the first expected packet sequence number.

[0126] In this embodiment of the disclosure, the retransmission module 2002 is specifically used to send the target packet sequence number and the first expected packet sequence number to the central processing unit of the target host, so that the central processing unit can obtain the packet sequence number corresponding to the lost data packet from the bitmap according to the target packet sequence number and the first expected packet sequence number; receive the retransmission request sent by the central processing unit, and send the retransmission request to the sender corresponding to the third data packet, wherein the retransmission request is generated based on the packet sequence number corresponding to the lost data packet and sent through the target retransmission queue, and the target retransmission queue is the retransmission queue corresponding to the sending queue associated with the lost data packet.

[0127] In this embodiment of the disclosure, the retransmission module 2002 is used to receive a fourth data packet, and if the packet sequence number carried by the fourth data packet is consistent with the packet sequence number corresponding to the lost data packet, send the fourth data packet to the target host; receive a second expected packet sequence number sent by the target host, and write the second expected packet sequence number into a preset scheduling list, wherein the second expected packet sequence number is sent by the target host after receiving the fourth data packet.

[0128] This disclosure provides a network interface card that, after determining the target scheduling queue to be scheduled based on the doorbell signal sent by the target host, firstly determines the target scheduling status of the target scheduling queue by using the activity level and credit value of the target work queue elements in the target queue; secondly, it uses the target scheduling status to determine whether the scheduling mechanism corresponding to the target scheduling queue is effective; and then determines whether the target scheduling queue can be scheduled subsequently based on whether the scheduling mechanism is effective. This method effectively ensures that each scheduling of the sending queue can be performed effectively by determining the scheduling mechanism's effectiveness based on the scheduling status before queue scheduling. Compared to existing technologies, this eliminates the need for blind scheduling, improves the success rate of queue scheduling, avoids unnecessary scheduling time, and enhances the service performance of the network interface card.

[0129] This disclosure also provides an electronic device, such as... Figure 9 As shown, the electronic device may include: a processor 1501, a communication interface 1502, a memory 1503, and a communication bus 1504, wherein the processor 1501, the communication interface 1502, and the memory 1503 communicate with each other through the communication bus 1504.

[0130] Memory 1503 is used to store computer programs;

[0131] When the processor 1501 executes the computer program stored in the memory 1503, it implements the steps of the above embodiments.

[0132] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0133] The communication interface is used for communication between the aforementioned terminal and other devices.

[0134] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0135] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0136] In another embodiment provided in this disclosure, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform any of the data processing methods described in the above embodiments.

[0137] In yet another embodiment provided in this disclosure, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the data processing methods described in the above embodiments.

[0138] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this disclosure are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state drive).

[0139] According to one or more embodiments of this disclosure, Example 1 provides a data processing method, including:

[0140] In response to a doorbell signal sent by the target host, the target scheduling queue to be scheduled is determined from the host memory, wherein the doorbell signal is used to indicate that at least one target work queue element in the target scheduling queue has a target message to be sent;

[0141] Determine the current target scheduling status of the target scheduling queue, where the target scheduling status is obtained based on the activity level and credit value of the target work queue element;

[0142] The target scheduling status determines whether the scheduling mechanism corresponding to the target scheduling queue is effective. The scheduling mechanism is used to indicate whether the target scheduling queue is allowed to be scheduled.

[0143] When the scheduling mechanism is in effect, schedule operations are performed on the target work queue elements and the target message.

[0144] Furthermore, determine the current target scheduling state of the target scheduling queue, including:

[0145] If the activity level is greater than or equal to a preset activity level, and the credit value is greater than or equal to a preset credit value, the target scheduling state of the target scheduling queue is determined to be the scheduling ready state; or,

[0146] If the activity level is less than the preset activity level and / or the credit value is less than the preset credit value, the target scheduling status of the target scheduling queue is determined to be a scheduling paused state.

[0147] Furthermore, after determining the target scheduling state, the method also includes:

[0148] Generate target scheduling information corresponding to the target scheduling queue. The target scheduling information includes the target scheduling sequence number and the target scheduling status. The target scheduling sequence number is obtained based on the trigger time of the doorbell signal.

[0149] Furthermore, if the target scheduling state is in the scheduling ready state and the target scheduling sequence number is less than or equal to the preset scheduling sequence number, the scheduling mechanism is determined to be effective. The preset scheduling sequence number is used to represent the scheduling limit of the network interface card.

[0150] Furthermore, perform scheduling operations on the target work queue elements and the target message, including:

[0151] From at least one target work queue element in the target scheduling queue, obtain no more than a preset number of first work queue elements, and determine the first message associated with the first work queue element from the target message;

[0152] Get the total number of bytes in the first message, compare the total number of bytes in the message with the preset number of bytes in the message, and get the comparison result. The preset number of bytes in the message is obtained based on the credit value.

[0153] The scheduling operation is performed on the first message based on the comparison results.

[0154] Furthermore, based on the comparison results, a scheduling operation is performed on the first message, including:

[0155] If the comparison result shows that the total number of message bytes is less than or equal to the preset number of message bytes, the first message is encapsulated to obtain the first data packet;

[0156] Send the first data packet to the receiving device.

[0157] Furthermore, based on the comparison results, a scheduling operation is performed on the first message, including:

[0158] If the comparison result shows that the total number of message bytes is greater than the preset number of message bytes, then obtain the second message to be sent from the first message, which is the preset number of message bytes.

[0159] The second message to be sent is encapsulated to obtain the second data packet;

[0160] Send a second data packet to the receiving device and discard any remaining messages that were not encapsulated in the first message.

[0161] Furthermore, after performing scheduling operations on the target work queue elements and the target message, the method also includes:

[0162] Receive the third data packet and parse its header to obtain the target packet sequence number.

[0163] Obtain the first expected packet sequence number corresponding to the third data packet from the preset scheduling list, and compare the target packet sequence number with the first expected packet sequence number;

[0164] If the target packet sequence number does not match the first expected packet sequence number, the system confirms that it has entered the packet loss recovery state and performs a retransmission operation based on the target packet sequence number and the first expected packet sequence number.

[0165] Furthermore, a retransmission operation is performed based on the target packet sequence number and the first expected packet sequence number, including:

[0166] Send the target packet sequence number and the first expected packet sequence number to the central processing unit of the target host, so that the central processing unit can obtain the packet sequence number corresponding to the lost data packet from the bitmap based on the target packet sequence number and the first expected packet sequence number;

[0167] The system receives retransmission requests sent by the central processing unit. These retransmission requests are generated based on the sequence number of the lost data packet and sent through a target retransmission queue, which is the retransmission queue corresponding to the sending queue associated with the lost data packet.

[0168] Furthermore, after sending the target packet sequence number and the first expected packet sequence number to the central processing unit, the method also includes:

[0169] Receive the fourth data packet. If the sequence number carried by the fourth data packet matches the sequence number of the lost data packet, send the fourth data packet to the central processing unit.

[0170] The system receives the second expected packet sequence number sent by the central processing unit and writes the second expected packet sequence number into a preset scheduling list. The second expected packet sequence number is sent by the central processing unit after receiving the fourth data packet.

[0171] According to one or more embodiments of this disclosure, Example 2 provides a network interface card, including: a direct memory access engine module and a transmission module;

[0172] The direct memory access engine module is used to respond to a doorbell signal sent by the target host, determine the target scheduling queue to be scheduled from the host memory, wherein the doorbell signal is used to indicate that at least one target work queue element in the target scheduling queue has a target message to be sent; determine the current target scheduling status of the target scheduling queue, wherein the target scheduling status is obtained based on the activity and credit value of the target work queue element; and determine whether the scheduling mechanism corresponding to the target scheduling queue is effective based on the target scheduling status, wherein the scheduling mechanism is used to indicate whether the target scheduling queue is allowed to be scheduled.

[0173] The transmission module is used to perform scheduling operations on target work queue elements and target messages when the scheduling mechanism is in effect.

[0174] Furthermore, the direct memory access engine module is used to determine the target scheduling state of the target scheduling queue as the scheduling ready state when the activity level is greater than or equal to a preset activity level and the credit value is greater than or equal to a preset credit value; or,

[0175] The direct memory access engine module is used to determine the target scheduling state of the target scheduling queue as a scheduling pause state when the activity level is less than a preset activity level and / or the credit value is less than a preset credit value.

[0176] Furthermore, the direct memory access engine module includes: a scheduler;

[0177] The scheduler is used to generate target scheduling information corresponding to the target scheduling queue. The target scheduling information includes the target scheduling sequence number and the target scheduling status. The target scheduling sequence number is obtained based on the trigger time of the doorbell signal.

[0178] Furthermore, the scheduler is used to determine that the scheduling mechanism is effective when the target scheduling state is in the scheduling ready state and the target scheduling sequence number is less than or equal to the preset scheduling sequence number. The preset scheduling sequence number is used to represent the scheduling limit of the network interface card.

[0179] Furthermore, the direct memory access engine module also includes: a data transporter;

[0180] The data transporter is used to obtain no more than a preset number of first work queue elements from at least one target work queue element in the target scheduling queue, determine the first message associated with the first work queue element from the target message, obtain the total number of message bytes corresponding to the first message, compare the total number of message bytes with the preset number of message bytes, and obtain the comparison result, wherein the preset number of message bytes is obtained based on the credit value;

[0181] The transmission module is used to perform scheduling operations on the first message based on the comparison results.

[0182] Furthermore, the transmission module is used to encapsulate the first message to obtain a first data packet when the comparison result shows that the total number of message bytes is less than or equal to the preset number of message bytes; and to send the first data packet to the receiving device.

[0183] Furthermore, the data transporter is used to obtain a second message to be sent from the first message if the comparison result shows that the total number of message bytes is greater than the preset number of message bytes;

[0184] The transmission module is used to encapsulate the second message to be sent to obtain a second data packet; send the second data packet to the receiving device; and discard the remaining unencapsulated messages in the first message.

[0185] Furthermore, the transmission module includes: a retransmission module, used to receive a third data packet, parse the header of the third data packet to obtain the target packet sequence number corresponding to the third data packet; obtain the first expected packet sequence number corresponding to the third data packet from a preset scheduling list, and compare the target packet sequence number with the first expected packet sequence number; if the target packet sequence number does not match the first expected packet sequence number, confirm that the data packet loss recovery state has been entered, and perform a retransmission operation based on the target packet sequence number and the first expected packet sequence number.

[0186] Furthermore, the retransmission module is specifically used to send the target packet sequence number and the first expected packet sequence number to the central processing unit of the target host, so that the central processing unit can obtain the packet sequence number corresponding to the lost data packet from the bitmap based on the target packet sequence number and the first expected packet sequence number; receive the retransmission request sent by the central processing unit, and send the retransmission request to the sender corresponding to the third data packet. The retransmission request is generated based on the packet sequence number corresponding to the lost data packet and sent through the target retransmission queue, which is the retransmission queue corresponding to the sending queue associated with the lost data packet.

[0187] Furthermore, the retransmission module is used to receive the fourth data packet. If the sequence number carried by the fourth data packet matches the sequence number of the lost data packet, the module sends the fourth data packet to the target host. It also receives the second expected sequence number sent by the target host and writes the second expected sequence number into a preset scheduling list. The second expected sequence number is sent by the target host after receiving the fourth data packet.

[0188] The above description is merely a preferred embodiment of this disclosure and is not intended to limit the scope of protection of this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure are included within the scope of protection of this disclosure.

[0189] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A data processing method, characterized in that, include: In response to a doorbell signal sent by the target host, a target scheduling queue to be scheduled is determined from the host memory. The doorbell signal is used to indicate that at least one target work queue element in the target scheduling queue has a target message to be sent. Each target work queue element is associated with at least one message. When the storage space pointed to by the target work queue element has a target message to be sent, the doorbell signal is triggered. The current target scheduling status of the target scheduling queue is determined, wherein the target scheduling status is obtained based on the activity level and credit value corresponding to the target work queue element, the activity level being a parameter of the target work queue element obtained by the network interface card from the target host; the credit value is used to indicate whether the target message corresponding to the target work queue element has obtained the number of message bytes allowed to be sent; Based on the target scheduling status, it is determined whether the scheduling mechanism corresponding to the target scheduling queue is effective, and the scheduling mechanism is used to indicate whether the target scheduling queue is allowed to be scheduled. When the scheduling mechanism is in effect, scheduling operations are performed on the target work queue element and the target message.

2. The method according to claim 1, characterized in that, Determining the current target scheduling state of the target scheduling queue includes: If the activity level is greater than or equal to a preset activity level, and the credit value is greater than or equal to a preset credit value, then the target scheduling state of the target scheduling queue is determined to be a scheduling ready state; or, If the activity level is less than a preset activity level and / or the credit value is less than a preset credit value, the target scheduling state of the target scheduling queue is determined to be a scheduling pause state.

3. The method according to claim 1, characterized in that, After determining the current target scheduling state of the target scheduling queue, the method further includes: Generate target scheduling information corresponding to the target scheduling queue, wherein the target scheduling information includes a target scheduling sequence number and a target scheduling status, and the target scheduling sequence number is obtained based on the trigger time of the doorbell signal.

4. The method according to claim 3, characterized in that, When the target scheduling state is in the scheduling ready state and the target scheduling sequence number is less than or equal to the preset scheduling sequence number, the scheduling mechanism is determined to be effective. The preset scheduling sequence number is used to represent the scheduling limit of the network interface card.

5. The method according to claim 1, characterized in that, The execution of the scheduling operation on the target work queue element and the target message includes: From at least one target work queue element of the target scheduling queue, obtain no more than a preset number of first work queue elements, and determine the first message associated with the first work queue element from the target message; Obtain the total number of message bytes corresponding to the first message, compare the total number of message bytes with the preset number of message bytes, and obtain the comparison result, wherein the preset number of message bytes is obtained based on the credit value; Based on the comparison results, a scheduling operation is performed on the first message.

6. The method according to claim 5, characterized in that, The step of performing a scheduling operation on the first message based on the comparison result includes: If the comparison result shows that the total number of message bytes is less than or equal to the preset number of message bytes, the first message is encapsulated to obtain a first data packet; Send the first data packet to the receiving device.

7. The method according to claim 6, characterized in that, The step of performing a scheduling operation on the first message based on the comparison result includes: If the comparison result shows that the total number of message bytes is greater than the preset number of message bytes, then obtain the second message to be sent from the first message, which is the preset number of message bytes. The second message to be sent is encapsulated to obtain the second data packet; The second data packet is sent to the receiving device, and the remaining unencapsulated messages in the first message are discarded.

8. The method according to claim 1, characterized in that, After performing scheduling operations on the target work queue element and the target message, the method further includes: Receive the third data packet and parse the header of the third data packet to obtain the target packet sequence number corresponding to the third data packet; Obtain the first expected packet sequence number corresponding to the third data packet from the preset scheduling list, and compare the target packet sequence number with the first expected packet sequence number; If the target packet sequence number does not match the first expected packet sequence number, the system confirms that it has entered the packet loss recovery state and performs a retransmission operation based on the target packet sequence number and the first expected packet sequence number.

9. The method according to claim 8, characterized in that, The retransmission operation based on the target packet sequence number and the first expected packet sequence number includes: The target packet sequence number and the first expected packet sequence number are sent to the central processing unit of the target host, so that the central processing unit can obtain the packet sequence number corresponding to the lost data packet from the bitmap based on the target packet sequence number and the first expected packet sequence number; The system receives a retransmission request from the central processing unit and sends the retransmission request to the sender corresponding to the third data packet. The retransmission request is generated based on the packet sequence number corresponding to the lost data packet and sent through a target retransmission queue, which is the retransmission queue corresponding to the sending queue associated with the lost data packet.

10. The method according to claim 9, characterized in that, After sending the target packet sequence number and the first desired packet sequence number to the central processing unit, the method further includes: Receive a fourth data packet; if the packet sequence number carried by the fourth data packet matches the packet sequence number corresponding to the lost data packet, send the fourth data packet to the central processing unit. The system receives the second expected packet sequence number sent by the central processing unit and writes the second expected packet sequence number into the preset scheduling list, wherein the second expected packet sequence number is sent by the central processing unit after receiving the fourth data packet.

11. A network interface card, characterized in that, include: Direct memory access engine module and transfer module; The direct memory access engine module is configured to, in response to a doorbell signal sent by the target host, determine a target scheduling queue to be scheduled from the host memory, wherein the doorbell signal indicates that at least one target work queue element in the target scheduling queue contains a target message to be sent, and each target work queue element is associated with at least one message; the doorbell signal is triggered when the storage space pointed to by the target work queue element contains a target message to be sent; determine the current target scheduling status of the target scheduling queue, wherein the target scheduling status is obtained based on the activity level and credit value corresponding to the target work queue element, the activity level being a parameter of the target work queue element obtained by the network interface card from the target host; the credit value indicating whether the target message corresponding to the target work queue element has obtained the number of message bytes allowed to be sent; and determine whether the scheduling mechanism corresponding to the target scheduling queue is effective based on the target scheduling status, wherein the scheduling mechanism indicates whether the target scheduling queue is allowed to be scheduled. The transmission module is used to perform scheduling operations on the target work queue element and the target message when the scheduling mechanism is in effect.

12. The network interface card according to claim 11, characterized in that, The direct memory access engine module includes: a scheduler; The scheduler is used to generate target scheduling information corresponding to the target scheduling queue, wherein the target scheduling information includes a target scheduling sequence number and a target scheduling status, and the target scheduling sequence number is obtained based on the trigger time of the doorbell signal.

13. The network interface card according to claim 12, characterized in that, The scheduler is configured to determine that the scheduling mechanism is effective when the target scheduling state is in a scheduling ready state and the target scheduling sequence number is less than or equal to a preset scheduling sequence number. The preset scheduling sequence number is used to represent the scheduling limit of the network interface card.

14. The network interface card according to claim 13, characterized in that, The direct memory access engine module further includes: a data transporter; The data transporter is configured to obtain no more than a preset number of first work queue elements from at least one target work queue element of the target scheduling queue, determine the first message associated with the first work queue element from the target message, obtain the total number of message bytes corresponding to the first message, compare the total number of message bytes with a preset number of message bytes, and obtain a comparison result, wherein the preset number of message bytes is obtained based on the credit value; The transmission module is used to perform a scheduling operation on the first message based on the comparison result.

15. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, a communication bus, and a network interface card as described in any one of claims 11-14.

16. A computer-readable storage medium, characterized in that, The storage medium includes a stored program, wherein the program executes the method of any one of claims 1 to 10 when it is run.