CN104601484A - Sending unit of TCP (Transmission Control Protocol) offload engine - Google Patents

Sending unit of TCP (Transmission Control Protocol) offload engine Download PDF

Info

Publication number
CN104601484A
CN104601484A CN201510027950.8A CN201510027950A CN104601484A CN 104601484 A CN104601484 A CN 104601484A CN 201510027950 A CN201510027950 A CN 201510027950A CN 104601484 A CN104601484 A CN 104601484A
Authority
CN
China
Prior art keywords
state
data
counter
connection
connection request
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.)
Granted
Application number
CN201510027950.8A
Other languages
Chinese (zh)
Other versions
CN104601484B (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.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
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 University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN201510027950.8A priority Critical patent/CN104601484B/en
Publication of CN104601484A publication Critical patent/CN104601484A/en
Application granted granted Critical
Publication of CN104601484B publication Critical patent/CN104601484B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a sending unit of a TCP (Transmission Control Protocol) offload engine. The sending unit is that 12 states are set totally; the sending unit initiates a connection and sends data; when the retransmission times exceed the preset threshold under a data timeout retransmission state, the machine enters a standby state, and the quality of a communication channel is monitored by a test mechanism, namely, the test messages are regularly sent; if the confirmation message can be received from a receiving side, the data preload state is recovered; if the test times exceed the preset threshold, the closing state is skipped; when closing the connection, a connection closing confirmation state 3 is added after entering the connection closing confirmation state 3 so as to control the time of waiting for the connection closing request from the receiving side; if the waiting time is exceeded, the closing state is skipped. According to the sending unit for the TCP offload engine, the problem of communication blocking is solved through the test mechanism; in addition, the state is added during the connection request process and the connection closing process, so as to improve the connection building and closing reliability.

Description

A kind of transmitting element of TCP offload engine
Technical field
The invention belongs to TCP offload engine technical field, more specifically say, relate to a kind of transmitting element of TCP offload engine.
Background technology
Current network Development is very fast, and the quality requirement of people to network is also more and more higher.As procotol the most basic in the Internet---the application of ICP/IP protocol is also widely.But along with to the increase of network demand and the expansion in network application field, the method that application operating system performs ICP/IP protocol has shown its deficiency.
With regard to the development of current network and equipment, CPU (Central Processing Unit, central processing unit) handling property gathers way and is significantly less than the network bandwidth and gathers way.As time goes on, tradition adopts the application of CPU process broadband network more and more awkward, and power consumption and cost increase greatly, cannot support broad band network application even at all.And Internet protocol becomes ubiquitous, all need from PC to non-PC equipment to adopt TCP/IP to connect, in order to highly effective and safe network enabled multimedia application on devices, need to support the characteristic such as packet classification and packets headers compression, and support IP security protocol etc., these new demands too increase the complexity of Internet protocol process greatly.
Traditional Transmission Control Protocol is all with software simulating, and normally performed the associative operations such as the encapsulation of packet by CPU.In the system that some cpu performances are lower, ICP/IP protocol be realized and just difficult for very much.Because realize ICP/IP protocol, CPU must have the ability of very strong real time processing network packet, that is can pack to network packet rapidly and unpack.Comparatively speaking, CPU must have higher system resource, and picture 8051 this kind of MCU (Micro Controller Unit, micro-control unit) does not but have so high system resource.So when requiring the connection realizing network in such a system, what just become extremely difficult for.But the existence that the MCU of picture 8051 and so on is also a large amount of in numerous applications at present; If network connecting function will be realized on such systems, just in the urgent need to a kind of scheme solving this contradiction.
In addition, the operation of current TCP protocol relies on bulky operating system, once operating system collapse, whole communication process will receive serious impact, even occur that wide area communications is paralysed.This is very fatal to fields such as military affairs, space flight, electric power for crucial application scenario.
In this case, hardware protocol processor has also just arisen at the historic moment (being also called protocol off-load engine).Adopt with the TCP offload engine based on hardware (as FPGA:Field Programmable Gate Array, field programmable gate array), can effectively improve communication efficiency and fail safe.Although but TCP offload engine has many theory analysises at present, the difficulty of specific implementation is larger.Wherein transmitting element is the most key in Transmission Control Protocol Hardware process, a most complicated part, still there are some problems at present, the mistake of such as data retransmit cause traffic congestion, incomplete the caused wasting of resources etc. of connection closed.
Summary of the invention
The object of the invention is to overcome the deficiencies in the prior art, a kind of transmitting element of TCP offload engine is provided, realize principle according to standard TCP protocol, and consider the situations such as obstruction in practical communication, connection closed be incomplete, realize the transmitting element of Transmission Control Protocol based on hardware.
For achieving the above object, the transmitting element of TCP offload engine of the present invention comprises transmission processing module, transmit control device and timing/counting module, wherein transmission processing module comprises School Affairs generation module, data encapsulation module and FIFO cache module, timing/counting module comprises 2MSL timer, Retransmission timeout timer, retransmission times counter, connection request counter, detects number counter, closes connection request counter and state counter, wherein:
Data, after generation message, are set to significant level with regard to sequential signal syn_ok by transmission processing module;
It is significant level that transmit control device monitors data with regard to sequential signal syn_ok, connection wait state is jumped to from closed condition, start connection request linkage counter to count connection request number of times, control transmission processing module and send handshake SYN to receiving terminal, start Retransmission timeout timer; If transmit control device receives the effective confirmation signal ACK that receiving terminal returns, effective confirmation signal refers to the confirmation signal receiving receiving terminal and return in regulation RTT two-way time, reset Retransmission timeout timer, jump to data preloaded condition, otherwise reset and exceed re-transmission timer, resend handshake SYN; If connection request number of times equals predetermined threshold value, closed condition is returned in redirect;
In data preloaded condition, transmit control device sends preload instruction to transmission processing module, and transmission processing module starts to load data; Judge that whether end signal is effective, if so, enter and close connection request state, otherwise enter data transmission state;
Send state in data, transmit control device sends data to transmission processing module and sends instruction, and transmission processing module sends data to receiving terminal; Then judge that local upper layer application sends to the reset signal of transmitting element and receiving terminal to send to the reset signal of transmitting element whether to be all invalid, if there is any one effective, closed condition is returned in redirect, otherwise continues to send data; When the Packet Generation of this message is complete, jump to data time-out detected state;
At data time-out detected state, if transmit control device receives the effective confirmation signal ACK that receiving terminal returns, data preloaded condition is returned in redirect, otherwise jumps to data Retransmission timeout state;
In data Retransmission timeout state, transmit control device makes transmission processing module retransmit message, start retransmission times counter to count number of retransmissions, if receive the confirmation signal ACK that receiving terminal returns before Retransmission timeout timer overflows, reset retransmission times counter, data preloaded condition is returned in redirect, otherwise again retransmit, if number of retransmissions equals predetermined threshold value, reset retransmission times counter, jumps to holding state;
At holding state, the mechanism of exploration is adopted to monitor the quality of communication channel, the detailed process souning out mechanism is: startup is detected number counter and counted detecting number of times, transmission processing module sends one at set intervals and detects message, if receive the effective confirmation signal ACK that receiving terminal returns, probe result is set to effectively, number counter is detected in reset, data preloaded condition is returned in redirect, if detect number of times to equal predetermined threshold value, probe result is set to invalid, and closed condition is returned in redirect;
In closedown connection request state, start closedown connection request counter to count sending the number of times of closing connection request, transmit control device sends instruction to transmission processing module, send to receiving terminal and close connection request, start retransmission timeout timer, jump to connection closed acknowledgement state 1, at connection closed acknowledgement state 1, if transmit control device receives the effective confirmation signal ACK that receiving terminal returns, reset retransmission timeout timer and closedown connection request counter, jump to connection closed acknowledgement state 2, otherwise reset retransmission timeout timer, redirect is returned closedown connection request state and is again sent closedown connection request, if send the number of times of closing connection request to be greater than predetermined threshold value, closed condition is returned in redirect,
At connection closed acknowledgement state 2, if receive the closedown connection request signal that receiving terminal returns, confirmation message ACK is sent to receiving terminal, then 2MSL state is jumped to, otherwise starting state counter counts the number of times entering connection closed acknowledgement state 3, if the number of times entering connection closed acknowledgement state 3 is greater than predetermined threshold value, closed condition is returned in redirect, otherwise jumps to connection closed acknowledgement state 3;
At connection closed acknowledgement state 3, starting state machine internal timer carries out timing, if clocking value is less than RTT, remains on connection closed acknowledgement state 3, otherwise reset internal timer, connection closed acknowledgement state 2 is returned in redirect;
In 2MSL state, start 2MSL timer, if the duration of 2MSL timer is less than 2 times of RTT, remain on 2MSL state, otherwise judge whether again to receive the closedown connection request signal that receiving terminal returns, if, connection closed acknowledgement state 2 is returned in redirect, otherwise closed condition is returned in redirect.
The transmitting element of TCP offload engine of the present invention, altogether set 12 states, transmitting element initiates connect and carry out data transmission, after entering data Retransmission timeout state, if number of retransmissions exceedes predetermined threshold value, carry out holding state, in the standby state, the mechanism of exploration is adopted to monitor the quality of communication channel, namely periodically send and detect message, if the confirmation message of receiving terminal can be received, then return to data preloaded condition, if detect number of times to exceed predetermined threshold value, then closed condition is returned in redirect.In closedown connection procedure, after entering connection closed acknowledgement state 2, increase the stand-by period that a connection closed acknowledgement state 3 controls the closedown connection request to receiving terminal, exceed, closed condition is returned in redirect.
The present invention has following beneficial effect:
(1) present invention employs exploration mechanism and solve communication blocking problem, the efficiency of communication can be made to improve, avoid the generation occurring " deadlock " phenomenon.Alleviate congested compared to traditional sliding window mode, there is successful, the feature easily realized.
(2) the present invention adds Setup_Wait connection wait state in connection request process, Fin_Wait3 connection closed acknowledgement state 3 is added in closedown connection procedure, comprehensively can judge to connect and whether set up or closed, thus make establishment of connection and close more reliable.
Accompanying drawing explanation
Fig. 1 is the structure chart of the transmitting element of TCP offload engine of the present invention;
Fig. 2 is the state machine diagram of transmit control device;
Fig. 3 is the schematic flow sheet souning out mechanism.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described, so that those skilled in the art understands the present invention better.Requiring particular attention is that, in the following description, when perhaps the detailed description of known function and design can desalinate main contents of the present invention, these are described in and will be left in the basket here.
Embodiment
Fig. 1 is the structure chart of the transmitting element of TCP offload engine of the present invention.As shown in Figure 1, the transmitting element of TCP offload engine of the present invention comprises transmission processing module 1, transmit control device 2 and timing/counting module 3.
Transmission processing module 1 comprises School Affairs generation module 11, data encapsulation module 12 and FIFO cache module 13, and School Affairs generation module 11, for generation of School Affairs, sends to data encapsulation module 12.The checking algorithm adopted in the present embodiment is: first checksum field is set to 0, then tcp data packet header is divided into multiple unit by 16 bits, if packet header is not the multiple of 16 bits, (namely high-order overflow position can be added to low level then to adopt radix-minus-one complement add operation to unit, common complement arithmetic is a high position of directly losing spilling), by obtain and radix-minus-one complement be filled into checksum field.Data encapsulation module 12 for inspection and, header information and transmission data encapsulate, by source port number, destination slogan, transmit Sequence Number, response sequence number, control the header information that flag bit, window size, urgent pointer and School Affairs add data field to and form complete message.FIFO cache module 13 carries out buffer memory for the message information generated data package module 12.After data encapsulation module 12 generates message, data are set to significant level with regard to sequential signal syn_ok by transmission processing module 1.
Timing/counting module 3 comprises 2MSL timer 31, Retransmission timeout timer 32, retransmission times counter 33, connection request counter 34, detects number counter 35, closes connection request counter 36 and state counter 37.Wherein 2MSL timer 31 namely TIME_WAIT timer, 2MSL refers to the MSL of twice, i.e. maximum message segment section life span (Maximum Segment Lifetime).Retransmission timeout timer 32, for carrying out timing to packet transmitting time, if exceed threshold value, sends time-out, needs to retransmit.Retransmission times counter 33 is for counting data retransmission times.Connection request counter 34 is for counting the transmission connection request number of times of initiating when connecting.Detect number counter 35 for counting sending the number of times detecting message when adopting the mechanism of detecting to carry out channel probe.Close connection request counter 36 for counting the closedown connection request number of times sent when closing and connect.State counter 37 counts the number of times entering Fin_wait3 connection closed acknowledgement state 3 for closing in connection procedure.The initial value of each timer sum counter is 0.
Transmit control device 2 for the various control signal of responsible generation to drive the normal work of other modules.Fig. 2 is the state machine diagram of transmit control device.As shown in Figure 2, there are 12 states in transmit control device of the present invention, be respectively Closed (closed condition), Setup_Wait (connection wait state), Data_Load (data preloaded condition), Data_Send (data transmission state), Timeover_Check (data time-out check state), Data_Retransmit (data Retransmission timeout state), Halt (holding state), Close_Req (closing connection request state), Fin_Wait1 (connection closed acknowledgement state 1), Fin_Wait2 (connection closed acknowledgement state 2), Fin_Wait3 (connection closed acknowledgement state 3), Time_Wait (2MSL state), the concrete transition process of each state is as follows:
S201: the initial condition of transmitting element is Closed closed condition, in this case, all counters or timer are all initial values.
S202: whether information syn_ok is effective for transmit control device 2 Monitoring Data sequence.In the present embodiment, all effective statuses are 1, i.e. high level.If effectively, enter step S203, otherwise return step S201, keep Closed closed condition.
S203: transmitting element jumps to Setup_Wait and connects wait state, and upper layer application sends instruction by transmit control device 2 to transmission processing module 1, sends handshake SYN to receiving terminal, starts Retransmission timeout timer 32, enters step S204.
S204: transmit control device 2 judges whether to receive the effective confirmation signal ACK (Acknowledgement that receiving terminal returns, acknowledge character), the effective implication of ACK refers to the ACK receiving receiving terminal at the appointed time and return, stipulated time is RTT (two-way time), receives ACK or ACK time-out not yet all represent invalid if overflowed at Retransmission timeout timer 32.If effectively represent the data answering that have received receiving terminal, enter step S207, otherwise enter step S205.
S205: transmit control device 2 sends count signal to connection request counter 34, be generally a pulse, connection request counter 34 is by connection request number of times Req_cnt=Req_cnt+1, and connection request number of times namely sends the number of times of handshake SYN.
S206: judge whether connection request number of times Req_cnt equals predetermined threshold value, be 3 in the present embodiment, if so, return step S201; Otherwise transmit control device 2 sends reset signal to Retransmission timeout timer 32, Retransmission timeout timer 32 resets, and returns step S203.
S207: transmit control device 2 sends reset signal to Retransmission timeout timer 32 and connection request counter 34, jump to Data_Load data preloaded condition, transmit control device 2 sends preload instruction to transmission processing module 1, and transmission processing module 1 starts to load data.
S208: judge that whether end signal fin is effective, if so, enter step S220, jump to Close_Req and close connection request state, otherwise enter step S209.
S209: jump to Data_Send data and send state, transmit control device 2 sends data to transmission processing module 1 and sends instruction, and transmission processing module 1 sends data to receiving terminal.
S210: transmit control device 2 judges that local upper layer application sends to the reset signal rst of transmitting element and receiving terminal to send to the reset signal rst_rx of transmitting element whether to be all invalid, if all invalid, enters step S211, otherwise returns step S201.
S211: judge whether packet volume residual send_count is 0, if be 0, represent that the message data that these needs send is sent, starts Retransmission timeout timer 32, enters step S211, otherwise returns step S207 continuation transmission.
S212: jump to Timeover_Check data time-out check state.
S213: transmit control device 2 judges whether to receive the effective confirmation signal ACK that receiving terminal returns, if, illustrate that receiving terminal correctly receives sent data, transmit control device 2 sends reset signal to Retransmission timeout timer 32, send instruction to transmission processing module 1 message data sent is deleted from FIFO cache module 13, return step S207, otherwise transmit control device 2 sends reset signal to Retransmission timeout timer 32, enters step S214.
S214: jump to Data_Retransmit data Retransmission timeout state, transmit control device 2 sends data re-transmission instruction to transmission processing module 1, and transmission processing module 1 carries out data re-transmission, starts Retransmission timeout timer 32 after data re-transmission.
S215: transmit control device 2 judges whether to receive the confirmation signal ACK that receiving terminal returns before Retransmission timeout timer 32 overflows, if, transmit control device 2 sends reset signal to Retransmission timeout timer 32, send instruction to transmission processing module 1 message data sent is deleted from FIFO cache module 13, return step S207, otherwise enter step S216.
S216: transmit control device 2 sends count signal to retransmission times counter 34, retransmission times counter 34 is by number of retransmissions Retry_cnt=Retry_cnt+1.
S217: judge whether number of retransmissions Retry_cnt equals predetermined threshold value, be 3 in the present embodiment, if, illustrate repeatedly retransmit all unsuccessful, the poor quality of communication channel, transmit control device 2 sends reset signal to Retransmission timeout timer 32 and retransmission times counter 33, enters step S218, otherwise send reset signal to Retransmission timeout timer 32, return step S214 and again retransmit.Visible, in retransmission processes, if retransmit successfully, normal data transmission flow next time will be proceeded to.
S218: jump to Halt holding state.Under Halt holding state, the mechanism of exploration is adopted to monitor the quality of communication channel.Fig. 3 is the schematic flow sheet souning out mechanism.As shown in Figure 3, exploration mechanism comprises the following steps:
S301: transmit control device 2 controls transmission processing module 1 and sends a detect every N number of RTT and detect message, and N is default constant, arranges N=3 in the present embodiment.Start retransmission timeout timer 32.
S302: transmit control device 2 judges whether to receive the effective confirmation signal ACK that receiving terminal returns, if effectively, transmit control device 2 sends reset signal to Retransmission timeout timer 32 and retransmission times counter 33, enters step S303, otherwise enters step S304.
S303: probe result detect_result is set to effectively.
S304: transmit control device 2 sends count signal to detecting number counter 35, detects number counter 35 and will detect number of times detect_cnt=detect_cnt+1, enter step S305.
S305: judge whether detect counting detect_cnt equals predetermined threshold value 3, if, transmit control device 2 is to retransmission times counter 33 and detect number counter 35 and send reset signal, enter step S306, otherwise transmit control device 2 sends reset signal to Retransmission timeout timer 32, returns step S302.
S306: probe result detect_result is set to invalid.
S219: transmit control device 2 judges whether probe result detect_result is effective, if, illustrate that current communication channel relaxes, data can be sent, therefore return step S207, if be invalid, then illustrate that present channel is congested very serious, need the connection of temporary close we to alleviate the pressure of channel, now return step S201.
S220: jump to Closed_Req and close connection request state, transmit control device 2 sends instruction to transmission processing module 1, sends to receiving terminal and closes connection request, namely with the message of fin mark, starts Retransmission timeout timer 32.
S221: jump to Fin_Wait1 state.
S222: transmit control device 2 judges whether to receive the effective confirmation signal ACK that receiving terminal returns, and if so, enters step S225, otherwise enters step S223.
S223: transmit control device 2 sends count signal to closedown connection request counter 36, closes connection request counter 36 and will close connection request number of times Req_cnt_2=Req_cnt_2+1, enter step S224.
S224: judge whether close connection request number of times Req_cnt_2 is greater than predetermined threshold value 3, if, transmit control device 2 sends reset signal to Retransmission timeout timer 32 and closedown connection request counter 36, return step S201, otherwise transmit control device 2 sends reset signal to Retransmission timeout timer 32, returns step S220.
S225: jump to Fin_Wait2 state.
S226: under Fin_Wati2 state, the connection of we is closed, and at this moment transmit control device 2 judges whether to receive the closedown connection request signal that receiving terminal returns, in the present embodiment, whenever receiving closedown connection request signal, marking signal eof_req is set to 1 by transmit control device.Whether then directly judgement symbol signal eof_req puts is 1, if so, sends confirmation message ACK, enter step S231, otherwise enter step S227 to receiving terminal.
S227: transmit control device 2 sends count signal to state counter 37, closes connection request counter 37 and will enter Fin_Wait3 state number of times Wait3_cnt=Wait3_cnt+1.
S228: judge that whether enter Fin_Wait3 state number of times Wait3_cnt is greater than predetermined threshold value 3, if so, returns step S201, otherwise enters step S229.
S229: jump to Fin_Wait3 state, adopts state machine internal timer to carry out timing.
S230: judge whether the clocking value Wait_cnt of state machine internal timer is less than RTT, if so, remain on connection closed acknowledgement state 3, otherwise reset internal timer, Fin_Wait2 is returned in redirect.
The object arranging Fin_Wait3 state is the stand-by period in order to control the closedown connection request signal to receiving terminal.
S231: jump to Time_Wait state, forces to be set to 0 by marking signal, starts 2MSL timer 31 and carries out timing.
S232: judge whether the clocking value 2MSL_cnt of 2MSL timer 31 is less than 2*RTT, if so, remain on Time_wait state, otherwise enter step S233.
S233: transmit control device 2 judges whether again to receive the closedown connection request signal that receiving terminal returns, namely whether judgement symbol marker signal eof_req is 1, if, illustrate that receiving terminal have sent closedown connection request again because of not receiving confirmation signal, transmit control device 2 sends reset signal to 2MSL timer 31, return step S225, otherwise return step S201, Closed closed condition is returned in redirect.
If we cause receiving terminal cannot receive confirmation message ACK to the line fault of receiving terminal, but we normally can receive the closedown connection request signal of receiving terminal, due to for closedown connection request signal, receiving terminal is initiator, so after repeatedly transmission can not get confirmation, receiving terminal can stop sending closes connection request, and so we redirect will return Closed closed condition in step S233.
In actual applications, if the line conditions between we and receiving terminal changes, make normal RTT increase two-way time, RTT two-way time so or before adopting is standard, number of retransmissions can be increased, waste Internet resources, therefore in the present invention, can also carry out adaptive management to RTT two-way time.Also comprise re-transmission time counter in transmitting element, on average retransmit time register, initial value is 0, under data Retransmission timeout state, if receive the confirmation signal ACK that receiving terminal returns before Retransmission timeout timer overflows, it is K that note retransmits time counter currency, and average re-transmission time register currency is t 0, obtain this confirmation signal ACK return time t according to the clocking value of Retransmission timeout timer, calculate average re-transmission time t a=(Kt 0+ t)/(K+1), will on average retransmit time t abe updated to and on average retransmit time register, retransmit time counter count value and add 1; If now retransmit time counter count value to equal predetermined threshold value, being 3 in the present embodiment, using on average retransmitting average re-transmission time of storing in time register as new RTT two-way time, re-transmissions time counter peace all being retransmitted time register reset.
Although be described the illustrative embodiment of the present invention above; so that those skilled in the art understand the present invention; but should be clear; the invention is not restricted to the scope of embodiment; to those skilled in the art; as long as various change to limit and in the spirit and scope of the present invention determined, these changes are apparent, and all innovation and creation utilizing the present invention to conceive are all at the row of protection in appended claim.

Claims (2)

1. the transmitting element of a TCP offload engine, comprise transmission processing module, transmit control device and timing/counting module, wherein transmission processing module comprises School Affairs generation module, data encapsulation module and FIFO cache module, timing/counting module comprises 2MSL timer, Retransmission timeout timer, retransmission times counter, it is characterized in that, described timing/counting module also comprises connection request counter, detects number counter, closes connection request counter and state counter, wherein:
Data, after generation message, are set to significant level with regard to sequential signal syn_ok by transmission processing module;
It is significant level that transmit control device monitors data with regard to sequential signal syn_ok, connection wait state is jumped to from closed condition, start connection request linkage counter to count connection request number of times, control transmission processing module and send handshake SYN to receiving terminal, start Retransmission timeout timer; If transmit control device receives the effective confirmation signal ACK that receiving terminal returns, effective confirmation signal refers to the confirmation signal receiving receiving terminal and return in regulation RTT two-way time, reset Retransmission timeout timer, jump to data preloaded condition, otherwise reset and exceed re-transmission timer, resend handshake SYN; If connection request number of times equals predetermined threshold value, closed condition is returned in redirect;
In data preloaded condition, transmit control device sends preload instruction to transmission processing module, and transmission processing module starts to load data; Judge that whether end signal is effective, if so, enter and close connection request state, otherwise enter data transmission state;
Send state in data, transmit control device sends data to transmission processing module and sends instruction, and transmission processing module sends data to receiving terminal; Then judge that local upper layer application sends to the reset signal of transmitting element and receiving terminal to send to the reset signal of transmitting element whether to be all invalid, if there is any one effective, closed condition is returned in redirect, otherwise continues to send data; When the Packet Generation of this message is complete, jump to data time-out detected state;
At data time-out detected state, if transmit control device receives the effective confirmation signal ACK that receiving terminal returns, data preloaded condition is returned in redirect, otherwise jumps to data Retransmission timeout state;
In data Retransmission timeout state, transmit control device makes transmission processing module retransmit message, start retransmission times counter to count number of retransmissions, if receive the confirmation signal ACK that receiving terminal returns before Retransmission timeout timer overflows, reset retransmission times counter, data preloaded condition is returned in redirect, otherwise again retransmit, if number of retransmissions equals predetermined threshold value, reset retransmission times counter, jumps to holding state;
At holding state, the mechanism of exploration is adopted to monitor the quality of communication channel, the detailed process souning out mechanism is: startup is detected number counter and counted detecting number of times, transmission processing module sends one at set intervals and detects message, if receive the effective confirmation signal ACK that receiving terminal returns, probe result is set to effectively, number counter is detected in reset, data preloaded condition is returned in redirect, if detect number of times to equal predetermined threshold value, probe result is set to invalid, and closed condition is returned in redirect;
In closedown connection request state, start closedown connection request counter to count sending the number of times of closing connection request, transmit control device sends instruction to transmission processing module, send to receiving terminal and close connection request, start retransmission timeout timer, jump to connection closed acknowledgement state 1, at connection closed acknowledgement state 1, if transmit control device receives the effective confirmation signal ACK that receiving terminal returns, reset retransmission timeout timer and closedown connection request counter, jump to connection closed acknowledgement state 2, otherwise reset retransmission timeout timer, redirect is returned closedown connection request state and is again sent closedown connection request, if send the number of times of closing connection request to be greater than predetermined threshold value, closed condition is returned in redirect,
At connection closed acknowledgement state 2, if receive the closedown connection request signal that receiving terminal returns, confirmation message ACK is sent to receiving terminal, then 2MSL state is jumped to, otherwise starting state counter counts the number of times entering connection closed acknowledgement state 3, if the number of times entering connection closed acknowledgement state 3 is greater than predetermined threshold value, closed condition is returned in redirect, otherwise jumps to connection closed acknowledgement state 3;
At connection closed acknowledgement state 3, starting state machine internal timer carries out timing, if clocking value is less than RTT, remains on connection closed acknowledgement state 3, otherwise reset internal timer, connection closed acknowledgement state 2 is returned in redirect;
In 2MSL state, start 2MSL timer, if the duration of 2MSL timer is less than 2 times of RTT, remain on 2MSL state, otherwise judge whether again to receive the closedown connection request signal that receiving terminal returns, if, connection closed acknowledgement state 2 is returned in redirect, otherwise closed condition is returned in redirect.
2. transmitting element according to claim 1, is characterized in that, also comprise re-transmission time counter, on average retransmit time register, initial value is 0; Under data Retransmission timeout state, if receive the confirmation signal ACK that receiving terminal returns before Retransmission timeout timer overflows, it is K that note retransmits time counter currency, and average to retransmit time register currency be t 0, obtain this confirmation signal ACK return time t according to the clocking value of Retransmission timeout timer, calculate average re-transmission time tA=(Kt 0+ t)/(K+1), will on average retransmit time t abe updated to and on average retransmit time register, retransmit time counter count value and add 1; If now retransmit time counter count value to equal predetermined threshold value, using on average retransmitting average re-transmission time of storing in time register as new RTT two-way time, re-transmissions time counter peace is all retransmitted time register reset.
CN201510027950.8A 2015-01-20 2015-01-20 A kind of TCP unloads the transmitting element of engine Expired - Fee Related CN104601484B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510027950.8A CN104601484B (en) 2015-01-20 2015-01-20 A kind of TCP unloads the transmitting element of engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510027950.8A CN104601484B (en) 2015-01-20 2015-01-20 A kind of TCP unloads the transmitting element of engine

Publications (2)

Publication Number Publication Date
CN104601484A true CN104601484A (en) 2015-05-06
CN104601484B CN104601484B (en) 2017-10-31

Family

ID=53127001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510027950.8A Expired - Fee Related CN104601484B (en) 2015-01-20 2015-01-20 A kind of TCP unloads the transmitting element of engine

Country Status (1)

Country Link
CN (1) CN104601484B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516191A (en) * 2016-01-13 2016-04-20 成都市智讯联创科技有限责任公司 10-gigabit Ethernet TCP offload engine (TOE) system realized based on FPGA
CN109032987A (en) * 2018-07-05 2018-12-18 山东超越数控电子股份有限公司 A kind of computer system and method accelerating domestic processor based on FPGA

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1520112A (en) * 2002-12-31 2004-08-11 ض� Network protocol off-load engines
US20040250059A1 (en) * 2003-04-15 2004-12-09 Brian Ramelson Secure network processing
US20040249957A1 (en) * 2003-05-12 2004-12-09 Pete Ekis Method for interface of TCP offload engines to operating systems
CN1612566A (en) * 2003-10-27 2005-05-04 英特尔公司 Network protocol engine
CN1679015A (en) * 2002-08-30 2005-10-05 美国博通公司 System and method for tpc/ip offload independent of bandwidth delay product
CN1679282A (en) * 2002-08-30 2005-10-05 美国博通公司 System and method for TCP offload
WO2006062328A1 (en) * 2004-12-08 2006-06-15 Electronics And Telecommunications Research Institute Retransmission and delayed ack timer management logic for tcp protocol
US20060168281A1 (en) * 2003-12-05 2006-07-27 Alacritech, Inc. TCP/IP offload device with reduced sequential processing
CN103546424A (en) * 2012-07-10 2014-01-29 华为技术有限公司 TCP (transmission control protocol) data transmission method and TCP unloading engine and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1679015A (en) * 2002-08-30 2005-10-05 美国博通公司 System and method for tpc/ip offload independent of bandwidth delay product
CN1679282A (en) * 2002-08-30 2005-10-05 美国博通公司 System and method for TCP offload
CN1520112A (en) * 2002-12-31 2004-08-11 ض� Network protocol off-load engines
US20040250059A1 (en) * 2003-04-15 2004-12-09 Brian Ramelson Secure network processing
US20040249957A1 (en) * 2003-05-12 2004-12-09 Pete Ekis Method for interface of TCP offload engines to operating systems
CN1612566A (en) * 2003-10-27 2005-05-04 英特尔公司 Network protocol engine
US20060168281A1 (en) * 2003-12-05 2006-07-27 Alacritech, Inc. TCP/IP offload device with reduced sequential processing
WO2006062328A1 (en) * 2004-12-08 2006-06-15 Electronics And Telecommunications Research Institute Retransmission and delayed ack timer management logic for tcp protocol
CN103546424A (en) * 2012-07-10 2014-01-29 华为技术有限公司 TCP (transmission control protocol) data transmission method and TCP unloading engine and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
王小峰: "面向TOE的快速报文传输研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
陆重阳: "TCP_IP卸载引擎技术及应用", 《电信快报》 *
陈续喜: "一种TCP_IP卸载结构的设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516191A (en) * 2016-01-13 2016-04-20 成都市智讯联创科技有限责任公司 10-gigabit Ethernet TCP offload engine (TOE) system realized based on FPGA
CN105516191B (en) * 2016-01-13 2019-08-20 成都市智讯联创科技有限责任公司 System based on the FPGA 10,000,000,000 net Transmission Control Protocol unloading engine TOE realized
CN109032987A (en) * 2018-07-05 2018-12-18 山东超越数控电子股份有限公司 A kind of computer system and method accelerating domestic processor based on FPGA

Also Published As

Publication number Publication date
CN104601484B (en) 2017-10-31

Similar Documents

Publication Publication Date Title
JP6522855B2 (en) Packet transmission method and user equipment
KR102109021B1 (en) Data transmission method, transmitting node, receiving node and data transmission system
US20220014312A1 (en) Data transmission method and apparatus
WO2018121294A1 (en) Packet transmission method, terminal, network device, and communication system
US9503223B2 (en) Controlling network device behavior
US7940665B2 (en) Transparent optimization for transmission control protocol flow control
US9577791B2 (en) Notification by network element of packet drops
WO2016192478A1 (en) Data transmission method and apparatus
JP5625748B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, PROGRAM, AND COMMUNICATION METHOD
WO2014092779A1 (en) Notification by network element of packet drops
CN107204834A (en) A kind of control method of the express network transmitting based on UDT agreements
CN109981385B (en) Method, device and system for realizing packet loss detection
US20150029863A1 (en) Network Congestion Control with Awareness of Random Packet Losses
CN102594434B (en) Method for improving satellite network-oriented transmission control mechanism
Dunaytsev et al. Modeling TCP SACK performance over wireless channels with completely reliable ARQ/FEC
US7349978B2 (en) Spurious timeout detection in TCP based networks
CN104601484A (en) Sending unit of TCP (Transmission Control Protocol) offload engine
US10728131B2 (en) Terminal and communication method thereof
WO2011116577A1 (en) Data retransmission method and apparatus
Bhargava et al. Analysis of Different Congestion Avoidance Algorithms
CN104580171A (en) TCP (transmission control protocol) transmission method, device and system
CN104506383A (en) Method and system for measuring data processing efficiency of server in TCP (transmission control protocol) transmission
Naito et al. New analytical model for TCP in wireless environments
Olasoji et al. Transmission Control Protocol and Congestion Control: A Review of TCP Variants
Liqing et al. TCP optimization implementation of a small embedded system

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171031

Termination date: 20210120

CF01 Termination of patent right due to non-payment of annual fee