CN118555249A - Message transmission method based on DPU network card, network equipment and computer storage medium - Google Patents
Message transmission method based on DPU network card, network equipment and computer storage medium Download PDFInfo
- Publication number
- CN118555249A CN118555249A CN202410770191.3A CN202410770191A CN118555249A CN 118555249 A CN118555249 A CN 118555249A CN 202410770191 A CN202410770191 A CN 202410770191A CN 118555249 A CN118555249 A CN 118555249A
- Authority
- CN
- China
- Prior art keywords
- message
- receiving
- rdma
- resources
- sending
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 230000005540 biological transmission Effects 0.000 title claims abstract description 44
- 238000012790 confirmation Methods 0.000 claims abstract description 36
- 238000004891 communication Methods 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 5
- 230000000153 supplemental effect Effects 0.000 description 13
- 230000007246 mechanism Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 8
- 230000003993 interaction Effects 0.000 description 4
- 238000013507 mapping Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 239000013589 supplement Substances 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 238000011022 operating instruction Methods 0.000 description 1
- 230000001502 supplementing effect Effects 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention provides a message transmission method based on a DPU network card, the DPU network card, network equipment and a computer storage medium. The message transmission method comprises the following steps: acquiring a receiving confirmation message sent by a receiving end aiming at a previous RDMA message, wherein the receiving confirmation message comprises resource indication information, and the resource indication information is used for indicating the quantity of the supplementary message resources of a receiving message queue of the receiving end; calculating the number of the residual message resources of the receiving end according to the number of the supplementary message resources, and judging whether the number of the residual message resources meets the sending condition of the current RDMA message; and under the condition that the sending condition is met, sending the current RDMA message to the receiving end.
Description
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a message transmission method based on a DPU network card, the DPU network card, network equipment and a computer storage medium.
Background
RDMA (Remote Direct Memory Access) technology is an important support technology for implementing DPU (Data Processing Unit ) schemes. RDMA allows applications to bypass the operating system kernel protocol stack and directly interact with the network card for network communication, thereby achieving high bandwidth and minimal delay. In addition, in RDMA, the network card can directly initiate and complete the read-write request to the remote memory without the help of a remote node, so that the CPU utilization rate can be greatly improved. From the perspective of system software design, RDMA can be directly regarded as a faster network, and current implementation of RDMA mainly includes InfiniBand, roCE (RDMA over Converged Ethernet) and iWARP (INTERNET WIDE AREA RDMA Protocol), wherein RoCE can implement high-performance data transmission on ethernet by encapsulating RDMA operations in an ethernet Protocol, and application is the widest.
With the development of Ethernet, the Ethernet has the capability of high bandwidth and low delay, and can also approach the InfiniBand switching performance in terms of delay, so that the RoCE becomes a necessary result, and the RoCE networking cost is lower. For packet loss in RDMA networks, the reason is that in network switches, network congestion occurs when ingress traffic is greater than the bandwidth of egress traffic, and a newly received packet is discarded too long. In order to solve the problem of packet loss, the InfiniBand adopts a Credit (Credit) flow control mechanism in the network card; the RoCE ethernet card needs to implement DCB features in the network card and the switch.
RDMA RNR (Receiver Not Ready), receiver not ready), retransmission is an error handling mechanism. When the receiving end is not ready to receive data, the receiving end will send an RNR NAK (Negative Acknowledgement, negative acknowledgement message) signal to the transmitting end requesting the transmitting end to retransmit the data.
Because the RNR retransmission is mainly used for solving the problem that the receiving end cannot receive data in time, the reliable transmission and the correctness of the data can be ensured through an RNR retransmission mechanism, however, the RNR retransmission is a mechanism based on request response and can have a certain influence on the performance of the system, so that the occurrence of the RNR retransmission needs to be reduced as much as possible.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a packet transmission method based on a DPU network card, a network device, and a computer storage medium, so as to solve the above-mentioned problems.
According to a first aspect of an embodiment of the present invention, there is provided a packet transmission method based on a DPU network card, including: acquiring a receiving confirmation message sent by a receiving end aiming at a previous RDMA message, wherein the receiving confirmation message comprises resource indication information, and the resource indication information is used for indicating the quantity of the supplementary message resources of a receiving message queue of the receiving end; calculating the number of the residual message resources of the receiving end according to the number of the supplementary message resources, and judging whether the number of the residual message resources meets the sending condition of the current RDMA message; and under the condition that the sending condition is met, sending the current RDMA message to the receiving end.
In another implementation manner of the present invention, determining whether the number of remaining message resources meets a sending condition of a current RDMA message includes: determining the number of messages to be sent in a sending message queue where the current RDMA message is located; and when the number of the messages to be sent is not greater than the number of the residual message resources, determining that the sending condition of the current RDMA message is met.
In another implementation manner of the present invention, determining whether the number of remaining message resources meets a sending condition of a current RDMA message further includes: updating a sending message queue where the current RDMA message is located after the last RDMA message of the current RDMA message is sent; and when receiving the receiving confirmation message of the last RDMA message, updating the quantity of the residual message resources.
According to a second aspect of the embodiment of the present invention, there is provided a packet transmission method based on a DPU network card, including: receiving a previous RDMA message; generating resource indication information according to the quantity of the supplementary message resources of the received message queue; including the resource indication information in a receipt acknowledgement message of the previous RDMA message; and sending the receiving confirmation message to a sending end.
In another implementation of the present invention, the method further includes: when the residual message resource data of the receiving message queue is insufficient in receiving the current RDMA message, triggering a configuration interface of the receiving message queue to acquire the quantity of the supplementary message resources preconfigured by the configuration interface.
In another implementation of the present invention, the method further includes: and under the condition that the current RDMA message sent by the sender is not received, retransmitting the receiving confirmation message to the sender when the preset timeout period of the timeout timer arrives, wherein the preset timeout period is smaller than the retransmission trigger period of the RDMA message.
In another implementation of the present invention, the method further includes: and setting the timeout timer to a disabled state under the condition that the current RDMA message sent by the sender is received, and updating the next RDMA message into the current RDMA message.
In another implementation of the present invention, the method further includes: and setting the overtime timer to be in an enabling state when the residual message resource data of the receiving message queue is insufficient.
According to a third aspect of an embodiment of the present invention, there is provided a DPU network card, including: the receiving module is used for acquiring a receiving confirmation message sent by a receiving end aiming at a previous RDMA message, wherein the receiving confirmation message comprises resource indication information, and the resource indication information is used for indicating the quantity of the supplementary message resources of a receiving message queue of the receiving end; the judging module is used for calculating the residual message resource quantity of the receiving end according to the supplementary message resource quantity and judging whether the residual message resource quantity meets the sending condition of the current RDMA message; and the sending module is used for sending the current RDMA message to the receiving end under the condition that the sending condition is met.
According to a fourth aspect of an embodiment of the present invention, there is provided a DPU network card, including: the receiving module receives a previous RDMA message; the generating module generates resource indication information according to the number of the supplementary message resources of the received message queue; and the sending module is used for including the resource indication information in a receiving confirmation message of the prior RDMA message and sending the receiving confirmation message to a sending end.
According to a fifth aspect of an embodiment of the present invention, there is provided a network device, including: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus; the memory is configured to hold at least one executable instruction that causes the processor to perform the method of the first or second aspect.
According to a sixth aspect of embodiments of the present invention, there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the method according to the first or second aspect.
According to a seventh aspect of embodiments of the present invention, there is provided a computer program product comprising computer instructions which, when executed by a processor, implement a method as described in the first or second aspect.
In the scheme of the embodiment of the invention, the receiving end can obtain the quantity of the supplementary message resources, and multiplex the receiving confirmation message of the RDMA message, so that the receiving end can inform the quantity of the supplementary message resources of the sending end, the sending condition of the current RDMA message sent to the receiving end can be timely met through the quantity of the supplementary message resources, the occurrence of RDMA message retransmission is greatly reduced, and the performance of the system is improved. In addition, multiplexing RDMA messages realizes the notification of the number of the supplementary message resources of the receiving end to the sending end, and improves the compatibility of RDMA protocols.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present invention, and other drawings may be obtained according to these drawings for a person having ordinary skill in the art.
Fig. 1 is a schematic interaction diagram of a packet flow scheme of some example RDMA protocols.
Fig. 2 is a flow chart illustrating steps of a message transmission method according to some embodiments of the present invention.
Fig. 3is a flowchart illustrating steps of a message transmission method according to another embodiment of the present invention.
Fig. 4 is a schematic interaction diagram of a message transmission method according to other embodiments of the present invention.
Fig. 5is a block diagram of a DPU network card in accordance with further embodiments of the invention.
Fig. 6 is a block diagram of a DPU network card in accordance with further embodiments of the invention.
Fig. 7 is a schematic structural diagram of a network device according to further embodiments of the present invention.
Detailed Description
In order to better understand the technical solutions in the embodiments of the present invention, the following description will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which are derived by a person skilled in the art based on the embodiments of the present invention, shall fall within the scope of protection of the embodiments of the present invention.
The implementation of the embodiments of the present invention will be further described below with reference to the accompanying drawings.
In general, RDMA RNR (Receiver Not Ready ) retransmission is an error handling mechanism. When the receiving end is not ready to receive data, the receiving end will send an RNR NAK (Negative Acknowledgement, negative acknowledgement message) signal to the transmitting end requesting the transmitting end to retransmit the data.
In the process of RNR retransmission, a transmitting end transmits data to a receiving end. The receiving end detects that the receiving end is not ready to receive data, and sends an RNR NAK to the sending end. After receiving the RNR NAK, the transmitting end stops transmitting data and waits for the receiving end to be ready. Once the receiving end is ready to receive data, the transmitting end will continue to transmit the previously incomplete transmission and retransmit the previously interrupted data as needed.
Because the RNR retransmission is mainly used for solving the problem that the receiving end cannot receive data in time, the reliable transmission and the correctness of the data can be ensured through an RNR retransmission mechanism, however, the RNR retransmission is a mechanism based on request response and can have a certain influence on the performance of the system, so that the occurrence of the RNR retransmission needs to be reduced as much as possible.
Fig. 1 is a schematic interaction diagram of a packet flow scheme of some example RDMA protocols. In the flow control scheme of the example of fig. 1, the method is performed by a node a, when it is determined that the usage counter of the transmitting memory unit is not zero, a data packet is sent to the opposite node, the count in the usage counter of the transmitting memory unit is reduced by a predetermined step size, when it is determined that the usage counter of the transmitting memory unit is zero, the data packet is stopped, and when the flow control data packet sent by the opposite node is received, the usage counter of the transmitting memory unit is reset to the usage number of the transmitting memory unit, and new transmission is started; when the use counter of the receiving memory unit is judged to be zero, the data packet sent by the opposite node is received, the count in the use counter of the receiving memory unit is reduced by a preset step length, when the use counter of the receiving memory unit is judged to be zero, the data packet of the opposite node is stopped to be received, the flow control data packet is sent to the opposite node, the use counter of the receiving memory unit is reset to be the use number of the receiving memory unit, and new receiving is started.
As shown in fig. 1, the receiving end and the transmitting end initially maintain 120 memory unit counts, and when the transmitting end transmits 4K data (corresponding to one memory unit), the transmitting end counts down by 1, and when the receiving end successfully receives 4K data, the receiving end counts down by 1. When 120 memory units of the transmitting end run out, the transmitting is stopped, and when 120 memory units of the receiving end run out, a flow control data packet is actively transmitted to the transmitting end, and meanwhile, the self memory unit count is reset to 120. After receiving the flow control data packet, the receiving end resets the own memory unit count to 120, and starts the next round of data transmission.
The sending end and the receiving end respectively maintain a counter with the same initial value, and the counter is used for judging the quantity of memory units received by the receiving end. The sending end reduces the counter count after sending the data packet, the receiving end reduces the counter count after successful receiving, when the counter of the receiving end is zero, the sending end is actively sent with the flow control message, and the counter of the two parties is reset, so that the next round of data transmission is started.
For the device implemented according to the standard RDMA protocol, the user behavior is undefined, that is, when RDMA data transmission is performed according to the patent scheme, after the receiving end actively sends the flow control message, the receiving end does not represent that the user has complemented the receiving queue memory unit, so that more configuration change needs to be executed.
The message transmission method according to some embodiments of the present invention will be described below with reference to fig. 2. The message transmission method of fig. 2 may be applied to a DPU network card, where the message transmission method includes:
s210: and acquiring a receiving confirmation message sent by the receiving end aiming at the previous RDMA message, wherein the receiving confirmation message comprises resource indication information, and the resource indication information is used for indicating the quantity of the supplementary message resources of a receiving message queue of the receiving end.
It should be understood that an RDMA message is a message that satisfies the RDMA protocol. In addition, the previous RDMA message is the last RDMA message of the current RDMA message in the same message queue, and may be other previous RDMA messages in the same message queue.
It should also be understood that when the sending condition of the current RDMA packet is not satisfied, a receiving acknowledgement message sent by the receiving end for the previous RDMA packet may be acquired, so as to acquire the resource indication information in time. In addition, when the sending condition of the current RDMA message is met, the receiving end can acquire the receiving confirmation message sent by the receiving end aiming at the previous RDMA message, so that the resource indication information can be acquired more reliably and timely.
It should also be understood that the receipt acknowledgement message may be an ACK message required by the RDMA protocol, the resource indication information characterizes the number of the supplemental message resources, or the resource indication information and the number of the supplemental message resources may have a preset mapping relationship, and the receiving end writes the resource indication information characterizing the number of the supplemental message resources into the receipt acknowledgement message, or searches the preset mapping relationship, and writes the resource indication information corresponding to the number of the supplemental message resources into the receipt acknowledgement message. In some examples, the resource indication information may be a supplemental message resource amount. In addition, the resource indication information may be written in a reserved field of the reception acknowledgement message.
It should also be appreciated that the mechanism of receiving the message queue and the mechanism of sending the message queue may follow the RDMA protocol.
S220: and calculating the quantity of the residual message resources of the receiving end according to the quantity of the supplementary message resources, and judging whether the quantity of the residual message resources meets the sending condition of the current RDMA message.
It should be appreciated that the number of remaining message resources may be calculated by summing the number of remaining message resources before the receipt of the acknowledgement message with the number of supplemental message resources, i.e. the number of remaining message resources may be updated after receipt of the acknowledgement message.
S230: and under the condition that the sending condition is met, sending the current RDMA message to the receiving end.
It should be appreciated that in some examples, the sending condition of the current RDMA message is considered to be satisfied in the case where the number of remaining message resources is not less than the verified number of messages to be sent. For example, if the number of remaining message resources is verified once every N messages are sent, then if the number of remaining message resources is not less than N, then it is considered that at least N RDMA messages may be sent in the send message queue.
In the scheme of the embodiment of the invention, the receiving end can obtain the quantity of the supplementary message resources, and multiplex the receiving confirmation message of the RDMA message, so that the receiving end can inform the quantity of the supplementary message resources of the sending end, the sending condition of the current RDMA message sent to the receiving end can be timely met through the quantity of the supplementary message resources, the occurrence of RDMA message retransmission is greatly reduced, and the performance of the system is improved. In addition, multiplexing RDMA messages realizes the notification of the number of the supplementary message resources of the receiving end to the sending end, and improves the compatibility of RDMA protocols.
In some embodiments, as an example of determining whether the number of remaining message resources satisfies the transmission condition of the current RDMA message, the number of messages to be transmitted in the transmission message queue in which the current RDMA message is located may be determined, and then, when the number of messages to be transmitted is not greater than the number of remaining message resources, the transmission condition of the current RDMA message is determined to be satisfied.
That is, according to the RDMA protocol, the receiving end may carry the local Credits information in the ACK header, which is used to feed back the current receiving queue resource condition to the sending end. More specifically, taking the sending process as an example, the sender adds 1 to the SSN (Send Sequence Number, send sequence count) count every time the sender sends an RDMA message, and adds the corresponding number of Credits to the LSN (Limit Sequence Number, remaining sequence count) count every time an ACK carrying Credits information is received. Before the sending end sends RDMA messages each time, the SSN count in the next WQE (Work Queue Entry) to be sent is judged, if SSN > LSN, the receiving end is indicated to receive insufficient Queue resources at the moment, and the sending end immediately stops scheduling. That is, the transmission sequence count is an example of the number of messages to be transmitted of the transmission message queue, and the remaining sequence count is an example of the number of remaining message resources. The number of messages to be sent and the number of remaining message resources are examples of queue management information.
In other embodiments, when determining whether the number of remaining message resources meets the sending condition of the current RDMA message, the sending message queue in which the current RDMA message is located may be updated after the last RDMA message of the current RDMA message is sent, and then, when receiving the receipt acknowledgement message of the last RDMA message, the number of remaining message resources may be updated.
That is, the receiving end will consume one receiving queue resource each time it receives an RDMA message, and when the receiving queue resource is exhausted and (e.g., user) is not replenished, it will feed back to the sending end through ACK that the receiving queue resource is insufficient, and the sending end will stop scheduling to trigger RDMA retransmission. The receive queue resources may be supplemented (e.g., by a user) by invoking ibv _post_recv (i.e., the verbs interface).
Alternatively, when the receiving end receives the exhaustion of the queue resources, i.e. after the receiving queue resources are pre-supplemented by ibv _post_recv, i.e. when the available resources of the receiving queue are changed from 0 to 1, waiting for a request period (e.g. 1us, configurable by the user), the receiving end actively sends a stream Control ACK message (denoted as fc_ack, flow Control ACK) according to the number of the supplemented receiving queue resources in the request period, where the PSN in the fc_ack message is consistent with the ACK message sent last successfully by the receiving end, or takes the ACK message sent last time as the fc_ack message. That is, the field of the Credits information in the message is updated according to the number of the currently-replenished receiving queue resources, and notifies the sender that the current receiving queue resources are enough, so that data transmission can be continued.
The message transmission method according to other embodiments of the present invention will be described below with reference to fig. 3. The message transmission method of fig. 3 may be applied to a DPU network card, where the message transmission method includes:
s310: a previous RDMA message is received.
It should be understood that an RDMA message is a message that satisfies the RDMA protocol. In addition, the previous RDMA message is the last RDMA message of the current RDMA message in the same message queue, and may be other previous RDMA messages in the same message queue.
S320: and generating resource indication information according to the quantity of the supplementary message resources of the received message queue.
It should be appreciated that the number of supplemental message resources may be obtained when the remaining message resources of the receive message queue are insufficient. The number of supplemental message resources may be considered to be a supplement to the number of remaining message resources (e.g., the number of remaining message resources may be 0) prior to receiving the previous RDMA message.
It should also be understood that the acknowledgement message may be an ACK message required by the RDMA protocol, the resource indication information characterizes the number of supplemental message resources, or the resource indication information and the number of supplemental message resources may have a preset mapping relationship.
S330: the resource indication information is included in a receipt acknowledgement message of a previous RDMA message.
It should be understood that the receiving end writes the resource indication information representing the number of the supplementary message resources into the receipt confirmation message, or searches the preset mapping relation, and writes the resource indication information corresponding to the number of the supplementary message resources into the receipt confirmation message. In some examples, the resource indication information may be a supplemental message resource amount. In addition, the resource indication information may be written in a reserved field of the reception acknowledgement message.
S340: and sending a receiving confirmation message to the sending end.
In the scheme of the embodiment of the invention, the receiving end can obtain the quantity of the supplementary message resources, and multiplex the receiving confirmation message of the RDMA message, so that the receiving end can inform the quantity of the supplementary message resources of the sending end, the sending condition of the current RDMA message sent to the receiving end can be timely met through the quantity of the supplementary message resources, the occurrence of RDMA message retransmission is greatly reduced, and the performance of the system is improved. In addition, multiplexing RDMA messages realizes the notification of the number of the supplementary message resources of the receiving end to the sending end, and improves the compatibility of RDMA protocols.
In other embodiments, the operations of the receiving end further comprise: when the residual message resource data of the receiving message queue is insufficient in receiving the current RDMA message, triggering a configuration interface of the receiving message queue to acquire the quantity of the supplementary message resources pre-configured through the configuration interface.
That is, when the receiving end receives the exhaustion of the queue resources, for example, the user supplements the queue resources in advance through ibv _post_recv, that is, when the available resources of the receiving queue change from 0 to 1, the receiving end waits for a request period (for example, 1us, which can be configured by the user), according to the number of the supplemented queue resources in the request period, the receiving end actively sends a stream Control ACK message (denoted as fc_ack, flow Control ACK), where the PSN in the fc_ack message is consistent with the ACK message sent last successfully by the receiving end, or takes the ACK message sent last time as the fc_ack message. That is, the field of the Credits information in the message is updated according to the number of the currently-replenished receiving queue resources, and notifies the sender that the current receiving queue resources are enough, so that data transmission can be continued.
In other embodiments, the operations of the receiving end further comprise: after the receiving end sends the FC_ACK message, if the message is not correctly sent to the sending end, the sending end cannot sense that the receiving end has supplemented the receiving queue resource and cannot restart the sending scheduling. Thus, after the receiving end sends the fc_ack, the timeout timer will be started.
Without loss of generality, when the current RDMA message sent by the sender is not received, the receiving confirmation message is retransmitted to the sender when a preset timeout period of the timeout timer arrives, wherein the preset timeout period is smaller than a retransmission trigger period of the RDMA message. For example, the preset timeout period is equal to the retransmission trigger period duration of the RDMA message multiplied by a coefficient less than 1. More specifically, the timeout time T of the timeout timer is freely configurable by the user, and its default value is set to:
t=max (e.g., 0.2 x rnr timeout);
The RNR timeout is the RNR retransmission trigger period duration designated by the user. When the timeout timer expires, the receiving end will send the fc_ack again, and if the user supplements more message resources of the receiving queue through ibv _post_recv in the time interval T, the Credits information in the fc_ack is updated based on the number of the supplemented message resources.
In other embodiments, the operations of the receiving end further comprise:
in the case of receiving the current RDMA message sent by the sender, setting the timeout timer to a disabled state, and updating the next RDMA message to the current RDMA message. That is, when the receiving end receives a new RDMA packet after sending the fc_ack, which indicates that the sending end knows the condition of the receiving queue resource at this time, the receiving end immediately cancels the timeout timer and starts a new round of RDMA data transmission according to the normal flow.
In other embodiments, the operations of the receiving end further comprise: and setting the timeout timer to be in an enabling state when the data of the residual message resources of the received message queue are insufficient. That is, after the receiving end sends the fc_ ACK, if no new RDMA packet is received, which indicates that the receiving end does not know the condition of the receiving queue resource at this time, the receiving end starts the timeout timer.
Fig. 4 is a schematic interaction diagram of a message transmission method according to other embodiments of the present invention. As shown in fig. 4, both the receiving end 42 and the transmitting end 41 may be DPU network cards. The DPU network card of the receiving end 41 and the DPU network card of the transmitting end 42 may be two adjacent nodes in the RDMA packet transmission link.
The message transmission method executed by the transmitting end 41 includes the following steps:
Step S411: based on the queue management information maintained by the sender, determine whether the remaining resources of the received message queue are sufficient? If yes, go to step S414; if not, step S412 is performed. It should be understood that the queue management information indicates a queue status of the receiving message queue and a queue status of the sending message queue, and the sending end may determine whether the remaining resources of the receiving message queue are sufficient by comparing a difference between the remaining message resource amount of the receiving message queue and the to-be-sent message amount of the sending message queue. That is, in this example, when the transmission condition of the current RDMA packet is not satisfied, the reception acknowledgement message transmitted by the receiving end for the previous RDMA packet is acquired. Alternatively, the receiving end may acquire the reception acknowledgement message sent by the receiving end for the previous RDMA message when the sending condition of the current RDMA message is satisfied.
Step S412: suspending the sending of the current RDMA message, and waiting or requesting the resource indication information from the receiving end.
Step S413: and receiving the flow control message and acquiring the resource indication information. It should be appreciated that the previous RDMA message may be the current RDMA message's flow control message. It should be understood that the number of remaining message resources at the receiving end may also be calculated according to the number of supplemental message resources, and it is determined whether the number of remaining message resources satisfies the current sending condition of the RDMA message.
Step S414: the sending of the current RDMA message is performed. Without loss of generality, the current RDMA message is sent to the receiving end if the sending condition of the current RDMA is met.
Accordingly, the message transmission method executed by the receiving end 42 includes the following steps:
Step S421: and waiting for supplementing the message resource quantity when the residual resource quantity of the receiving message queue is insufficient for the current RDMA message.
Step S422: and generating the flow control message according to the quantity of the supplementary message resources, and sending the flow control message to a sending end. It should be appreciated that without loss of generality, the resource indication information is generated according to the number of supplemental message resources of the receive message queue, then included in the receive acknowledgement message of the previous RDMA message, and then sent to the sender.
Step S423: after sending the flow control message, monitor for the current RDMA message received? If yes, go to step S424; if not, step S425 is performed.
Step S424: and judging whether the residual resource quantity of the receiving message queue is sufficient for the next RDMA message.
Step S425: it is determined whether the timeout timer has reached the preset timeout period, and if so, step S422 is performed.
It should be understood that in step S422, the receiving end 42 transmits the flow control message to the transmitting end 41, and in step S413, the transmitting end 41 receives the flow control message from the receiving end 42, that is, steps S422 and S413 are corresponding operations.
A DPU network card according to further embodiments of the invention will be described below in connection with fig. 5. The DPU network card of fig. 5 includes:
The receiving module 510 obtains a receiving confirmation message sent by the receiving end for a previous RDMA message, where the receiving confirmation message includes resource indication information, where the resource indication information is used to indicate the number of supplementary message resources in a receiving message queue of the receiving end;
the judging module 520 calculates the number of the remaining message resources of the receiving end according to the number of the supplementary message resources, and judges whether the number of the remaining message resources meets the sending condition of the current RDMA message;
And a sending module 530, configured to send the current RDMA packet to the receiving end if the sending condition is satisfied.
In the scheme of the embodiment of the invention, the receiving end can obtain the quantity of the supplementary message resources, and multiplex the receiving confirmation message of the RDMA message, so that the receiving end can inform the quantity of the supplementary message resources of the sending end, the sending condition of the current RDMA message sent to the receiving end can be timely met through the quantity of the supplementary message resources, the occurrence of RDMA message retransmission is greatly reduced, and the performance of the system is improved. In addition, multiplexing RDMA messages realizes the notification of the number of the supplementary message resources of the receiving end to the sending end, and improves the compatibility of RDMA protocols.
In other embodiments, the judging module is specifically configured to: determining the number of messages to be sent in a sending message queue where the current RDMA message is located; and when the number of the messages to be sent is not greater than the number of the residual message resources, determining that the sending condition of the current RDMA message is met.
In other embodiments, the determining module is further configured to: updating a sending message queue where the current RDMA message is located after the last RDMA message of the current RDMA message is sent; and when receiving the receiving confirmation message of the last RDMA message, updating the quantity of the residual message resources.
A DPU network card according to further embodiments of the invention will be described below in connection with fig. 6. The DPU network card of fig. 6 includes:
a receiving module 610 that receives a previous RDMA message;
the generating module 620 generates resource indication information according to the number of the supplementary message resources of the received message queue;
The sending module 630 includes the resource indication information in a receipt acknowledgement message of a previous RDMA packet, and sends the receipt acknowledgement message to a sender.
In the scheme of the embodiment of the invention, the receiving end can obtain the quantity of the supplementary message resources, and multiplex the receiving confirmation message of the RDMA message, so that the receiving end can inform the quantity of the supplementary message resources of the sending end, the sending condition of the current RDMA message sent to the receiving end can be timely met through the quantity of the supplementary message resources, the occurrence of RDMA message retransmission is greatly reduced, and the performance of the system is improved. In addition, multiplexing RDMA messages realizes the notification of the number of the supplementary message resources of the receiving end to the sending end, and improves the compatibility of RDMA protocols.
In other embodiments, the DPU network card further includes an obtaining module, configured to trigger a configuration interface of the receiving message queue to obtain a number of complementary message resources preconfigured via the configuration interface when the remaining message resource data of the receiving message queue is not enough to receive the current RDMA message.
In other embodiments, the DPU network card further comprises: and the retransmission module is used for retransmitting the receiving confirmation message to the sender when a preset timeout period of the timeout timer arrives under the condition that the current RDMA message sent by the sender is not received, wherein the preset timeout period is smaller than a retransmission trigger period of the RDMA message.
In other embodiments, the DPU network card further comprises: and the timer module is used for setting the timeout timer to a disabled state and updating the next RDMA message into the current RDMA message under the condition that the current RDMA message sent by the sender is received.
In other embodiments, the timer module is specifically configured to: and setting the overtime timer to be in an enabling state when the residual message resource data of the receiving message queue is insufficient.
It should be understood that, the specific implementation of each module in the DPU network card may refer to the descriptions corresponding to the corresponding steps in the above method embodiments, and have corresponding beneficial effects, which are not repeated herein. It will be clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the DPU network card and the module described above may refer to the corresponding process description in the foregoing method embodiment, and will not be repeated herein.
Referring to fig. 7, a schematic diagram of a network device according to another embodiment of the present invention is shown, and the specific embodiment of the present invention is not limited to the specific implementation of the network device.
As shown in fig. 7, the network device may include: a processor (processor) 702 for executing programs 710, a communication interface (Communications Interface) 704, a memory (memory) 706, and a communication bus 708.
The processor, communication interface, and memory communicate with each other via a communication bus.
And the communication interface is used for communicating with other network devices or servers.
And a processor, configured to execute a program, and specifically may execute relevant steps in the foregoing method embodiment.
In particular, the program may include program code including computer-operating instructions.
The processor may be a CPU, or an Application-specific integrated Circuit ASIC (Application SPECIFIC INTEGRATED circuits), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors comprised by the smart device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
And the memory is used for storing programs. The memory may comprise high-speed RAM memory or may further comprise non-volatile memory, such as at least one disk memory.
The program may include a plurality of computer instructions, and the program may specifically enable the processor to perform the packet transmission method based on the DPU network card described in any one of the foregoing method embodiments.
The specific implementation of each step in the program may refer to the corresponding description in the corresponding steps, modules or units in the above method embodiment, and has corresponding beneficial effects, which are not described herein. It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus, device or module described above may refer to corresponding procedure descriptions in the foregoing method embodiments, which are not repeated herein.
The present invention also provides a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the method described in any of the preceding method embodiments. The computer storage media includes, but is not limited to: a compact disk read Only (Compact Disc Read-Only Memory, CD-ROM), random access Memory (Random Access Memory, RAM), floppy disk, hard disk, magneto-optical disk, or the like.
The embodiment of the invention also provides a computer program product, which comprises computer instructions for instructing a computing device to execute the message transmission method based on the DPU network card in the method embodiments.
In addition, it should be noted that, the information related to the user (including, but not limited to, user equipment information, user personal information, etc.) and the data related to the embodiment of the present invention (including, but not limited to, sample data for training the model, data for analyzing, stored data, presented data, etc.) are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related regulations and standards, and are provided with corresponding operation entries for the user to select authorization or rejection.
It should be noted that, according to implementation requirements, each component/step described in the embodiments of the present invention may be split into more components/steps, or two or more components/steps or part of operations of the components/steps may be combined into new components/steps, so as to achieve the objects of the embodiments of the present invention.
The methods according to embodiments of the present invention described above may be implemented in hardware, firmware, or as software or computer code storable in a recording medium such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk, or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium and to be stored in a local recording medium downloaded through a network, so that the methods described herein may be processed by such software on a recording medium using a general purpose computer, a special purpose processor, or programmable or dedicated hardware such as an Application SPECIFIC INTEGRATED Circuit (ASIC), or field programmable gate array (Field Programmable GATE ARRAY, FPGA). It is understood that a computer, processor, microprocessor controller, or programmable hardware includes a Memory component (e.g., random access Memory (Random Access Memory, RAM), read-Only Memory (ROM), flash Memory, etc.) that can store or receive software or computer code that, when accessed and executed by the computer, processor, or hardware, performs the methods described herein. Furthermore, when a general purpose computer accesses code for implementing the methods illustrated herein, execution of the code converts the general purpose computer into a special purpose computer for performing the methods illustrated herein.
Those of ordinary skill in the art will appreciate that the elements and method steps of the examples described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or as a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present invention.
The above embodiments are only for illustrating the embodiments of the present invention, but not for limiting the embodiments of the present invention, and various changes and modifications may be made by one skilled in the relevant art without departing from the spirit and scope of the embodiments of the present invention, so that all equivalent technical solutions also fall within the scope of the embodiments of the present invention, and the scope of the embodiments of the present invention should be defined by the claims.
Claims (12)
1. The message transmission method based on the DPU network card is characterized by comprising the following steps of:
Acquiring a receiving confirmation message sent by a receiving end aiming at a previous RDMA message, wherein the receiving confirmation message comprises resource indication information, and the resource indication information is used for indicating the quantity of the supplementary message resources of a receiving message queue of the receiving end;
calculating the number of the residual message resources of the receiving end according to the number of the supplementary message resources, and judging whether the number of the residual message resources meets the sending condition of the current RDMA message;
and under the condition that the sending condition is met, sending the current RDMA message to the receiving end.
2. The method of claim 1, wherein determining whether the remaining amount of message resources satisfies a current RDMA message transmission condition comprises:
Determining the number of messages to be sent in a sending message queue where the current RDMA message is located;
And when the number of the messages to be sent is not greater than the number of the residual message resources, determining that the sending condition of the current RDMA message is met.
3. The method of claim 2, wherein determining whether the remaining amount of message resources meets a current RDMA message transmission condition further comprises:
Updating a sending message queue where the current RDMA message is located after the last RDMA message of the current RDMA message is sent;
And when receiving the receiving confirmation message of the last RDMA message, updating the quantity of the residual message resources.
4. The message transmission method based on the DPU network card is characterized by comprising the following steps of:
Receiving a previous RDMA message;
generating resource indication information according to the quantity of the supplementary message resources of the received message queue;
including the resource indication information in a receipt acknowledgement message of the previous RDMA message;
And sending the receiving confirmation message to a sending end.
5. The method according to claim 4, wherein the method further comprises:
When the residual message resource data of the receiving message queue is insufficient in receiving the current RDMA message, triggering a configuration interface of the receiving message queue to acquire the quantity of the supplementary message resources preconfigured by the configuration interface.
6. The method of claim 5, wherein the method further comprises:
And under the condition that the current RDMA message sent by the sender is not received, retransmitting the receiving confirmation message to the sender when the preset timeout period of the timeout timer arrives, wherein the preset timeout period is smaller than the retransmission trigger period of the RDMA message.
7. The method of claim 6, wherein the method further comprises:
And setting the timeout timer to a disabled state under the condition that the current RDMA message sent by the sender is received, and updating the next RDMA message into the current RDMA message.
8. The method of claim 7, wherein the method further comprises:
and setting the overtime timer to be in an enabling state when the residual message resource data of the receiving message queue is insufficient.
9. A DPU network card, comprising:
The receiving module is used for acquiring a receiving confirmation message sent by a receiving end aiming at a previous RDMA message, wherein the receiving confirmation message comprises resource indication information, and the resource indication information is used for indicating the quantity of the supplementary message resources of a receiving message queue of the receiving end;
The judging module is used for calculating the residual message resource quantity of the receiving end according to the supplementary message resource quantity and judging whether the residual message resource quantity meets the sending condition of the current RDMA message;
and the sending module is used for sending the current RDMA message to the receiving end under the condition that the sending condition is met.
10. A DPU network card, comprising:
the receiving module receives a previous RDMA message;
the generating module generates resource indication information according to the number of the supplementary message resources of the received message queue;
and the sending module is used for including the resource indication information in a receiving confirmation message of the prior RDMA message and sending the receiving confirmation message to a sending end.
11. A network device, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
the memory is configured to hold at least one executable instruction that causes the processor to perform the method of any one of claims 1-8.
12. A computer storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410770191.3A CN118555249A (en) | 2024-06-14 | 2024-06-14 | Message transmission method based on DPU network card, network equipment and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410770191.3A CN118555249A (en) | 2024-06-14 | 2024-06-14 | Message transmission method based on DPU network card, network equipment and computer storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118555249A true CN118555249A (en) | 2024-08-27 |
Family
ID=92448005
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410770191.3A Pending CN118555249A (en) | 2024-06-14 | 2024-06-14 | Message transmission method based on DPU network card, network equipment and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118555249A (en) |
-
2024
- 2024-06-14 CN CN202410770191.3A patent/CN118555249A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11934340B2 (en) | Multi-path RDMA transmission | |
CN110995697B (en) | Big data transmission method and system | |
JP4017652B2 (en) | Data transmission method and data transmission apparatus | |
US7532577B2 (en) | Managing transmission control protocol (TCP) connections | |
KR101365838B1 (en) | Improved distributed kernel operating system | |
US7730196B2 (en) | Efficient transfer of messages using reliable messaging protocols for web services | |
EP2978171B1 (en) | Communication method, communication device, and communication program | |
JP2014524092A (en) | System and method for reliable virtual bidirectional data stream communication with single socket point-to-multipoint performance | |
CN108234087B (en) | Data transmission method and sending end | |
JP2006287981A (en) | Error correcting communication method to transmit data packet in network communication system | |
US9197373B2 (en) | Method, apparatus, and system for retransmitting data packet in quick path interconnect system | |
CN110413425B (en) | Third-party message callback method, device, server and storage medium | |
CN109981385B (en) | Method, device and system for realizing packet loss detection | |
WO2017097201A1 (en) | Data transmission method, transmission device and receiving device | |
US10461892B2 (en) | Low latency communications | |
CN113852445A (en) | Method, system, equipment and storage medium for improving data transmission reliability | |
CN117040692A (en) | Method and device for transmitting service data, electronic equipment and storage medium | |
JP5636574B2 (en) | COMMUNICATION DEVICE, PACKET TRANSFER METHOD AND ITS PROGRAM | |
CN118555249A (en) | Message transmission method based on DPU network card, network equipment and computer storage medium | |
CN112351049B (en) | Data transmission method, device, equipment and storage medium | |
CN111447046B (en) | Service data transmission method, device, equipment and storage medium | |
JP2014147011A5 (en) | ||
EP4207654A1 (en) | Packet retransmission method and apparatus | |
JP3148733B2 (en) | Signal processing device and signal processing system | |
CA2784985A1 (en) | Apparatus and method of communicating automatic repeat request (arq) feedback in a wireless communication network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |