CN104065465B - A kind of method of message retransmission, request end, responder and system - Google Patents

A kind of method of message retransmission, request end, responder and system Download PDF

Info

Publication number
CN104065465B
CN104065465B CN201410250643.1A CN201410250643A CN104065465B CN 104065465 B CN104065465 B CN 104065465B CN 201410250643 A CN201410250643 A CN 201410250643A CN 104065465 B CN104065465 B CN 104065465B
Authority
CN
China
Prior art keywords
message
error
affiliated
error message
sequence number
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.)
Active
Application number
CN201410250643.1A
Other languages
Chinese (zh)
Other versions
CN104065465A (en
Inventor
石仔良
陈步林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410250643.1A priority Critical patent/CN104065465B/en
Publication of CN104065465A publication Critical patent/CN104065465A/en
Application granted granted Critical
Publication of CN104065465B publication Critical patent/CN104065465B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Communication Control (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

The invention discloses a kind of method of message retransmission, request end, responder and system, the method for one of which message retransmission includes:Multiple data queues are sent to responder, the data queue includes at least one message, and the message includes at least one message;Obtain the error messages that responder is sent;Deviant is obtained according to the error messages, and offset address of the error message relative to the first message of the affiliated message of error message is obtained according to the deviant;According to the sequence number of the queue number of the data queue and the affiliated message of the error message, the initial memory address of the affiliated message of the error message is oriented;According to the offset address and the initial memory address of the affiliated message of error message, the initial memory address of error message is oriented, and message is retransmitted to responder at the initial memory address of error message.Using the present invention when message transmission error is retransmitted out misrepresenting deliberately text, and with the characteristics of small and simple to operate that is delayed.

Description

A kind of method of message retransmission, request end, responder and system
Technical field
The present invention relates to the communications field, more particularly to a kind of method of message retransmission, request end, responder and system.
Background technology
RDMA (Remote Direct Memory Access, the access of distal end immediate data) technology is used in network service Data transfer between device, in data transmission procedure, the network interface card of the band RDMA functions of request end server is passed through by zero reproduction technology Network is transmitted directly to data the memory block of responder server.During concrete implementation, responder server may Error in data or received over time data can be received because of a variety of causes.In this case it is necessary to request end service is thought highly of New to transmit data to responder server, i.e. data retransmit, and because data are transmitted in the form of message, therefore data retransmit Also known as message retransmission.
The method of message retransmission is that request end server needs to disappear for each of each data queue for being used to transmit at present The sequence number of breath record first message simultaneously preserves in the table entry, is read when responder server sends error messages from list item The sequence number of first message, contrasted, obtained out by the sequence number of the error message in the sequence number and error messages by first message The offset address of literary storage address is misrepresented deliberately, and then determines the position that message retransmission starts, carries out message retransmission.But work as data When concurrent message more (such as 16K) that queue size larger (such as 256K~1M) and each data queue support, The list item will expend huge storage resource (i.e. 16K*256K~16K*1M bits).Obviously, so big list item hardware is deposited Storage equipment is difficult to bear, and is placed on hardware storage device and is unfavorable for extending, therefore above-mentioned list item is generally put into main frame by this method In the internal memory of server, request end server is needed to increase the list item in above-mentioned internal memory when so having sent a message every time Content, need to read the contents in table from above-mentioned internal memory when receiving the error messages that responder server is sent, add Delay and the complexity of operation.
The content of the invention
The embodiment of the present invention provides a kind of method of message retransmission, request end, responder and system, for being passed in message When sending out wrong re-transmission error message, reduce time delay and improve ease-to-operate.
In order to solve the above-mentioned technical problem, first aspect of the embodiment of the present invention provides a kind of method of message retransmission, bag Include:
Multiple data queues are sent to responder, the data queue includes at least one message, and the message is included extremely A few message, the length of the message is fixed, and the data queue all messages for including all are continuously numbered for;
The error messages that the responder is sent are obtained, the error messages include being used to obtain the error message Information of the sequence number relative to the deviant of the sequence number of the first message of the affiliated message of the error message, error message institute Belong to the queue number of data queue and the sequence number of the affiliated message of the error message of message;
According to sequence number the reporting for the first time relative to the affiliated message of the error message for being used to obtain the error message Deviant described in the information acquisition of the deviant of the sequence number of text, and multiplying according to the deviant and the length of the message Product, obtains offset address of the error message relative to the first message of the affiliated message of the error message;
According to the sequence number of the queue number of the data queue and the affiliated message of the error message, the error is oriented The initial memory address of the affiliated message of message, wherein, the queue number of the data queue and the affiliated message of the error message There is corresponding relation between both sequence numbers and the initial memory address of the affiliated message of the error message;
According to the error message relative to the first message of the affiliated message of the error message offset address and it is described go out The initial memory address of message belonging to text is misrepresented deliberately, orients the initial memory address of the error message, and go out to misrepresent deliberately from described Message is retransmitted to the responder at the initial memory address of text, wherein, the starting storage of the affiliated message of error message Location is the initial memory address of the first message of the affiliated message of the error message.
In a kind of possible implementation of first aspect, it is described be used to obtaining the sequence number of the error message relative to The information of the deviant of the sequence number of the first message of the affiliated message of error message, is specifically included:
The sequence number of the first message of the sequence number of the error message and the affiliated message of the error message;
The sequence number for being used to obtain the error message described in the basis is relative to the affiliated message of the error message Deviant described in the information acquisition of the deviant of the sequence number of first message, is specifically included:
According to the sequence number of the error message and the sequence number of the first message of the affiliated message of the error message, calculate The sequence number of the error message relative to the sequence number of the first message of the affiliated message of the error message deviant, it is described go out The sequence number for misrepresenting deliberately text is with the Serial No. radix of the first message of the affiliated message of the error message, is carried out according to certain order The numerical value counted to get.
Second aspect of the embodiment of the present invention provides a kind of method of message retransmission, including:
Multiple data queues that request end is sent are received, the data queue includes at least one message, the message package At least one message is included, the length of the message is fixed, and all messages that the data queue includes all are continuously to compile Number;
When detecting error message in the message included from the data queue, generate error messages and reported an error described Message is sent to the request end, the sequence number that the error messages include being used for obtaining the error message relative to it is described go out Misrepresent deliberately the data queue of the information of the deviant of the sequence number of the first message of message belonging to text, the affiliated message of the error message The sequence number of queue number and the affiliated message of the error message, wherein, the queue number of the data queue and described go out to misrepresent deliberately There is corresponding relation between both sequence numbers of message belonging to text and the initial memory address of the affiliated message of the error message, with The request end is set to calculate the error message relative to described according to the product of the deviant and the length of the message The offset address of the first message of the affiliated message of error message, and the queue number according to the data queue and error message institute The sequence number of category message orients the initial memory address of the affiliated message of the error message, so as to according to the offset address and The initial memory address of the error message orients the initial memory address of the error message, and then from the error message Initial memory address at start retransmit message.
It is described to be detected in the message included from the data queue in a kind of possible implementation of second aspect During error message, generate error messages and the error messages are sent to the request end, the error messages include being used for The sequence number of the error message is obtained relative to the deviant of the sequence number of the first message of the affiliated message of the error message Information, including:
If detecting error message in the message included from the data queue, generate error messages and described report an error disappears Breath is sent to the request end, and the error messages include the sequence number and the affiliated message of the error message of the error message First message sequence number so that sequence number and the error message affiliated message of the request end according to the error message The sequence number of first message calculate the deviant, the sequence number of the error message is with the affiliated message of the error message First message Serial No. radix, the numerical value counted to get according to certain order.
The third aspect of the embodiment of the present invention provides a kind of request end of message retransmission, including:
Sending module, for sending multiple data queues to responder, the data queue includes at least one message, institute Stating message includes at least one message, and the length of the message is fixed, and all messages that the data queue includes are all It is continuously numbered for;
Acquisition module, the error messages sent for obtaining the responder, the error messages include being used to obtain The sequence number of the error message relative to the deviant of the sequence number of the first message of the affiliated message of the error message information, The queue number of the data queue of the affiliated message of error message and the sequence number of the affiliated message of the error message;
The acquisition module is additionally operable to according to the sequence number for being used to obtain the error message relative to the error Deviant described in the information acquisition of the deviant of the sequence number of the first message of the affiliated message of message, and according to the deviant and institute The product of the length of message is stated, with obtaining skew of the error message relative to the first message of the affiliated message of the error message Location;
Locating module, for the sequence number of the queue number according to the data queue and the affiliated message of the error message, The initial memory address of the affiliated message of the error message is oriented, wherein, the queue number of the data queue and the error There is corresponding relation between both sequence numbers of the affiliated message of message and the initial memory address of the affiliated message of the error message;
The locating module is additionally operable to the first message relative to the affiliated message of the error message according to the error message Offset address and the affiliated message of the error message initial memory address, orient the starting storage of the error message Location, and message is retransmitted to the responder at the initial memory address of the error message, wherein, belonging to the error message The initial memory address of message is the initial memory address of the first message of the affiliated message of the error message.
In a kind of possible implementation of the third aspect, it is described be used to obtaining the sequence number of the error message relative to The information of the deviant of the sequence number of the first message of the affiliated message of error message, is specifically included:
The sequence number of the first message of the sequence number of the error message and the affiliated message of the error message;
The acquisition module is used to go out to misrepresent deliberately relative to described according to the sequence number for being used to obtain the error message Described in the information acquisition of the deviant of the sequence number of the first message of message belonging to text during deviant, specifically for according to the error The sequence number of the first message of the sequence number of message and the affiliated message of the error message, calculate the sequence number of the error message Relative to the deviant of the sequence number of the first message of the affiliated message of the error message, the sequence number of the error message is with institute The Serial No. radix of the first message of the affiliated message of error message is stated, the numerical value counted to get according to certain order.
Fourth aspect of the embodiment of the present invention provides a kind of responder of message retransmission, including:
Receiving module, for receiving multiple data queues of request end transmission, the data queue includes at least one disappear Breath, the message include at least one message, and the length of the message is fixed, and all reports that the data queue includes What text was all continuously numbered for;
Message transmission module, during for detecting error message in the message included from the data queue, generation report The error messages are simultaneously sent to the request end by wrong message, and the error messages include being used to obtain the error message Message of the sequence number relative to the deviant of the sequence number of the first message of the affiliated message of the error message, error message institute Belong to the queue number of data queue and the sequence number of the affiliated message of the error message of message, wherein, the data queue Both sequence numbers of queue number and the affiliated message of the error message and the initial memory address of the affiliated message of the error message Between there is corresponding relation so that the request end according to the sequence number for being used to obtain the error message relative to described Deviant described in the information acquisition of the deviant of the sequence number of the first message of the affiliated message of error message, and according to the deviant The error message is calculated relative to the first message of the affiliated message of the error message with the product of the length of the message Offset address, the request end position according to the queue number of the data queue and the sequence number of the affiliated message of the error message Go out the initial memory address of the affiliated message of the error message, and then disappeared according to belonging to the offset address and the error message The initial memory address of breath orients the initial memory address of the error message, at the initial memory address retransmit Message.
In a kind of possible implementation of fourth aspect, the message transmission module is used to wrap from the data queue When detecting error message in the message included, generate error messages and the error messages are sent to the request end, it is described Error messages include the sequence number of the error message and the sequence number of the first message of the affiliated message of the error message, so that institute Request end is stated to be calculated according to the sequence number of the sequence number of the error message and the first message of the affiliated message of the error message The deviant, the sequence number of the error message is with the Serial No. base of the first message of the affiliated message of the error message Number, the numerical value counted to get according to certain order.
The aspect of the embodiment of the present invention the 5th provides a kind of system of message retransmission, and the system provides including the third aspect Request end, and fourth aspect provide responder, wherein:
The request end is used to send multiple data queues to the responder, and the data queue includes at least one disappear Breath, the message include at least one message, and the length of the message is fixed, and all reports that the data queue includes What text was all continuously numbered for;
The responder is used to receive multiple data queues that the request end is sent, and detects the data queue;From Error messages are generated when error message is detected in the message that the data queue includes;
The request end orients the initial memory address of the error message according to the error messages, and from it is described go out Misrepresent deliberately and retransmit message to the responder at the initial memory address of text.
Implement the embodiment of the present invention, have the advantages that:If the responder of the embodiment of the present invention is sent in request end Error message is detected in the message of the data queue come, then generates error messages and error messages is sent to request end, please Ask end to obtain deviant from error messages, and head of the error message relative to the affiliated message of error message is obtained according to deviant The offset address of message, and the queue number of data queue and the sequence of the affiliated message of error message are obtained from error messages Number, and rising for the affiliated message of error message is oriented according to the sequence number of the affiliated message of queue number and error message of data queue Beginning storage address, request end and then oriented out according to the initial memory address of offset address and the affiliated message of error message are misrepresented deliberately The initial memory address of text, and message is retransmitted to responder at initial memory address, realize and send out re-transmission of staggering the time in message The function of error message, when the technical scheme provided using inventive embodiments carries out error message re-transmission, there is the small and behaviour that is delayed Make the characteristics of simple.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of the method for message retransmission provided in an embodiment of the present invention;
Fig. 2 is the schematic flow sheet of the method for another message retransmission provided in an embodiment of the present invention;
Fig. 3 is the schematic flow sheet of the method for another message retransmission provided in an embodiment of the present invention;
Fig. 4 is a kind of structural representation of the request end of message retransmission provided in an embodiment of the present invention;
Fig. 5 is a kind of structural representation of the responder of message retransmission provided in an embodiment of the present invention;
Fig. 6 is a kind of structural representation of the system of message retransmission provided in an embodiment of the present invention;
Fig. 7 is a kind of schematic diagram of the RDMA transmission networks of simplification provided in an embodiment of the present invention;
Fig. 8 is a kind of schematic diagram of the message provided in an embodiment of the present invention with corresponding message;
Fig. 9 is a kind of schematic diagram of error messages provided in an embodiment of the present invention;
Figure 10 is the schematic diagram of another error messages provided in an embodiment of the present invention;
Figure 11 is schematic diagram of another message provided in an embodiment of the present invention with corresponding message;
Figure 12 is a kind of schematic diagram of error messages containing message number and queue number provided in an embodiment of the present invention;
Figure 13 is the schematic diagram of another error messages containing message number and queue number provided in an embodiment of the present invention;
Figure 14 is the structural representation of the request end of another message retransmission provided in an embodiment of the present invention;
Figure 15 is the structural representation of the responder of another message retransmission provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
A kind of method of message retransmission provided in an embodiment of the present invention, it can apply to the message in network between server and pass Send, especially for the server under RDMA (Remote Direct Memory Access, the access of distal end immediate data) technology Between message transmission.Wherein, the RDMA technologies are a kind of storage for data being transmitted directly to by network destination server Zero reproduction technology in area.Thus, RDMA technologies reduce the operation replicated with text exchange, have liberated the internal memory of current server With CPU (Central Processing Unit, CPU) load, prolonging for data processing between server is reduced Late.
Fig. 1 is a kind of schematic flow sheet of the method for message retransmission in the embodiment of the present invention.As shown in the figure in the present embodiment The flow of method of message retransmission can include:
S101, multiple data queues are sent to responder, the data queue includes at least one message, the message package At least one message is included, the length of the message is fixed, and all messages that the data queue includes all are continuously to compile Number.
A kind of schematic diagram of the RDMA transmission networks of simplification as shown in Figure 7 is referred to, simplified RDMA transmission networks are extremely Include CPU, HCA (Host Direct Memory Access, host side channel adapter) and memory bar less.CPU be used for HCA issues traffic order, and HCA is used to send message to opposite end HCA by network, and memory bar is used to store message.Whole message In transmission process, CPU is not carried out replicating the operation of message, only HCA need to be controlled directly to send a message to opposite end HCA, and then By the memory space of message deposit opposite end memory bar.
The responder is responder server, for receiving the message of request end (i.e. request end server) transmission.Need It is noted that RDMA transmission networks can prejudge the HCA of request end and responder mechanism and agreement it is whether identical, if phase Together, following steps are just performed.
Specifically, request end sends multiple data queues through network to responder, the data queue includes at least one Message, the message include at least one message.Wherein, QP in the data queue such as Fig. 7 (Queue Pair, queue to) institute Show, QP0 and QP1 is respectively to send out, receive data queue, and QP0 and QP1 forms a data queue pair, and data queue pair is established at both ends Message can be sent after data queue.It is pointed out that in transmission process, message is split as at least one message, institute The length for stating message is fixed, is MTU (Maximum Transmission Unit, MTU) value, and the number What all messages included according to queue were all continuously numbered for, the frame head record of each message has its corresponding sequence number, i.e. PSN (Packet Sequence Number, sequence of message number).
S102, obtains the error messages that the responder is sent, and the error messages include being used to obtain the error The sequence number of message relative to the deviant of the sequence number of the first message of the affiliated message of the error message information.
The error message comprises at least following three kinds:Packet loss sends the message of time-out, unexpected message and not The message of storage address is got out, the message and unexpected message of wherein packet loss or transmission time-out are common error message. Optionally, can be for both common error messages, the detection method of responder:Judge the sequence of the message in message Number whether the sequence number of more previous message is incremented by by default queueing discipline, if it is not, then judging that message is error message.Example Such as:Assuming that the default queueing discipline is incremented by successively 1, a kind of signal of message as shown in Figure 8 with corresponding message is referred to Figure, if PSN=13 expected from current message, but PSN ≠ 13 for the message being an actually-received are (such as:=25), with previous message PSN (=12) compare and be not incremented by, then judge that current message is error message, and the PSN=13 of error message, that is, malfunction The PSN of message is with the Serial No. radix of the first message of the affiliated message of error message, is counted to get according to certain order A numerical value.
Further, if responder detects error message, NAK (Negative are sent to request end Acknowledge, error messages), conversely, then sending ACK to request end after one or more correct messages are received (Acknowledge, correct response message).Wherein, when detecting error message, responder can be according to the PSN of error message Sent out with the PSN of the first message of the affiliated message of error message (i.e. message cutting is first message of message queue after message) NAK, NAK is sent to include the sequence number for being used for obtaining error message relative to the sequence number of the first message of the affiliated message of error message The information of deviant.For example, as shown in figure 8, after responder detects error message, the PSN of error message is recorded (such as:=13) With the PSN of first message (such as:=10), and with the one way in which of following two embodiment NAK is sent:
Mode one, directly the PSN (=13) of error message and first message PSN (=10) recorded in NAK, i.e. NAK The sequence number of the first message of the affiliated message of sequence number and error message comprising error message, one kind as shown in Figure 9, which reports an error, to disappear The schematic diagram of breath, wherein, PSNe is the PSN of error message, and PSNf is the PSN of first message;
Mode two, calculate the PSN of the error message and PSN of first message deviant △ PSN (such as:△ PSN=13-10 =3), then by △ PSN recorded in NAK, i.e. NAK includes the sequence number of error message relative to the head of the affiliated message of error message The deviant of the sequence number of message, the schematic diagram of another error messages as shown in Figure 10.
Further, in mode one and mode two both implementation process, responder can be in NAK consensus standard lattice The PSN of error message, while the first message of the carrying affiliated message of error message in NAK reserved field are carried in formula PSN domains PSN, on the contrary, responder can also carry the first message of the affiliated message of error message in NAK consensus standard form PSN domains PSN, at the same in NAK reserved field carry error message PSN.It is pointed out that above-mentioned implementation process can be with tradition Scheme is compatible, while accuracy can be also improved when privately owned docking.
Especially, responder records the sequence number of the affiliated message of error message, i.e. MSN (Message also in NAK Sequence Number, message SN), and the queue number of data queue, i.e., No. QP.For example, refer to as shown in figure 11 Another message and corresponding message schematic diagram, responder find error message after, QP0 and MSN=3 also be recorded into NAK In.Accordingly, NAK content can be as shown in Figure 12 or Figure 13.Specifically, request end obtains the NAK that responder is sent.
S103, according to the sequence number for being used to obtain the error message relative to the affiliated message of the error message Deviant described in the information acquisition of the deviant of the sequence number of first message, and according to the deviant and the length of the message Product, obtain offset address of the error message relative to the first message of the affiliated message of the error message.
Specifically, on the one hand, if NAK only carries the PSN of error message and the PSN of first message, then request end passes through Calculate to obtain both the PSN of error message and first message PSN deviant △ PSN, wherein △ PSN=error messages The PSN of PSN- first messages.On the other hand, if NAK has carried both PSN of the error message and PSN of first message skew Value △ PSN, then request end directly obtain the △ PSN values.
The storage address is physical address of the packet storage in the memory bar of request end.Specifically, request end can basis The product of the length of deviant △ PSN and message (i.e. preset MTU value) obtains the offset address of error message.That is offset address =△ PSN*MTU values.
S104, according to the sequence number of the queue number of the data queue and the affiliated message of the error message, orient institute State the initial memory address of the affiliated message of error message.
Specifically, the data for including the affiliated message of error message are obtained in the NAK that request end is directly sent from responder The sequence number of the affiliated message of queue number and error message of queue, due to the affiliated message of queue number and error message of data queue Both sequence numbers there is corresponding relation between the initial memory address of the affiliated message of error message, request end can be according to data The sequence number of the affiliated message of queue number and error message of queue orients the initial memory address of the affiliated message of error message, tool Body implementation process repeats no more here.
S105, according to offset address of the error message relative to the first message of the affiliated message of the error message and institute State the initial memory address of the affiliated message of error message, orient the initial memory address of the error message, and from it is described go out Misrepresent deliberately and retransmit message to the responder at the initial memory address of text, wherein, the starting of the affiliated message of error message is deposited Storage address is the initial memory address of the first message of the affiliated message of the error message.
Specifically, because the initial memory address of the affiliated message of error message is the first message of the affiliated message of error message Initial memory address, request end according to offset address and the initial memory address of the affiliated message of error message and can orient Misrepresent deliberately the initial memory address of the initial memory address, the i.e. affiliated message of initial memory address=error message of error message of text + offset address, and retransmit message to responder at the initial memory address of error message.
If detecting error message in the message for the data queue that the responder of the embodiment of the present invention is sent in request end, Then generating error messages and error messages are sent to request end, request end obtains deviant from error messages, and according to inclined Shifting value obtains offset address of the error message relative to the first message of the affiliated message of error message, and is obtained from error messages The sequence number of the affiliated message of queue number and error message of data queue, and according to queue number and the error message institute of data queue The sequence number of category message orients the initial memory address of the affiliated message of error message, request end and then according to offset address and goes out The initial memory address for misrepresenting deliberately message belonging to text orients the initial memory address of error message, and is deposited from the starting of error message Store up and retransmit message to responder at address, compared with prior art, request end does not have to send out to deposit any list item is locally created The message information sent, while the process of inquiry and contrast message information is also eliminated, improved under conditions of accuracy is ensured Efficiency, reduce the delay of request end.
Fig. 2 is the schematic flow sheet of the method for another message retransmission in the embodiment of the present invention, can be included:
S201, request end send multiple data queues to responder, and the data queue includes at least one message, described Message includes at least one message.
A kind of schematic diagram of the RDMA transmission networks of simplification as shown in Figure 7 is referred to, simplified RDMA transmission networks are extremely Include CPU, HCA (Host Direct Memory Access, host side channel adapter) and memory bar less.CPU be used for HCA issues traffic order, and HCA is used to send message to opposite end HCA by network, and memory bar is used to store message.Whole message In transmission process, CPU is not carried out replicating the operation of message, only HCA need to be controlled directly to send a message to opposite end HCA, and then By the memory space of message deposit opposite end memory bar.
The responder is responder server, for receiving the message of request end (i.e. request end server) transmission.Need It is noted that RDMA transmission networks can prejudge the HCA of request end and responder mechanism and agreement it is whether identical, if phase Together, following steps are just performed.
Specifically, request end sends multiple data queues through network to responder, the data queue includes at least one Message, the message include at least one message.Wherein, QP in the data queue such as Fig. 7 (Queue Pair, queue to) institute Show, QP0 and QP1 is respectively to send out, receive data queue, and QP0 and QP1 forms a data queue pair, and data queue pair is established at both ends Message can be sent after data queue.It is pointed out that in transmission process, message is split as at least one message, institute The length for stating message is fixed, is MTU (Maximum Transmission Unit, MTU) value, and the number What all messages included according to queue were all continuously numbered for, the frame head record of each message has its corresponding sequence number, i.e. PSN (Packet Sequence Number, sequence of message number).
S202, when responder detects error message in the message included from the data queue, generate error messages.
Specifically, during the message of responder in the received messages, detect and obtain error message.
It is pointed out that the error message comprises at least following three kinds:Packet loss or the message, unexpected for sending time-out Message and unripe storage address message, wherein packet loss or send time-out message and unexpected message to be common Error message.Optionally, can be for both common error messages, the detection method of responder:Judge in message The sequence number of the whether more previous message of sequence number of message be incremented by by default queueing discipline, if it is not, then judging that message is Error message.Such as:Assuming that the default queueing discipline be incremented by successively 1, refer to a kind of message as shown in Figure 8 with it is corresponding The schematic diagram of message, if PSN=13 expected from current message, but PSN ≠ 13 for the message being an actually-received are (such as:=25), with The PSN (=12) of previous message is compared and is not incremented by, then judges that current message is error message, and the PSN of error message =13, i.e. the PSN of error message is with the Serial No. radix of the first message of the affiliated message of error message, according to certain order The numerical value counted to get.
Further, if responder detects error message, NAK (Negative are sent to request end Acknowledge, error messages), conversely, then sending ACK to request end after one or more correct messages are received (Acknowledge, correct response message).Wherein, when detecting error message, responder can be by the PSN of error message (such as:=13) and first message PSN (such as:=10) recorded in NAK, a kind of schematic diagram of error messages as shown in Figure 9, its In, PSNe is the PSN of error message, and PSNf is the PSN of first message.
Further, in implementation process, responder can be carried out in NAK consensus standard form PSN domains and misrepresented deliberately Text PSN, while in NAK reserved field carry the affiliated message of error message first message PSN, on the contrary, responder The PSN of the first message of the affiliated message of error message can be carried in NAK consensus standard form PSN domains, while in NAK reservation The PSN of error message is carried in domain.It is pointed out that above-mentioned implementation process can be compatible with traditional scheme, at the same it is privately owned right Accuracy can be also improved when connecing.
In addition, responder need to also record the sequence number of the affiliated message of error message, i.e. MSN (Message in NAK Sequence Number, message SN), and the queue number of data queue, i.e., No. QP.For example, refer to as shown in figure 11 Another message and corresponding message schematic diagram, wherein, after responder finds error message, QP0 and MSN=3 is also recorded Into NAK, NAK content is as shown in figure 12.
The error messages are sent to the request end by S203, responder, and the error messages go out to misrepresent deliberately including described The sequence number of text, the sequence number of the first message of the affiliated message of the error message, the data team of the affiliated message of the error message The sequence number of the queue number of row and the affiliated message of the error message.
Specifically, responder will carry the MSN of the affiliated message of the PSN of error message, the PSN of first message, error message And the NAK of No. QP of queue pair is sent to request end.
S204, request end is according to the sequence number of the error message and the sequence of the first message of the affiliated message of the error message Row number, the sequence number of the error message is calculated relative to the inclined of the sequence number of the first message of the affiliated message of the error message Shifting value.
Specifically, request end obtains both the PSN of error message and first message PSN deviant △ by calculating PSN, wherein, the PSN of the PSN- first messages of △ PSN=error messages.
It is relative to obtain the error message according to the deviant and the product of the length of the message for S205, request end In the offset address of the first message of the affiliated message of the error message.
The storage address is physical address of the packet storage in the memory bar of request end.Specifically, request end can basis The product of the length of deviant △ PSN and message (i.e. preset MTU value) obtains the offset address of error message.That is offset address =△ PSN*MTU values.
S206, request end obtain the queue number of the data queue of the affiliated message of the error message from the error messages With the sequence number of the affiliated message of the error message.
Specifically, the data for including the affiliated message of error message are obtained in the NAK that request end is directly sent from responder The sequence number of the affiliated message of queue number and error message of queue.
S207, request end are fixed according to the queue number of the data queue and the sequence number of the affiliated message of the error message Position goes out the initial memory address of the affiliated message of the error message.
Specifically, both sequence numbers of the affiliated message of queue number and error message by data queue and error message institute There is corresponding relation between the initial memory address of category message, request end can be according to queue number and the error message institute of data queue The sequence number of category message orients the initial memory address of the affiliated message of error message, and specific implementation process repeats no more here.
S208, skew of the request end according to the error message relative to the first message of the affiliated message of the error message Location and the initial memory address of the affiliated message of the error message, orient the initial memory address of the error message, and from At the initial memory address of the error message message is retransmitted to the responder.
Specifically, because the initial memory address of the affiliated message of error message is the first message of the affiliated message of error message Initial memory address, request end can be according to offset address and initial memory address and alignment error message starting storage Initial memory address+offset address of the affiliated message of initial memory address=error message of location, i.e. error message, and from error At the initial memory address of message message is retransmitted to responder.
If detecting error message in the message for the data queue that the responder of the embodiment of the present invention is sent in request end, Then generate error messages and error messages are sent to request end, the sequence number of error message of the request end in error message Deviant is calculated with the sequence number of the first message of the affiliated message of error message, further according to deviant and the product of the length of message Offset address of the error message relative to the first message of the affiliated message of error message is calculated, and according to the queue number of data queue The initial memory address of the affiliated message of error message is oriented with the sequence number of the affiliated message of error message, and then according to skew ground The initial memory address of location and the affiliated message of error message orients the initial memory address of error message, so as to from error message Initial memory address at start to retransmit message, realize to send out to stagger the time in message and retransmit the function of error message, and with prolonging When it is small and simple to operate the characteristics of.
Fig. 3 is the schematic flow sheet of the method for another message retransmission in the embodiment of the present invention, can be included:
S301, request end send multiple data queues to responder, and the data queue includes at least one message, described Message includes at least one message.Step S301 is identical with the content of the step S201 in Fig. 2, repeats no more here.
S302, when responder detects error message in the message included from the data queue, according to the error The sequence number of the first message of the sequence number of message and the affiliated message of the error message, calculate the sequence number of the error message Relative to the deviant of the sequence number of the first message of the affiliated message of the error message, and generate error messages.
Specifically, during the message of responder in the received messages, detect and obtain error message.
It is pointed out that the error message comprises at least following three kinds:Packet loss or the message, unexpected for sending time-out Message and unripe storage address message, wherein packet loss or send time-out message and unexpected message to be common Error message.Optionally, can be for both common error messages, the detection method of responder:Judge in message The sequence number of the whether more previous message of sequence number of message be incremented by by default queueing discipline, if it is not, then judging that message is Error message.Such as:Assuming that the default queueing discipline be incremented by successively 1, refer to a kind of message as shown in Figure 8 with it is corresponding The schematic diagram of message, if PSN=13 expected from current message, but PSN ≠ 13 for the message being an actually-received are (such as:=25), with The PSN (=12) of previous message is compared and is not incremented by, then judges that current message is error message, and the PSN of error message =13, i.e. the PSN of error message is with the Serial No. radix of the first message of the affiliated message of error message, is entered according to certain order The numerical value that row counts to get.
If responder detects error message, sending NAK to request end, (Negative Acknowledge, report an error and disappear Breath), conversely, then sending ACK (Acknowledge, correct response to request end after one or more correct messages are received Message).
Specifically, when detecting error message, responder can calculate the PSN's of the error message and PSN of first message Deviant △ PSN are (such as:△ PSN=13-10=3), then △ PSN recorded in NAK, another kind as shown in Figure 10, which reports an error, to disappear The schematic diagram of breath.
In addition, responder need to also record the sequence number of the affiliated message of error message, i.e. MSN (Message in NAK Sequence Number, message SN), and in NAK record data queue queue number, i.e., No. QP.For example, it please join Read the schematic diagram of another message as shown in figure 11 with corresponding message, wherein, after responder finds error message, by QP0 and MSN=3 also recorded in NAK, and NAK content is as shown in figure 12.
Further, in implementation process, responder can be carried out in NAK consensus standard form PSN domains and misrepresented deliberately Text PSN, while in NAK reserved field carry the affiliated message of error message first message PSN, on the contrary, responder The PSN of the first message of the affiliated message of error message can be carried in NAK consensus standard form PSN domains, while in NAK reservation The PSN of error message is carried in domain.It is pointed out that above-mentioned implementation process can be compatible with traditional scheme, at the same it is privately owned right Accuracy can be also improved when connecing.
The error messages are sent to the request end by S303, responder, and the error messages go out to misrepresent deliberately including described The sequence number of text is relative to belonging to the deviant of the sequence number of the first message of the affiliated message of the error message, the error message The sequence number of the queue number of the data queue of message and the affiliated message of the error message.
Specifically, responder is by the MSN for carrying the affiliated message of deviant △ PSN, the error message and QP of queue pair Number NAK be sent to request end.
S304, request end deviant according to the error messages information acquisition.
Specifically, request end directly obtains deviant △ PSN from NAK.
It is relative to obtain the error message according to the deviant and the product of the length of the message for S305, request end In the offset address of the first message of the affiliated message of the error message.
The storage address is the physical address for the memory bar that error message is stored in request end.Specifically, request end can The offset address of error message is obtained according to the product of the length of deviant △ PSN and message (i.e. preset MTU value).Offset Address=△ PSN*MTU values.
S306, request end obtain the queue number of the data queue of the affiliated message of the error message from the error messages With the sequence number of the affiliated message of the error message.
Specifically, the data for including the affiliated message of error message are obtained in the NAK that request end is directly sent from responder The sequence number of the affiliated message of queue number and error message of queue.
S307, request end are fixed according to the queue number of the data queue and the sequence number of the affiliated message of the error message Position goes out the initial memory address of the affiliated message of the error message.
Specifically, both sequence numbers of the affiliated message of queue number and error message by data queue and error message institute There is corresponding relation between the initial memory address of category message, request end can be according to queue number and the error message institute of data queue The sequence number of category message orients the initial memory address of the affiliated message of error message, and specific implementation process repeats no more here.
S308, skew of the request end according to the error message relative to the first message of the affiliated message of the error message Location and the initial memory address of the affiliated message of the error message, orient the initial memory address of the error message, and from At the initial memory address of the error message message is retransmitted to the responder.
Specifically, because the initial memory address of the affiliated message of error message is the first message of the affiliated message of error message Initial memory address, request end according to offset address and the initial memory address of the affiliated message of error message and can orient Misrepresent deliberately the initial memory address of the initial memory address, the i.e. affiliated message of initial memory address=error message of error message of text + offset address, and retransmit message to responder at the initial memory address of error message.
If detecting error message in the message for the data queue that the responder of the embodiment of the present invention is sent in request end, Then generate error messages and error messages are sent to request end, request end obtains the deviant in error message and according to skew The product of value and the length of message calculates offset address of the error message relative to the first message of the affiliated message of error message, then The starting that the affiliated message of error message is oriented according to the sequence number of the queue number of data queue and the affiliated message of error message is deposited Address is stored up, and then the starting for orienting according to the initial memory address of offset address and the affiliated message of error message error message is deposited Address is stored up, so as to retransmit message at the initial memory address of error message, realizes to send out to stagger the time in message and is retransmitted out The function of text is misrepresented deliberately, and with the characteristics of small and simple to operate that is delayed.
Fig. 4 is a kind of request end of message retransmission in the embodiment of the present invention.Request in the embodiment of the present invention as shown in the figure End can at least include sending module 410, acquisition module 420 and locating module 430, wherein:
Sending module 410, for sending multiple data queues to responder, the data queue includes at least one disappear Breath, the message include at least one message, and the length of the message is fixed, and all reports that the data queue includes What text was all continuously numbered for.
A kind of schematic diagram of the RDMA transmission networks of simplification as shown in Figure 7 is referred to, simplified RDMA transmission networks are extremely Include CPU, HCA (Host Direct Memory Access, host side channel adapter) and memory bar less.CPU be used for HCA issues traffic order, and HCA is used to send message to opposite end HCA by network, and memory bar is used to store message.Whole message In transmission process, CPU is not carried out replicating the operation of message, only HCA need to be controlled directly to send a message to opposite end HCA, and then By the memory space of message deposit opposite end memory bar.
Specifically, sending module 410 sends multiple data queues through network to responder, the data queue is included at least One message, the message include at least one message.Wherein, QP (Queue Pair, queue in the data queue such as Fig. 7 It is right) shown in, QP0 and QP1 forms a data queue, and both ends can send message after establishing data queue.It is pointed out that In transmission process, message is split as at least one message, and the length of the message is fixed, is MTU (Maximum Transmission Unit, MTU) value, and the data queue all messages for including all are continuously numbered for, The frame head record of each message has its corresponding sequence number, i.e. PSN (Packet Sequence Number, sequence of message number).
Acquisition module 420, the error messages sent for obtaining the responder, the error messages include being used to obtain The sequence number of the error message is obtained relative to the letter of the deviant of the sequence number of the first message of the affiliated message of the error message Breath, the queue number of data queue of the affiliated message of the error message and the sequence number of the affiliated message of the error message.
The error message comprises at least following three kinds:Packet loss sends the message of time-out, unexpected message and not The message of storage address is got out, the message and unexpected message of wherein packet loss or transmission time-out are common error message. Optionally, can be for both common error messages, the detection method of responder:Judge the sequence of the message in message Number whether the sequence number of more previous message is incremented by by default queueing discipline, if it is not, then judging that message is error message.Example Such as:Assuming that the default queueing discipline is incremented by successively 1, a kind of signal of message as shown in Figure 8 with corresponding message is referred to Figure, if PSN=13 expected from current message, but PSN ≠ 13 for the message being an actually-received are (such as:=25), with previous message PSN (=12) compare and be not incremented by, then judge that current message is error message, and the PSN=13 of error message, that is, malfunction The PSN of message is with the Serial No. radix of the first message of the affiliated message of error message, is counted to get according to certain order A numerical value.
Further, if responder detects error message, NAK (Negative are sent to request end Acknowledge, error messages), conversely, then sending ACK to request end after one or more correct messages are received (Acknowledge, correct response message).Wherein, when detecting error message, responder can be according to the PSN of error message Sent out with the PSN of the first message of the affiliated message of error message (i.e. message cutting is first message of message queue after message) NAK, NAK is sent to include the sequence number for being used for obtaining error message relative to the sequence number of the first message of the affiliated message of error message The information of deviant.For example, as shown in figure 8, after responder detects error message, the PSN of error message is recorded (such as:=13) With the PSN of first message (such as:=10), and with the one way in which of following two embodiment NAK is sent:
Mode one, directly the PSN (=13) of error message and first message PSN (=10) recorded in NAK, such as Fig. 9 A kind of schematic diagram of shown error messages, wherein, PSNe is the PSN of error message, and PSNf is the PSN of first message;
Mode two, calculate the PSN of the error message and PSN of first message deviant △ PSN (such as:△ PSN=13-10 =3), then by △ PSN recorded in NAK, the schematic diagram of another error messages as shown in Figure 10.
Further, in mode one and mode two both implementation process, responder can be in NAK consensus standard lattice The PSN of error message, while the first message of the carrying affiliated message of error message in NAK reserved field are carried in formula PSN domains PSN, on the contrary, responder can also carry the first message of the affiliated message of error message in NAK consensus standard form PSN domains PSN, at the same in NAK reserved field carry error message PSN.It is pointed out that above-mentioned implementation process can be with tradition Scheme is compatible, while accuracy can be also improved when privately owned docking.
Especially, responder records the sequence number of the affiliated message of error message, i.e. MSN (Message also in NAK Sequence Number, message SN), and the queue number of data queue, i.e., No. QP.For example, refer to as shown in figure 11 Another message and corresponding message schematic diagram, responder find error message after, QP0 and MSN=3 also be recorded into NAK In.Accordingly, NAK content can be as shown in Figure 12 or Figure 13.
Specifically, acquisition module 420 obtains responder reporting for the first time according to the affiliated message of PSN and error message of error message The NAK that the PSN of text is sent.
The acquisition module 420 be additionally operable to according to the sequence number for being used to obtaining the error message relative to it is described go out Misrepresent deliberately deviant described in the information acquisition of the deviant of the sequence number of the first message of message belonging to text, and according to the deviant and The product of the length of the message, obtain skew of the error message relative to the first message of the affiliated message of the error message Address.
Specifically, on the one hand, if NAK has carried both PSN of the error message and PSN of first message deviant △ PSN, then acquisition module 420 from NAK for obtaining △ PSN values.On the other hand, if NAK only carry error message PSN and The PSN of first message, then acquisition module 420 is used for the first message of the affiliated message of sequence number and error message according to error message Sequence number calculate deviant △ PSN, wherein the PSN- first messages of △ PSN=error messages PSN.
The storage address is physical address of the packet storage in the memory bar of request end.Specifically, acquisition module 420 can The offset address of error message is obtained according to the product of the length of deviant △ PSN and message (i.e. preset MTU value).Offset Address=△ PSN*MTU values.
Locating module 430, for the queue number according to the data queue and the sequence of the affiliated message of the error message Number, orient the initial memory address of the affiliated message of the error message, wherein, the queue number of the data queue and it is described go out Misrepresenting deliberately between both sequence numbers of message belonging to text and the initial memory address of the affiliated message of the error message has corresponding close System.
Specifically, obtained in the NAK that locating module 430 is directly sent from responder including the affiliated message of error message The sequence number of the affiliated message of queue number and error message of data queue, due to belonging to the queue number and error message of data queue There is corresponding relation, locating module 430 between both sequence numbers of message and the initial memory address of the affiliated message of error message The starting of the affiliated message of error message can be oriented according to the sequence number of the affiliated message of queue number and error message of data queue Storage address, specific implementation process repeat no more here.
The locating module 430 is additionally operable to the reporting for the first time relative to the affiliated message of the error message according to the error message The offset address of text and the initial memory address of the affiliated message of the error message, orient the starting storage of the error message Address, and message is retransmitted to the responder at the initial memory address of the error message, wherein, the error message institute The initial memory address of category message is the initial memory address of the first message of the affiliated message of the error message.
Specifically, because the initial memory address of the affiliated message of error message is the first message of the affiliated message of error message Initial memory address, the locating module 430 can be according to the initial memory address of offset address and the affiliated message of error message And alignment error message initial memory address, i.e., the affiliated message of initial memory address=error message of error message rise Beginning storage address+offset address, and retransmit message to responder at the initial memory address of error message.
Fig. 5 is a kind of responder of message retransmission provided in an embodiment of the present invention.As shown in the figure in the embodiment of the present invention Responder can at least include data queue's receiving module 510 and message transmission module 520, wherein:
Receiving module 510, for receiving multiple data queues of request end transmission, the data queue includes at least one Message, the message include at least one message, the length of the message be it is fixed, and the data queue include it is all What message was all continuously numbered for.
A kind of schematic diagram of the RDMA transmission networks of simplification as shown in Figure 7 is referred to, simplified RDMA transmission networks are extremely Include CPU, HCA (Host Direct Memory Access, host side channel adapter) and memory bar less.CPU be used for HCA issues traffic order, and HCA is used to send message to opposite end HCA by network, and memory bar is used to store message.Whole message In transmission process, CPU is not carried out replicating the operation of message, only HCA need to be controlled directly to send a message to opposite end HCA, and then By the memory space of message deposit opposite end memory bar.
Specifically, receiving module 510 receives multiple data queues that request end is sent through network, data queue's bag At least one message is included, the message includes at least one message.Wherein, QP (Queue in the data queue such as Fig. 7 Pair, queue to) shown in, QP0 and QP1 form a data queue, and both ends can send message after establishing data queue.Need , it is noted that in transmission process, message is split has its corresponding sequence at least one message, the frame head record of each message Row number, i.e. PSN (Packet Sequence Number, sequence of message number).
Message transmission module 520, during for detecting error message in the message included from the data queue, generation The error messages are simultaneously sent to the request end by error messages, and the error messages include being used to obtain the error message Message of the sequence number relative to the deviant of the sequence number of the first message of the affiliated message of the error message, the error message The sequence number of the queue number of the data queue of affiliated message and the affiliated message of the error message, wherein, the data queue Queue number and the affiliated message of the error message starting storage with the affiliated message of the error message of both sequence numbers There is corresponding relation, so that the request end calculates institute according to the product of the deviant and the length of the message between location Offset address of the error message relative to the first message of the affiliated message of the error message is stated, and according to the team of the data queue The sequence number of row number and the affiliated message of the error message orients the initial memory address of the affiliated message of the error message, enters And rising for the error message is oriented according to the initial memory address of the offset address and the affiliated message of the error message Beginning storage address, so as to retransmit message at the initial memory address of the error message.
The error message comprises at least following three kinds:Packet loss sends the message of time-out, unexpected message and not The message of storage address is got out, the message and unexpected message of wherein packet loss or transmission time-out are common error message. Specifically, for both common error messages, message transmission module 520 judge the message in message sequence number whether compared with The sequence number of previous message is incremented by by default queueing discipline, if the sequence number for finding message is not the sequence of more previous message Number it is incremented by by default queueing discipline, then it is the error message to judge the message.Such as:Assuming that the default queueing discipline be according to It is secondary to be incremented by 1, a kind of schematic diagram of message as shown in Figure 8 with corresponding message is referred to, if PSN=13 expected from current message, But PSN ≠ 13 for the message being an actually-received are (such as:=25), it is not incremented by compared with the PSN (=12) of previous message, then Judge that current message is error message, and the PSN=13 of error message, i.e. error message PSN are to disappear belonging to error message The Serial No. radix of the first message of breath, the numerical value counted to get according to certain order.
Further, when message transmission module 520 obtains error message, the meeting basis of message transmission module 520 goes out to misrepresent deliberately The first message (i.e. message cutting is first message of message queue after message) of the affiliated message of PSN and error message of text PSN sends NAK (Negative Acknowledge, error messages).Optionally, message transmission module 520 is with following two The one way in which of embodiment sends NAK:
Mode one, directly the PSN (=13) of error message and first message PSN (=10) recorded in NAK, i.e. NAK The sequence number of the first message of the affiliated message of sequence number and error message comprising error message, one kind as shown in Figure 9, which reports an error, to disappear The schematic diagram of breath, wherein, PSNe is the PSN of error message, and PSNf is the PSN of first message;
Mode two, calculate the PSN of the error message and PSN of first message deviant △ PSN (such as:△ PSN=13-10 =3), then by △ PSN recorded in NAK, i.e. NAK includes the sequence number of error message relative to the head of the affiliated message of error message The deviant of the sequence number of message, the schematic diagram of another error messages as shown in Figure 10.
Further, request end obtains the initial memory address of error message according to NAK, and then from the starting storage Start to retransmit message at location.Wherein, request end refers to Fig. 4 according to the method for the initial memory address of NAK acquisition error messages In embodiment, repeat no more here.
Fig. 6 is a kind of structural representation of the system of message retransmission in the embodiment of the present invention.The present invention is implemented as shown in the figure The system of message retransmission in example can at least include request end 61 and responder 62, wherein:
The request end 61 is the request end as described by previously in conjunction with Fig. 4, for sending multiple data to responder 62 Queue, the data queue include at least one message, and the message includes at least one message, and the length of the message is solid It is fixed, and the data queue all messages for including all are continuously numbered for;
The responder 62 is the responder as described by previously in conjunction with Fig. 6, for receiving the transmission of request end 61 Multiple data queues, and detect the data queue;Given birth to when detecting error message in the message included from the data queue Into error messages;
The request end 61 orients the initial memory address of the error message according to the error messages, and from described At the initial memory address of error message message is retransmitted to the responder 62.
Figure 14 is the structural representation of the request end of another message retransmission in the embodiment of the present invention, as shown in figure 14, The request end can include:At least one processor 701, such as CPU, at least one communication bus 702, host side path adaptation Device 703 and memory 704.Wherein, communication bus 702 is used to realize the connection communication between these components.Host side passage Adapter 703 is used to request end accessing network.Memory 704 can be that (Random Access Memory, are deposited at a high speed RAM Take) memory or NVM (Non-Volatile Memory, non-volatile) memory, a for example, at least disk deposits Reservoir.Memory 704 can also be the storage device away from aforementioned processor 701, for example, at least a memory bar.Memory Batch processing code is stored in 704, and processor 701 is used to perform following grasp according to the program code stored in memory Make:
Multiple data queues are sent to responder, the data queue includes at least one message, and the message is included extremely A few message, the length of the message is fixed, and the data queue all messages for including all are continuously numbered for;
The error messages that the responder is sent are obtained, the error messages include being used to obtain the error message Information of the sequence number relative to the deviant of the sequence number of the first message of the affiliated message of the error message, error message institute Belong to the queue number of data queue and the sequence number of the affiliated message of the error message of message;
According to sequence number the reporting for the first time relative to the affiliated message of the error message for being used to obtain the error message Deviant described in the information acquisition of the deviant of the sequence number of text, and multiplying according to the deviant and the length of the message Product, obtains offset address of the error message relative to the first message of the affiliated message of the error message;
According to the sequence number of the queue number of the data queue and the affiliated message of the error message, the error is oriented The initial memory address of the affiliated message of message, wherein, the queue number of the data queue and the affiliated message of the error message There is corresponding relation between both sequence numbers and the initial memory address of the affiliated message of the error message;
According to the error message relative to the first message of the affiliated message of the error message offset address and it is described go out The initial memory address of message belonging to text is misrepresented deliberately, orients the initial memory address of the error message, and go out to misrepresent deliberately from described Message is retransmitted to the responder at the initial memory address of text, wherein, the starting storage of the affiliated message of error message Location is the initial memory address of the first message of the affiliated message of the error message.
Optionally, if the error messages carry the sequence number and the affiliated message of the error message of the error message First message sequence number, then the processor 701 be used to obtain the sequence number of the error message relative to institute according to described The concrete operations for stating deviant described in the information acquisition of the deviant of the sequence number of the first message of the affiliated message of error message can be with For:
According to the sequence number of the error message and the sequence number of the first message of the affiliated message of the error message, calculate The sequence number of the error message relative to the sequence number of the first message of the affiliated message of the error message deviant, it is described go out The sequence number for misrepresenting deliberately text is with the Serial No. radix of the first message of the affiliated message of the error message, is carried out according to certain order The numerical value counted to get.
Figure 15 is the structural representation of the responder of another message retransmission in the embodiment of the present invention, as shown in figure 15, The responder can include:At least one processor 801, such as CPU, at least one communication bus 802, host side path adaptation Device 803 and memory 804.Wherein, communication bus 802 is used to realize the connection communication between these components.Host side passage Adapter 803 is used to responder accessing network.Memory 804 can be that (Random Access Memory, are deposited at a high speed RAM Take) memory or NVM (Non-Volatile Memory, non-volatile) memory, a for example, at least disk deposits Reservoir.Memory 804 can also be the storage device away from aforementioned processor 801, for example, at least a memory bar.Memory Batch processing code is stored in 804, and processor 801 is used to perform following grasp according to the program code stored in memory Make:
Multiple data queues that request end is sent are received, the data queue includes at least one message, the message package At least one message is included, the length of the message is fixed, and all messages that the data queue includes all are continuously to compile Number;
When detecting error message in the message included from the data queue, generate error messages and reported an error described Message is sent to the request end, the sequence number that the error messages include being used for obtaining the error message relative to it is described go out Misrepresent deliberately the data queue of the information of the deviant of the sequence number of the first message of message belonging to text, the affiliated message of the error message The sequence number of queue number and the affiliated message of the error message, wherein, the queue number of the data queue and described go out to misrepresent deliberately There is corresponding relation between both sequence numbers of message belonging to text and the initial memory address of the affiliated message of the error message, with The request end is set to calculate the error message relative to described according to the product of the deviant and the length of the message The offset address of the first message of the affiliated message of error message, and the queue number according to the data queue and error message institute The sequence number of category message orients the initial memory address of the affiliated message of the error message, so as to according to the offset address and The initial memory address of the affiliated message of error message orients the initial memory address of the error message, and then from described Start to retransmit message at the initial memory address of error message.
Optionally, processor 801 send error messages can also include the error message sequence number and it is described go out Misrepresent deliberately the sequence number of the first message of message belonging to text so that the request end according to the sequence number of the error message and it is described go out The sequence number for misrepresenting deliberately the first message of message belonging to text calculates the deviant, the sequence number of the error message be with it is described go out The Serial No. radix of the first message of message belonging to text is misrepresented deliberately, the numerical value counted to get according to certain order.
The embodiment of the present invention also proposed a kind of computer-readable storage medium, and the computer-readable storage medium has program stored therein, The method including the message retransmission described by combination of embodiment of the present invention Fig. 1~Fig. 3 is part or all of when described program performs The step of.
If detecting error message in the message for the data queue that the responder of the embodiment of the present invention is sent in request end, Then generating error messages and error messages are sent to request end, request end obtains deviant from error messages, and according to inclined Shifting value obtains offset address of the error message relative to the first message of the affiliated message of error message, and is obtained from error messages The sequence number of the affiliated message of queue number and error message of data queue, and according to queue number and the error message institute of data queue The sequence number of category message orients the initial memory address of the affiliated message of error message, request end and then according to offset address and goes out The initial memory address for misrepresenting deliberately message belonging to text orients the initial memory address of error message, and at initial memory address to Responder retransmits message, realizes the function that re-transmission error message of staggering the time is sent out in message, and small and simple to operate with being delayed The characteristics of.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
Above disclosure is only preferred embodiment of present invention, can not limit the right model of the present invention with this certainly Enclose, therefore the equivalent variations made according to the claims in the present invention, still belong to the scope that the present invention is covered.

Claims (9)

  1. A kind of 1. method of message retransmission, it is characterised in that methods described includes:
    Multiple data queues are sent to responder, the data queue includes at least one message, and the message includes at least one Individual message, the length of the message is fixed, and the data queue all messages for including all are continuously numbered for;
    The error messages that the responder is sent are obtained, the error messages include being used for the sequence number phase for obtaining error message Information, the affiliated message of the error message for the deviant of the sequence number of the first message of the affiliated message of the error message The sequence number of the queue number of data queue and the affiliated message of the error message;
    According to the sequence number for being used to obtain the error message relative to the first message of the affiliated message of the error message Deviant described in the information acquisition of the deviant of sequence number, and according to the deviant and the product of the length of the message, obtain Obtain offset address of the error message relative to the first message of the affiliated message of the error message;
    According to the sequence number of the queue number of the data queue and the affiliated message of the error message, the error message is oriented The initial memory address of affiliated message, wherein, the sequence of the queue number of the data queue and the affiliated message of the error message Number both there is corresponding relation between the initial memory address of the affiliated message of the error message;
    Relative to the offset address of the first message of the affiliated message of the error message and described go out to misrepresent deliberately according to the error message The initial memory address of message belonging to text, orients the initial memory address of the error message, and from the error message Message is retransmitted to the responder at initial memory address, wherein, the initial memory address of the affiliated message of error message is For the initial memory address of the first message of the affiliated message of the error message.
  2. 2. message retransmission method according to claim 1, it is characterised in that the sequence for being used to obtain the error message Row number specifically includes relative to the information of the deviant of the sequence number of the first message of the affiliated message of the error message:
    The sequence number of the first message of the sequence number of the error message and the affiliated message of the error message;
    It is used for sequence number the reporting for the first time relative to the affiliated message of the error message for obtaining the error message described in the basis Deviant described in the information acquisition of the deviant of the sequence number of text, is specifically included:
    According to the sequence number of the error message and the sequence number of the first message of the affiliated message of the error message, calculate described The sequence number of error message relative to the sequence number of the first message of the affiliated message of the error message deviant, it is described to go out to misrepresent deliberately The sequence number of text is with the Serial No. radix of the first message of the affiliated message of the error message, is counted according to certain order An obtained numerical value.
  3. A kind of 3. method of message retransmission, it is characterised in that methods described includes:
    Multiple data queues that request end is sent are received, the data queue includes at least one message, and the message is included extremely A few message, the length of the message is fixed, and the data queue all messages for including all are continuously numbered for;
    When detecting error message in the message included from the data queue, error messages are generated and by the error messages The request end is sent to, the sequence number that the error messages include being used to obtain the error message goes out to misrepresent deliberately relative to described The information of the deviant of the sequence number of the first message of message belonging to text, the affiliated message of the error message data queue queue Number and the affiliated message of the error message sequence number, wherein, the queue number of the data queue and error message institute Belong to both sequence numbers of message has corresponding relation between the initial memory address of the affiliated message of the error message, so that institute State request end and the error message is calculated relative to the error according to the product of the deviant and the length of the message The offset address of the first message of the affiliated message of message, and disappear belonging to queue number according to the data queue and the error message The sequence number of breath orients the initial memory address of the affiliated message of the error message, so as to according to the offset address and described The initial memory address of the affiliated message of error message orients the initial memory address of the error message, and then from the error Start to retransmit message at the initial memory address of message.
  4. 4. the method for message retransmission according to claim 3, it is characterised in that described to include from the data queue When error message is detected in message, generate error messages and the error messages are sent to the request end, it is described to report an error The sequence number that message includes being used to obtain the error message is relative to the sequence of the first message of the affiliated message of the error message Number deviant information, including:
    If detecting error message in the message included from the data queue, generate error messages and send out the error messages The request end is sent to, the error messages include the sequence number of the error message and the head of the affiliated message of the error message The sequence number of message, so that the request end is according to the sequence number of the error message and the head of the affiliated message of the error message The sequence number of message calculates the deviant, and the sequence number of the error message is with the head of the affiliated message of the error message The Serial No. radix of message, the numerical value counted to get according to certain order.
  5. 5. a kind of request end of message retransmission, it is characterised in that the request end includes:
    Sending module, for sending multiple data queues to responder, the data queue includes at least one message, described to disappear Breath includes at least one message, and the length of the message is fixed, and all messages that the data queue includes all are to connect The number of sequeling;
    Acquisition module, the error messages sent for obtaining the responder, the error messages include being used to be malfunctioned Information of the sequence number of message relative to the deviant of the sequence number of the first message of the affiliated message of the error message, the error The queue number of the data queue of the affiliated message of message and the sequence number of the affiliated message of the error message;
    The acquisition module is additionally operable to according to the sequence number for being used to obtain the error message relative to the error message Deviant described in the information acquisition of the deviant of the sequence number of the first message of affiliated message, and according to the deviant and the report The product of the length of text, obtains offset address of the error message relative to the first message of the affiliated message of the error message;
    Locating module, for the sequence number of the queue number according to the data queue and the affiliated message of the error message, positioning Go out the initial memory address of the affiliated message of the error message, wherein, the queue number of the data queue and the error message There is corresponding relation between both sequence numbers of affiliated message and the initial memory address of the affiliated message of the error message;
    The locating module is additionally operable to according to the error message relative to the inclined of the first message of the affiliated message of the error message The initial memory address of address and the affiliated message of the error message is moved, orients the initial memory address of the error message, And message is retransmitted to the responder at the initial memory address of the error message, wherein, disappear belonging to the error message The initial memory address of breath is the initial memory address of the first message of the affiliated message of the error message.
  6. 6. request end according to claim 5, it is characterised in that the sequence number phase for being used to obtain the error message For the information of the deviant of the sequence number of the first message of the affiliated message of the error message, specifically include:
    The sequence number of the first message of the sequence number of the error message and the affiliated message of the error message;
    The acquisition module is used for according to the sequence number for being used to obtain the error message relative to the error message institute When belonging to deviant described in the information acquisition of the deviant of the sequence number of the first message of message, specifically for according to the error message Sequence number and the affiliated message of the error message first message sequence number, the sequence number for calculating the error message is relative In the deviant of the sequence number of the first message of the affiliated message of the error message, the sequence number of the error message be with it is described go out The Serial No. radix of the first message of message belonging to text is misrepresented deliberately, the numerical value counted to get according to certain order.
  7. 7. a kind of responder of message retransmission, it is characterised in that the responder includes:
    Receiving module, for receiving multiple data queues of request end transmission, the data queue includes at least one message, institute Stating message includes at least one message, and the length of the message is fixed, and all messages that the data queue includes are all It is continuously numbered for;
    Message transmission module, during for detecting error message in the message included from the data queue, generation, which reports an error, to disappear Cease and the error messages are sent to the request end, the error messages include being used for the sequence for obtaining the error message Number disappear relative to belonging to the message of deviant of sequence number of first message of the affiliated message of the error message, the error message The sequence number of the queue number of the data queue of breath and the affiliated message of the error message, wherein, the queue of the data queue Number and the affiliated message of the error message both sequence numbers between the initial memory address of the affiliated message of the error message With corresponding relation, so that the sequence number that the request end is used to obtain the error message according to is relative to the error Deviant described in the information acquisition of the deviant of the sequence number of the first message of the affiliated message of message, and according to the deviant and institute The product for stating the length of message calculates skew of the error message relative to the first message of the affiliated message of the error message Institute is oriented in address, the request end according to the queue number of the data queue and the sequence number of the affiliated message of the error message State the initial memory address of the affiliated message of error message, and then according to the offset address and the affiliated message of the error message Initial memory address orients the initial memory address of the error message, is opened at the initial memory address of the error message Starting weight passes message.
  8. 8. responder according to claim 7, it is characterised in that the message transmission module is used for from the data team When detecting error message in the message that row include, generate error messages and the error messages be simultaneously sent to the request end, The error messages include the sequence number of the error message and the sequence number of the first message of the affiliated message of the error message, with Make the request end according to the sequence number of the error message and the sequence number meter of the first message of the affiliated message of the error message The deviant is calculated, the sequence number of the error message is with the Serial No. of the first message of the affiliated message of the error message Radix, the numerical value counted to get according to certain order.
  9. A kind of 9. system of message retransmission, it is characterised in that the system include request end as described in claim 5 or 6 with Responder as claimed in claim 7 or 8, wherein:
    The request end is used to send multiple data queues to the responder, and the data queue includes at least one message, The message includes at least one message, and the length of the message is fixed, and all messages that the data queue includes All it is continuously numbered for;
    The responder is used to receive multiple data queues that the request end is sent, and detects the data queue;From described Error messages are generated when error message is detected in the message that data queue includes;
    The request end orients the initial memory address of the error message according to the error messages, and goes out to misrepresent deliberately from described At the initial memory address of text message is retransmitted to the responder.
CN201410250643.1A 2014-06-06 2014-06-06 A kind of method of message retransmission, request end, responder and system Active CN104065465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410250643.1A CN104065465B (en) 2014-06-06 2014-06-06 A kind of method of message retransmission, request end, responder and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410250643.1A CN104065465B (en) 2014-06-06 2014-06-06 A kind of method of message retransmission, request end, responder and system

Publications (2)

Publication Number Publication Date
CN104065465A CN104065465A (en) 2014-09-24
CN104065465B true CN104065465B (en) 2018-03-16

Family

ID=51553013

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410250643.1A Active CN104065465B (en) 2014-06-06 2014-06-06 A kind of method of message retransmission, request end, responder and system

Country Status (1)

Country Link
CN (1) CN104065465B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104394163A (en) * 2014-12-05 2015-03-04 浪潮电子信息产业股份有限公司 Safety detection method based on Web application
CN108512820B (en) * 2017-02-28 2020-07-24 华为技术有限公司 Method and equipment for server to respond to request message in communication system
CN113055131B (en) * 2019-12-26 2023-06-30 阿里巴巴集团控股有限公司 Data processing method, data segmentation method, computing device and medium
CN113301103B (en) * 2021-02-05 2024-03-12 阿里巴巴集团控股有限公司 Data processing system, method and device
CN113300818B (en) * 2021-02-08 2023-04-28 阿里巴巴集团控股有限公司 Data transmission system and method
CN115296900B (en) * 2022-08-03 2024-01-23 北京天融信网络安全技术有限公司 Network message correction method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1890657A (en) * 2003-12-02 2007-01-03 国际商业机器公司 RDMA completion and retransmit system and method
CN101091318A (en) * 2003-12-11 2007-12-19 国际商业机器公司 Data transfer error checking

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7243284B2 (en) * 2003-12-11 2007-07-10 International Business Machines Corporation Limiting number of retransmission attempts for data transfer via network interface controller
US8458280B2 (en) * 2005-04-08 2013-06-04 Intel-Ne, Inc. Apparatus and method for packet transmission over a high speed network supporting remote direct memory access operations
JP4662273B2 (en) * 2006-03-24 2011-03-30 富士通株式会社 Communication apparatus, method and program
US9495324B2 (en) * 2012-03-30 2016-11-15 Intel Corporation Efficient distribution of subnet administration data over an RDMA network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1890657A (en) * 2003-12-02 2007-01-03 国际商业机器公司 RDMA completion and retransmit system and method
CN101091318A (en) * 2003-12-11 2007-12-19 国际商业机器公司 Data transfer error checking

Also Published As

Publication number Publication date
CN104065465A (en) 2014-09-24

Similar Documents

Publication Publication Date Title
CN104065465B (en) A kind of method of message retransmission, request end, responder and system
CN103905300B (en) A kind of data message sending method, equipment and system
JP5859669B2 (en) Packet ordering based on delivery route changes in communication networks
CN105812287B (en) Efficient circuit in packet switching network
CN104518853B (en) Method, receiving terminal and the system that a kind of data retransmit
CN104484295B (en) Receiver sliding window-based data transmission method in parallel computer system
CN103141050B (en) Data packet retransmission method and node in quick path interconnect system
EP3296885A1 (en) Method of disconnecting link between pcie equipment and host and device utilizing same
KR102046792B1 (en) Method of transporting data from sending node to destination node
CN103188059A (en) Method, device and system for data packet retransmission in quick path interconnect system
CN107172649A (en) A kind of data transmission method and equipment
CN104038322A (en) Intermediate node, communication network and data transmission control method
CN103999394B (en) Data retransmission and feedback methods, and corresponding apparatus
CN103368703B (en) Data package retransmission method, data packet receiving method and device
CN106911485A (en) For the method and apparatus of reliable multicast transport data
CN106936852B (en) Data sending and receiving method, equipment and data transmission system
US9450706B2 (en) Communication apparatus and packet transfer method
CN103684882B (en) Message transmission method, system and device based on TRUNK technology
US20240146806A1 (en) Intermediate apparatus, communication method, and program
JP2014147011A5 (en)
CN104426866A (en) Data transmission method and apparatus
CN109495384A (en) A kind of method and apparatus improving network route reliability
CN103078883B (en) Asynchronous system file transfer means based on FTP
CN106375232A (en) Message transmission method and message transmission system
KR101243502B1 (en) Data receiving method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant