WO2014008793A1 - 一种tcp数据传输方法、tcp卸载引擎及系统 - Google Patents

一种tcp数据传输方法、tcp卸载引擎及系统 Download PDF

Info

Publication number
WO2014008793A1
WO2014008793A1 PCT/CN2013/076686 CN2013076686W WO2014008793A1 WO 2014008793 A1 WO2014008793 A1 WO 2014008793A1 CN 2013076686 W CN2013076686 W CN 2013076686W WO 2014008793 A1 WO2014008793 A1 WO 2014008793A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
tcp
cpu
sent
remote device
Prior art date
Application number
PCT/CN2013/076686
Other languages
English (en)
French (fr)
Inventor
罗海
胡新宇
魏启坤
张亮
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP13816079.1A priority Critical patent/EP2860936A4/en
Publication of WO2014008793A1 publication Critical patent/WO2014008793A1/zh
Priority to US14/593,577 priority patent/US20150127849A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9063Intermediate storage in different physical parts of a node or terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/12Protocol engines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields

Definitions

  • TCP data transmission method TCP offload engine and system
  • the present invention relates to the field of communications, and in particular, to a transmission control protocol TCP data transmission method, a TCP offload engine, and a system.
  • Transmission Control Protocol and Internet Protocol are the most basic communication protocols in the Internet.
  • TCP/IP Transmission Control Protocol and Internet Protocol
  • CPU Central Processing Unit
  • the software processing methods mainly include three aspects: protocol processing, interrupt processing and data processing. Copying brings huge overhead to the system.
  • TCP offload engine TCP offload engine
  • the TOE technology is designed to alleviate the CPU/TCP consumption of CPU processing. To this end, the tedious work of handling TCP/IP is handled by the TOE, such as TCP link chain breaking, out-of-order reorganization, and other TCP response and state management.
  • the existing TOE design uses the technology of zero-copy socket.
  • the data received by the TOE is directly transferred from the TOE cache through the DMA (Direct Memory Access) to the user cache space.
  • the data is sent directly from the user buffer space through the DMA to the TOE cache.
  • the TOE is responsible for packaging the data into TCP packets for transmission.
  • the zero-copy socket technology avoids the movement of data between the user cache space and the protocol stack, reducing the CPU usage.
  • the TOE When sending and receiving data, the TOE will still transfer all data through the TOE's memory and user cache space, which still consumes a large CPU overhead and may have a large transmission delay.
  • the CPU For the received data, the CPU needs to parse all the data to extract the data that must be processed by the CPU, and then hand it to the application or the protocol stack for processing, which increases the processing overhead of the CPU.
  • Embodiments of the present invention provide a transmission control protocol TCP data transmission method, a TCP offload engine, and a system, which can reduce data movement between a TCP offload engine and a CPU, and reduce CPU resolution of data, thereby reducing CPU processing of TCP. /IP data resources and the effect of reducing transmission delays.
  • a transmission control protocol TCP data transmission method including:
  • the TCP offload engine receives the transmission control protocol TCP data sent by the remote device;
  • the data after the TCP unloading is identified, and the data after the TCP unloading is sent to the storage device corresponding to the storage location information delivered by the CPU according to the identification result.
  • Storage devices include:
  • the content data in the data after the TCP unloading is sent to the storage device corresponding to the storage location information delivered by the CPU.
  • the second aspect provides a transmission control protocol TCP data transmission method, including:
  • the data is TCP encapsulated and sent to a remote device.
  • the acquiring the data indicated by the CPU includes: receiving storage location information sent by the CPU; and reading the storage space specified by the storage location information Content data
  • the TCP encapsulating and transmitting the data to the remote device comprises: performing the TCP encapsulation and sending the content data to a remote device.
  • the acquiring the data indicated by the CPU includes: receiving signaling payload data sent by the CPU;
  • the TCP encapsulating and transmitting the data to the remote device comprises: performing TCP encapsulation and sending the signaling payload data to a remote device.
  • a transmission control protocol TCP offload engine including a state management unit, a parsing unit, and a sending unit; wherein:
  • the state management unit is configured to receive TCP data of the remote device, and perform TCP offloading on the TCP data;
  • a parsing unit configured to identify the data after the TCP unloading, and send the TCP unloaded data to a storage device corresponding to the storage location information delivered by the CPU according to the recognition result or sent to the storage device by using the state management unit CPU;
  • the state management unit is further configured to acquire data indicated by the CPU and perform TCP encapsulation on the data.
  • the sending unit is configured to receive the TCP encapsulated data of the state management unit and send the data to a remote device.
  • the parsing unit is specifically configured to identify the
  • the data after the TCP is unloaded, and the content data in the data after the TCP unloading is sent to the storage device corresponding to the storage location information delivered by the CPU or the TCP is uninstalled by the state management unit according to the recognition result.
  • the signaling data or the key data in the data is sent to the CPU, wherein the key data is data other than the signaling data and the content data that needs to be processed by the CPU.
  • the status management unit is configured to receive the storage location information sent by the CPU and send the information to the The sending unit receives the content data sent by the sending unit, and performs TCP encapsulation on the content data and sends the content data to the remote device by using the sending unit, where the sending unit is specifically configured to receive the status management unit to send The storage location information, the storage location element is read.
  • the status management unit is specifically configured to receive signaling payload data sent by the CPU, and send the signaling The payload data is TCP encapsulated;
  • the sending unit is specifically configured to receive the TCP encapsulated signaling payload data sent by the state management unit and send the data to a remote device.
  • a data transmission system including a local device and a remote device, the local device including a CPU connected through a data bus, any of the foregoing transmission control protocols, a TCP offload engine, and a storage device.
  • the TCP control data transmission method, the TCP offload engine and the system provided by the embodiment of the present invention respectively process different types of data through the TCP offload engine, reduce data movement between the TCP offload engine and the CPU, and reduce the CPU pair.
  • the data is parsed to reduce the CPU's processing of TCP data and reduce the transmission delay.
  • FIG. 1 is a schematic flowchart of a TCP transmission method of a transmission control protocol according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of another TCP control data transmission control protocol according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of still another transmission control protocol TCP data transmission method according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of still another transmission control protocol TCP data transmission method according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a TCP unloading engine of a transmission control protocol according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of a data transmission system according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of another data transmission system according to an embodiment of the present invention
  • FIG. 8 is a schematic diagram of a transmission control protocol TCP data transmission method according to an embodiment of the present invention. Schematic diagram of the process;
  • FIG. 9 is a schematic flowchart of another application of a TCP control method for a transmission control protocol according to an embodiment of the present invention.
  • the embodiment of the invention provides a transmission control protocol TCP data transmission method. As shown in FIG. 1, the method includes:
  • the TCP offload engine receives TCP data sent by the remote device.
  • the remote device includes: a server, a terminal device, and the like.
  • the TCP offload engine performs TCP offloading on the TCP data.
  • the TCP offloading is protocol processing in a data transmission process, including calculating a checksum for maintaining retransmission of TCP reliability transmission, reordering packet recombination, and the like.
  • the TCP offloading engine identifies the data after the TCP is unloaded, and sends the data after the TCP unloading to the storage device corresponding to the storage location information delivered by the CPU according to the identification result.
  • the data unloaded by the TCP offload engine can be divided into signaling data, key data, and content data, where the key data is data other than signaling data and content data that needs to be processed by the CPU, and can be used for data transmission.
  • the data that the business software on the TCP offload engine must acquire and process such as flash video (flv) metadata, where flash refers to the standard of interactive vector graphics and network animation introduced by macromedia.
  • the step 103 includes: the TCP offloading engine identifies the data after the TCP unloading, and sends the signaling data or the key data in the data after the TCP unloading to the CPU according to the identification result, where the key data is the signaling data and the content. Data other than the data that needs to be processed by the CPU; the content data in the data after the TCP is unloaded is sent to the storage device corresponding to the storage location information delivered by the CPU.
  • Transmission control protocol TCP data transmission method provided by embodiment of the present invention, TCP offloading
  • the engine directly performs the TCP offload classification of the received message data, and transfers the signaling data and key data that need to be processed by the CPU in the classified data to the CPU for processing, thereby reducing data movement between the TCP offload engine and the CPU, and reducing
  • the CPU parses the data, which reduces the processing steps and frequency of the CPU to the data, thereby reducing the CPU's processing of TCP/IP data and reducing the transmission delay.
  • An embodiment of the present invention provides another transmission control protocol TCP data transmission method. As shown in FIG. 2, the method includes:
  • the TCP offload engine acquires data indicated by the CPU.
  • the TCP offload engine TCP encapsulates the data and sends the data to a remote device.
  • the same remote device includes: a server, a terminal device, and the like.
  • the embodiment of the invention provides a transmission control protocol TCP data transmission method, and the TCP offload engine processes the data according to the CPU sending instructions, thereby reducing the processing steps of the CPU on the data, thereby reducing the resources occupied by the CPU for processing TCP/IP data and reducing the transmission delay. Effect.
  • the data indicated by the CPU in 201 may be content data or signaling payload data.
  • the method specifically includes:
  • the TCP offload engine receives storage location information sent by the CPU.
  • the TCP offload engine reads the content data in the storage space specified by the storage location information.
  • the TCP offload engine TCP encapsulates the content data and sends the content data to a remote device.
  • the method specifically includes:
  • the TCP offload engine receives signaling payload data sent by the CPU.
  • the TCP offload engine TCP encapsulates the signaling payload data and sends the data to a remote device.
  • the TCP offload engine processes and transmits different types of data sent by the CPU in different ways, reduces data movement between the TCP offload engine and the CPU, and reduces CPU resolution of data, thereby reducing CPU processing TCP/ The resources occupied by IP data and the effect of reducing transmission delay.
  • the embodiment of the invention provides a transmission control protocol TCP offload engine, as shown in FIG. 5, a state management unit 51, a parsing unit 52, and a transmitting unit 53, wherein:
  • the state management unit 51 is configured to receive TCP data of the remote device, and perform TCP offloading on the TCP data.
  • the parsing unit 52 is configured to identify the data after the TCP is unloaded, and send the data after the TCP unloading to the storage device corresponding to the storage location information delivered by the CPU or sent to the storage device through the state management unit 51 according to the recognition result.
  • the CPU
  • the state management unit 51 is further configured to acquire data indicated by the CPU and perform TCP encapsulation on the data.
  • the sending unit 53 is configured to receive the TCP encapsulated data and send the data to a remote device.
  • the parsing unit 52 is configured to identify the data after the TCP is unloaded, and send the content data in the data after the TCP unloading to the storage device corresponding to the storage location information delivered by the CPU according to the identification result.
  • the state management unit 51 transmits signaling data or key data in the data after TCP offloading to the CPU, wherein the key data is data other than the signaling data and the content data that needs to be processed by the CPU.
  • the key data may be data that must be acquired and processed by the business software used on the data transfer and TCP offload engines, such as flv metadata.
  • the TCP offloading engine identifies the data after the TCP is unloaded, and the signaling data and the key data that need to be processed by the CPU are processed by the CPU, reducing data movement between the TCP offload engine and the CPU, and reducing the CPU's parsing of the data. Thereby achieving the effect of reducing the resources occupied by the CPU for processing TCP/IP data and reducing the transmission delay.
  • the optional state management unit 51 is specifically configured to receive the storage location information sent by the CPU and send the information to the sending unit 53. Receive the content data sent by the sending unit 53, and describe the sending unit 53. And receiving the storage location information sent by the state management unit, reading content data in a storage space specified by the storage location information, and transmitting the content data to the state management unit 51.
  • the TCP offloading engine sends the content data in the storage device to the remote device according to the location information data sent by the CPU, thereby avoiding the content data generated by the CPU directly participating in the processing of the content data between the TCP offload engine and the CPU. Move to reduce the CPU's processing of TCP/IP data and reduce the transmission delay.
  • the state management unit 51 is further configured to receive the signaling sent by the CPU. Load data, and wrap the signaling payload data in TCP; device.
  • the signaling offload data sent by the CPU is encapsulated by the TCP offload engine, which reduces the CPU's processing of TCP/IP data, thereby reducing the CPU's processing of TCP/IP data resources and reducing transmission delay.
  • FIG. 6 A data transmission system according to an embodiment of the present invention is shown in FIG. 6.
  • the system includes a network-connected local device 1 and a remote device 2, and the local device 1 includes a CPU 61 connected through a data bus, as shown in the present invention.
  • the TCP offloading engine 62 is configured to receive the transmission control protocol TCP data sent by the remote device 1; perform TCP offloading on the TCP data; identify the TCP offloaded data, and uninstall the TCP according to the identification result.
  • the data is sent to the storage device 63 corresponding to the storage location information delivered by the CPU 61 or the CPU 61.
  • the TCP offloading engine 62 is specifically configured to identify the data after the TCP is unloaded; and send signaling data or key data in the offloaded TCP data to the CPU 61 according to the identification result, where the key data is Signaling data and data other than the content data that are required to be processed by the CPU; the content data in the unloaded data is sent to the storage device 63 corresponding to the storage location information delivered by the CPU 61 according to the recognition result.
  • the data transmission system identifies the data after the TCP unloading by the TCP offload engine, and the signaling data and the key data that need to be processed by the CPU are processed by the CPU, and the data between the TCP offload engine and the CPU is reduced. Move, and reduce the CPU's parsing of data, thereby reducing the CPU's processing of TCP/IP data and reducing the transmission delay.
  • the TCP offload engine 62 is further configured to acquire data indicated by the CPU; the data is TCP encapsulated and sent to the remote device 2.
  • the TCP offloading engine 62 is specifically configured to receive the storage location information data sent by the CPU 61; read the content data in the storage space specified by the storage location information data; perform TCP encapsulation and send the content data to the remote device. 2.
  • the content data in the storage device is sent to the remote device according to the location information data sent by the CPU by the TCP offloading engine, so that the content data generated by the CPU directly participating in the processing of the content data is avoided between the TCP offload engine and the CPU.
  • Move to achieve lower CPU Handles the resources occupied by TCP/IP data and reduces the effect of transmission delay.
  • the TCP offloading engine 62 is further configured to receive signaling payload data sent by the CPU 61; and the signaling payload data is TCP encapsulated and sent to the remote device 2.
  • the signaling offload data sent by the CPU is encapsulated by the TCP offload engine, which reduces the CPU's processing of TCP/IP data, thereby reducing the CPU's processing of TCP/IP data resources and reducing transmission delay.
  • the embodiment of the present invention further provides another data transmission system.
  • the system includes a network-connected local device 1 and a remote device 2, and the local device 1 includes a CPU 71, a TCP offload engine 72, and a storage device 73 connected by a data bus,
  • the CPU 71 includes a TOE driving unit 711, an application unit 712, and a SOCKET unit 713;
  • the TCP offloading engine 72 includes a state management unit 721, a parsing unit 722, and a transmitting unit 723;
  • 73 including a storage controller 731 and a memory 732;
  • the CPU 71 is connected to the TCP offloading engine 72 via the TOE driving unit 711, and the TOE driving unit 711 includes operation control software for the TOE, and the CPU 71 establishes a connection with the TOE through the TOE driving unit 711 to issue a control command to the TOE, where the CPU 71 passes the TOE driving unit. 711 directly interacts with the TOE state management unit, and the CPU-side application unit 712 calls the TOE driver through a socket mode (in which the socket mode is implemented by the SOCKET unit 713 shown in FIG. 7), thereby implementing the CPU and
  • the working method of the TCP offloading engine 72 may refer to the corresponding embodiment of FIG. 7 and details are not described herein again.
  • the data transmission system provided by the embodiment of the present invention separately processes different types of data through the TCP offload engine, reduces data movement between the TCP offload engine and the CPU, and reduces CPU resolution of data, thereby reducing CPU processing of TCP data. Occupied resources and the effect of reducing transmission delays.
  • the TCP data transmission method, the TCP offload engine, and the system for Hypertext Transport Protocol (HTTP) video intake storage process CPU and TCP are provided by using the embodiment of the present invention.
  • the data flow of the uninstall engine and the remote device can use the following process:
  • the CPU sends a TCP link command to the TCP offload engine, where the command content includes an IP address, a TCP port, a local IP address, and a TCP port of the remote device.
  • the remote device completes the three-way handshake with the TCP offload engine.
  • the three-way handshake includes:
  • the TCP offload engine sends a SYN (Synchronize Sequence Numbers) packet to the remote device, including the SYN of the TCP offload engine, and enters the SYN transmission state, waiting for the remote device to confirm;
  • SYN Synchronize Sequence Numbers
  • Second handshake When the remote device receives the SYN packet, it must confirm the SYN of the TCP offload engine, and the remote device sends a SYN acknowledgement packet, which includes the SYN and acknowledgment information of the remote device.
  • the confirmation message is: TCP offload engine SYN+1, the remote device enters the SYN reply state at this time;
  • the third handshake the TCP offload engine receives the SYN acknowledgement packet of the remote device, sends an acknowledgement packet to the remote device, and the acknowledgement packet is sent.
  • the TCP offload engine and the remote device enter a connection success state and complete the three-way handshake.
  • the TCP offload engine reports a connection success command to the CPU.
  • the CPU sends a session layer or a presentation layer or an application layer signaling payload, and the TCP offloading engine encapsulates the signaling payload into a signaling packet and sends the signaling packet to the remote device.
  • the step 804 is to use the 401 and 402 in the foregoing embodiment.
  • the TCP offload engine receives the session layer or the presentation layer or the application layer signaling payload sent by the CPU.
  • the TCP offload engine performs the signaling payload.
  • the TCP encapsulation is encapsulated into a signaling message and sent to a remote device, where the signaling payload can obtain signaling for the session layer HTTP, and the HTTP acquisition signaling is a method for initiating a request for a specific resource in the HTTP protocol. .
  • the remote device After receiving the session layer or the presentation layer or the application layer signaling packet sent by the TCP offloading engine, the remote device sends a signaling message response to the TCP offloading engine; and the TCP offload engine responds to the signaling to generate an unloading response message.
  • the payload is responsive and sent to the CPU.
  • the TCP offload engine receives the session layer or the presentation layer or the application layer signaling message sent by the remote device (of course, the signaling message response here is an HTTP response. And the TCP offloading engine performs TCP offloading on the signaling message response to obtain a signaling payload response; secondly, the TCP offloading engine classifies and identifies the offloaded data, where the result of the identification is only signaling data, that is, the signaling. The payload response, the TCP offload engine sends the signaling payload response to the CPU.
  • the CPU After receiving the signaling packet payload, the CPU parses and processes the signaling packet payload, and sends the content data storage location information to the TCP offload engine.
  • the remote device sends the TCP data packet to the TCP offload engine, and the TCP offload engine completes the response, and performs TCP offload processing such as out-of-order reordering of the TCP data packet, and Classify the unloaded data to identify another 'J.
  • the TCP data packet is mainly a content data packet, and the content data packet is unloaded by TCP to obtain corresponding content data, where the content data may be media data;
  • the TCP data packet also includes key data packets related to the content data.
  • the key data packets are unloaded by TCP to obtain corresponding key data.
  • the key data is flv metadata
  • the key data is FLAC metadata.
  • the TCP offload engine sends the identified content data to the storage space of the storage device specified by the CPU.
  • the storage device may be a memory, a hard disk, or the like;
  • the processing of the steps 807 and 808 can be processed by the method as described in FIG. 1 in the foregoing embodiment, where the TCP offloading engine completes the response (the response here is generally acknowledgement information), and the method according to the above embodiment is provided.
  • the TCP offload engine receives the data message unloading sent by the remote device.
  • the TCP offload engine classifies and identifies the unloaded data.
  • the result identified here includes content data and key data.
  • the TCP offload engine will content data (of course, refer to 807, the content data herein may be sent to the storage device corresponding to the content data storage location information sent by the CPU in step 806 for the media data, that is, the ingested video data; and the key data is sent to the CPU.
  • the TCP offload engine initiates a four-way handshake with the remote device to disconnect.
  • the remote device Since the TCP connection is full-duplex, the remote device must disconnect the data stream separately in each direction when disconnecting from the TCP offload engine.
  • the principle is that when one party completes its data transmission task, it sends an end message. Terminate the connection in this direction.
  • a party receives an end message it only means that the party cannot receive the data, but can still send the data. Therefore, the party that first shuts down will perform an active shutdown while the other party performs a passive shutdown. Therefore, the four-way handshake process is as follows:
  • First handshake The TCP offload engine sends an end message to the remote device to shut down the data transfer from the TCP offload engine to the remote device.
  • Second handshake The remote device receives this end message and replies with a confirmation message.
  • Third handshake The remote device closes the connection to the TCP offload engine and sends an end message to the TCP offload engine.
  • Fourth handshake The TCP offload engine replies with a confirmation message to the remote device. 810.
  • the TCP offload engine reports the disconnection information to the CPU.
  • the different types of data transmitted by the TCP offload engine are separately processed, the data movement between the TCP offload engine and the CPU is reduced, and the CPU parses the data, thereby reducing the CPU processing of TCP/IP data occupation. Resources and the effect of reducing transmission delays.
  • the TCP offloading engine directly stores the content data sent by the remote device according to the location information of the content data sent by the CPU during the HTTP video ingestion storage process, and the content data does not need to be processed by the CPU, thereby reducing TCP offloading.
  • the data is moved between the engine and the CPU.
  • the received message is directly unloaded and identified, which reduces the CPU's parsing of the data, thereby reducing the CPU processing of TCP/IP.
  • the TCP data transmission method provided by the embodiment of the present invention, the TCP offload engine, and the data interaction between the CPU of the HTTP video streaming process and the TCP offload engine and the remote device may use the following Process:
  • the CPU sends a TCP listening port command to the TCP offloading engine, where the command content includes a local IP address and a TCP port.
  • the remote device completes a three-way handshake with the TCP offload engine.
  • the TCP offload engine reports a connection success command to the CPU.
  • the remote device sends a session layer or a presentation layer or an application layer signaling packet, and the TCP offload engine performs TCP offloading and classification identification on the signaling packet, and uploads the identified signaling payload to the CPU.
  • the TCP offloading engine receives the session layer or the presentation layer or the application layer signaling packet sent by the remote device.
  • the session layer HTTP obtains the signaling.
  • the TCP offloading engine performs TCP offloading on the signaling packet, and then offloads it to the signaling payload and sends it to the CPU.
  • the signaling packet here is an HTTP packet.
  • the CPU After receiving the signaling payload sent by the TCP offloading engine, the CPU sends a signaling payload response to the TCP offloading engine.
  • the TCP offload engine performs TCP encapsulation on the signaling payload response, and sends the packet to the far end. Program equipment.
  • the above steps 905 and 906 can use the method shown in FIG. 3 in the above embodiment.
  • the TCP offload engine receives the signaling payload response sent by the CPU (of course, the signaling payload response here is an HTTP response), TCP.
  • the offloading engine performs TCP encapsulation on the signaling payload response to obtain a signaling packet response.
  • the TCP offloading engine sends the encapsulated signaling packet response to the remote device.
  • the CPU sends the location information of the read content data to the TCP offload engine.
  • the TCP offloading engine reads the content data included in the storage device indicated by the location information by using the location information sent by the CPU.
  • the TCP offload engine TCP encapsulates the read content data into a content data message and sends the content data message to the remote device.
  • the content data here is mainly media stream data
  • the content data message is mainly media data message
  • the processing of the above steps 907, 908, and 909 can be processed by using the method as described in FIG. 3 in the foregoing embodiment.
  • the TCP offloading engine After receiving the storage location information sent by the CPU, the TCP offloading engine first reads the corresponding storage according to the storage location information. Content data in the device. Second, the TCP offload engine TCP encapsulates the read data and sends the encapsulated content data to the remote device.
  • the remote device responds to the confirmation message after receiving the data packet in the form of a message.
  • the TCP offload engine performs a four-way handshake disconnection with the remote device after the data is sent.
  • step 809 The process of four handshakes can be referred to step 809, and will not be described here.
  • the TCP offload engine reports disconnection information to the CPU.
  • the different types of data transmitted by the TCP offload engine are separately processed, the data movement between the TCP offload engine and the CPU is reduced, and the CPU parses the data, thereby reducing the CPU processing of TCP/IP data occupation. Resources and the effect of reducing transmission delays.
  • the TCP offloading engine directly encapsulates and sends the content data according to the location information of the content data sent by the CPU during the HTTP video ingestion storage process, without having to The data is processed by the CPU to reduce the data movement between the TCP offload engine and the CPU.
  • the received message is directly unloaded and identified during the packet exchange with the remote device, which reduces the CPU's analysis of the data. Work to reduce the CPU's processing of TCP/IP data and reduce the transmission delay.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)
  • Communication Control (AREA)

Abstract

本发明的实施例提供一种传输控制协议TCP数据传输方法、TCP卸载引擎及系统,涉及通信领域,能够减少TCP卸载引擎和CPU之间的数据搬移,同时减少CPU对数据的解析工作,从而达到降低CPU处理TCP/IP数据的资源以及减少传输延迟的效果。该方法包括:TCP卸载引擎接收远程设备发送的TCP数据;对所述TCP数据进行TCP卸载;识别所述TCP卸载后的数据,并根据识别结果将所述TCP卸载后的数据发送至CPU或所述CPU下发的存储位置信息对应的存储设备。本发明实施例应用于TCP数据传输。

Description

一种 TCP数据传输方法、 TCP卸载引擎及系统 技术领域
本发明涉及通信领域, 尤其涉及一种传输控制协议 TCP 数据传输方 法、 TCP卸载引擎及系统。
背景技术 说
传输控制协议和网际协议协议 ( Transmission Control Protocol/ Internet Protocol, 简称 TCP/IP )是因特网中最基本的通信协议。 但传统的 TCP/IP技术 在处理网络数据传输时, 需要占用大量的中央处理器(Central Processing Unit, 简称 CPU ) 资源。 这是因为对 TCP数据的处书理, 大多是通过软件处理方式, 即由运行于处理器之上的 TCP/IP协议栈进行处理, 软件处理方式主要包括三 方面: 协议处理、 中断处理和数据复制, 给系统带来了庞大的开销。
近年来, 视频流量的增长占网络流量增长的主要部分, 另外, 网络存储的 应用范围越来越广, 这两类网络应用对带宽、 响应时间的要求越来越高。 但是 由于这两类网络应用大多釆用 TCP传输, 因此对 TCP数据的处理成为一个主 要的瓶颈。 这两类网络应用还有一个特点, 即 CPU没有必要对其传输的所有 数据进行处理, 例如对于文件内容、 视频编码格式、 视频内容等 TCP数据, 而传统的方法需要将所有的 TCP数据交由 CPU进行处理, 增加了存储复制的 开销, 同时增加了 CPU对传送的数据进行处理带来的额外负担。
为了满足网络流量和网络通信速度的飞速增长, 一种将 TCP数据的处理 移到硬件上实现的技术应运而生, 即 TCP卸载引擎(TCP offload engine, 简 称 TOE)技术。
TOE技术旨在减轻 CPU处理 TCP/IP的消耗, 为此, 将处理 TCP/IP过程 中比较繁瑣的工作交由 TOE处理,例如 TCP建链断链、乱序重组等 TCP应答 和状态管理。 现有的 TOE设计釆用了零复制套接字的技术, 在接收过程中, TOE收到的数据从 TOE緩存直接通过 DMA(Direct Memory Access 直接内存 访问)到用户緩存空间; 发送过程中, 待发数据从用户緩存空间直接通过 DMA 到 TOE緩存, TOE负责将数据打包成 TCP报文发送。 零复制套接字技术避 免了数据在用户緩存空间和协议栈之间的搬移, 减少对 CPU的占用。 但是, 在发送数据和接收数据时, TOE还是会将所有数据都通过 TOE的内存与用户 緩存空间进行传输, 仍然会占用较大的 CPU开销以及可能存在较大的传输延 时。且对于接收的数据, CPU需要对全部数据进行解析后才能提取出必须 CPU 处理的数据, 然后交给应用程序或协议栈处理, 增加了 CPU的处理开销。
发明内容
本发明的实施例提供一种传输控制协议 TCP数据传输方法、 TCP 卸 载引擎及系统, 能够减少 TCP卸载引擎和 CPU之间的数据搬移, 同时减 少 CPU对数据的解析工作, 从而达到降低 CPU处理 TCP/IP数据的资源以及 减少传输延迟的效果。
为达到上述目的, 本发明的实施例釆用如下技术方案:
第一方面, 提供一种传输控制协议 TCP数据传输方法, 包括:
TCP卸载引擎接收远程设备发送的传输控制协议 TCP数据;
对所述 TCP数据进行 TCP卸载;
识别所述 TCP卸载后的数据, 并根据识别结果将所述 TCP卸载后的数据 发送至 CPU或所述 CPU下发的存储位置信息对应的存储设备。
在第一方面的一种可能实现方式中, 所述识别所述 TCP卸载后的数据, 并根据识别结果将所述 TCP卸载后的数据发送至 CPU或所述 CPU下发的存 储位置信息对应的存储设备包括:
识别所述 TCP卸载后的数据;
根据识别结果将所述 TCP卸载后的数据中的信令数据或关键数据发送至 CPU, 其中所述关键数据为除所述信令数据和所述内容数据外其他需要 CPU 处理的数据;
根据识别结果将所述 TCP卸载后的数据中的内容数据发送至所述 CPU下 发的存储位置信息对应的存储设备。
第二方面, 提供一种传输控制协议 TCP数据传输方法, 包括:
获取 CPU指示的数据;
将所述数据进行 TCP封装并发送至远程设备。
在第二方面的第一种可能实现方式中, 所述获取 CPU指示的数据包括: 接收 CPU发送的存储位置信息; 读取所述存储位置信息指定的存储空间中的 内容数据;
相应地, 所述将所述数据进行 TCP封装并发送至远程设备包括: 将所述 内容数据进行 TCP封装并发送至远程设备。
在第二方面的第二种可能实现方式中, 所述获取 CPU指示的数据包括: 接收 CPU发送的信令净荷数据;
相应地, 所述将所述数据进行 TCP封装并发送至远程设备包括: 将所述 信令净荷数据进行 TCP封装并发送至远程设备。
第三方面, 提供一种传输控制协议 TCP卸载引擎, 包括状态管理单元, 解析单元和发送单元; 其中:
所述状态管理单元, 用于接收远程设备的 TCP数据, 对所述 TCP数据进 行 TCP卸载;
解析单元,用于识别所述 TCP卸载后的数据,并根据识别结果将所述 TCP 卸载后的数据发送至 CPU 下发的存储位置信息对应的存储设备或通过所述状 态管理单元发送至所述 CPU;
所述状态管理单元, 还用于获取 CPU指示的数据并将所述数据进行 TCP 封装;
所述发送单元, 用于接收所述状态管理单元 TCP封装后的数据并发送至 远程设备。
在第三方面的第一种可能实现方式中, 所述解析单元, 具体用于识别所述
TCP卸载后的数据, 根据识别结果将所述 TCP卸载后的数据中的内容数据发 送至所述 CPU下发的存储位置信息对应的存储设备或通过所述状态管理单元 将所述 TCP卸载后的数据中的信令数据或所述关键数据发送至 CPU, 其中所 述关键数据为除所述信令数据和所述内容数据外其他需要 CPU处理的数据。
根据第三方面或第三方面的第一种可能实现方式,在第三方面的第二种可 能实现方式中, 所述状态管理单元, 具体用于接收 CPU发送的所述存储位置 信息并发送至所述发送单元; 接收所述发送单元发送的内容数据, 并对所述内 容数据进行 TCP封装并通过所述发送单元发送至远程设备; 所述发送单元, 具体用于接收所述状态管理单元发送的所述存储位置信息,读取所述存储位置 元。 根据第三方面的任一种可能实现方式,在第三方面的第三种可能实现方式 中, 所述状态管理单元, 具体用于接收 CPU发送的信令净荷数据, 并将所述 信令净荷数据进行 TCP封装;
所述发送单元, 具体用于接收所述状态管理单元发送的所述 TCP封装后 的信令净荷数据并发送至远程设备。
第四方面, 提供一种数据传输系统, 包括本地设备和远程设备, 所述本地设备包括通过数据总线连接的 CPU, 上述任一所述传输控制协 议 TCP卸载引擎及存储设备。
本发明实施例提供的一种传输控制协议 TCP数据传输方法、 TCP卸载 引擎及系统, 通过 TCP卸载引擎对不同类型的数据分别处理, 减少 TCP 卸载引擎和 CPU之间的数据搬移, 同时减少 CPU对数据的解析工作, 从 而达到降低 CPU处理 TCP数据占用的资源以及减少传输延迟的效果。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付 出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例提供的一种传输控制协议 TCP数据传输方法流程 示意图;
图 2为本发明实施例提供的另一种传输控制协议 TCP数据传输方法流 程示意图;
图 3为本发明实施例提供的又一种传输控制协议 TCP数据传输方法流 程示意图;
图 4为本发明实施例提供的再一种传输控制协议 TCP数据传输方法流 程示意图;
图 5为本发明实施例提供的一种传输控制协议 TCP卸载引擎结构示意 图;
图 6为本发明实施例提供的一种数据传输系统结构示意图;
图 7为本发明实施例提供的另一种数据传输系统结构示意图; 图 8为本发明实施例提供的一种传输控制协议 TCP数据传输方法应用 流程示意图;
图 9为本发明实施例提供的另一种传输控制协议 TCP数据传输方法应 用流程示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有做出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明实施例提供一种传输控制协议 TCP数据传输方法, 如图 1所示, 所述方法包括:
101、 TCP卸载引擎接收远程设备发送的 TCP数据。
当然所述远程设备包括: 服务器, 终端设备等。
102、 TCP卸载引擎对所述 TCP数据进行 TCP卸载。
所述 TCP卸载为数据传输过程中的协议处理, 包括计算校验和用于 维护 TCP可靠性传输的重传、 乱序报文重组等。
103、 TCP卸载引擎识别所述 TCP卸载后的数据, 并根据识别结果将所 述 TCP卸载后的数据发送至 CPU或所述 CPU下发的存储位置信息对应的存 储设备。
示例性的, 通过 TCP卸载引擎卸载后的数据可以分成信令数据、 关 键数据和内容数据, 其中关键数据为除信令数据和内容数据外其他需要 CPU 处理的数据, 这里可以为运用于数据传输和 TCP 卸载引擎上的业务软件 必须获取并处理的数据, 例如 flash视频 (flash video, 简称 flv ) 元数据, 其中 flash指多媒体 ( macromedia )公司推出的交互式矢量图和网络动画的标 准。
进一步可选的,步骤 103包括: TCP卸载引擎识别 TCP卸载后的数据, 根据识别结果将 TCP卸载后的数据中的信令数据或关键数据发送至 CPU, 其 中关键数据为除信令数据和内容数据外其他需要 CPU处理的数据; 将 TCP卸 载后的数据中的内容数据发送至 CPU下发的存储位置信息对应的存储设备。
本发明实施例提供的传输控制协议 TCP数据传输方法, TCP 卸载引 擎直接将接收到的报文数据进行 TCP卸载分类, 将分类后的数据中需要 由 CPU处理的信令数据和关键数据交由 CPU处理, 减少 TCP卸载引擎 和 CPU之间的数据搬移, 同时减少 CPU对数据的解析工作, 少了 CPU 对数据的处理步骤和频率 ,从而达到降低 CPU处理 TCP/IP数据占用的资 源以及降低传输延迟的效果。
本发明实施例提供另一种传输控制协议 TCP 数据传输方法, 如图 2 所示, 所述方法包括:
201、 TCP卸载引擎获取 CPU指示的数据。
202、 TCP卸载引擎将所述数据进行 TCP封装并发送至远程设备。
同样的所述远程设备包括: 服务器, 终端设备等。
本发明实施例提供传输控制协议 TCP数据传输方法, TCP 卸载引擎 根据 CPU发送指示对数据进行处理, 减少了 CPU对数据的处理步骤, 从 而达到降低 CPU处理 TCP/IP数据占用的资源以及降低传输延迟的效果。
201中所述 CPU指示的数据可以是内容数据, 也可以是信令净荷数据。 在图 2所示的传输控制协议 TCP数据传输方法基础上, 可选的, 参照 图 3所示, 所述方法具体包括:
301、 TCP卸载引擎接收 CPU发送的存储位置信息。
302、 TCP 卸载引擎读取所述存储位置信息指定的存储空间中的内容数 据。
303、 TCP卸载引擎将所述内容数据进行 TCP封装并发送至远程设备。 在图 2所示的传输控制协议 TCP数据传输方法基础上, 可选的, 参照 图 4所示, 所述方法具体包括:
401、 TCP卸载引擎接收 CPU发送的信令净荷数据;
402、 TCP卸载引擎将所述信令净荷数据进行 TCP封装并发送至远程设 备。
所述 TCP卸载引擎通过对 CPU发送的不同类型的数据进行不同的方 式处理并发送, 减少 TCP 卸载引擎和 CPU之间的数据搬移, 同时减少 CPU对数据的解析工作, 从而达到降低 CPU处理 TCP/IP数据占用的资 源以及降低传输延迟的效果。
本发明实施例提供一种传输控制协议 TCP卸载引擎,如图 5所示, 包 括状态管理单元 51、 解析单元 52和发送单元 53 , 其中:
所述状态管理单元 51 , 用于接收远程设备的 TCP数据, 对所述 TCP 数据进行 TCP卸载;
所述解析单元 52 , 用于识别所述 TCP卸载后的数据, 并根据识别结果 将所述 TCP卸载后的数据发送至 CPU下发的存储位置信息对应的存储设备或 通过状态管理单元 51发送至所述 CPU;
所述状态管理单元 51 , 还用于获取 CPU指示的数据并将所述数据进行 TCP封装;
所述发送单元 53 , 用于接收所述 TCP封装后的数据并发送至远程设备。 可选的, 所述解析单元 52, 具体用于识别所述 TCP卸载后的数据, 根据 识别结果将 TCP卸载后的数据中的内容数据发送至 CPU下发的存储位置信息 对应的存储设备或通过所述状态管理单元 51将 TCP卸载后的数据中的信令数 据或关键数据发送至 CPU,其中关键数据为除信令数据和内容数据外其他需要 CPU处理的数据。
所述关键数据可以为运用于数据传输和 TCP 卸载引擎上的业务软件 必须获取并处理的数据, 例如 flv元数据。
所述 TCP卸载引擎识别 TCP卸载后的数据, 将需要由 CPU处理的 信令数据和关键数据交由 CPU处理, 减少 TCP卸载引擎和 CPU之间的 数据搬移, 同时减少 CPU对数据的解析工作, 从而达到降低 CPU处理 TCP/IP数据占用的资源以及降低传输延迟的效果。
此外, 可选的所述状态管理单元 51 , 具体用于接收 CPU发送的所述存储 位置信息并发送至所述发送单元 53; 接收所述发送单元 53发送的内容数据, 述发送单元 53 , 具体用于接收所述状态管理单元发送的所述存储位置信息, 读取所述存储位置信息指定的存储空间中的内容数据并将所述内容数据发送 至所述状态管理单元 51。
这里由 TCP卸载引擎根据 CPU下发的位置信息数据将存储设备中的 内容数据发送至远程设备, 避免了因 CPU直接参与对内容数据的处理而 产生的内容数据在 TCP卸载引擎和 CPU之间的搬移,从而达到降低 CPU 处理 TCP/IP数据占用的资源以及降低传输延迟的效果。
可选的, 所述状态管理单元 51 , 具体还用于接收 CPU发送的信令净 荷数据, 并将信令净荷数据进行 TCP封装; 设备。
由所述 TCP卸载引擎将 CPU发送的信令净荷数据进行封装,减少了 CPU处理 TCP/IP数据的步骤, 从而达到降低 CPU处理 TCP/IP数据的资 源以及减少传输延迟的效果。
本发明实施例提供的一种数据传输系统, 参照图 6所示, 所述系统包括 网络连接的本地设备 1和远程设备 2, 所述本地设备 1包括通过数据总线连接 的 CPU61、 如本发明图 5所示的 TCP卸载引擎 62及存储设备 63。
其中, 所述 TCP卸载引擎 62用于接收远程设备 1发送的传输控制协议 TCP数据; 对所述 TCP数据进行 TCP卸载; 识别所述 TCP卸载后的数据, 并 根据识别结果将所述 TCP卸载后的数据发送至 CPU61或所述 CPU61下发的 存储位置信息对应的存储设备 63。
所述 TCP卸载引擎 62具体用于识别所述 TCP卸载后的数据;根据识别结 果将所述卸载后的 TCP数据中的信令数据或关键数据发送至 CPU61 , 其中所 述关键数据为除所述信令数据和所述内容数据外其他需要 CPU处理的数据; 根据识别结果将所述卸载后的数据中的内容数据发送至所述 CPU61 下发的存 储位置信息对应的存储设备 63。
本发明实施例提供的数据传输系统,通过所述 TCP卸载引擎识别 TCP 卸载后的数据,将需要由 CPU处理的信令数据和关键数据交由 CPU处理 , 减少 TCP卸载引擎和 CPU之间的数据搬移, 同时减少 CPU对数据的解 析工作 ,从而达到降低 CPU处理 TCP/IP数据占用的资源以及降低传输延 迟的效果。
此外, TCP卸载引擎 62还用于获取 CPU指示的数据; 将所述数据进行 TCP封装并发送至远程设备 2。
其中, 所述 TCP卸载引擎 62具体用于接收 CPU61发送的存储位置信息 数据; 读取所述存储位置信息数据指定的存储空间中的内容数据; 将所述内容 数据进行 TCP封装并发送至远程设备 2。
由所述 TCP卸载引擎根据 CPU下发的位置信息数据将存储设备中的 内容数据发送至远程设备, 避免了因 CPU直接参与对内容数据的处理而 产生的内容数据在 TCP卸载引擎和 CPU之间的搬移,从而达到降低 CPU 处理 TCP/IP数据占用的资源以及降低传输延迟的效果。
所述 TCP卸载引擎 62具体还用于接收 CPU61发送的信令净荷数据; 将 所述信令净荷数据进行 TCP封装并发送至远程设备 2。
由所述 TCP卸载引擎将 CPU发送的信令净荷数据进行封装,减少了 CPU处理 TCP/IP数据的步骤, 从而达到降低 CPU处理 TCP/IP数据的资 源以及减少传输延迟的效果。
在图 6所示系统基础上, 本发明的实施例还提供另一种数据传输系统, 参 照图 7所示, 所述系统包括网络连接的本地设备 1和远程设备 2, 所述本地设 备 1包括通过数据总线连接的 CPU71、 TCP卸载引擎 72及存储设备 73 ,
如图 7所示, 所述 CPU71包括, TOE驱动单元 711、应用程序单元 712 和 SOCKET单元 713 ; 所述 TCP卸载引擎 72包括, 状态管理单元 721、 解 析单元 722和发送单元 723 ; 所述存储设备 73 , 包括存储控制器 731和存 储器 732;
CPU71通过 TOE驱动单元 711与 TCP卸载引擎 72连接, 所述 TOE 驱动单元 711 包括对 TOE的操作控制软件, CPU71通过 TOE驱动单元 711建立与 TOE的连接向 TOE发出控制指令, 这里 CPU71通过 TOE驱 动单元 711直接与 TOE的状态管理单元进行数据交互, CPU端的应用程 序单元 712通过套接字方式(其中套接字方式釆用如图 7所示的 SOCKET 单元 713实现 )调用 TOE驱动, 进而实现 CPU与 TOE之间的数据交互, 其中 TCP卸载引擎 72的工作方法可以参考图 7对应的实施例这里不再赘述。
本发明实施例提供的数据传输系统, 通过 TCP卸载引擎对不同类型的 数据分别处理, 减少 TCP 卸载引擎和 CPU之间的数据搬移, 同时减少 CPU对数据的解析工作 ,从而达到降低 CPU处理 TCP数据占用的资源以 及减少传输延迟的效果。
示例性的, 如图 8所示, 釆用本发明实施例提供的 TCP数据传输方 法、 TCP卸载引擎及系统对超文本传送协议( Hypertext Transport Protocol, 简称 HTTP ) 视频摄入存储过程的 CPU与 TCP卸载引擎及远程设备的数 据交互可以釆用以下流程:
801、 CPU向 TCP卸载引擎下发建立 TCP链接命令, 命令内容包括 远程设备的 IP地址、 TCP端口及本地 IP地址、 TCP端口;
802、 远程设备与 TCP卸载引擎完成三次握手。 所述三次握手包括:
第一次握手: 建立连接时, TCP 卸载引擎发送 SYN ( Synchronize Sequence Numbers, 同步序列编号) 包到远程设备, 其中包括 TCP卸载 引擎的 SYN, 并进入 SYN发送状态, 等待远程设备确认;
第二次握手: 远程设备收到所述 SYN包, 必须确认 TCP卸载引擎的 SYN,同时所述远程设备发送一个 SYN确认包,其中包括远程设备的 SYN 和确认信息, 确认信息为: TCP卸载引擎的 SYN+1 , 此时所述远程设备 进入 SYN回复状态;第三次握手: TCP卸载引擎收到所述远程设备的 SYN 确认包, 向所述远程设备发送确认包, 所述确认包发送完毕, TCP 卸载 引擎和所述远程设备进入连接成功状态, 完成三次握手。
803、 TCP卸载引擎向 CPU上报连接成功命令。
804、 CPU下发会话层或表示层或应用层信令净荷, TCP卸载引擎将 所述信令净荷封装成信令报文发送至远程设备。
所述步骤 804为釆用上述实施例中 401 和 402 , 首先, TCP卸载引 擎接收 CPU发送的会话层或表示层或应用层信令净荷, 其次、 TCP卸载 引擎将所述信令净荷进行 TCP封装,封装成信令报文并发送至远程设备, 所述信令净荷可以为会话层 HTTP获取信令, HTTP获取信令是 HTTP协 议中用于向特定的资源发起请求的一种方法。
805、远程设备在接收到 TCP卸载引擎发送的会话层或表示层或应用 层信令报文后, 向 TCP卸载引擎发送信令报文响应; TCP卸载引擎对信 令才艮文响应卸载生成信令净荷响应并发送至 CPU。
这里釆用上述实施例中如图 1 所示的方法, 首先, TCP卸载引擎接 收远程设备发送的会话层或表示层或应用层信令报文响应 (当然这里的 信令报文响应为 HTTP响应) , TCP卸载引擎对所述信令报文响应进行 TCP 卸载得到信令净荷响应; 其次、 TCP 卸载引擎将卸载后的数据进行 分类识别, 这里识别的结果只有信令数据即所述信令净荷响应, TCP 卸 载引擎将所述信令净荷响应发送至 CPU。
806、 CPU 接收到信令报文净荷, 解析并处理信令报文净荷后, 向 TCP卸载引擎下发内容数据存储位置信息。
807、 远程设备将 TCP数据报文发送至 TCP卸载引擎, TCP卸载引 擎完成应答、 并对所述 TCP数据报文进行乱序重排等 TCP卸载处理, 并 对卸载后的数据进行分类识另 'J 。
所述 TCP数据报文主要为内容数据报文, 当然内容数据报文经 TCP 卸载后得到对应的内容数据, 这里内容数据可以为媒体数据; 同时所述
TCP 数据报文也包括和内容数据相关的关键数据报文, 当然关键数据报 文经 TCP卸载后得到对应的关键数据,例如当媒体数据为 flv视频格式时, 关键数据为 flv元数据, 当媒体数据为无损音频压缩编码 (Free Lossless Audio Codec , 简称 FLAC ) 格式时, 关键数据为 FLAC元数据。
808、 TCP 卸载引擎将识别的内容数据发送至 CPU指定的存储设备 的存储空间。
所述存储设备可以为内存、 硬盘等;
所述步骤 807和 808的处理过程可以釆用上述实施例中如图 1 所述 的方法进行处理, 这里 TCP卸载引擎完成应答后 (这里的应答一般为确 认信息) , 根据上述实施例提供的方法, 首先 TCP卸载引擎接收远程设 备发送的数据报文卸载, 其次、 TCP 卸载引擎将卸载后的数据进行分类 识别, 这里识别的结果包括内容数据、 关键数据, 最后 TCP卸载引擎将 内容数据(当然参照 807 , 这里的内容数据可以为媒体数据即摄入的视频 数据) 发送到步骤 806中 CPU发送的内容数据存储位置信息对应的存储 设备进行存储; 并将关键数据发送到 CPU。
809、 远程设备在发送完 TCP数据报文后, TCP卸载引擎发起与远 程设备四次握手断开连接。
由于 TCP连接是全双工的, 因此远程设备与 TCP卸载引擎断开连接 时每个方向都必须单独关闭数据流的发送, 这个原则是当一方完成它的数 据发送任务后就发送一个结束信息来终止这个方向的连接。 当一方收到一 个结束信息只意味着这一方不能接收数据, 但仍能发送数据。 因此首先进 行关闭的一方将执行主动关闭, 而另一方执行被动关闭。 因此四次握手过 程如下:
第一次握手: TCP卸载引擎发送一个结束信息至远程设备,用来关闭 TCP 卸载引擎到远程设备的数据传送。 第二次握手: 远程设备收到这个结束信 息, 回复一个确认信息。 第三次握手: 远程设备关闭与 TCP卸载引擎的连 接, 发送一个结束信息给 TCP卸载引擎。 第四次握手: TCP卸载引擎回复 一个确认信息给远程设备。 810、 TCP卸载引擎向 CPU上报断开连接信息。
在以上过程中通过 TCP 卸载引擎对传输的不同类型的数据分别处 理, 减少 TCP卸载引擎和 CPU之间的数据搬移, 同时减少 CPU对数据 的解析工作,从而达到降低 CPU处理 TCP/IP数据占用的资源以及减少传 输延迟的效果。
具体的, TCP卸载引擎在对 HTTP视频摄入存储过程中, 直接根据 CPU 下发的内容数据的位置信息将远程设备发送的内容数据进行存储, 而内容数据不必再通过 CPU的处理, 减少 TCP卸载引擎和 CPU之间的 数据搬移; 此外在与远程设备的报文交互过程中, 直接对收到的报文进 行卸载和识别, 减少了 CPU对数据的解析工作, 从而达到降低 CPU处理 TCP/IP数据占用的资源以及减少传输延迟的效果。
示例性的, 如图 9所示, 釆用本发明实施例提供的 TCP数据传输方 法、 TCP卸载引擎及系统对 HTTP视频流化过程的 CPU与 TCP卸载引擎 及远程设备的数据交互可以釆用以下流程:
901、 CPU向 TCP卸载引擎下发建立 TCP监听端口命令, 命令内容 包括本地 IP地址和 TCP端口;
902、 远程设备与 TCP卸载引擎完成三次握手。
所述三次握手过程可以参考 802 , 在此不再赘述。
903、 TCP卸载引擎向 CPU上报连接成功命令。
904、 远程设备发送会话层或表示层或应用层信令报文, TCP卸载引 擎将所述信令报文进行 TCP卸载和分类识别, 将识别的信令净荷上传至 CPU;
该步骤为釆用上述实施例中如图 1 所示的方法, 首先, TCP卸载引 擎接收远程设备发送的会话层或表示层或应用层信令报文, 当然这里的 信令报文为可以为会话层 HTTP 获取信令, 其次, TCP卸载引擎将所述 信令报文进行 TCP卸载, 卸载成信令净荷并发送至 CPU, 当然这里的信 令报文为 HTTP 获取报文。
905、 CPU在接收到 TCP卸载引擎发送的所述信令净荷后, 向 TCP 卸载引擎发送信令净荷响应。
906、 TCP卸载引擎对所述信令净荷响应进行 TCP封装, 并发送至远 程设备。
这里以上步骤 905和 906可以釆用上述实施例中如图 3所示的方法, 首先, TCP卸载引擎接收 CPU发送的信令净荷响应 (当然这里的信令净 荷响应为 HTTP响应) , TCP卸载引擎对所述信令净荷响应进行 TCP封 装得到信令报文响应; 其次、 TCP 卸载引擎将封装后的所述信令报文响 应发送至远程设备。
907、 CPU向 TCP卸载引擎下发读取内容数据的位置信息。
908、 TCP 卸载引擎通过所述 CPU下发的位置信息, 读取所述位置 信息指示的存储设备中包含的内容数据。
909、 TCP卸载引擎将所述读取的内容数据进行 TCP封装成内容数据 报文并发送至远程设备。
当然在视频流化的过程中这里的内容数据主要为媒体流数据, 内容 数据报文主要为媒体数据报文。
以上步骤 907、 908和 909的处理过程可以釆用上述实施例中如图 3 所述的方法进行处理, TCP卸载引擎接收到 CPU发送的存储位置信息后, 首先根据存储位置信息读取对应的存储设备中的内容数据, 其次, TCP 卸载引擎将读取的数据进行 TCP封装, 并将封装后的内容数据发送至远 程设备。
进一步的, 远程设备在接收到报文形式的数据包以后回复确认信息 口向应。
910、 TCP卸载引擎在发送完数据后与远程设备进行四次握手断开连 接。
其中四次握手的过程可以参考步骤 809 , 这里不再赘述。
911、 TCP卸载引擎向 CPU上报断开连接信息。
在以上过程中通过 TCP 卸载引擎对传输的不同类型的数据分别处 理, 减少 TCP卸载引擎和 CPU之间的数据搬移, 同时减少 CPU对数据 的解析工作,从而达到降低 CPU处理 TCP/IP数据占用的资源以及减少传 输延迟的效果。
具体的, TCP卸载引擎在对 HTTP视频摄入存储过程中, 直接根据 CPU 下发的内容数据的位置信息将内容数据封装并发送, 而不必再将内 容数据在通过 CPU的处理, 减少 TCP卸载引擎和 CPU之间的数据搬移; 此外在与远程设备的报文交互过程中直接对收到的报文进行卸载和识 别, 减少了 CPU对数据的解析工作, 从而达到降低 CPU处理 TCP/IP数 据占用的资源以及减少传输延迟的效果。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分 步骤可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计 算机可读取存储介质中, 该程序在执行时, 执行包括上述方法实施例的 步骤; 而前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以 存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不 局限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本 发明的保护范围应以所述权利要求的保护范围为准。

Claims

权 利 要 求 书
1、 一种传输控制协议 TCP数据传输方法, 其特征在于, 包括:
TCP卸载引擎接收远程设备发送的 TCP数据;
对所述 TCP数据进行 TCP卸载;
识别所述 TCP卸载后的数据, 并根据识别结果将所述 TCP卸载后的数据 发送至 CPU或所述 CPU下发的存储位置信息对应的存储设备。
2、 根据权利要求 1所述方法, 其特征在于, 所述识别所述 TCP卸载后的 数据, 并根据识别结果将所述 TCP卸载后的数据发送至 CPU或所述 CPU下 发的存储位置信息对应的存储设备包括:
识别所述 TCP卸载后的数据;
根据识别结果将所述 TCP卸载后的数据中的信令数据或关键数据发送至 CPU, 其中所述关键数据为除所述信令数据和所述内容数据外其他需要 CPU 处理的数据;
根据识别结果将所述 TCP卸载后的数据中的内容数据发送至所述 CPU下 发的存储位置信息对应的存储设备。
3、 一种传输控制协议 TCP数据传输方法, 其特征在于, 包括: 获取 CPU指示的数据;
将所述数据进行 TCP封装并发送至远程设备。
4、 根据权利要求 3所述的方法, 其特征在于,
所述获取 CPU指示的数据包括: 接收 CPU发送的存储位置信息; 读取所 述存储位置信息指定的存储空间中的内容数据;
相应地, 所述将所述数据进行 TCP封装并发送至远程设备包括: 将所述 内容数据进行 TCP封装并发送至远程设备。
5、 根据权利要求 3所述的 方法, 其特征在于, 所述获取 CPU指示的数 据包括: 接收 CPU发送的信令净荷数据;
相应地, 所述将所述数据进行 TCP封装并发送至远程设备包括: 将所述 信令净荷数据进行 TCP封装并发送至远程设备。
6、 一种传输控制协议 TCP卸载引擎, 其特征在于, 包括状态管理单元, 解析单元和发送单元; 其中:
所述状态管理单元, 用于接收远程设备的 TCP数据, 对所述 TCP数据进 行 TCP卸载;
解析单元,用于识别所述 TCP卸载后的数据,并根据识别结果将所述 TCP 卸载后的数据发送至 CPU 下发的存储位置信息对应的存储设备或通过所述状 态管理单元发送至所述 CPU;
所述状态管理单元, 还用于获取 CPU指示的数据并将所述数据进行 TCP 封装;
所述发送单元, 用于接收所述状态管理单元 TCP封装后的数据并发送至 远程设备。
7、 根据权利要求 6所述的 TCP卸载引擎, 其特征在于,
所述解析单元, 具体用于识别所述 TCP卸载后的数据, 根据识别结果将 所述 TCP卸载后的数据中的内容数据发送至所述 CPU下发的存储位置信息对 应的存储设备或通过所述状态管理单元将所述 TCP卸载后的数据中的信令数 据或所述关键数据发送至 CPU,其中所述关键数据为除所述信令数据和所述内 容数据外其他需要 CPU处理的数据。
8、 根据权利要求 6或 7所述的 TCP卸载引擎, 其特征在于,
所述状态管理单元, 具体用于接收 CPU发送的所述存储位置信息并发送 至所述发送单元; 接收所述发送单元发送的内容数据, 并对所述内容数据进行
TCP封装并通过所述发送单元发送至远程设备; 所述发送单元, 具体用于接收 所述状态管理单元发送的所述存储位置信息,读取所述存储位置信息指定的存
9、 根据权利要求 6至 8任一项所述的 TCP卸载引擎, 其特征在于, 所述状态管理单元, 具体用于接收 CPU发送的信令净荷数据, 并将所述 信令净荷数据进行 TCP封装;
所述发送单元, 具体用于接收所述状态管理单元发送的所述 TCP封装后 的信令净荷数据并发送至远程设备。
10、 一种数据传输系统, 其特征在于, 包括本地设备和远程设备, 所述本地设备包括通过数据总线连接的 CPU, 如权利要求 6至 9任一项 所述的传输控制协议 TCP卸载引擎及存储设备。
PCT/CN2013/076686 2012-07-10 2013-06-04 一种tcp数据传输方法、tcp卸载引擎及系统 WO2014008793A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP13816079.1A EP2860936A4 (en) 2012-07-10 2013-06-04 METHOD FOR TRANSMITTING TCP DATA, TCP UNINSTALLING MOTOR AND SYSTEM
US14/593,577 US20150127849A1 (en) 2012-07-10 2015-01-09 Tcp data transmission method, tcp offload engine, and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210237465.XA CN103546424A (zh) 2012-07-10 2012-07-10 一种tcp数据传输方法、tcp卸载引擎及系统
CN201210237465.X 2012-07-10

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/593,577 Continuation US20150127849A1 (en) 2012-07-10 2015-01-09 Tcp data transmission method, tcp offload engine, and system

Publications (1)

Publication Number Publication Date
WO2014008793A1 true WO2014008793A1 (zh) 2014-01-16

Family

ID=49915376

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/076686 WO2014008793A1 (zh) 2012-07-10 2013-06-04 一种tcp数据传输方法、tcp卸载引擎及系统

Country Status (4)

Country Link
US (1) US20150127849A1 (zh)
EP (1) EP2860936A4 (zh)
CN (1) CN103546424A (zh)
WO (1) WO2014008793A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209344A (zh) * 2018-07-26 2019-09-06 腾讯科技(深圳)有限公司 迁移对象存储的方法、装置和计算机可读存储介质

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104601484B (zh) * 2015-01-20 2017-10-31 电子科技大学 一种tcp卸载引擎的发送单元
CN106034084B (zh) * 2015-03-16 2020-04-28 华为技术有限公司 一种数据传输方法及装置
DE102016110078A1 (de) * 2016-06-01 2017-12-07 Intel IP Corporation Datenverarbeitungsvorrichtung und Verfahren zum Auslagern von Daten zu einer fernen Datenverarbeitungsvorrichtung
CN105871739B (zh) * 2016-06-17 2018-12-07 华为技术有限公司 一种处理报文的方法及计算设备
CN110958213B (zh) * 2018-09-27 2021-10-22 华为技术有限公司 处理tcp报文的方法、toe组件以及网络设备
CN111182008B (zh) * 2018-11-09 2023-03-07 微软技术许可有限责任公司 在用户空间中建立套接字连接
CN111277600B (zh) * 2020-01-21 2021-07-30 中科驭数(北京)科技有限公司 数据传输方法及装置
CN112073434B (zh) * 2020-09-28 2022-06-07 山东产研集成电路产业研究院有限公司 降低基于toe的高频交易终端接收通道传输延迟的方法
US11595472B2 (en) 2021-01-19 2023-02-28 Mellanox Technologies, Ltd. Controlling packet delivery based on application level information
US11792139B2 (en) 2022-01-24 2023-10-17 Mellanox Technologies, Ltd. Efficient packet reordering using hints
CN116886643B (zh) * 2023-09-07 2023-11-17 北京大禹智芯科技有限公司 一种提高toe性能的方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1612566A (zh) * 2003-10-27 2005-05-04 英特尔公司 网络协议引擎
US20050147100A1 (en) * 2004-01-07 2005-07-07 International Business Machines Corporation Dynamic management of TCP reassembly buffers
CN1809058A (zh) * 2005-01-17 2006-07-26 英业达股份有限公司 通过装置卸载来减轻主机负载的系统及其方法
US20070297334A1 (en) * 2006-06-21 2007-12-27 Fong Pong Method and system for network protocol offloading
CN102143218A (zh) * 2011-01-24 2011-08-03 上海红神信息技术有限公司 web接入云体系结构及接入方法

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6643292B2 (en) * 1998-04-28 2003-11-04 Nortel Networks Limited Efficient packet data transport mechanism and an interface therefor
US7346701B2 (en) * 2002-08-30 2008-03-18 Broadcom Corporation System and method for TCP offload
WO2004021143A2 (en) * 2002-08-30 2004-03-11 Broadcom Corporation Method and system for data placement of out-of-order (ooo) tcp segments
US7596634B2 (en) * 2002-12-12 2009-09-29 Millind Mittal Networked application request servicing offloaded from host
JP4343760B2 (ja) * 2004-04-28 2009-10-14 株式会社日立製作所 ネットワークプロトコル処理装置
US7523179B1 (en) * 2004-12-14 2009-04-21 Sun Microsystems, Inc. System and method for conducting direct data placement (DDP) using a TOE (TCP offload engine) capable network interface card
US8605712B1 (en) * 2005-11-21 2013-12-10 At&T Intellectual Property Ii, L.P. Method and apparatus for distributing video with offload engine
US8966103B2 (en) * 2007-12-21 2015-02-24 General Instrument Corporation Methods and system for processing time-based content
WO2011038359A2 (en) * 2009-09-26 2011-03-31 Cisco Technology, Inc. Providing services at a communication network edge

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1612566A (zh) * 2003-10-27 2005-05-04 英特尔公司 网络协议引擎
US20050147100A1 (en) * 2004-01-07 2005-07-07 International Business Machines Corporation Dynamic management of TCP reassembly buffers
CN1809058A (zh) * 2005-01-17 2006-07-26 英业达股份有限公司 通过装置卸载来减轻主机负载的系统及其方法
US20070297334A1 (en) * 2006-06-21 2007-12-27 Fong Pong Method and system for network protocol offloading
CN102143218A (zh) * 2011-01-24 2011-08-03 上海红神信息技术有限公司 web接入云体系结构及接入方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2860936A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209344A (zh) * 2018-07-26 2019-09-06 腾讯科技(深圳)有限公司 迁移对象存储的方法、装置和计算机可读存储介质
CN110209344B (zh) * 2018-07-26 2022-02-18 腾讯科技(深圳)有限公司 迁移对象存储的方法、装置和计算机可读存储介质

Also Published As

Publication number Publication date
EP2860936A4 (en) 2015-06-03
US20150127849A1 (en) 2015-05-07
EP2860936A1 (en) 2015-04-15
CN103546424A (zh) 2014-01-29

Similar Documents

Publication Publication Date Title
WO2014008793A1 (zh) 一种tcp数据传输方法、tcp卸载引擎及系统
US9906630B2 (en) Processing data packets in performance enhancing proxy (PEP) environment
US7817634B2 (en) Network with a constrained usage model supporting remote direct memory access
US8458280B2 (en) Apparatus and method for packet transmission over a high speed network supporting remote direct memory access operations
WO2016187813A1 (zh) 一种光电混合网络的数据传输方法及装置
US7685287B2 (en) Method and system for layering an infinite request/reply data stream on finite, unidirectional, time-limited transports
JP4903270B2 (ja) 冗長の接続を除去する方法
US8544025B2 (en) Efficient data transfer on local network connections using a pseudo socket layer
US9794354B1 (en) System and method for communication between networked applications
US9288287B2 (en) Accelerated sockets
CN113285931B (zh) 流媒体的传输方法、流媒体服务器及流媒体系统
US9130957B2 (en) Data communication apparatus and method
US7580410B2 (en) Extensible protocol processing system
WO2023217188A1 (zh) 一种直播数据传输方法、装置、系统、设备和介质
JP2005136684A (ja) データ転送方法とtcpプロキシ装置およびそれを用いたネットワークシステム
US7213074B2 (en) Method using receive and transmit protocol aware logic modules for confirming checksum values stored in network packet
CN114710568A (zh) 音视频数据通信方法、设备及存储介质
WO2016177257A1 (zh) 一种数据分享的方法和装置
JP6802295B2 (ja) 転送装置、転送方法及びプログラム
US20230353285A1 (en) Data transmission method, data transmission apparatus, computer-readable medium, electronic device, and computer program product
JP2006109016A (ja) 送受信装置、送受信制御方法、プログラム、およびメモリ
WO2024104016A1 (zh) 一种数据传输的方法、装置、电子设备及存储介质
CN117579714A (zh) 报文处理方法、装置、设备及计算机可读存储介质
CN113746755A (zh) 数据处理方法、装置、设备及计算机可读存储介质
CN118200253A (zh) 面向rdma ud传输的可靠通信方法、电子设备及可读介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13816079

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2013816079

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE