CN104601484B - A kind of TCP unloads the transmitting element of engine - Google Patents
A kind of TCP unloads the transmitting element of engine Download PDFInfo
- Publication number
- CN104601484B CN104601484B CN201510027950.8A CN201510027950A CN104601484B CN 104601484 B CN104601484 B CN 104601484B CN 201510027950 A CN201510027950 A CN 201510027950A CN 104601484 B CN104601484 B CN 104601484B
- Authority
- CN
- China
- Prior art keywords
- state
- data
- closed
- counter
- 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.)
- Expired - Fee Related
Links
Landscapes
- Communication Control (AREA)
Abstract
The invention discloses the transmitting element that a kind of TCP unloads engine, 12 states are set altogether, transmitting element initiates to connect and carry out data transmission, after data Retransmission timeout state is entered, if number of retransmissions exceedes predetermined threshold value, carry out holding state, in the standby state, the quality of communication channel is monitored using exploration mechanism, periodically send and detect message, if the confirmation message of receiving terminal can be received, recover to data preloaded condition, if detecting number of times more than predetermined threshold value, closed mode is jumped back to.In connection procedure is closed, after connection closed acknowledgement state 2 is entered, one connection closed acknowledgement state 3 of increase controls the stand-by period of the closing connection request to receiving terminal, beyond then jumping back to closed mode.The present invention solves the problems, such as communication blocking by exploration mechanism, and increases state to make establishment of connection and close more reliable in connection request process and connection closed process.
Description
Technical field
The invention belongs to TCP unloading engine techniques field, more specifically, it is related to the transmission that a kind of TCP unloads engine
Unit.
Background technology
Current network Development is very fast, and people are to the quality requirement of network also more and more higher.As in internet most
The application of basic procotol --- ICP/IP protocol is also widely.But as the increase to network demand and network should
With the expansion in field, application operating system performs the deficiency that the method for ICP/IP protocol has had shown that it.
For the development of current network and equipment, CPU (Central Processing Unit, central processing unit) place
Rationality, which can gather way, to be significantly less than the network bandwidth and gathers way.Over time, conventionally employed CPU process bandwidths network
Using increasingly having too many difficulties to cope with, power consumption and cost are greatly increased, or even can not support broad band network application at all.And internet
Agreement becomes ubiquitous, is required for using TCP/IP connections from PC to non-PC equipment, for highly effective and safe on devices
Network-multimedia application is supported, it is necessary to support the characteristic such as packet classification and packets headers compression, and support IP security protocol etc., these
New demand also increases the complexity of Internet protocol processing significantly.
Traditional Transmission Control Protocol is all realized with software, and is typically that the correlations such as the encapsulation of packet are performed by CPU
Operation.In the relatively low system of some cpu performances, to realize just extremely difficult if ICP/IP protocol.Because realizing
ICP/IP protocol, CPU must have the ability of very strong real time processing network packet, that is to say, that can be rapidly to network
Packet is packed and unpacked.Comparatively, CPU must have higher system resource, and as 8051 this kind of MCU (Micro
Controller Unit, micro-control unit) but without so high system resource.Require real in such a system so working as
If the connection of existing network network, what is just become is very difficult.But at present as 8051 etc MCU is also substantial amounts of in numerous applications
In the presence of;If to realize network connecting function on such systems, it is felt to be desirable to a kind of scheme of this contradiction of solution.
In addition, the operation of current TCP protocol relies on bulky operating system, it is whole logical if operating system is collapsed
Letter process will receive serious influence, or even wide area communications paralysis occur.This is very fatal for crucial application scenario
Such as military affairs, space flight, electric power field.
In this case, hardware protocol processor has also just arisen at the historic moment (also referred to as agreement unloading engine).Use with
Hardware (such as FPGA:Field Programmable Gate Array, field programmable gate array) based on TCP unload
Engine is carried, communication efficiency and security can be effectively improved.But although TCP unloading engines have many theory analysises at present,
It is that the difficulty implemented is larger.Wherein transmitting element is the most key, the most complicated during Transmission Control Protocol Hardware one
Such as part, at present there are still some problems, traffic congestion, connection closed are not exclusively caused caused by the mistake re-transmission of data
The wasting of resources etc..
The content of the invention
It is an object of the invention to overcome the deficiencies of the prior art and provide a kind of TCP unload engine transmitting element, according to
The realization principle of standard TCP protocol, and in view of the obstruction in practical communication, connection closed is incomplete situations such as, based on hardware
To realize the transmitting element of Transmission Control Protocol.
For achieving the above object, the transmitting element of TCP unloadings engine of the present invention includes sending processing module, sends control
Device processed and timing/counting module, wherein sending processing module includes verification and generation module, data package module and FIFO cachings
Module, timing/counting module includes 2MSL timers, Retransmission timeout timer, retransmission times counter, connection request and counted
Device, detect number counter, close connection request counter and state counter, wherein:
Processing module is sent after generation message, data are set to significant level with regard to sequential signal syn_ok;
It is significant level with regard to sequential signal syn_ok that monitoring control devices, which are sent, to data, and jumping to connection from closed mode waits
State, starts connection request linkage counter and connection request number of times is counted, control sends processing module and sent out to receiving terminal
Handshake SYN is sent, starts Retransmission timeout timer;If sending the effective confirmation letter that controller receives receiving terminal return
Number ACK, effective confirmation signal refers to the confirmation signal that receiving terminal return is received in regulation two-way time RTT, resets super
When re-transmission timer, jump to data preloaded condition, otherwise reset exceed re-transmission timer, resend handshake SYN;
If connection request number of times is equal to predetermined threshold value, closed mode is jumped back to;
In data preloaded condition, controller is sent to processing module is sent and sends preload instruction, send processing module
Start to load data;Judge whether end signal is effective, connection request state is closed if it is, entering, otherwise enter data and send out
Send state;
State is sent in data, controller is sent and is instructed to processing module transmission data transmission is sent, send processing module
Data are sent to receiving terminal;Then judge that local upper layer application is sent to the reset signal and receiving terminal of transmitting element and is sent to
Whether the reset signal for sending unit is all invalid, if any one effectively, jumps back to closed mode, otherwise continues to send number
According to;When the packet of the message is sent, the overtime detection state of data is jumped to;
In the overtime detection state of data, if sending the effective confirmation signal ACK that controller receives receiving terminal return,
Data preloaded condition is jumped back to, data Retransmission timeout state is otherwise jumped to;
In data Retransmission timeout state, send controller order and send processing module re-transmission message, start number of retransmissions and count
Device is counted to number of retransmissions, multiple if receiving the confirmation signal ACK of receiving terminal return before Retransmission timeout timer spilling
Position retransmission times counter, jumps back to data preloaded condition, otherwise retransmits again, if number of retransmissions is equal to predetermined threshold value,
Retransmission times counter is resetted, holding state is jumped to;
In holding state, the quality of communication channel is monitored using exploration mechanism, the detailed process for souning out mechanism is:
Startup is detected number counter and counted to detecting number of times, and transmission processing module sends one and detects report at regular intervals
Text, if receiving the effective confirmation signal ACK of receiving terminal return, probe result is set to effectively, and counting how many times are detected in reset
Device, jumps back to data preloaded condition, if detecting number of times equal to predetermined threshold value, it is invalid that probe result is set to, and jumps back to closing
State;
Connection request state is being closed, is starting closing connection request counter and the number of times for sending closing connection request is carried out
Count, send controller to processing module is sent and send instruction, sent to receiving terminal and close connection request, start retransmission time out meter
When device, jump to connection closed acknowledgement state 1, in connection closed acknowledgement state 1, returned if sending controller and receiving receiving terminal
The effective confirmation signal ACK returned, resets retransmission timeout timer and closes connection request counter, jump to connection closed true
Recognize state 2, otherwise reset retransmission timeout timer, jump back to closing connection request state and send closing connection request again;Such as
Fruit sends the number of times for closing connection request more than predetermined threshold value, jumps back to closed mode;
In connection closed acknowledgement state 2, if receiving the closing connection request signal of receiving terminal return, sent out to receiving terminal
Confirmation message ACK is sent, 2MSL states are then jumped to, otherwise starting state counter is to entering connection closed acknowledgement state 3
Number of times is counted, if the number of times into connection closed acknowledgement state 3 is more than predetermined threshold value, jumps back to closed mode, otherwise
Jump to connection closed acknowledgement state 3;
In connection closed acknowledgement state 3, starting state machine internal timer carries out timing, if clocking value is less than RTT, protects
Hold in connection closed acknowledgement state 3, otherwise reset internal timer, jump back to connection closed acknowledgement state 2;
In 2MSL states, start 2MSL timers, if the duration of 2MSL timers is less than 2 times of RTT, be maintained at 2MSL shapes
State, otherwise judges whether to receive the closing connection request signal of receiving terminal return again, if it is, it is true to jump back to connection closed
Recognize state 2, otherwise jump back to closed mode.
TCP of the present invention unloads the transmitting element of engine, and 12 states are set altogether, and transmitting element initiates to connect and carry out
Data are sent, after data Retransmission timeout state is entered, if number of retransmissions exceedes predetermined threshold value, are carried out holding state, are being treated
Under machine state, the quality of communication channel is monitored using exploration mechanism, i.e., periodically sends and detects message, if can receive
The confirmation message of receiving terminal, then recover to data preloaded condition, if detecting number of times more than predetermined threshold value, jumps back to closing
State.In connection procedure is closed, after connection closed acknowledgement state 2 is entered, increase a connection closed acknowledgement state 3 to control
The stand-by period of the closing connection request to receiving terminal is made, beyond then jumping back to closed mode.
The invention has the advantages that:
(1) communication blocking is solved the problems, such as present invention employs exploration mechanism, can improves the efficiency of communication, it is to avoid go out
The generation of existing " deadlock " phenomenon.Mitigate congestion compared to traditional sliding window mode, with effect substantially, easily realize
Feature.
(2) present invention adds Setup_Wait connection wait states during connection request, is closing connection procedure
In add Fin_Wait3 connection closeds acknowledgement state 3, can comprehensively judge connection whether set up or closed so that
Make establishment of connection and close more reliable.
Brief description of the drawings
Fig. 1 is the structure chart of the transmitting element of TCP unloadings engine of the present invention;
Fig. 2 is the state machine diagram for sending controller;
Fig. 3 is the schematic flow sheet of exploration mechanism.
Embodiment
The embodiment to the present invention is described below in conjunction with the accompanying drawings, so as to those skilled in the art preferably
Understand the present invention.Requiring particular attention is that, in the following description, when known function and design detailed description perhaps
When can desalinate the main contents of the present invention, these descriptions will be ignored herein.
Embodiment
Fig. 1 is the structure chart of the transmitting element of TCP unloadings engine of the present invention.As shown in figure 1, TCP unloadings engine of the present invention
Transmitting element include sending processing module 1, send controller 2 and timing/counting module 3.
Sending processing module 1 includes verification and generation module 11, data package module 12 and FIFO cache modules 13, verification
It is used to produce verification with generation module 11 and is sent to data package module 12.The checking algorithm used in the present embodiment for:It is first
Checksum field is first set to 0, TCP data packet header is then divided into multiple units by 16 bits, if packet header is not 16 bits
Multiple, then to unit using radix-minus-one complement add operation (i.e. a high position overflow position can be added to low level, common complement arithmetic is straight
Connect the high position for losing spilling), the radix-minus-one complement of obtained sum is filled into checksum field.Data package module 12 is used for examining
With, header information and send data and be packaged, i.e., by source port number, destination slogan, transmit Sequence Number, response sequence number,
Control flag bit, window size, urgent pointer and verification and it is added to the header information of data field and forms complete message.
FIFO cache modules 13 are used to cache the message information that data package module 12 is generated.The generation report of data package module 12
Wen Hou, sends processing module 1 and data is set into significant level with regard to sequential signal syn_ok.
Timing/counting module 3 includes 2MSL timers 31, Retransmission timeout timer 32, retransmission times counter 33, connection
Request counter 34, detect number counter 35, close connection request counter 36 and state counter 37.Wherein 2MSL timing
The namely TIME_WAIT timers of device 31,2MSL refers to twice of MSL, i.e. maximum message segment section life span (Maximum
Segment Lifetime).Retransmission timeout timer 32 is used to carry out timing to sending packet the time, if it exceeds threshold value
Time-out is then sent, it is necessary to retransmit.Retransmission times counter 33 is used to count data retransmission times.Connection request counter
The 34 transmission connection request number of times for being used for during to initiating to connect are counted.Detecting number counter 35 is used to detect machine to using
Sent when system carries out channel probe and detect the number of times of message and counted.Closing connection request counter 36 is used to connect to closing
When the closing connection request number of times that sends counted.State counter 37 is used to close in connection procedure to entering Fin_
The number of times of wait3 connection closeds acknowledgement state 3 is counted.The initial value of each timer and counter is 0.
Sending controller 2 is used to be responsible for producing various control signals to drive the normal work of other modules.Fig. 2 is
Send the state machine diagram of controller.As shown in Fig. 2 the present invention, which sends controller, has 12 states, respectively Closed
(closed mode), 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 states), respectively
The specific transition process of state is as follows:
S201:The original state of transmitting element is Closed closed modes, in this case, all counters or timing
Device is all initial value.
S202:Whether effective send the Monitoring Data sequence information syn_ok of controller 2.All effective statuses are equal in the present embodiment
For 1, i.e. high level.If effectively, into step S203, otherwise return to step S201, keeps Closed closed modes.
S203:Transmitting element jumps to Setup_Wait connection wait states, and upper layer application is by sending controller 2 to hair
Send processing module 1 to send instruction, handshake SYN is sent to receiving terminal, start Retransmission timeout timer 32, into step
S204。
S204:Controller 2 is sent to judge whether to receive the effective confirmation signal ACK of receiving terminal return
(Acknowledgement confirms character), the effective implications of ACK refer to receive receiving terminal return at the appointed time
ACK, the stipulated time is RTT (two-way time), if Retransmission timeout timer 32 overflow do not receive yet ACK or ACK surpass
When all represent invalid.If effectively representing to have received the data answering of receiving terminal, into step S207, otherwise into step
S205。
S205:Send controller 2 and send count signal to connection request counter 34, usually one pulse, connection please
Ask counter 34 by connection request number of times Req_cnt=Req_cnt+1, connection request number of times namely sends handshake SYN
Number of times.
S206:It is 3 to judge whether connection request number of times Req_cnt is equal in predetermined threshold value, the present embodiment, if it is, returning
Return step S201;Otherwise send controller 2 and send reset signal to Retransmission timeout timer 32, Retransmission timeout timer 32 is answered
Position, return to step S203.
S207:Send controller 2 and send reset signal to Retransmission timeout timer 32 and connection request counter 34, redirect
To Data_Load data preloaded conditions, controller 2 is sent to processing module 1 is sent and sends preload instruction, send processing mould
Block 1 starts to load data.
S208:Judge whether end signal fin is effective, if it is, into step S220, jumping to Close_Req closings
Connection request state, otherwise into step S209.
S209:Jump to Data_Send data and send state, send controller 2 to processing module 1 is sent and send data hair
Instruction is sent, processing module 1 is sent and sends data to receiving terminal.
S210:Send controller 2 and judge that local upper layer application is sent to the reset signal rst and receiving terminal hair of transmitting element
The reset signal rst_rx of transmitting element is given whether all to be invalid, if invalid, into step S211, otherwise return to step
S201。
S211:Whether be 0, if 0 if judging packet volume residual send_count, represents this report for needing to send
Literary data have been sent, and start Retransmission timeout timer 32, and into step S212, otherwise return to step S207 continuation is sent out
Send.
S212:Jump to Timeover_Check data time-out check states.
S213:Send controller 2 to judge whether to receive the effective confirmation signal ACK of receiving terminal return, if it is, saying
Bright receiving terminal has been properly received transmitted data, sends controller 2 and sends reset signal to Retransmission timeout timer 32, to
Send the transmission instruction of processing module 1 to delete the message data sent from FIFO cache modules 13, return to step S207, otherwise
Send controller 2 and send reset signal to Retransmission timeout timer 32, into step S214.
S214:Data_Retransmit data Retransmission timeout states are jumped to, controller 2 are sent to transmission processing module 1
Data retransmission instructions are sent, processing module 1 is sent and carries out data re-transmission, data re-transmission starts Retransmission timeout timer after finishing
32。
S215:Send controller 2 and judge whether that receiving receiving terminal before Retransmission timeout timer 32 overflows returns really
Recognize signal ACK, if it is, send controller 2 sends reset signal to Retransmission timeout timer 32, sent out to processing module 1 is sent
Instruction is sent to delete the message data sent from FIFO cache modules 13, return to step S207, otherwise into step S216.
S216:Send controller 2 and send count signal to retransmission times counter 34, retransmission times counter 34 will be retransmitted
Number of times Retry_cnt=Retry_cnt+1.
S217:It is 3 to judge whether number of retransmissions Retry_cnt is equal in predetermined threshold value, the present embodiment, if it is, explanation
Failed, the poor quality of communication channel is repeatedly retransmitted, controller 2 is sent to Retransmission timeout timer 32 and number of retransmissions meter
Number device 33 sends reset signal, into step S218, otherwise sends reset signal, return to step to Retransmission timeout timer 32
S214 is retransmitted again.It can be seen that, in retransmission processes, if retransmitted successfully, it will be transferred to normal data transmission flow next time.
S218:Jump to Halt holding states.Under Halt holding states, using quality of the mechanism of exploration to communication channel
It is monitored.Fig. 3 is the schematic flow sheet of exploration mechanism.As shown in figure 3, exploration mechanism comprises the following steps:
S301:Send the control of controller 2 transmission processing module 1 and detect message every one detect of N number of RTT transmissions, N is
N=3 is set in default constant, the present embodiment.Start retransmission timeout timer 32.
S302:Controller 2 is sent to judge whether to receive the effective confirmation signal ACK of receiving terminal return, if effectively,
Send controller 2 and send reset signal to Retransmission timeout timer 32 and retransmission times counter 33, into step S303, otherwise
Into step S304.
S303:Probe result detect_result is set to effectively.
S304:Send controller 2 and send count signal to number counter 35 is detected, detecting number counter 35 will detect
Number of times detect_cnt=detect_cnt+1, into step S305.
S305:Judgement detects whether counting detect_cnt is equal to predetermined threshold value 3, if it is, sending controller 2 to re-transmission
Number counter 33 sends reset signal with number counter 35 is detected, into step S306, otherwise sends controller 2 to time-out
Re-transmission timer 32 sends reset signal, return to step S302.
S306:It is invalid that probe result detect_result is set to.
S219:Send controller 2 and judge whether probe result detect_result is effective, if it is, explanation is current logical
Letter channel has relaxed, and can send data, therefore return to step S207, if invalid, then illustrate present channel congestion
Through very serious, it is necessary to the connection of temporary close we is to alleviate the pressure of channel, now return to step S201.
S220:Jump to Closed_Req and close connection request state, send controller 2 and sent to processing module 1 is sent
Instruction, sends to receiving terminal and closes connection request, i.e., the message indicated with fin starts Retransmission timeout timer 32.
S221:Jump to Fin_Wait1 states.
S222:Send controller 2 to judge whether to receive the effective confirmation signal ACK of receiving terminal return, if it is, entering
Enter step S225, otherwise into step S223.
S223:Send controller 2 and send count signal to connection request counter 36 is closed, close connection request counter
36 will close connection request number of times Req_cnt_2=Req_cnt_2+1, into step S224.
S224:Judge to close whether connection request number of times Req_cnt_2 is more than predetermined threshold value 3, if it is, sending controller
2 send reset signal to Retransmission timeout timer 32 and closing connection request counter 36, and otherwise return to step S201 sends control
Device 2 processed sends reset signal, return to step S220 to Retransmission timeout timer 32.
S225:Jump to Fin_Wait2 states.
S226:Under Fin_Wati2 states, our connection is turned off, and is at this moment sent controller 2 and is judged whether to receive
The closing connection request signal that receiving terminal is returned, in the present embodiment, whenever closing connection request signal is received, sends control
Marking signal eof_req is set to 1 by device.Whether it is 1 that then direct judgement symbol signal eof_req is put, if it is, to reception
End sends confirmation message ACK, into step S231, otherwise into step S227.
S227:Send controller 2 and send count signal to state counter 37, closing connection request counter 37 will enter
Fin_Wait3 state number of times Wait3_cnt=Wait3_cnt+1.
S228:Judge whether be more than predetermined threshold value 3 into Fin_Wait3 state number of times Wait3_cnt, if it is, returning
Step S201, otherwise into step S229.
S229:Fin_Wait3 states are jumped to, adoption status machine internal timer carries out timing.
S230:Judge whether the clocking value Wait_cnt of state machine internal timer is less than RTT, if it is, the company of being maintained at
Closing acknowledgement state 3 is connect, internal timer is otherwise resetted, jumps back to Fin_Wait2.
When the purpose for setting Fin_Wait3 states is the wait in order to control the closing connection request signal to receiving terminal
Between.
S231:Time_Wait states are jumped to, marking signal is forced to be set to 0, starts 2MSL timers 31 and is counted
When.
S232:Judge whether the clocking value 2MSL_cnt of 2MSL timers 31 is less than 2*RTT, if it is, being maintained at Time_
Wait states, otherwise into step S233.
S233:Send controller 2 to judge whether to receive the closing connection request signal of receiving terminal return again, that is, judge
Whether marking signal marking signal eof_req is 1, if it is, explanation receiving terminal is sent out again because of confirmation signal is not received
Closing connection request has been sent, controller 2 has been sent and sends reset signal to 2MSL timers 31, otherwise return to step S225 returns
Step S201, jumps back to Closed closed modes.
If we cause receiving terminal can not receive confirmation message ACK to the line fault of receiving terminal, but we can be with
The closing connection request signal of receiving terminal is normally received, because for closing connection request signal, receiving terminal is initiator, that
After multiple transmission cannot confirm, receiving terminal, which can stop sending, closes connection request, then we in step S233 just
Closed closed modes can be jumped back to.
In actual applications, if the line conditions between we and receiving terminal change, normal two-way time is made
RTT increases, then or the two-way time RTT before using is standard, can increase number of retransmissions, wastes Internet resources, therefore
In the present invention, adaptive management can also be carried out to two-way time RTT.Also include re-transmission time counter in transmitting element, put down
Time register is retransmitted, initial value is 0, under data Retransmission timeout state, if before Retransmission timeout timer spilling
The confirmation signal ACK of receiving terminal return is received, note re-transmission time counter currency is K, and average re-transmission time register is current
It is worth for t0, this confirmation signal ACK time of return t are worth to according to the timing of Retransmission timeout timer, when calculating is averagely retransmitted
Between tA=(Kt0+ t)/(K+1), by average re-transmission time tAIt is updated to average re-transmission time register, re-transmission time counter counts
Numerical value adds 1;If it is 3 that now re-transmission time counter, which is equal in predetermined threshold value, the present embodiment, by average re-transmission time
The average re-transmission time stored in register is as new two-way time RTT, by re-transmission time counter peace re-transmission time
Register resets.
Although illustrative embodiment of the invention is described above, in order to the technology of the art
Personnel understand the present invention, it should be apparent that the invention is not restricted to the scope of embodiment, to the common skill of the art
For art personnel, as long as various change is in the spirit and scope of the present invention that appended claim is limited and is determined, these
Change is it will be apparent that all utilize the innovation and creation of present inventive concept in the row of protection.
Claims (2)
1. a kind of TCP unloads the transmitting element of engine, including sends processing module, sends controller and timing/counting module, its
Middle transmission processing module includes verification and generation module, data package module and FIFO cache modules, and timing/counting module includes
2MSL timers, Retransmission timeout timer, retransmission times counter, 2MSL refer to twice of MSL, and MSL is maximum message segment section existence
Time, it is characterised in that the timing/counting module also includes connection request counter, detects number counter, closes connection
Request counter and state counter, wherein:
Processing module is sent after generation message, data are set to significant level with regard to sequential signal syn_ok;
It is significant level with regard to sequential signal syn_ok that monitoring control devices, which are sent, to data, and jumping to connection from closed mode waits shape
State, starts connection request linkage counter and connection request number of times is counted, control sends processing module and sent to receiving terminal
Handshake SYN, starts Retransmission timeout timer;If sending the effective confirmation signal that controller receives receiving terminal return
ACK, effective confirmation signal refers to the confirmation signal that receiving terminal return is received in regulation two-way time RTT, resets time-out
Re-transmission timer, jumps to data preloaded condition, otherwise resets and exceedes re-transmission timer, resends handshake SYN;Such as
Fruit connection request number of times is equal to predetermined threshold value, jumps back to closed mode;
In data preloaded condition, controller is sent to processing module is sent and sends preload instruction, send processing module and start
Load data;Judge whether end signal is effective, connection request state is closed if it is, entering, otherwise enter data and send shape
State;
State is sent in data, controller is sent and instructs to sending processing module and send data and send, send processing module to connecing
Receiving end sends data;Then judge local upper layer application to be sent to the reset signal and receiving terminal of transmitting element that to be sent to transmission single
Whether the reset signal of member is all invalid, if any one effectively, jumps back to closed mode, otherwise continues to send data;
When the packet of the message is sent, the overtime detection state of data is jumped to;
In the overtime detection state of data, if sending the effective confirmation signal ACK that controller receives receiving terminal return, redirect
Data preloaded condition is returned, data Retransmission timeout state is otherwise jumped to;
In data Retransmission timeout state, send controller order and send processing module re-transmission message, start retransmission times counter pair
Number of retransmissions is counted, if receiving the confirmation signal ACK of receiving terminal return before Retransmission timeout timer spilling, resets weight
Number counter is passed, data preloaded condition is jumped back to, otherwise retransmits again, if number of retransmissions is equal to predetermined threshold value, is resetted
Retransmission times counter, jumps to holding state;
In holding state, the quality of communication channel is monitored using exploration mechanism, the detailed process for souning out mechanism is:Start
Detect number counter and counted to detecting number of times, send processing module and detect message for one every N number of RTT transmissions, N is pre-
If constant, if receiving the effective confirmation signal ACK of receiving terminal return, probe result is set to effectively, and reset is detected secondary
Counter, jumps back to data preloaded condition, if detecting number of times equal to predetermined threshold value, it is invalid that probe result is set to, and redirects
Return closed mode;
Connection request state is being closed, is starting closing connection request counter and the number of times for sending closing connection request is counted
Number, sends controller to processing module is sent and sends instruction, sent to receiving terminal and close connection request, start retransmission time out timing
Device, jumps to connection closed acknowledgement state 1, in connection closed acknowledgement state 1, if sending controller receives receiving terminal return
Effective confirmation signal ACK, reset retransmission timeout timer and close connection request counter, jump to connection closed confirmation
State 2, otherwise resets retransmission timeout timer, jumps back to closing connection request state and sends closing connection request again;If
The number of times for closing connection request is sent more than predetermined threshold value, closed mode is jumped back to;
In connection closed acknowledgement state 2, if receiving the closing connection request signal of receiving terminal return, send true to receiving terminal
Recognize message ACK, then jump to 2MSL states, otherwise starting state counter is to the number of times into connection closed acknowledgement state 3
Counted, if the number of times into connection closed acknowledgement state 3 is more than predetermined threshold value, jumps back to closed mode, otherwise redirect
To connection closed acknowledgement state 3;
In connection closed acknowledgement state 3, starting state machine internal timer carries out timing, if clocking value is less than RTT, is maintained at
Connection closed acknowledgement state 3, otherwise resets internal timer, jumps back to connection closed acknowledgement state 2;
In 2MSL states, start 2MSL timers, if the duration of 2MSL timers is less than 2 times of RTT, be maintained at 2MSL states,
Otherwise judge whether to receive the closing connection request signal that receiving terminal is returned again, if it is, jumping back to connection closed confirmation
State 2, otherwise jumps back to closed mode.
2. transmitting element according to claim 1, it is characterised in that also including re-transmission time counter, averagely retransmit when
Inter-register, initial value is 0;Under data Retransmission timeout state, if receiving reception before Retransmission timeout timer spilling
The confirmation signal ACK returned is held, note re-transmission time counter currency is K, average re-transmission time register currency is t0, root
This confirmation signal ACK time of return t are worth to according to the timing of Retransmission timeout timer, average re-transmission time t is calculatedA=(Kt0+
T)/(K+1), by average re-transmission time tAAverage re-transmission time register is updated to, re-transmission time counter adds 1;Such as
Now re-transmission time counter is equal to predetermined threshold value to fruit, during the average re-transmission that will be stored in average re-transmission time register
Between as new two-way time RTT, re-transmission time counter peace is retransmitted into time register and resetted.
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 CN104601484A (en) | 2015-05-06 |
CN104601484B true 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) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7346701B2 (en) * | 2002-08-30 | 2008-03-18 | Broadcom Corporation | System and method for TCP offload |
EP1552408A4 (en) * | 2002-08-30 | 2010-10-06 | Broadcom Corp | System and method for tpc/ip offload independent of bandwidth delay product |
US7324540B2 (en) * | 2002-12-31 | 2008-01-29 | Intel Corporation | Network protocol off-load engines |
US7373500B2 (en) * | 2003-04-15 | 2008-05-13 | Sun Microsystems, Inc. | Secure network processing |
US20040249957A1 (en) * | 2003-05-12 | 2004-12-09 | Pete Ekis | Method for interface of TCP offload engines to operating systems |
CN100484136C (en) * | 2003-10-27 | 2009-04-29 | 英特尔公司 | Network protocol engine |
US6996070B2 (en) * | 2003-12-05 | 2006-02-07 | Alacritech, Inc. | TCP/IP offload device with reduced sequential processing |
KR100648837B1 (en) * | 2004-12-08 | 2006-11-24 | 한국전자통신연구원 | 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 |
-
2015
- 2015-01-20 CN CN201510027950.8A patent/CN104601484B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN104601484A (en) | 2015-05-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Paxson et al. | Known TCP implementation problems | |
EP1841118B1 (en) | Communication terminal and retransmission control method | |
US7940665B2 (en) | Transparent optimization for transmission control protocol flow control | |
AU2017385021B2 (en) | Packet loss tolerant transmission control protocol congestion control | |
WO2016192478A1 (en) | Data transmission method and apparatus | |
JP5625748B2 (en) | COMMUNICATION DEVICE, COMMUNICATION SYSTEM, PROGRAM, AND COMMUNICATION METHOD | |
WO2019001042A1 (en) | Data transmission method and related devices | |
CN104243097A (en) | Data transmission method and system based on satellite network | |
US20150029863A1 (en) | Network Congestion Control with Awareness of Random Packet Losses | |
CN102780593B (en) | Based on the method for BFD protocol detection link, device and network processing unit | |
CN111711680A (en) | File breakpoint continuous transmission method and device based on UDP (user Datagram protocol) | |
Dunaytsev et al. | Modeling TCP SACK performance over wireless channels with completely reliable ARQ/FEC | |
CN104601484B (en) | A kind of TCP unloads the transmitting element of engine | |
CN103929286A (en) | Data transmission control method and device | |
KR20050078096A (en) | Method for frame retransmission and network apparatus employing the method | |
US10728131B2 (en) | Terminal and communication method thereof | |
CN102546531B (en) | Data traffic control method and user terminal | |
CN102201901A (en) | Data retransmission method and device | |
CN104580171B (en) | The transmission method of Transmission Control Protocol, device and system | |
CN108449280B (en) | Method and device for avoiding ping-pong of TCP (Transmission control protocol) messages | |
Jiong et al. | TP-satellite: A new transport protocol for satellite IP networks | |
Liu et al. | On the performance of additive increase multiplicative decrease (AIMD) protocols in hybrid space-terrestrial networks | |
Murray et al. | Solving ack inefficiencies in 802.11 networks | |
Li et al. | Improving TCP performance for asymmetric networks | |
Naito et al. | New analytical model for TCP in wireless environments |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20171031 Termination date: 20210120 |