Data transmission method and apparatus, electronic device, and computer storage medium

CN117579576BActive Publication Date: 2026-10-09YUSUR TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311666308.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-06
Publication Date
2026-10-09
Estimated Expiration
2043-12-06

AI Technical Summary

Benefits of technology

[0031]According to the data transmission scheme provided in the embodiments of this application, by storing data packets of different message types to be sent into corresponding sending queues, multiple sending queues can be used for fine-grained management of data packets to be sent. Furthermore, different sending queues have different priorities, and by configuring high bandwidth values ​​for high-priority sending queues, the bandwidth of high-priority sending queues can be guaranteed first, thereby improving the service quality of the network card.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117579576B_ABST
    Figure CN117579576B_ABST
Patent Text Reader

Abstract

The application provides a data transmission method and device, electronic equipment and computer storage medium. The method comprises the following steps: obtaining to-be-sent data packets in a set area of a network card according to a received current batch of data read-write requests; storing the to-be-sent data packets in corresponding sending queues according to packet types of the to-be-sent data packets; determining a first equivalent bandwidth value of the sending queues according to packet lengths of each to-be-sent data packet in the sending queues; and sending the to-be-sent data packets in the sending queues to corresponding target devices when it is detected that the first equivalent bandwidth value of the sending queues is not 0. The application can finely manage packet types of data packets by using sending queues with different priorities, and preferentially guarantees bandwidth of a high-priority sending queue, so as to improve service quality of the network card.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data transmission method, apparatus, electronic device, and computer storage medium. Background Technology

[0002] With the development of high-performance computing (HPC) technology, cloud technology, and data centers, RDMA (Remote Direct Memory Access), as a technology for direct remote memory access, has been widely used in the field of data transmission due to its high bandwidth, low latency, and low CPU utilization.

[0003] As network congestion worsens, traffic management is needed for network cards with RDMA capabilities to ensure the quality of service. Summary of the Invention

[0004] In view of this, embodiments of this application provide a data transmission method, apparatus, electronic device, and computer storage medium, which can use different priority transmission queues to perform fine-grained management of data packet types, and prioritize the bandwidth of high-priority transmission queues to improve the service quality of the network card.

[0005] According to a first aspect of the embodiments of this application, a data transmission method is provided, applied to a network interface card (NIC) with RDMA functionality, wherein one end of the NIC is connected to a host device, and the other end is connected to multiple target devices, the method comprising:

[0006] Based on the received data read / write requests for the current batch, the data packets to be sent are obtained from the designated area of ​​the network card;

[0007] According to the message type of the data message to be sent, the data message to be sent is stored in the corresponding sending queue. The network card is provided with multiple sending queues. The message types of the data messages stored in the multiple sending queues are different. The priorities of the multiple sending queues are different. The priority of the sending queue is positively correlated with the preset bandwidth value of the sending queue.

[0008] The first equivalent bandwidth value of the sending queue is determined based on the message length of each data packet to be sent in the sending queue.

[0009] If the first equivalent bandwidth value of the sending queue is not 0, the data packet to be sent in the sending queue is sent to the corresponding target device.

[0010] In some embodiments, the method further includes:

[0011] When the current batch of data transmission is completed, the bandwidth difference is determined based on the first equivalent bandwidth value of the sending queue and the preset bandwidth value of the sending queue.

[0012] When the bandwidth difference is less than 0, a second equivalent bandwidth value is determined based on the preset bandwidth value of the sending queue and the bandwidth difference, and the second equivalent bandwidth value is determined as the preset bandwidth value of the sending queue when transmitting data in the next batch.

[0013] If the bandwidth difference is greater than or equal to 0, the preset bandwidth value for the next batch of data transmitted in the sending queue will not be adjusted.

[0014] In some embodiments, determining the first equivalent bandwidth value of the sending queue based on the message length of each data packet to be sent in the sending queue includes:

[0015] The message length of each data packet to be sent in the sending queue is obtained sequentially;

[0016] The total message length of the data packets to be sent in the sending queue is determined based on the message length of each data packet to be sent, and the total message length is determined as the first equivalent bandwidth value of the sending queue.

[0017] In some embodiments, determining a first equivalent bandwidth value for the sending queue based on the message length of each data packet to be sent in the sending queue includes:

[0018] If the sending queue is detected to be the highest priority sending queue, the first equivalent bandwidth value of the sending queue is determined to be infinitesimal;

[0019] If the sending queue is detected to be a non-highest priority sending queue, the first equivalent bandwidth value of the sending queue is determined based on the message length of each data packet to be sent in the sending queue.

[0020] In some embodiments, sending the data packet to be sent in the sending queue to the corresponding target device includes:

[0021] If the number of the sending queues is greater than or equal to 2, the data packets to be sent in each sending queue are sent to the corresponding target device using a round-robin scheduling method.

[0022] In some embodiments, the method further includes:

[0023] If the total equivalent bandwidth of all the sending queues is greater than the preset total bandwidth of the network card for a period of time longer than a preset time, the data packets to be sent in each sending queue are sent to the corresponding target device using a priority scheduling method.

[0024] According to a second aspect of the present application, a data transmission apparatus is provided, applied to a gateway with RDMA functionality, wherein one end of the network interface card is connected to a master device and the other end is connected to multiple target devices, the apparatus comprising:

[0025] The acquisition module is used to acquire the data packets to be sent in a set area of ​​the network card based on the received data read / write requests of the current batch.

[0026] The storage module is used to store the data packet to be sent into the corresponding sending queue according to the packet type of the data packet to be sent. The network card is provided with multiple sending queues. The data packets stored in the multiple sending queues have different packet types and different priorities. The priority of the sending queue is positively correlated with the preset bandwidth value of the sending queue.

[0027] The determining module is used to determine the first equivalent bandwidth value of the sending queue based on the message length of each data packet to be sent in the sending queue;

[0028] The sending module is configured to send the data packet to be sent in the sending queue to the corresponding target device when it detects that the first equivalent bandwidth value of the sending queue is not 0.

[0029] According to a third aspect of the present application, an electronic device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, wherein the executable instruction causes the processor to perform an operation corresponding to the data transmission method described in the first aspect.

[0030] According to a fourth aspect of the embodiments of this application, a computer storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the data transmission method as described in the first aspect.

[0031] According to the data transmission scheme provided in the embodiments of this application, by storing data packets of different message types to be sent into corresponding sending queues, multiple sending queues can be used for fine-grained management of data packets to be sent. Furthermore, different sending queues have different priorities, and by configuring high bandwidth values ​​for high-priority sending queues, the bandwidth of high-priority sending queues can be guaranteed first, thereby improving the service quality of the network card. Attached Figure Description

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

[0033] Figure 1 This is a flowchart illustrating the steps of a data transmission method according to an embodiment of this application;

[0034] Figure 2 This is a flowchart illustrating the steps of a data transmission method according to another embodiment of this application;

[0035] Figure 3 This is a structural block diagram of a data transmission device according to an embodiment of this application;

[0036] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

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

[0038] The specific implementation of the embodiments of this application will be further described below with reference to the accompanying drawings.

[0039] This application provides a data transmission method applied to a network interface card (NIC) with RDMA (Remote Data Interchange). One end of the NIC is connected to a host device, and the other end is connected to multiple target devices. The host device can be a server, and data exchange can be performed between two target devices via the NIC. Specific steps are as follows: Figure 1 As shown, the method includes:

[0040] S101: Based on the received data read / write requests for the current batch, obtain the data packets to be sent from the designated area of ​​the network card.

[0041] In this embodiment, after the network card receives a data read / write request sent by the target device, the network card parses the data read / write request and finds the data packet to be sent corresponding to the read / write request in the network card's set area.

[0042] In one example, in this embodiment of the application, multiple target devices can simultaneously send data read / write requests to the network card. When the network card receives data read / write requests sent simultaneously by multiple target devices, the network card parses the received current batch of data read / write requests and determines the data packet to be sent for each data read / write request in the network card's designated area.

[0043] In one example, the network card's configuration area can be either the network card's local storage or cloud storage connected to the network card.

[0044] S102, based on the message type of the data message to be sent, store the message to be sent into the corresponding sending queue.

[0045] In this embodiment, after the network interface card (NIC) determines the data packet to be sent corresponding to the data read / write request, the NIC sequentially determines the packet type of each acquired data packet to be sent, and stores the data packet to be sent into the corresponding sending queue according to the packet type. Specifically, in this embodiment, the NIC is provided with multiple sending queues, the packet types of the data packets stored in the multiple sending queues are different, the priorities of the multiple sending queues are different, and the priority of the sending queue is positively correlated with the preset bandwidth value of the sending queue.

[0046] In one example, the network card in this embodiment of the application determines the message type of the data packet to be sent based on the header of the data packet to be sent. That is, when the data packet is stored in a set area, the network card will encapsulate the data packet according to the message type of the data packet and add a corresponding header during the encapsulation process. Thus, the network card can determine the message type of the data packet to be sent based on the header of the data packet to be sent.

[0047] In one example, the message type of the data packet to be sent can be determined according to the communication protocol between the master device and / or the target device and the network card. Specifically, the message type of the data packet to be sent can be divided into RoCEv2 data packets, TCP data packets and other data packets.

[0048] Furthermore, the transmission queue in the network card can also be determined according to the communication protocol between the master device and / or the target device and the network card. Specifically, the transmission queue may include the RoCEv2 transmission queue, the TCP transmission queue, and other data packet transmission queues.

[0049] Furthermore, when the network interface card (NIC) determines that the data packet to be sent is a RoCEv2 data packet, the NIC stores the data packet to be sent in the RoCEv2 sending queue. When the NIC determines that the data packet to be sent is a TCP data packet, the NIC stores the data packet to be sent in the TCP sending queue, and so on. The NIC stores the data packets to be sent in the current batch in the corresponding sending queue.

[0050] In one example, the priority among the sending queues in this embodiment can be set as follows: RoCEv2 sending queue > TCP sending queue > other data packet sending queues, and the bandwidth of each sending queue can be determined according to the configured sending queue bandwidth ratio. Specifically, in this embodiment, high-priority sending queues have higher bandwidth than low-priority sending queues.

[0051] S103, determine the first equivalent bandwidth value of the sending queue based on the message length of each data message to be sent in the sending queue.

[0052] In this embodiment of the application, after the network card stores all data packets to be sent into the corresponding sending queue, the network card sequentially obtains the packet length of each data packet to be sent in each sending queue, and then determines the first equivalent bandwidth value of the sending queue. The first equivalent bandwidth value can be used to indicate whether there are data packets to be sent in the sending queue.

[0053] S104: If the first equivalent bandwidth value of the sending queue is not 0, the data packets to be sent in the sending queue will be sent to the corresponding target device.

[0054] In this embodiment, if the network card determines that the first equivalent bandwidth value of the transmission queue is not 0, the network card determines that there is data to be transmitted in the transmission queue. Furthermore, the network card transmits the data to be transmitted in the transmission queue to the corresponding target device.

[0055] In one example, the network card determines that the first equivalent bandwidth of the RoCEv2 sending queue is 1000bps, the first equivalent bandwidth of the TCP sending queue is 500bps, and the first equivalent bandwidth of other data packet sending queues is 0. The network card then sends the data to be sent stored in the RoCEv2 sending queue and the TCP sending queue to the corresponding target device.

[0056] The data transmission method of this application embodiment stores data packets of different message types to be sent into corresponding sending queues, which can be used to perform fine-grained management of data packets to be sent using multiple sending queues. Furthermore, different sending queues have different priorities, and by configuring high bandwidth values ​​for high-priority sending queues, the bandwidth of high-priority sending queues can be guaranteed first, thereby improving the service quality of the network card.

[0057] Furthermore, the data transmission method in this application embodiment may further include the following steps:

[0058] S105, when the current batch of data transmission is completed, determine the bandwidth difference based on the first equivalent bandwidth value of the sending queue and the preset bandwidth value of the sending queue.

[0059] In this embodiment, after the network interface card (NIC) sends the current batch of data packets to the corresponding target device, the NIC calculates the difference between the first equivalent bandwidth value of the sending queue and its corresponding preset bandwidth value to determine the bandwidth difference, and then determines whether the actual bandwidth used by the sending queue exceeds the preset bandwidth of the sending queue. Specifically, if the bandwidth difference is greater than or equal to 0, it is determined that the actual bandwidth used by the sending queue does not exceed the preset bandwidth of the sending queue, and the bandwidth of the sending queue is normal. If the bandwidth difference is less than 0, it is determined that the actual bandwidth used by the sending queue exceeds the preset bandwidth of the sending queue, and the bandwidth of the sending queue is abnormal.

[0060] In one example, the network card calculates the first equivalent bandwidth value of the TCP send queue to be 800bps, and the preset bandwidth value of the TCP send queue is 500bps. After the network card sends all the data to be sent in the TCP queue to the target device, the network card calculates the bandwidth difference of the TCP queue to be -300bps, and then the network card determines that the bandwidth of the TCP queue is abnormal.

[0061] In one example, when the network card is calculating the bandwidth difference in the sending queue, it can subtract the equivalent bandwidth of the sent data from the preset bandwidth value of the sending queue each time a piece of data to be sent is sent, until the sending queue is empty. The network card can then determine the bandwidth difference in the sending queue.

[0062] S106, when the bandwidth difference is less than 0, determine the second equivalent bandwidth value based on the preset bandwidth value of the sending queue and the bandwidth difference, and set the second equivalent bandwidth value as the preset bandwidth value of the sending queue when transmitting data in the next batch.

[0063] In this embodiment, when the network card determines that the bandwidth difference of the sending queue is less than 0, the network card uses the preset bandwidth value of the sending queue and the bandwidth difference to determine the second equivalent bandwidth value, and uses the second equivalent bandwidth value as the preset bandwidth value of the sending queue when transmitting data in the next batch. In this way, by reducing the preset bandwidth of the sending queue when transmitting data in the next batch, the bandwidth occupied by the sending queue in the current batch is compensated, thereby maintaining the normal bandwidth of the sending queue and ensuring the service quality of the network card.

[0064] In one example, with a bandwidth difference of -300 in the TCP send queue, the network card will set the default bandwidth of the TCP send queue to 200bps for the next batch of data transmission.

[0065] S107: If the bandwidth difference is greater than or equal to 0, the preset bandwidth value for the next batch of data to be transmitted in the sending queue will not be adjusted.

[0066] In this embodiment, when the bandwidth difference is greater than or equal to 0, the network card determines that the bandwidth of the transmission queue is normal, and therefore, when transmitting the next batch of data, the network card will not adjust the preset bandwidth value of the transmission queue.

[0067] Furthermore, determining the first equivalent bandwidth value of the sending queue based on the message length of each data packet to be sent in the sending queue according to the embodiments of this application may include the following steps:

[0068] S1031, sequentially obtain the message length of each data packet to be sent in the sending queue.

[0069] In this embodiment, when the network card determines the first equivalent bandwidth value of the sending queue, it first obtains the message length of each data packet to be sent in the sending queue in sequence.

[0070] In one example, the length of the data packet to be sent in this embodiment of the application can also be determined based on the header of the data packet to be sent.

[0071] S1032, determine the total message length of the data packets to be sent in the sending queue based on the message length of each data packet to be sent, and determine the total message length as the first equivalent bandwidth value of the sending queue.

[0072] In this embodiment, the network card counts the length of each data packet to be sent in the sending queue, and determines the total length of all data packets to be sent as the first equivalent bandwidth value of the sending queue.

[0073] In one example, if the TCP send queue stores three data packets to be sent, namely data packet 1, data packet 2, and data packet 3, with packet lengths of 100 bits, 200 bits, and 300 bits respectively, then the first equivalent bandwidth of the TCP send queue is 600 bps.

[0074] In one example, when the network interface card (NIC) determines the first equivalent bandwidth value of the sending queue, it checks whether the priority of the sending queue is the highest priority. If the NIC detects that the sending queue is the highest priority sending queue, it sets the first equivalent bandwidth value of the highest priority sending queue to be infinitesimal to ensure the quality of service for high-priority traffic. If the NIC detects that the sending queue is not the highest priority sending queue, it sets the total packet length corresponding to all data packets to be sent as the first equivalent bandwidth value of the sending queue.

[0075] In one example, the RoCEv2 sending queue in this application embodiment can be set as the highest priority sending queue.

[0076] Furthermore, in this embodiment of the application, sending the data packets to be sent in the sending queue to the corresponding target device may include the following steps:

[0077] S1041, if the number of sending queues is detected to be greater than or equal to 2, the data packets to be sent in each sending queue are sent to the corresponding target device using a round-robin scheduling method.

[0078] In this embodiment, when the network interface card (NIC) sends data packets to be sent from the transmission queue, it detects the number of transmission queues that meet the sending conditions, specifically the number of transmission queues with a first equivalent bandwidth value greater than 0. If the number of transmission queues meeting the sending conditions is greater than or equal to 2, the NIC uses a round-robin scheduling method to send the data packets to be sent from the transmission queue to the target device. This round-robin scheduling method ensures that transmission queues of all priorities can transmit data, guaranteeing the quality of service (QoS) for both high-priority and low-priority traffic.

[0079] In one example, before the network interface card (NIC) sends the data packets to be sent from each sending queue to the corresponding target device using round-robin scheduling, the NIC obtains the total equivalent bandwidth value of all sending queues in the NIC. If the total equivalent bandwidth value of all sending queues is greater than the NIC's preset total bandwidth value, the NIC uses priority scheduling to send the data packets to be sent from each sending queue to the target device. That is, under priority scheduling, the NIC first sends the data packets to the highest priority sending queue. When the data packets to be sent in the highest priority sending queue have been sent, the NIC sends the data packets to be sent from the sending queue to the target device in descending order of priority to ensure the quality of service for high-priority traffic.

[0080] When the total equivalent bandwidth of all sending queues is less than or equal to the preset total bandwidth of the network card, and the number of sending queues that meet the sending conditions is greater than or equal to 2, the network card uses a round-robin scheduling method to send the data packets to be sent in the sending queues to the target device.

[0081] Furthermore, this application provides yet another data transmission method, with specific steps... Figure 2 As shown, it includes:

[0082] The network interface card (NIC) receives data read / write requests for the current batch from the target device. Based on the received data read / write requests, the NIC retrieves the data to be sent corresponding to the data read / write requests from the NIC's designated area. Further, the NIC determines the packet type of the data packet to be sent based on the header of the data packet to be sent. After determining the packet type, the NIC stores the data packet to be sent in the corresponding sending queue. The NIC has multiple sending queues, and the packet types of the data packets stored in the multiple sending queues are different. The priorities of the multiple sending queues are also different, and the priority of the sending queue is positively correlated with the preset bandwidth value of the sending queue.

[0083] Furthermore, after the network interface card (NIC) stores the data packets to be sent into the transmission queue, the NIC sequentially obtains the packet length of each data packet to be sent in the transmission queue to calculate the first equivalent bandwidth value of the transmission queue. When determining the first equivalent bandwidth value of the transmission queue, the NIC checks whether the priority of the transmission queue is the highest priority. When the NIC detects that the transmission queue is the highest priority transmission queue, the NIC determines the first equivalent bandwidth value of the highest priority transmission queue as infinitesimal. When the NIC detects that the transmission queue is not the highest priority transmission queue, it determines the first equivalent bandwidth value of the transmission queue according to the packet length of each data packet to be sent in the transmission queue.

[0084] Furthermore, when the network card sends data, it obtains the total equivalent bandwidth value of all transmission queues in the network card. If the total equivalent bandwidth value of all transmission queues is greater than the network card's preset total bandwidth value, the network card uses a priority scheduling method to send the data packets to be sent in each transmission queue to the target device. If the total equivalent bandwidth value of all transmission queues is less than or equal to the network card's preset total bandwidth value, and the number of transmission queues is greater than or equal to 2, the network card uses a round-robin scheduling method to send the data packets to be sent in each transmission queue to the corresponding target device.

[0085] Furthermore, when the current batch of data packets is sent, the network card calculates the difference between the first equivalent bandwidth value of the sending queue and its corresponding preset bandwidth value to determine the bandwidth difference. If the network card determines that the bandwidth difference of the sending queue is less than 0, the network card uses the preset bandwidth value of the sending queue and the bandwidth difference to determine the second equivalent bandwidth value, and uses the second equivalent bandwidth value as the preset bandwidth value of the sending queue when transmitting the next batch of data. If the bandwidth difference is greater than or equal to 0, the network card determines that the bandwidth of the sending queue is normal, and therefore, when transmitting the next batch of data, the network card will not adjust the preset bandwidth value of the sending queue.

[0086] Furthermore, embodiments of this application provide a data transmission device, such as... Figure 3 As shown, the device includes:

[0087] The acquisition module 301 is used to acquire the data packet to be sent in a set area of ​​the network card according to the received data read and write requests of the current batch.

[0088] The storage module 302 is used to store the data packet to be sent into the corresponding sending queue according to the packet type of the data packet to be sent. The network card is provided with multiple sending queues. The data packets stored in the multiple sending queues have different packet types and different priorities. The priority of the sending queue is positively correlated with the preset bandwidth value of the sending queue.

[0089] The determining module 303 is used to determine the first equivalent bandwidth value of the sending queue based on the message length of each data packet to be sent in the sending queue;

[0090] The sending module 304 is configured to send the data packet to be sent in the sending queue to the corresponding target device when it is detected that the first equivalent bandwidth value of the sending queue is not 0.

[0091] The data transmission device of this embodiment is used to implement the corresponding data transmission methods in the foregoing method embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. Furthermore, the functional implementation of each module in the data transmission device of this embodiment can be referred to the description of the corresponding part in the foregoing method embodiments, which will also not be repeated here.

[0092] Reference Figure 4 This document illustrates a schematic diagram of an electronic device according to an embodiment of this application. The specific embodiments of this application do not limit the specific implementation of the electronic device.

[0093] like Figure 4 As shown, the electronic device may include: a processor 402, a communications interface 404, a memory 406, and a communications bus 408.

[0094] in:

[0095] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408.

[0096] Communication interface 404 is used to communicate with other electronic devices or servers.

[0097] The processor 402 is used to execute program 410, which can specifically execute the relevant steps in the above-described verification code generation method embodiment.

[0098] Specifically, program 410 may include program code that includes computer operation instructions.

[0099] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The smart device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0100] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0101] Specifically, program 410 can be used to cause processor 402 to perform the following operations:

[0102] In an optional implementation, program 410 is further configured to ensure that the specific implementation of each step of the processor 402 in program 410 can be found in the corresponding steps and units described in the above-described data transmission method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.

[0103] This application also provides a computer program product, including computer instructions that instruct a computing device to perform an operation corresponding to any of the data transmission methods in the above-described multiple method embodiments.

[0104] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of this application can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of this application.

[0105] The methods described in the embodiments of this application can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code downloaded over a network that is originally stored in a remote recording medium or a non-transitory machine-readable medium and will be stored in a local recording medium. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the checksum generation method described herein. Furthermore, when a general-purpose computer accesses code used to implement the checksum generation method shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the checksum generation method shown herein.

[0106] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.

[0107] The above embodiments are only used to illustrate the embodiments of this application, and are not intended to limit the embodiments of this application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of this application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of this application, and the patent protection scope of the embodiments of this application should be defined by the claims.

Claims

1. A data transmission method applied to a network interface card (NIC) with RDMA functionality, wherein one end of the NIC is connected to a host device, and the other end is connected to multiple target devices, characterized in that... The method includes: Based on the received data read / write requests for the current batch, the data packets to be sent are obtained from the designated area of ​​the network card, wherein the data read / write requests are sent by the target device; According to the message type of the data message to be sent, the data message to be sent is stored in the corresponding sending queue. The network card is provided with multiple sending queues. The message types of the data messages stored in the multiple sending queues are different. The priorities of the multiple sending queues are different. The priority of the sending queue is positively correlated with the preset bandwidth value of the sending queue. The message length of each data packet to be sent in the sending queue is obtained sequentially; the total message length of the data packets to be sent in the sending queue is determined according to the message length of each data packet to be sent, and the total message length is determined as the first equivalent bandwidth value of the sending queue; If the first equivalent bandwidth value of the sending queue is not 0, the data packet to be sent in the sending queue is sent to the corresponding target device. The method further includes: obtaining the total equivalent bandwidth value of all the transmission queues in the network interface card; if the total equivalent bandwidth value of all the transmission queues is detected to be greater than the preset total bandwidth value of the network interface card, sending the data packets to be sent in each transmission queue to the corresponding target device using a priority scheduling method; if the total equivalent bandwidth value of all the transmission queues is detected to be less than or equal to the preset total bandwidth value of the network interface card, and the number of transmission queues that meet the sending conditions is greater than or equal to 2, sending the data packets to be sent in each transmission queue to the corresponding target device using a round-robin scheduling method.

2. The method according to claim 1, characterized in that, The method further includes: When the current batch of data transmission is completed, the bandwidth difference is determined based on the first equivalent bandwidth value of the sending queue and the preset bandwidth value of the sending queue. When the bandwidth difference is less than 0, a second equivalent bandwidth value is determined based on the preset bandwidth value of the sending queue and the bandwidth difference, and the second equivalent bandwidth value is determined as the preset bandwidth value of the sending queue when transmitting data in the next batch. If the bandwidth difference is greater than or equal to 0, the preset bandwidth value for the next batch of data transmitted in the sending queue will not be adjusted.

3. The method according to claim 1, characterized in that, Based on the message length of each data packet to be sent in the sending queue, the first equivalent bandwidth value of the sending queue is determined, including: If the sending queue is detected to be the highest priority sending queue, the first equivalent bandwidth value of the sending queue is determined to be infinitesimal; If the sending queue is detected to be a non-highest priority sending queue, the first equivalent bandwidth value of the sending queue is determined based on the message length of each data packet to be sent in the sending queue.

4. A data transmission device, applied to a gateway with RDMA functionality, wherein one end of a network interface card (NIC) is connected to a master device, and the other end is connected to multiple target devices, characterized in that... The device includes: The acquisition module is used to acquire the data packets to be sent in a set area of ​​the network card based on the received data read / write requests of the current batch. The storage module is used to store the data packet to be sent into the corresponding sending queue according to the packet type of the data packet to be sent. The network card is provided with multiple sending queues. The data packets stored in the multiple sending queues have different packet types and different priorities. The priority of the sending queue is positively correlated with the preset bandwidth value of the sending queue. The determining module is used to sequentially obtain the message length of each data packet to be sent in the sending queue; determine the total message length of the data packets to be sent in the sending queue based on the message length of each data packet to be sent, and determine the total message length as the first equivalent bandwidth value of the sending queue; The sending module is configured to send the data packet to be sent in the sending queue to the corresponding target device when it is detected that the first equivalent bandwidth value of the sending queue is not 0; The device is further configured to obtain the total equivalent bandwidth value of all the transmission queues in the network interface card; when the total equivalent bandwidth value of all the transmission queues is detected to be greater than the preset total bandwidth value of the network interface card, the device uses a priority scheduling method to send the data packets to be sent in each transmission queue to the corresponding target device; when the total equivalent bandwidth value of all the transmission queues is detected to be less than or equal to the preset total bandwidth value of the network interface card, and the number of transmission queues that meet the sending conditions is greater than or equal to 2, the device uses a round-robin scheduling method to send the data packets to be sent in each transmission queue to the corresponding target device.

5. An electronic device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the data transmission method as described in any one of claims 1-3.

6. A computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the data transmission method as described in any one of claims 1-3.

7. A computer program product comprising computer instructions that instruct a computing device to perform an operation corresponding to any one of the data transmission methods as described in claims 1-3.

Citation Information

Patent Citations

  • Technologies for RDMA queue pair QOS management

    US20190354406A1