CN111200594A - Method and device for receiving data, data receiving equipment and storage medium - Google Patents
Method and device for receiving data, data receiving equipment and storage medium Download PDFInfo
- Publication number
- CN111200594A CN111200594A CN201911328812.8A CN201911328812A CN111200594A CN 111200594 A CN111200594 A CN 111200594A CN 201911328812 A CN201911328812 A CN 201911328812A CN 111200594 A CN111200594 A CN 111200594A
- Authority
- CN
- China
- Prior art keywords
- data
- scsi
- processor
- page
- iscsi
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/63—Routing a service request depending on the request content or context
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/163—In-band adaptation of TCP data exchange; In-band control procedures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Communication Control (AREA)
Abstract
The application provides a method and a device for receiving data, data receiving equipment and a storage medium, belonging to the technical field of storage, wherein the method comprises the following steps: the network card of the data receiving end receives the TCP message, the network card receives the TCP message, the TCP message includes iSCSI header and SCSI data, the network card stores the SCSI data to the target data page in the memory, the processor obtains the data page of the SCSI data in the SCSI layer data space according to the iSCSI header, and the processor stores the SCSI data from the target data page to the SCSI layer data space by adopting a data page exchange mode according to the data page of the SCSI data in the SCSI layer data space. By the method and the device, the storage performance of the data receiving end can be improved.
Description
Technical Field
The present application relates to the field of storage technologies, and in particular, to a method and an apparatus for receiving data, a data receiving device, and a storage medium.
Background
A network Small Computer System Interface (iSCSI) enables a Central Processing Unit (CPU) of a data sink to have a high utilization ratio, and is therefore often used for data reception of the data sink.
In the related art, when a data receiving end receives data, after a Network Interface Card (NIC) (simply referred to as a network Card) of the data receiving end receives a Transmission Control Protocol (TCP) message, the NIC stores the TCP message into a data page of a kernel protocol stack of the data receiving end according to Direct Memory Access (DMA). The CPU analyzes the TCP message by using the kernel protocol stack, removes the TCP message header, and performs disorder, congestion processing and the like. And the CPU of the data receiving end obtains an iSCSI head in the TCP message from the kernel protocol stack by using the iSCSI driver, and obtains a data page of an SCSI layer data space according to the iSCSI head. And the CPU copies the SCSI data in the TCP message to a data page of the SCSI layer data space by using the iSCSI drive.
In the related art, because SCSI data needs to be copied to an SCSI layer data space, when the data size is large, a large number of CPUs are occupied at the data receiving end, which results in poor storage performance at the data receiving end.
Disclosure of Invention
The application provides a method and a device for receiving data, data receiving equipment and a storage medium, so as to improve the storage performance of a data receiving end.
In a first aspect, a method for receiving data is provided, which is applied to a data receiving end, where the data receiving end includes a processor, a memory, and a network card, and the network card, the processor, and the memory communicate with each other, and the method includes:
the network card receives and transmits TCP messages; the TCP message contains an iSCSI header and SCSI data. The network card stores SCSI data to a target data page in the memory, and the processor acquires the data page of the SCSI data in the SCSI layer data space according to the iSCSI head; and the processor stores the SCSI data from the target data page to the SCSI layer data space by adopting a data page exchange mode according to the data page of the SCSI data in the SCSI layer data space.
According to the scheme, the data sending end has data to be sent to the data receiving end, the data sending end can organize the data into a TCP message, and then the TCP message is sent to the data receiving end. The network card at the data receiving end receives the TCP message sent by the data sending end, and the network card may determine, in the memory, a data page for storing SCSI data included in the TCP message, where the data page may be referred to as a target data page. Then the network card stores the SCSI data contained in the TCP message to a target data page, and the network card can store the iSCSI header contained in the TCP message to a data page in the memory except the target data page.
The network card informs the processor to read the iSCSI head contained in the TCP message in the memory, the processor can read the iSCSI head in the memory, and the iSCSI head is used for determining SCSI data contained in the TCP message and a data page in an SCSI layer data space. The processor may then store the SCSI data included in the TCP packet from the target data page to the SCSI layer data space using a page swap. Therefore, the network card of the data receiving end separates the iSCSI head from the SCSI data and stores the separated data to the provided data page of the memory, and the processor of the data receiving end provides the SCSI data to the SCSI layer of the data receiving end in a page exchange mode without data copying, so that zero copy of the data is realized in the data receiving direction, the occupation of a CPU of the data receiving end can be reduced, and the storage performance of the data receiving end can be improved.
In a possible implementation manner, before the network card stores the SCSI data to the target data page in the memory, the method further includes: the network card separates SCSI data and iSCSI head contained in the TCP message based on the context information to obtain a first separation result. Before the processor stores the SCSI data from the target data page to the SCSI layer data space, the method further comprises: the processor determines that the first separation result is correct.
According to the scheme, before the SCSI data is stored in the target data page in the memory by the network card, the network card can perform separation processing on the SCSI data and the iSCSI head contained in the TCP message based on the context information to obtain a first separation result, and then the SCSI data and the iSCSI head contained in the TCP message are respectively stored in the target data page and other pages except the target data page. The processor may further determine whether the first separation result is correct, and store the SCSI data from the target data page to the SCSI layer data space after determining that the first separation result is correct. In this way, the processor stores the SCSI data from the target data page to the SCSI layer data space only if the first split result is correct, so that it is possible to ensure that the SCSI data provided to the SCSI layer data space is correct as much as possible.
In a possible implementation manner, the processor performs separation processing on the iSCSI header and SCSI data included in the TCP packet, and obtains a second separation result. When the first and second split results are the same, the processor determines that the first split result is correct.
In the solution shown in the present application, the processor may also perform separation processing on the separation of the iSCSI header and the SCSI data included in the TCP packet based on the context information stored in the processor, so as to obtain a second separation result. The processor then compares the first and second separation results, and when the first and second separation results are the same, the processor may determine that the first separation result is correct. Therefore, the processor separates the iSCSI head and the SCSI data contained in the TCP message, and the second separation result is correct, so that whether the first separation result is correct or not can be accurately determined by comparing whether the first separation result is the same as the second separation result, and the SCSI data provided to the SCSI layer data space can be ensured to be correct as far as possible.
In a possible implementation manner, when the first separation result is different from the second separation result, the processor copies SCSI data included in the TCP packet to a data page of an SCSI layer data space based on the second separation result.
According to the scheme, when the processor determines that the first separation result is different from the second separation result, the processor can determine that the first separation result is incorrect. The processor may determine the SCSI data contained in the TCP message based on the second separation result. And then copying SCSI data contained in the TCP message currently stored in the memory to a data page of a SCSI layer data space. In this way, even if the first separation result is incorrect, the processor can correctly store the SCSI data included in the TCP message to the data page of the SCSI layer data space.
In one possible implementation, the processor sends a target message to the network card, where the target message carries target context information, and the target context information is used to separate an iSCSI header. And the network card replaces the context information of the obtained first separation result with target context information.
According to the scheme, when the processor determines that the first separation result is different from the second separation result, the processor can determine that the first separation result is incorrect. The processor may then generate a target message carrying target context information that may be used to indicate the correct split iSCSI header, the target context information being context information used by the processor. The processor may send the target message to the network card, and after receiving the target message, the network card may analyze the target context information from the target message, and then replace the context information of the first separation result with the target context information. In this way, the network card may be instructed to subsequently properly isolate the iSCSI header.
In one possible implementation, the processor determines that the SCSI data in the target data page meets the alignment requirement.
In the solution shown in this application, before the processor stores the SCSI data from the target data page to the SCSI data space, the processor may further determine that SCSI data in the data page storing the SCSI data meets the alignment requirement. Therefore, when the alignment requirement is met, the SCSI data is stored to the SCSI layer data space from the target data page, and the correctness of the SCSI data provided to the SCSI layer data space can be ensured as much as possible.
In one possible implementation, when the SCSI data in the target data page does not meet the alignment requirement, the processor copies the SCSI data to the data page of the SCSI layer data space.
According to the scheme, when the processor determines that the SCSI data in the target data page does not meet the alignment requirement, the processor can copy the SCSI data to the data page of the SCSI layer data space without adopting a page exchange mode. This also ensures that the SCSI data provided to the SCSI layer data space is as correct as possible.
In a possible implementation manner, the processor stores the pointer of the target data page to the SCSI layer data space, and uses the pointer of the SCSI data page in the SCSI layer data space to store the TCP message subsequently received by the network card.
According to the scheme, the processor can store the pointer of the target data page to the SCSI layer data space, and the pointer of the SCSI data page in the SCSI layer data space is used for storing the TCP message subsequently received by the network card. Therefore, the SCSI data contained in the TCP message can be stored to the data page of the SCSI layer data space without a copying mode, so that the occupation of a CPU of a data receiving end is reduced, and the storage performance of the data receiving end can be improved.
In a second aspect, an apparatus for receiving data is provided, the apparatus comprising:
the receiving module is used for receiving the TCP message; the TCP message comprises an iSCSI head and SCSI data;
the storage module is used for storing the SCSI data to a target data page in the memory;
the acquisition module is used for acquiring a data page of the SCSI data in a SCSI layer data space according to the iSCSI head;
the storage module is further configured to store the SCSI data from the target data page to an SCSI layer data space in a data page exchange manner according to a data page of the SCSI data in the SCSI layer data space.
In one possible implementation, the apparatus further includes:
the delimiting module is used for separating the SCSI data and the iSCSI head contained in the TCP message based on context information to obtain a first separation result;
the storage module is further used for determining that the first separation result is correct.
In a possible implementation manner, the storage module is further configured to:
separating the iSCSI head and the SCSI data contained in the TCP message to obtain a second separation result;
and when the first separation result is the same as the second separation result, determining that the first separation result is correct.
In a possible implementation manner, the storage module is further configured to:
and when the first separation result is different from the second separation result, the processor copies SCSI data contained in the TCP message to a data page of the SCSI layer data space based on the second separation result.
In one possible implementation, the apparatus further includes:
a sending module, configured to send a target message to the network card, where the target message carries target context information, and the target context information is used to separate an iSCSI header;
a replacing module, configured to replace context information obtained from the first separation result with the target context information.
In a possible implementation manner, the storage module is further configured to:
and determining that the SCSI data in the target data page meets the alignment requirement.
In a possible implementation manner, the storage module is further configured to:
when the SCSI data in the target data page does not meet the alignment requirement, the SCSI data is copied to the data page of the SCSI layer data space.
In one possible implementation manner, the storage module is configured to:
and storing the pointer of the target data page to an SCSI layer data space, and using the pointer of the SCSI data in the data page of the SCSI layer data space to store the TCP message subsequently received by the network card.
In a third aspect, a data receiving end is provided, where the data receiving end includes a network card and a processor, where:
the network card is the network card of the first aspect, and the processor is the processor of the first aspect.
In a fourth aspect, a network processor is provided, where the network processor is applied to a data receiving end, and the network processor includes a processor and a network card, where: the network card is the network card of the first aspect, and the processor is the processor of the first aspect.
In a fifth aspect, there is provided a data receiving device for receiving data, the data receiving device comprising a processor and a memory, wherein:
the memory having stored therein computer instructions;
the processor executes the computer instructions to implement the method of receiving data as described in the first aspect above.
In a sixth aspect, a computer-readable storage medium is provided, which stores computer instructions, and when the computer instructions in the computer-readable storage medium are executed by a data receiving apparatus, the data receiving apparatus is caused to implement the method for receiving data according to the first aspect.
Drawings
Fig. 1 is a schematic flow chart of receiving data according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a data receiving device according to an embodiment of the present application;
fig. 3 is a schematic diagram of an application scenario for receiving data according to an embodiment of the present application;
fig. 4 is a schematic diagram of an application scenario for receiving data according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a method for receiving data according to an embodiment of the present application;
fig. 6 is a schematic diagram of an aggregation of TCP packets according to an embodiment of the present application;
fig. 7 is a schematic flow chart of receiving data according to an embodiment of the present application;
fig. 8 is a schematic flow chart of receiving data according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an apparatus for receiving data according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an apparatus for receiving data according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an apparatus for receiving data according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
To facilitate an understanding of the embodiments of the present application, the following first introduces concepts of the terms involved:
the SCSI protocol is an intelligent universal interface standard, and is a protocol for communicating between computers and peripheral devices (such as hard disks).
The iSCSI protocol is a protocol for encapsulating SCSI content (e.g., SCSI data, SCSI commands) via TCP, i.e., a protocol for transmitting SCSI content via ethernet.
Zero copy, meaning that the CPU does not need to copy data from memory to another particular region.
In a TCP Offload Engine (TOE), during communication of a computer through a network, a CPU of the computer needs to consume a large amount of resources to perform packet processing of multiple layers of network protocols, which include TCP, IP, and the like. In order to release the occupied CPU resource of the computer, the work of the CPU of the computer is transferred to a chip (such as a network card of the computer).
The ISCSI Offload Engine (IOE) implements the work of handling the iSCSI protocol in a chip (e.g., a network card of a computer), and the chip provides the content externally as SCSI data instead of TCP packets.
The Network Card may be referred to as a Network Interface Card (NIC) or a Network Interface Controller (NIC), and is configured to convert transmitted data into a format that can be recognized by other devices in a Network and transmit the converted data through a Network medium. Specifically, in the embodiment of the present application, separation of the iSCSI header and the SCSI in the TCP message may also be implemented.
After receiving the TCP message of the data, the data receiving end stores the TCP message to a data page of a kernel protocol stack of the data receiving end according to a direct memory access mode. And the kernel protocol stack analyzes the TCP message, removes a TCP message header, processes such as TCP disorder and congestion, and the like, and the iSCSI driver at the data receiving end obtains the iSCSI header in the TCP message from the kernel protocol stack. And the iSCSI driver obtains a data page of an SCSI layer data space according to the iSCSI head. And the iSCSI driver at the data receiving end copies the SCSI data contained in the TCP message to a data page of the SCSI layer data space. For example, as shown in fig. 1, the network card at the data receiving end receives three TCP messages, that is, TCP message 1 includes SCSI data-1, TCP message 2 includes SCSI data-2, and TCP message 3 includes SCSI data-3, and the network card at the data receiving end stores the first TCP message and the second TCP message in one data page and stores the third TCP message in another data page. The inner core protocol stack of the data receiving end removes a TCP message head of a TCP message, TCP disorder, congestion processing and the like are completed, an iSCSI driver of the data receiving end obtains a data page of an SCSI layer data space according to an iSCSI head, and the iSCSI driver of the data receiving end copies SCSI data from the data page in the inner core protocol stack to the data page of the SCSI layer data space. Thus, since the iSCSI driver at the data sink copies SCSI data to a data page in the SCSI layer data space, and occupies a large amount of CPU resources at the data sink, a way to reduce the CPU resource occupation is needed when the data sink receives the data.
The embodiment of the application provides a method for receiving data, which can be applied to a data receiving end, wherein the data receiving end, namely a data receiving device, can be a storage device, such as a storage array, a hard disk frame, and a storage server in a distributed storage system. The data receiver may also be an application server.
When the method for receiving data is executed by a storage device, fig. 2 shows a block diagram of the storage device in the embodiment of the present application, where the storage device may include at least a network card (the network card is a hardware interface) 201 and a processor 202. The processor may be a combination of a CPU and a memory, a Field Programmable Gate Array (FPGA) or other hardware, and the processor 202 may also be a combination of a CPU and other hardware, such as a combination of a CPU and an FPGA. Processor 202 may be a control center for a memory device, with various interfaces and lines connecting various portions of the overall memory device, and as one possible implementation, processor 202 may include one or more processing cores. Further, the storage device further comprises a hard disk, which is used for providing storage space for the storage device. In a scene that the storage equipment is a storage array, the storage equipment comprises a storage array controller and a hard disk; the network card 201 and the processor 202 are located in the storage array controller. In the hard disk frame scenario, the network card 201 and the processor 202 are located in the hard disk frame. In a distributed storage system scenario, the network card 201 and the processor 202 are located in a storage server.
The method for receiving data related to the embodiment of the application can be applied to various scenes for receiving data, and two feasible scenes are given as follows:
in a first scenario, as shown in fig. 3, the data receiving end includes a processor, a memory and a network card, where the processor is in communication with the memory, the processor is in communication with the network card, and the memory is in communication with the network card. The network card of the data receiving end is a hardware interface and is used for receiving the TCP message and separating the iSCSI head of the TCP message from the SCSI. The processor at the data target executes the iSCSI-driven code to perform the swap processing of the data page (described later). And a processor at the data receiving end executes the codes of the kernel protocol stack to realize TCP analysis. And the processor at the data receiving end executes the SCSI drive codes to realize data storage. In the following, the iSCSI driver performs the processing actually performed by the processor executing the code implementation of the iSCSI driver; the processing executed by the SCSI drive is actually realized by the processor executing the codes of the iSCSI drive; the processing performed by the kernel protocol stack is actually realized by the processor executing the code of the kernel protocol stack.
In a second scenario, as shown in fig. 4, the data receiving end includes a network processor and a memory, and the network processor communicates with the memory. The network processor can comprise a processor and a network card, wherein the network card is used for receiving a TCP message and separating an iSCSI head of the TCP message from SCSI, and the processor is used for carrying out TCP analysis, realizing exchange processing of a data page and the like. That is, the modules for receiving and processing the TCP packet, separating the iSCSI header and the SCSI header of the TCP packet, exchanging the data page, and performing TCP parsing in the scene one are all disposed in one network processor.
In a possible implementation manner, in scenario two, the network processor may be in the form of a converged network card at the data receiving end, that is, a network card supporting TOE.
In the process of sending a TCP packet to a data receiving end by a data sending end, when the data sending end processes a write request of the data sending end, the data corresponding to the write request is divided into two parts, one part is non-request data (certainly, non-request data may not be included), and the other part is request data. The unsolicited data is data sent together with a write command (the data is also data to be sent to a data receiving end by a data sending end (the data volume of the part of data is small) and is only sent together with the write command), and the write command carries the data length of data to be written; the request data is sent after obtaining a Ready to Transfer (R2T) message sent by the data receiving end (i.e. a TCP message mentioned later). Specifically, the data sending end sends the unsolicited data and the write command to the data receiving end, and when the iSCSI driver of the data receiving end processes a new write command, the iSCSI driver of the data receiving end may notify the SCSI driver of the data receiving end of completing the allocation of the data page based on the data length in the write command. The SCSI driver at the data receiving end allocates a data page (which belongs to the memory at the data receiving end) capable of writing the data length for the data to be written based on the data length in the write command. Then the SCSI drive of the data receiving end informs the iSCSI drive of the data receiving end that the data page is distributed. The iSCSI driver at the data receiving end may copy the received unsolicited data to the data page provided by the SCSI layer, and if there is data (i.e. the solicited data, i.e. SCSI data in a TCP message mentioned later), it needs to record which data pages this iSCSI command corresponds to, and notify the data sending end to send the data corresponding to the write command, i.e. send the TCP message mentioned later.
The following describes a flow of a method for receiving data according to an embodiment of the present application with reference to fig. 5 (taking scenario one as an example):
In this embodiment, after the data receiving end notifies the data sending end to send data corresponding to the write Command, the SCSI driver of the data sending end may generate a corresponding SCSI Command, that is, a Command Descriptor Block (CBD), and transmit the SCSI Command and the request data to the iSCSI driver of the data sending end. After receiving the iSCSI drive of the data transmitting terminal, the iSCSI drive of the data transmitting terminal can package the CBD and the request data to obtain an iSCSI message packet, wherein the iSCSI message packet comprises an iSCSI head and SCSI data, then the iSCSI drive of the data transmitting terminal transmits the iSCSI message packet to a network card of the data transmitting terminal, the network card of the data transmitting terminal packages the iSCSI message packet into a TCP message, and the TCP message comprises a TCP message head, the iSCSI head and the SCSI data. Then the network card of the data sending end transmits the TCP message to the data receiving end through the network. And the network card of the data receiving end receives the TCP message sent by the data sending end.
In this embodiment, the network card at the data receiving end performs aggregation processing on the received TCP packets by using a Receive Side merging (RSC) technique (i.e., Large Receive Offload (LRO) processing on the received TCP packets), so as to obtain aggregated TCP packets, i.e., to aggregate the received TCP packets into one TCP packet. For example, as shown in fig. 6, there are three TCP messages, a first TCP message (message 1) includes SCSI data-1, a second TCP message (message 2) includes SCSI data-2, a third TCP message (message 3) includes SCSI data-3, and a network card at the data receiving end aggregates the three TCP messages to obtain one TCP message, where the TCP message includes a TCP message header (including TCP and IP) and includes SCSI data-1, SCSI data-2, and SCSI data-3.
Then, the network card at the data receiving end identifies the TCP packet after the aggregation processing based on the currently stored context information (where the context information is delimited context information (different from the command context information mentioned later), and the delimited context information includes an initial position of the iSCSI header), and obtains the iSCSI header and SCSI data included in the TCP packet after the aggregation processing. Specifically, the network card at the data receiving end determines the initial position of the iSCSI header of the TCP packet by using the currently stored context information, then obtains the length of the SCSI data in the iSCSI header, and after the initial position deviates from the length of the iSCSI header (the length of the iSCSI header is a fixed length, such as 48 bytes), the initial position is the start position of the SCSI data, and at the start position, the length of the deviated SCSI data is the end position of the SCSI data, so that the SCSI data included in the TCP packet can be obtained. And shifting the length of the iSCSI header at the initial position and then shifting the length of the SCSI data, namely acquiring a position, wherein the position is the initial position of the next iSCSI header. In this way, the iSCSI header and SCSI data contained in the TCP packet may be separated.
Thus, the network card at the data receiving end recognizes the iSCSI header and SCSI data included therein, and obtains a first separation result. The network card at the data receiving end stores the SCSI data to target data pages in the memory respectively through the DMA technique (the data pages may be referred to as cache pages in a socket buffer (skb) structure). In addition, the network card at the data receiving end can also store the iSCSI header to other data pages in the memory except the target data page. In this way, separation of iSCSI header and SCSI data is achieved.
In the DMA technique, the network card on the data receiving side directly writes the data received by the network card into the memory on the data receiving side without using the CPU on the data receiving side. The specific treatment process comprises the following steps: the kernel protocol stack of the data receiving end establishes a ring-shaped cache sequence (the ring-shaped cache sequence comprises a plurality of data pages) for receiving data in the memory of the data receiving end, and then the kernel protocol stack submits the ring-shaped cache sequence to the network card. The network card can store the iSCSI header and the SCSI data to different data pages in a ring-shaped cache sequence respectively.
Wherein, the data page of the SCSI data in the SCSI layer data space also belongs to the memory of the data receiving end.
In this embodiment, after the network card of the data receiving end stores the iSCSI header and the SCSI data to different data pages, the network card of the data receiving end may send an interrupt message to the kernel protocol stack of the data receiving end. After the kernel protocol stack of the data receiving end receives the interrupt message, the kernel protocol stack can remove the TCP message header in the iSCSI header and complete the TCP out-of-order and congestion processing of SCSI data. The kernel protocol stack may then send a read message to the iSCSI driver of the data target to read the iSCSI header. The iSCSI driver at the data receiving end receives the reading information for reading the iSCSI head and can read the iSCSI head of the TCP message in the data page provided by the kernel protocol stack.
After the iSCSI driver at the data receiving end reads the iSCSI Header of the TCP packet, a Basic Header Segment (BHS) may be obtained from the iSCSI Header, where the BHS is the first Segment in the iSCSI Header and occupies 48 bits, and the BHS includes a CBD, a data Segment length (i.e., a length of SCSI data), and the like. And then the iSCSI driver at the data receiving end acquires the length of the SCSI data from the BHS. The iSCSI driver of the data receiving end transmits the length of the SCSI data and the command descriptor block to the SCSI driver of the data receiving end. After receiving the length of the SCSI data and the CBD, the SCSI driver at the data receiving end may determine that this is a data write instruction, may obtain a pointer (which may also be referred to as an address, where the pointer is an address of the data page in the memory of the data receiving end) of a data page that can store the length of the SCSI data, and then return the pointer to the iSCSI driver at the data receiving end. The iSCSI drive at the data receiving end receives the pointer of the data page storing the length of the SCSI data, namely the data page of the SCSI data in the SCSI layer data space is obtained. It should be noted that, because the SCSI data included in the TCP message may not be all data to be written by the data sending end to the data receiving end, or may be all data to be written by the data sending end to the data receiving end, the length of the SCSI data here may be the length of a part of data in the data to be written by the data sending end to the data receiving end, or may be the length of all data in the data to be written by the data sending end to the data receiving end.
For example, the target data pages are data page 1 and data page 2, and the SCSI driver at the data sink returns pointers to data page 5 and data page 6 to the iSCSI driver at the data sink. The number of data pages returned by the SCSI drive at the data receiving end is the same as that of the target data pages.
It should be noted that the triggering condition for the network card at the data receiving end to send the interrupt message to the kernel protocol stack at the data receiving end may be: the network card at the data receiving end triggers after receiving the TCP packet with a certain data size, or triggers at intervals, or certainly triggers other triggering mechanisms based on the performance consideration of the data receiving end, and the embodiment of the present application is not limited. Since the embodiments of the present application relate to writing of data, the command descriptor block describes a data write instruction.
Wherein, the data space of the SCSI layer is the data space corresponding to the SCSI drive of the data receiving end.
In this embodiment, the iSCSI driver at the data receiving end may store the SCSI data to the SCSI layer data space in a page exchange manner according to the data page of the SCSI data in the SCSI layer data space and the data page of the SCSI data currently stored. Therefore, the SCSI data is stored in the SCSI layer data space by adopting a page exchange mode instead of being subjected to copy processing, so that the occupation of a CPU of a data receiving end can be reduced, and the load of the CPU of the data receiving end is reduced.
In one possible implementation manner, in step 504, the process of storing the SCSI data to the SCSI layer data space may be:
and the processor at the data receiving end stores the pointer of the target data page to the SCSI layer data space, and uses the pointer of the SCSI data in the data page of the SCSI layer data space to store the TCP message subsequently received by the network card.
In this embodiment, the iSCSI driver at the data receiving end may send an acquisition message of a data page stored in the SCSI data to the kernel protocol stack, where the acquisition message carries a pointer of the data page of the SCSI data in the SCSI layer data space. After receiving the acquisition message, the kernel protocol stack at the data receiving end can analyze the pointer of the data page of the SCSI layer data space from the acquisition message, add the pointer to the annular cache sequence, and send the pointer of the data page stored in the SCSI data to the iSCSI driver. The iSCSI driver at the data sink receives the pointer to the data page stored in the SCSI data, and may send the pointer to the data page stored in the SCSI data (i.e., the pointer to the target data page) to the SCSI driver.
The SCSI drive at the data receiving end receives the pointer of the data page stored by the SCSI data. In this way, the SCSI driver obtains the pointer of the data page stored in the SCSI data, and the subsequent SCSI driver may obtain the SCSI data based on the pointer, store the SCSI data to the disk at the data receiving end, or store the SCSI data to the cache pool corresponding to the SCSI driver, or the like. After the SCSI data is stored to the disk by the SCSI driver, the SCSI driver may delete the SCSI data in the target data page for subsequent data page exchange.
Therefore, the pointer of the data page of the SCSI layer data space is provided for the network card, the network card receives the subsequent received TCP message, the pointer of the data page stored in the SCSI data space is submitted to the SCSI drive, the pointer is exchanged, and the SCSI data is not copied, so that the load of a CPU (central processing unit) of a data receiving end is reduced.
It should be noted that the data page of the SCSI layer data space may be a data page of non-stored data provided to the SCSI driver by the kernel protocol stack at the data receiving end.
In addition, in the embodiment of the present application, the iSCSI header is used as control data, and does not enter into the SCSI layer data space. After writing the SCSI data of the TCP packet into the SCSI layer data space, the SCSI driver may notify the kernel protocol stack to delete the iSCSI header.
In a possible implementation manner, in order to make the obtained SCSI data more accurate, before the iSCSI driver performs data page exchange, it may be determined whether a separation result obtained by separating the iSCSI header and the SCSI data by the network card is correct, and the corresponding processing is:
and the processor of the data receiving terminal determines that the first separation result is correct, wherein the first separation result is obtained by separating the iSCSI head and SCSI data contained in the TCP message by the network card of the data receiving terminal.
In this embodiment, after the iSCSI driver at the data receiving end obtains the first separation result, it may be determined whether the first separation result is correct. The iSCSI driver at the data receiving end can execute the exchange of data pages under the condition of judging that the first separation result is correct. Therefore, the iSCSI driver can provide the SCSI data to the SCSI driver only when the first separation result is correct, and the SCSI data submitted to the SCSI driver can be guaranteed to be correct as far as possible.
In a possible implementation manner, the iSCSI driver determines whether the first separation result is correct based on the separation result of the iSCSI header and the SCSI data, and the corresponding processing may be:
and the processor separates the iSCSI head and SCSI data contained in the TCP message to obtain a second separation result. And when the first separation result is the same as the second separation result, determining that the first separation result is correct.
In this embodiment, the iSCSI driver at the data receiving end may merge the iSCSI header and SCSI data separated by the network card, and then separate the iSCSI header and SCSI data in the merged message based on the context information stored by the iSCSI driver (the context information is delimited context information and includes an initial position of the iSCSI header) (the processing process may be referred to as iSCSI PDU delimited processing, and the processing process is the same as the process of separating the iSCSI header and SCSI data by the network card, but is different from the used context information), so as to obtain the separated iSCSI header and SCSI data, which is a second separation result.
Then the iSCSI driver determines whether the first separation result is the same as the second separation result, and when the first separation result is the same as the second separation result, the iSCSI driver at the data receiving end can determine that the first separation result is correct, and can perform the swap processing of the data page.
When the first separation result is different from the second separation result, the iSCSI driver at the data receiving end may determine that the first separation result is incorrect, and the iSCSI driver may obtain SCSI data in the second separation result, copy the SCSI data obtained from the second separation result to a data page in an SCSI layer data space, and not perform data page exchange. In this way, when the first separation result is incorrect, the SCSI data included in the TCP packet may be copied to the data page of the SCSI data space in a copy manner. In this way, the SCSI data submitted to the SCSI drive can be guaranteed to be correct as much as possible.
In addition, under the condition that the iSCSI driver determines that the first separation result is incorrect, the iSCSI driver may further perform the following processing to make the subsequent separation of the iSCSI header and SCSI data by the network card at the data receiving end correct, and the processing may be:
and the processor at the data receiving end sends a target message to the network card, wherein the target message carries target context information, and the target context information is used for separating the iSCSI head. And the network card at the data receiving end replaces the context information of the obtained first separation result with the target context information.
In this embodiment, the iSCSI driver at the data receiving end may generate a target message, where the target message carries target context information (the target context information is delimited context information and is different from command context information mentioned later), and the target context information is context information used by the iSCSI driver to separate an iSCSI header and SCSI data. Specifically, the target context information carried in the target message may be a TCP sequence number, and may be used to locate an initial position of the iSCSI header. And the iSCSI drive of the data receiving terminal sends a target message to the network card of the data receiving terminal.
After receiving the target message, the network card at the data receiving end can analyze the target context information from the target message, and then replace the target context information to obtain the context information of the first separation result. Therefore, the network card of the data receiving terminal can use the replaced context information to separate the iSCSI head, and the separation result of the iSCSI head and the SCSI data can be ensured to be correct as much as possible.
In a possible implementation manner, in order to make the obtained SCSI data more accurate, the iSCSI driver may further determine whether SCSI data in the data page storing the SCSI data meets an alignment requirement (the alignment requirement is a 4K alignment requirement), and when the SCSI data meets the alignment requirement, perform exchange processing of the data page. In this way, when the SCSI data in the data page storing the SCSI data meets the alignment requirement, the exchange processing of the data page is executed, and the SCSI data submitted to the SCSI driver can be made correct.
It should be noted that the alignment requirement is a requirement of the SCSI layer, and in many cases, the SCSI layer performs alignment according to a Logical Block Address (LBA). Different alignment requirements may be used when different SCSI layers are implemented. For example, a LBA address of 1 requires that the data start to be stored at a location in the data page of the SCSI layer data space that is offset (offset) by 512 bytes.
Generally, the SCSI data in the data page meets the alignment requirement, and only in a few cases, the SCSI data in the data page does not meet the alignment requirement, so that the occupation of the CPU of the data receiving end can be reduced as a whole.
In addition, when the iSCSI drive at the data receiving end judges that the SCSI data in the data page for storing the SCSI data does not meet the alignment requirement, the iSCSI drive can copy the SCSI data to the data page of the SCSI layer data space, so that the SCSI data can be directly copied to the data page of the SCSI layer data space without adopting data page exchange under the condition that the SCSI data does not meet the alignment requirement, and the SCSI data can be correctly stored to the data page of the SCSI layer data space.
It should be noted that, in this embodiment of the application, in most scenarios, the iSCSI header is in the TCP packet header, and the probability that aggregation cannot be completed (i.e., large reception and load shedding cannot be performed) due to packet loss/disorder and the like is very low, so the network card can realize separation of the iSCSI header and SCSI data included in the TCP packet with a high probability. Moreover, the SCSI data is generally processed in a 4K aligned manner, so that data page exchange can be performed in most scenarios, thereby reducing the copy of the SCSI data and reducing the occupation of the CPU at the data receiving end.
In the embodiment of the application, the network card of the data receiving terminal receives the TCP message, the network card of the data receiving terminal performs separation processing on the iSCSI header and the SCSI data included in the TCP message, the iSCSI header and the SCSI data are respectively stored to different data pages, and the iSCSI driver of the data receiving terminal obtains the data page of the SCSI data in the SCSI layer data space according to the iSCSI header. And the iSCSI drive of the data receiving terminal stores the SCSI data to the SCSI layer data space by adopting a data page exchange mode according to the data page of the SCSI data in the SCSI layer data space. Therefore, the iSCSI head and the SCSI data are separated by the network card of the data receiving end and stored to the data page provided by the kernel protocol stack, and the SCSI data are provided for the SCSI drive of the data receiving end by the iSCSI drive of the data receiving end in a page exchange mode without data copying processing, so that zero copy of the data is realized in the data receiving direction, the occupation of a CPU of the data receiving end can be reduced, and the storage performance of the data receiving end can be improved.
In addition, since the iSCSI driver and the kernel protocol stack at the data receiving end are still implemented by software, but a TCP offload engine and an iSCSI offload engine are not used, the problem of compatibility between the TCP offload engine and the iSCSI offload engine (to implement the TCP offload engine and the iSCSI offload engine, a logic circuit in a network card needs to be redesigned, and the development period is long) can be avoided, and various new protocols (such as congestion control and Round-Trip Time (BBR) technology) which cannot use the kernel protocol stack in the linux system) and the like can be avoided.
In addition, as can be seen from the above description of the embodiment of the present application, the network card at the data receiving end only needs to complete aggregation of multiple TCP messages, maintain the delimiting context information, and separate the iSCSI header and SCSI data included in the TCP message, and does not need to complete maintenance of iSCSI session control (session), TCP connection (connection), and command context information, and does not need to process scenes such as TCP out-of-order and packet loss, which are all directly submitted to the kernel protocol stack for processing. iSCSI session means that a set of TCP connections between the data initiator and the data target form a session. A TCP connection refers to one or more TCP connections between a data sender and a data receiver. The command context information indicates context information of a command between the data transmitting terminal and the data receiving terminal.
In addition, corresponding to the first scenario, in order to better understand the embodiment of the present application, a signaling flow diagram of the data receiving end shown in fig. 7 is also provided in the embodiment of the present application.
In step 704, the kernel protocol stack informs the iSCSI driver of a read message to read the iSCSI header.
In step 708, the iSCSI driver sends an acquisition message of the data page stored in the SCSI data to the kernel protocol stack, where the acquisition message carries a pointer of the data page of the SCSI data in the SCSI layer data space.
In step 709, the kernel protocol stack obtains pointers of data page 1 and data page 2 of the stored SCSI data, and returns the pointers of data page 1 and data page 2 of the SCSI data to the iSCSI driver.
At step 710, the iSCSI driver may return pointers for data page 1 and data page 2 to the SCSI driver.
At step 711, the SCSI driver may perform subsequent processing.
In addition, corresponding to the flowchart in fig. 7, in the embodiment of the present application, as shown in fig. 8, a schematic diagram that a data receiving end performs data receiving is also provided, which is more convenient to understand.
In the second scenario, the method for receiving data is applied, and the network processor at the data receiving end can realize the separation of the iSCSI header and the SCSI of the TCP message, analyze the TCP, and realize the exchange processing of the data page, thereby obtaining the SCSI data contained in the TCP message. Then the network card submits the SCSI data to a data page of an SCSI layer data space in a page exchange manner, that is, to an SCSI driver, so that a TCP offload engine and an iSCSI offload engine can be implemented in the manner of the embodiment of the present application, and thus, an TOE-based IOE can be implemented.
Fig. 9 is a block diagram of an apparatus for receiving data according to an embodiment of the present application. The apparatus may be implemented as part or all of the apparatus by a combination of software and hardware. The apparatus provided in the embodiment of the present application may implement the process described in fig. 5 in the embodiment of the present application, and the apparatus includes: a receiving module 910, a storing module 920 and an obtaining module 930, wherein: the device comprises:
a receiving module 910, configured to receive a TCP packet; the TCP packet includes an iSCSI header and SCSI data, and may be specifically used to implement the receiving function of step 501 and execute the implicit step included in step 501;
a storage module 920, configured to store the SCSI data to a target data page in the memory, and specifically, may be configured to implement the storage function in step 502 and execute the implicit step included in step 502;
an obtaining module 930, configured to obtain, according to the iSCSI header, a data page of the SCSI data in a SCSI layer data space, and specifically may be configured to implement the obtaining function of step 503 and execute an implicit step included in step 503;
the storage module 920 is further configured to store the SCSI data from the target data page to an SCSI layer data space in a data page exchange manner according to a data page of the SCSI data in the SCSI layer data space, and specifically may be configured to implement the storage function in step 504 and execute the implicit step included in step 504.
In one possible implementation, as shown in fig. 10, the apparatus further includes:
a delimiting module 940, configured to separate the SCSI data and the iSCSI header included in the TCP packet based on context information to obtain a first separation result;
the storage module 920 is further configured to determine that the first separation result is correct.
In a possible implementation manner, the storage module 920 is further configured to:
separating the iSCSI head and the SCSI data contained in the TCP message to obtain a second separation result;
and when the first separation result is the same as the second separation result, determining that the first separation result is correct.
In a possible implementation manner, the storage module is further configured to:
and when the first separation result is different from the second separation result, the processor copies SCSI data contained in the TCP message to a data page of the SCSI layer data space based on the second separation result.
In one possible implementation, as shown in fig. 11, the apparatus further includes:
a sending module 950, configured to send a target message to the network card, where the target message carries target context information, and the target context information is used to separate an iSCSI header;
a replacing module 960, configured to replace the context information of the first separation result with the target context information.
In a possible implementation manner, the storage module 920 is further configured to:
and determining that the SCSI data in the target data page meets the alignment requirement.
In a possible implementation manner, the storage module 920 is further configured to:
when the SCSI data in the target data page does not meet the alignment requirement, the SCSI data is copied to the data page of the SCSI layer data space.
In a possible implementation manner, the storage module 920 is configured to:
and storing the pointer of the target data page to an SCSI layer data space, and using the pointer of the SCSI data in the data page of the SCSI layer data space to store the TCP message subsequently received by the network card.
The division of the modules in the embodiments of the present application is schematic, and only one logic function division is provided, and in actual implementation, there may be another division manner, and in addition, each functional module in each embodiment of the present application may be integrated in one processor, may also exist alone physically, or may also be integrated in one module by two or more modules. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. For a specific implementation of the apparatus for receiving data in this embodiment, reference may be made to the description of the method embodiment of the present invention.
In an embodiment of the present application, a computer-readable storage medium is further provided, where the computer-readable storage medium stores computer instructions, and when the computer instructions stored in the computer-readable storage medium are executed by a data receiving apparatus, the data receiving apparatus is caused to execute the method for receiving data provided above.
In an embodiment of the present application, there is also provided a computer program product containing instructions, which when run on a data receiving apparatus, causes the data receiving apparatus to execute the above-mentioned method for receiving data.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware or any combination thereof, and when the implementation is realized by software, all or part of the implementation may be realized in the form of a computer program product. The computer program product comprises one or more computer program instructions which, when loaded and executed on a server or terminal, cause the processes or functions described in accordance with embodiments of the application to be performed, in whole or in part. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optics, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium can be any available medium that can be accessed by a server or a terminal or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (such as a floppy Disk, a hard Disk, a magnetic tape, etc.), an optical medium (such as a Digital Video Disk (DVD), etc.), or a semiconductor medium (such as a solid state Disk, etc.).
Claims (20)
1. A method for receiving data is characterized in that the method is applied to a data receiving end, the data receiving end comprises a processor, a memory and a network card, and the network card, the processor and the memory are communicated; the method comprises the following steps:
the network card receives a Transmission Control Protocol (TCP) message; the TCP message comprises a network small computer system interface iSCSI head and small computer system interface SCSI data;
the network card stores the SCSI data to a target data page in the memory;
the processor acquires a data page of the SCSI data in a SCSI layer data space according to the iSCSI head;
and the processor stores the SCSI data from the target data page to an SCSI layer data space in a data page exchange mode according to the data page of the SCSI data in the SCSI layer data space.
2. The method of claim 1, wherein before the network card stores the SCSI data to the target data page in the memory, the method further comprises:
the network card separates the SCSI data and the iSCSI head contained in the TCP message based on the context information to obtain a first separation result;
before storing the SCSI data from the target data page to the SCSI layer data space, the method further includes:
the processor determines that the first separation result is correct.
3. The method of claim 2, wherein the processor determining that the first separation result is correct comprises:
the processor separates the iSCSI head and the SCSI data contained in the TCP message to obtain a second separation result;
when the first separation result is the same as the second separation result, the processor determines that the first separation result is correct.
4. The method of claim 3, further comprising:
and when the first separation result is different from the second separation result, the processor copies SCSI data contained in the TCP message to a data page of the SCSI layer data space based on the second separation result.
5. The method of claim 4, further comprising:
the processor sends a target message to the network card, wherein the target message carries target context information, and the target context information is used for separating an iSCSI head;
and replacing the context information of the obtained first separation result by the target context information by the network card.
6. The method according to any one of claims 1 to 5, further comprising:
and the processor determines that the SCSI data in the target data page meets the alignment requirement.
7. The method of claim 6, further comprising:
when the SCSI data in the target data page does not meet the alignment requirement, the processor copies the SCSI data to the data page of the SCSI layer data space.
8. The method according to any of claims 1 to 7, wherein the storing, by the processor, the SCSI data from the target data page to the SCSI layer data space in a data page swap manner according to the data page of the SCSI data in the SCSI layer data space comprises:
and the processor stores the pointer of the target data page to an SCSI layer data space, and uses the pointer of the SCSI data in the data page of the SCSI layer data space to store the TCP message subsequently received by the network card.
9. An apparatus for receiving data, applied to a data receiving end, the apparatus comprising:
the receiving module is used for receiving a Transmission Control Protocol (TCP) message; the TCP message comprises a network small computer system interface iSCSI head and small computer system interface SCSI data;
the storage module is used for storing the SCSI data to a target data page in the memory;
the acquisition module is used for acquiring a data page of the SCSI data in a SCSI layer data space according to the iSCSI head;
the storage module is further configured to store the SCSI data from the target data page to an SCSI layer data space in a data page exchange manner according to a data page of the SCSI data in the SCSI layer data space.
10. The apparatus of claim 9, further comprising:
the delimiting module is used for separating the SCSI data and the iSCSI head contained in the TCP message based on context information to obtain a first separation result;
the storage module is further used for determining that the first separation result is correct.
11. The apparatus of claim 10, wherein the storage module is further configured to:
separating the iSCSI head and the SCSI data contained in the TCP message to obtain a second separation result;
and when the first separation result is the same as the second separation result, determining that the first separation result is correct.
12. The apparatus of claim 10, wherein the storage module is further configured to:
and when the first separation result is different from the second separation result, the processor copies SCSI data contained in the TCP message to a data page of the SCSI layer data space based on the second separation result.
13. The apparatus of claim 4, further comprising:
a sending module, configured to send a target message to the network card, where the target message carries target context information, and the target context information is used to separate an iSCSI header;
a replacing module, configured to replace context information obtained from the first separation result with the target context information.
14. The apparatus of any of claims 9 to 13, wherein the storage module is further configured to:
and determining that the SCSI data in the target data page meets the alignment requirement.
15. The apparatus of claim 14, wherein the storage module is further configured to:
when the SCSI data in the target data page does not meet the alignment requirement, the SCSI data is copied to the data page of the SCSI layer data space.
16. The apparatus of any one of claims 9 to 15, wherein the storage module is configured to:
and storing the pointer of the target data page to an SCSI layer data space, and using the pointer of the SCSI data in the data page of the SCSI layer data space to store the TCP message subsequently received by the network card.
17. A data receiving end, characterized in that, the data receiving end includes a network card and a processor, wherein:
the network card is the network card of any one of claims 1 to 8;
the processor is the processor of any one of claims 1 to 8.
18. A network processor, wherein the network processor is applied to a data receiving end, and the network processor comprises a processor and a network card, wherein:
the network card is the network card of any one of claims 1 to 8;
the processor is the processor of any one of claims 1 to 8.
19. A data receiving device, characterized in that the data receiving device comprises a processor and a memory, wherein:
the memory having stored therein computer instructions;
the processor executes the computer instructions to implement the method of receiving data of any of the claims 1-8.
20. A computer-readable storage medium storing computer instructions which, when executed by a data receiving apparatus, cause the data receiving apparatus to perform the method of receiving data of any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911328812.8A CN111200594B (en) | 2019-12-20 | 2019-12-20 | Method and device for receiving data, data receiving equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911328812.8A CN111200594B (en) | 2019-12-20 | 2019-12-20 | Method and device for receiving data, data receiving equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111200594A true CN111200594A (en) | 2020-05-26 |
CN111200594B CN111200594B (en) | 2021-07-16 |
Family
ID=70746320
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911328812.8A Active CN111200594B (en) | 2019-12-20 | 2019-12-20 | Method and device for receiving data, data receiving equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111200594B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1985492A (en) * | 2004-06-17 | 2007-06-20 | 美国博通公司 | Method and system for supporting iSCSI read operations and iSCSI chimney |
CN101123485A (en) * | 2007-09-20 | 2008-02-13 | 杭州华三通信技术有限公司 | iSCSI packet processing method and device, error recovery method and device |
CN101707564A (en) * | 2009-12-04 | 2010-05-12 | 曙光信息产业(北京)有限公司 | Processing method and processing device for transmitting and receiving network data in zero-copy buffer queue |
CN101707565A (en) * | 2009-12-04 | 2010-05-12 | 曙光信息产业(北京)有限公司 | Method and device for transmitting and receiving zero-copy network message |
CN103441948A (en) * | 2013-07-03 | 2013-12-11 | 华为技术有限公司 | Data access method, network card and storage system |
CN103838517A (en) * | 2012-11-23 | 2014-06-04 | 中国科学院声学研究所 | Method and system for transmitting data between multi-core processor and disk array |
CN103838516A (en) * | 2012-11-23 | 2014-06-04 | 中国科学院声学研究所 | Method and system for multi-core processor to efficiently have access to iSCSI disk array |
CN106656870A (en) * | 2015-10-28 | 2017-05-10 | 中国科学院声学研究所 | Two-layer switch storage method based on storage port |
CN109857545A (en) * | 2018-12-29 | 2019-06-07 | 华为技术有限公司 | A kind of data transmission method and device |
-
2019
- 2019-12-20 CN CN201911328812.8A patent/CN111200594B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1985492A (en) * | 2004-06-17 | 2007-06-20 | 美国博通公司 | Method and system for supporting iSCSI read operations and iSCSI chimney |
CN101123485A (en) * | 2007-09-20 | 2008-02-13 | 杭州华三通信技术有限公司 | iSCSI packet processing method and device, error recovery method and device |
CN101707564A (en) * | 2009-12-04 | 2010-05-12 | 曙光信息产业(北京)有限公司 | Processing method and processing device for transmitting and receiving network data in zero-copy buffer queue |
CN101707565A (en) * | 2009-12-04 | 2010-05-12 | 曙光信息产业(北京)有限公司 | Method and device for transmitting and receiving zero-copy network message |
CN103838517A (en) * | 2012-11-23 | 2014-06-04 | 中国科学院声学研究所 | Method and system for transmitting data between multi-core processor and disk array |
CN103838516A (en) * | 2012-11-23 | 2014-06-04 | 中国科学院声学研究所 | Method and system for multi-core processor to efficiently have access to iSCSI disk array |
CN103441948A (en) * | 2013-07-03 | 2013-12-11 | 华为技术有限公司 | Data access method, network card and storage system |
CN106656870A (en) * | 2015-10-28 | 2017-05-10 | 中国科学院声学研究所 | Two-layer switch storage method based on storage port |
CN109857545A (en) * | 2018-12-29 | 2019-06-07 | 华为技术有限公司 | A kind of data transmission method and device |
Non-Patent Citations (4)
Title |
---|
D. XINIDIS.ET: ""Performance evaluation of commodity iSCSI-based storage systems"", 《22ND IEEE/13TH NASA GODDARD CONFERENCE ON MASS STORAGE SYSTEMS AND TECHNOLOGIES》 * |
FUJITA TOMONORI.ET: ""Performance of optimized software implementation of the iSCSI protocol"", 《SNAP,COMPUTER SCIENCE》 * |
PRASENJIT SARKAR.ET: ""Storage over IP: When Does Hardware Support help?"", 《PROCEEDINGS OF THE 2ND USENIX CONFERENCE ON FILE AND STORAGE TECHNOLOGIES》 * |
黄建忠等: ""一种基于iSCSI的对象存储安全系统的设计与实现"", 《计算机科学》 * |
Also Published As
Publication number | Publication date |
---|---|
CN111200594B (en) | 2021-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107209644B (en) | Data processing method and NVMe memory | |
US10642777B2 (en) | System and method for maximizing bandwidth of PCI express peer-to-peer (P2P) connection | |
CN113485823A (en) | Data transmission method, device, network equipment and storage medium | |
CN113179327B (en) | High concurrency protocol stack unloading method, equipment and medium based on large-capacity memory | |
CN114153778A (en) | Cross-network bridging | |
US20240039995A1 (en) | Data access system and method, device, and network adapter | |
US20220222016A1 (en) | Method for accessing solid state disk and storage device | |
CN105141603A (en) | Communication data transmission method and system | |
EP1554644A2 (en) | Method and system for tcp/ip using generic buffers for non-posting tcp applications | |
CN113498595B (en) | PCIe-based data transmission method and device | |
US20240275740A1 (en) | RDMA Data Transmission System, RDMA Data Transmission Method, and Network Device | |
US7822040B2 (en) | Method for increasing network transmission efficiency by increasing a data updating rate of a memory | |
CN111200594B (en) | Method and device for receiving data, data receiving equipment and storage medium | |
CN111404842B (en) | Data transmission method, device and computer storage medium | |
CN113973091A (en) | Message processing method, network equipment and related equipment | |
US6693905B1 (en) | Data exchange unit | |
CN108140005B (en) | System and method for providing file information in a memory system protocol | |
KR20200143881A (en) | Controller commnication device and method thereof | |
US9201599B2 (en) | System and method for transmitting data in storage controllers | |
EP3631640B1 (en) | Communication between field programmable gate arrays | |
US12124709B2 (en) | Computing system and associated method | |
US20240069754A1 (en) | Computing system and associated method | |
TWI831536B (en) | Adapter and data transmission method under limited memory | |
CN118200417B (en) | NETMAP-based FPGA algorithm card call processing method and system | |
CN115982090B (en) | Method and device for realizing remote memory access by cooperation of software and hardware |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |