CN102104596B - A kind of TCP connects method for reordering - Google Patents
A kind of TCP connects method for reordering Download PDFInfo
- Publication number
- CN102104596B CN102104596B CN201010598345.3A CN201010598345A CN102104596B CN 102104596 B CN102104596 B CN 102104596B CN 201010598345 A CN201010598345 A CN 201010598345A CN 102104596 B CN102104596 B CN 102104596B
- Authority
- CN
- China
- Prior art keywords
- message
- order
- sequence number
- connection
- upload
- 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
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a kind of TCP and connect method for reordering.Network interface card increases DDR memory bar for storing Tcp connection status and out of order message.For each out of order connection, network processes chip is that it distributes the out of order state of buffer records and the out of order message of buffer memory of one piece of fixed size.Adopt the maintenance realizing connection table in this way and greatly can reduce cpu load, improve the ability of system network data, and along with the increase of the network bandwidth, the program has good extensibility.
Description
Technical field
The present invention relates to field of Internet communication, be specifically related to a kind of TCP and connect method for reordering.
Background technology
Because Tcp agreement allows the data packet disorder connected to arrive destination, therefore need out of order message to reorder according to sequence number at the ICP/IP protocol stack of destination computer, also namely carry out stream restructuring, submit to application program to use afterwards again.Existing solution is the maintenance being realized TCP connection by operating system ICP/IP protocol stack.Protocol stack is the data structure of each active connection maintenance one record connection status, and the out of order message of buffer memory, after the out of order message connected all arrives, submit buffer memory message to application program by sequence number order.This operating system ICP/IP protocol stack realizes TCP and connects the mode of reduction based on pure software, can bring a large amount of memory bandwidth expenses, memory headroom expense and CPU processing expenditure to main frame.The growth rate of current network bandwidth is far longer than the growth rate of CPU disposal ability and memory bandwidth and capacity, and the scheme of pure software is difficult to linear process message, and adopting specialized hardware to realize tcp protocol stack unloading becomes inevitable choice.
Summary of the invention
In order to solve the problem, the present invention proposes a kind of method adopting hardware chip to realize the sequence of out of order connection message, after out of order connection is sequenced sequence by network interface card, upload main frame.
A kind of TCP connects method for reordering, and network interface card increases DDR internal memory, process is as follows:
A, network processes chip distribute network interface card DDR internal memory, store TCP connection status and out of order message;
B, each out of order connection, network processes chip is that it distributes the out of order state of buffer records of one piece of fixed size and out of order message;
C, upload main frame by after out of order connection sequence.
A preferred technical solution of the present invention is: sequencer procedure is as follows:
C1, there is out of order this buffering area of stylish distribution when connection first time, first this buffering area head descriptor structure is carried out initialization, and the associated description information of sequence number and this message expected in record;
C2, follow-up when carrying out message again, first calculate the skew that this sequence of message number need expect sequence number, if skew equals 0, illustrate that this message expects message, upload this message, and upgrade according to this message data size and expect sequence number and the second row Seq offset; Need to scan data cached seqoffset after renewal sequence number whether to have and equal 0, if had, continue to upload this message, until all buffer memory message seqoffset are greater than 0;
If this message of C3 seq offset is greater than 0, then the total len of the third line in this value and structure is compared, find idle sizeable region; If can not find required size space, upload current bag and all buffer memory bags according to order field number order, otherwise the relevant information recording this message is to each field; Finally the seq offset of this message is compared with buffer memory bag, find right sorting position to upgrade order field.
Adopt the maintenance realizing connection table in this way and greatly can reduce cpu load, improve the ability of system network data, and along with the increase of the network bandwidth, the program has good extensibility.
Accompanying drawing explanation
Fig. 1 is an out of order connection buffering area schematic diagram
Embodiment
Think that each out of order connection distributes 8Kbyte size buffering area and buffer memory 8 messages are the detail that example illustrates this programme at most below.
Fig. 1 is the 8K buffering area schematic diagram connecting distribution for out of order, wherein buffering area head has the gauge outfit data structure (descriptor) of at least 48 bytes for describing the state information such as position and order of out of order message in table, is the region storing out of order message after this region.The structure focusing on buffering area head of the present invention, stresses wherein each field meaning and using method below.
1.BN: the out of order message number representing buffer memory in buffering area.
2.BV: need length and the sequence number information of safeguarding each out of order message in gauge head structure, as shown in the 2/3rd row, this field represents that wherein those are effective;
3.Order: sort to message according to the second row sequence number, this field presses the corresponding label of sequence number journal.
4.Expected Seq Num: connect current expectation sequence number.
5.BD base address: record each message and the offset address of clear area original position in 8K buffering area.
6.Seq offset n: the skew of corresponding sequence of message number and Expected Seq Num, due to tcp agreement regulation, this skew can not more than the scope of 16 bit representations.(window size is 16.)
7.Total len n: record corresponding message size or clear area size.
Occur out of order this buffering area of stylish distribution when connection first time, first this buffering area head descriptor structure is carried out initialization, and the associated description information of sequence number and this message expected in record.
Follow-up when carrying out message again, first calculate the skew that this sequence of message number need expect sequence number, if skew equals 0, illustrate that this message expects message, upload this message, and upgrade according to this message data size and expect sequence number and the second row Seq offset.Need to scan data cached seq offset after renewal sequence number whether to have and equal 0, if had, continue to upload this message, until all buffer memory message seq offset are greater than 0.
If this message seq offset is greater than 0, then the total len of the third line in this value and structure is compared, find idle sizeable region (to be numbered n).If can not find required size space, upload current bag and all buffer memory bags according to order field number order, otherwise the relevant information recording this message is to each field.Finally the seq offset of this message is compared with buffer memory bag, find right sorting position to upgrade order field.
Claims (1)
1. TCP connects a method for reordering, it is characterized in that: network interface card increases DDR internal memory, process is as follows:
A, network processes chip distribute network interface card DDR internal memory, store TCP connection status and out of order message;
B, each out of order connection, network processes chip is that it distributes the out of order state of buffer records of one piece of fixed size and out of order message;
C, upload main frame by after out of order connection sequence;
Sequencer procedure is as follows:
C1, there is out of order this buffering area of stylish distribution when connection first time, first this buffering area head descriptor structure is carried out initialization, and the associated description information of sequence number and this message expected in record;
C2, follow-up when carrying out message again, first calculate this sequence of message number and expect the skew of sequence number, if skew equals 0, illustrate that this message expects message, upload this message, and upgrade according to this message data size and expect sequence number and the second row Seq offset; Need to scan data cached seqoffset after renewal sequence number whether to have and equal 0, if had, continue to upload this message, until all buffer memory message seqoffset are greater than 0;
If this message of C3 seq offset is greater than 0, then the total len of the third line in this value and structure is compared, find idle sizeable region; If can not find required size space, upload current bag and all buffer memory bags according to order field number order, otherwise the relevant information recording this message is to each field; Finally the seq offset of this message is compared with buffer memory bag, find right sorting position to upgrade order field.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010598345.3A CN102104596B (en) | 2010-12-17 | 2010-12-17 | A kind of TCP connects method for reordering |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010598345.3A CN102104596B (en) | 2010-12-17 | 2010-12-17 | A kind of TCP connects method for reordering |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102104596A CN102104596A (en) | 2011-06-22 |
CN102104596B true CN102104596B (en) | 2015-08-19 |
Family
ID=44157123
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010598345.3A Active CN102104596B (en) | 2010-12-17 | 2010-12-17 | A kind of TCP connects method for reordering |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102104596B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103117948B (en) * | 2013-02-22 | 2016-04-06 | 桂林电子科技大学 | Based on the hierarchical parallel express network TCP flow recombination method of FPGA |
CN107800653B (en) * | 2016-09-06 | 2021-09-03 | 中兴通讯股份有限公司 | Message compression method and device |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101136730A (en) * | 2007-10-19 | 2008-03-05 | 武汉烽火网络有限责任公司 | Credible synchronization method of distributed network equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060168091A1 (en) * | 2005-01-21 | 2006-07-27 | International Business Machines Corporation | RNIC-BASED OFFLOAD OF iSCSI DATA MOVEMENT FUNCTION BY INITIATOR |
-
2010
- 2010-12-17 CN CN201010598345.3A patent/CN102104596B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101136730A (en) * | 2007-10-19 | 2008-03-05 | 武汉烽火网络有限责任公司 | Credible synchronization method of distributed network equipment |
Also Published As
Publication number | Publication date |
---|---|
CN102104596A (en) | 2011-06-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102014005B (en) | Method for implementing TCP connection management by using multistage memory searching mode | |
JP5535115B2 (en) | Multithreaded file input / output system and multithreaded file input / output program | |
CN109565455A (en) | Packet descriptor storage in packeting memory with cache | |
US20050021558A1 (en) | Network protocol off-load engine memory management | |
WO2001005123A1 (en) | Apparatus and method to minimize incoming data loss | |
US20130138771A1 (en) | Apparatus and method for transmitting data | |
EP3166269B1 (en) | Queue management method and apparatus | |
CN104318350B (en) | Merchandise news real time updating method and system based on electronic bin tag system | |
CN101197773B (en) | Packet compressed transmitting and received de-compression method and system based on multilink | |
CN102104596B (en) | A kind of TCP connects method for reordering | |
CN103036805A (en) | System and method for improving multicast performance in banked shared memory architectures | |
US9319354B2 (en) | Network storage device and method for data transmission via a single serial network link | |
CN102694730A (en) | Method and device for parallel processing | |
CN101079753B (en) | A multi-link packet snapping system, method and network audit system | |
US20180146039A1 (en) | Byte alignment in data storage devices | |
US20220182340A1 (en) | Packet Processing Device and Packet Processing Method | |
CN101764760B (en) | Multilink message capturing method, and method and system for processing multilink message | |
CN103828377A (en) | Distribution network and server, and distribution method | |
CN102833146B (en) | Method and equipment for network duplicate removal | |
US20100091683A1 (en) | Rate monitoring apparatus | |
CN103108256A (en) | Method for removing jitter, disorder and repeated packets when receiving RTP packets | |
CN102546405B (en) | Business processing method and device of protocol stack | |
CN109862297A (en) | Window regulation method, device and readable storage medium storing program for executing | |
CN103190120B (en) | Network system | |
CN112579488B (en) | Message storage circuit and method supporting dynamic buffer allocation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210820 Address after: Room 111-1, 1st floor, building 23, No.8 yard, Dongbei Wangxi Road, Haidian District, Beijing 100193 Patentee after: Zhongke Tenglong Information Technology Co.,Ltd. Address before: 300384 Xiqing District, Tianjin Huayuan Industrial Zone (outside the ring) 15 1-3, hahihuayu street. Patentee before: DAWNING INFORMATION INDUSTRY Co.,Ltd. |