Data transmission method and network card

CN114637458BActive Publication Date: 2026-10-30HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011477038.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-15
Publication Date
2026-10-30
Estimated Expiration
2040-12-15

AI Technical Summary

Technical Problem

但是,由于数据的传输是由网卡中的处理器执行的,因此,导致应用服务器对磁盘阵列的读操作和写操作的时长较长

Benefits of technology

[0033]本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114637458B_ABST
    Figure CN114637458B_ABST
Patent Text Reader

Abstract

The application discloses a data transmission method and a network card, relates to the field of storage, and solves the problem of long time length of read operation and write operation of an application server on a disk array. The method comprises the following steps: after receiving a command from an application server, a network card determines a controller for processing the command, and transmits the command to the controller. If the command is a read command, the network card receives a first instruction from the controller, reads to-be-accessed data from the memory of the controller, and sends the to-be-accessed data to the application server. If the command is a write command, the network card receives a second instruction from the controller, reads to-be-written data from the application server, and writes the to-be-written data into the storage space of the controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage, and more particularly to a data transmission method and a network interface card (NIC). Background Technology

[0002] With the rapid development of the internet and network applications, the data that application servers need to process is also growing explosively. Disk arrays can provide application servers with secure, reliable, and scalable external storage space. For example, storage devices in a data center include multiple controllers, disk arrays, and network interface cards (NICs). Each controller manages a portion of the storage space within the disk array. Typically, the storage device transfers data from the controller's memory to the application server's NIC via its included NIC. Alternatively, the storage device receives data from the application server via its included NIC, and then the storage device's NIC transfers the data to the controller. However, because data transfer is performed by the processor within the NIC, read and write operations on the disk array by the application server take a relatively long time. Summary of the Invention

[0003] This application provides a data transmission method and a network interface card (NIC), which can shorten the time for application servers to perform read and write operations on disk arrays.

[0004] Firstly, this application provides a data transmission method applied to a network interface card (NIC) of a storage device. The NIC includes a processor and a data transmission chip. The method includes the NIC's processor receiving a read command from an application server, determining a first controller in the storage device that processes the read command, and transmitting the read command to the first controller. Then, the NIC's data transmission chip transmits the data read by the first controller according to the read command to the application server.

[0005] In this way, the data transmission chip in the network card transmits the data read by the first controller according to the read command to the application server, avoiding the network card's processor transmitting the data read by the first controller according to the read command to the application server. This effectively improves the efficiency of the application server in performing read operations on the disk array and shortens the time for performing read operations on the disk array.

[0006] The data transmission chip can be an application-specific integrated circuit (ASIC). Examples include a digital signal processor (DSP), one or more field-programmable gate arrays (FPGAs), a graphics processing unit (GPU), a neural network processing unit (NPU), or a direct memory access (DMA) controller. This embodiment does not limit the type of data transmission chip.

[0007] In one possible implementation, the processor determines the first controller in the storage device that handles read commands by: determining the first controller based on the Internet Protocol (IP) address of the first controller transmitted by the application server; or, determining the first controller based on the logical unit number (LUN) and logical block address (LBA) in the read command. For example, the first data packet received by the network interface card (NIC) from the application server may include the IP address of the first controller and the read command. This allows the NIC to distribute the received data packets reasonably and evenly to different controllers, avoiding congestion during controller data processing.

[0008] In another possible implementation, the data transmission chip transmits the data read by the first controller according to the read command to the application server by: the data transmission chip reading data from the memory of the first controller according to a first instruction sent by the first controller, and transmitting the read data from the network card to the application server. The first instruction instructs the data transmission chip to read the data read by the first controller according to the read command from the memory of the first controller into the network card.

[0009] Specifically, the first instruction contains the physical address of the first controller's memory, and the data transmission chip reads data from the location indicated by the physical address in the first controller's memory. Then, the data transmission chip encapsulates the data according to a protocol, generates a second data packet, and sends the second data packet to the application server. The second data packet contains the data.

[0010] In this way, the data transmission chip in the network card reads the data read by the first controller according to the read command from the memory of the first controller, and transmits the read data to the application server. This avoids the network card's processor transmitting the data read by the first controller according to the read command to the application server, thus effectively improving the efficiency of the application server in reading the disk array and shortening the time of reading the disk array.

[0011] In another possible implementation, the read command includes the application server's first memory address, which is the address where the read data will be written. When the data transmission chip transmits the data read by the first controller according to the read command to the application server, it sends the application server's first memory address to the application server's network card, instructing the application server's network card to write the read data into the storage space indicated by the application server's first memory address.

[0012] In another possible implementation, after the data transmission chip reads data from the memory of the first controller according to the first instruction sent by the first controller, the method further includes: the data transmission chip sending an operation completion message to the application server.

[0013] In another possible implementation, the method further includes: after the network interface card's (NIC) processor receives a write command from the application server, it identifies a second controller in the storage device that processes write commands and transmits the write command to the second controller. Then, the NIC's data transmission chip writes the data to be written, as indicated by the write command, into the memory of the second controller.

[0014] In this way, the data transmission chip in the network card writes the data to be written indicated by the write command into the memory of the second controller, avoiding the network card's processor writing the data to be written indicated by the write command into the memory of the second controller. Therefore, the efficiency of the application server's write operation on the disk array is effectively improved, and the time for writing operation on the disk array is shortened.

[0015] In another possible implementation, the processor determines the second controller in the storage device that handles write commands by: determining the second controller based on the IP address of the second controller transmitted by the application server; or, determining the second controller based on the logical unit number and logical block address in the write command. For example, a third data packet received by the network interface card (NIC) from the application server may include the IP address of the second controller and the write command. This allows the NIC to distribute the received data packets reasonably and evenly to different controllers, avoiding congestion during controller data processing.

[0016] In another possible implementation, the data transmission chip writing the data to be written indicated by the write command into the memory of the second controller includes: the data transmission chip writing the data to be written from the application server into the memory of the second controller according to a second instruction sent by the second controller. The second instruction is used to instruct the data to be written indicated by the write command to be written into the memory of the second controller.

[0017] In this way, the data transmission chip in the network card writes the data to be written indicated by the write command from the application server into the memory of the second controller, avoiding the network card's processor writing the data to be written indicated by the write command into the memory of the second controller. Therefore, the efficiency of the application server's write operation on the disk array is effectively improved, and the time for writing operation on the disk array is shortened.

[0018] In another possible implementation, the write command includes a second memory address of the application server, which is the address from which the data to be written is read. The data transmission chip sends the second memory address to the application server's network interface card (NIC) to instruct the NIC to read the data to be written from the storage space indicated by the second memory address.

[0019] Specifically, the data transmission chip encapsulates the second memory address and length using a protocol to generate a fourth data packet, which is then sent to the application server. This allows the data transmission chip to receive data to be written from the application server. The fourth data packet includes the second memory address and length, and the third data packet from the application server also includes the second memory address and length. The second memory address indicates the location where the application server stores the data to be written, and the length indicates the length of the data to be written. The second instruction contains the physical address of the second controller's memory. Furthermore, the data transmission chip writes the data to be written to the location indicated by the physical address in the second controller's memory.

[0020] In another possible implementation, after the data transmission chip writes the data to be written from the application server into the memory of the second controller according to the second instruction sent by the second controller, the method further includes: the data transmission chip sending an operation completion message to the application server.

[0021] Secondly, this application provides a network interface card (NIC), which includes a processor and a data transmission chip. Wherein:

[0022] The processor receives a read command from the application server, identifies the first controller in the storage device that handles the read command, and transmits the read command to the first controller. Then, the network interface card's data transmission chip transmits the data read by the first controller according to the read command to the application server.

[0023] The data transmission chip is used to transmit the data read by the first controller according to the read command to the application server, avoiding the network card's processor from transmitting the data read by the first controller according to the read command to the application server. Therefore, it effectively improves the efficiency of the application server in performing read operations on the disk array and shortens the time of performing read operations on the disk array.

[0024] In one possible implementation, the data transmission chip is specifically used to: receive a first instruction sent by a first controller, the first instruction being used to instruct the data transmission chip to read data from the memory of the first controller according to the read command into the network card; and to transmit the read data from the network card to the application server.

[0025] In another possible implementation, when the processor is used to determine the first controller in the storage device that handles read commands, it specifically determines the first controller based on the IP address of the first controller transmitted by the application server; or, it determines the first controller based on the LUN and LBA in the read command.

[0026] In another possible implementation, the processor is also used to receive a write command from the application server; the processor determines a second controller in the storage device that processes the write command and transmits the write command to the second controller; the data transfer chip is also used to write the data to be written indicated by the write command into the memory of the second controller.

[0027] In another possible implementation, when the data transmission chip writes the data to be written indicated by the write command into the memory of the second controller, it is specifically used to: receive a second instruction sent by the second controller, the second instruction being used to instruct the data to be written indicated by the write command to be written into the memory of the second controller; and write the data to be written from the application server into the memory of the second controller.

[0028] Thirdly, this application provides a system including an application server and a storage device. The application server includes a first network interface card (NIC), and the storage device includes a second NIC and a controller. The second NIC includes a processor and a data transmission chip. The first NIC is used to send a read command to the second NIC. The processor of the second NIC is used to determine a first controller in the storage device that processes the read command and transmit the read command to the first controller. The data transmission chip transmits the data read by the first controller according to the read command to the application server.

[0029] In one possible implementation, the first network interface card (NIC) is used to send a write command to the second NIC; the processor of the second NIC is used to determine the second controller in the storage device that processes the write command, and transmit the write command to the second controller; the data transmission chip is used to write the data to be written indicated by the write command from the application server into the memory of the second controller.

[0030] Fourthly, this application provides a network interface card (NIC) comprising an interface circuit, a memory, and a processor. The interface circuit is used to receive read or write commands from an application server, and the memory is used to store a set of computer instructions. When the data transmission chip executes a set of computer instructions, it executes the method described in the first aspect above.

[0031] Fifthly, a computer-readable storage medium is provided, comprising: computer software instructions; when the computer software instructions are executed in a computing device, causing the computing device to perform operational steps of the method as described in the first aspect or any possible implementation thereof.

[0032] Sixthly, a computer program product is provided that, when run on a computer, causes a computing device to perform the operational steps of the method as described in the first aspect or any possible implementation thereof.

[0033] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0034] Figure 1 A schematic diagram of the architecture of a communication system provided in this application;

[0035] Figure 2 A schematic diagram of the architecture of a storage device provided in this application;

[0036] Figure 3 A flowchart of a data transmission method provided in this application;

[0037] Figure 4 A schematic diagram of the structure of a data packet provided in this application;

[0038] Figure 5 A flowchart of another data transmission method provided in this application;

[0039] Figure 6 This is a schematic diagram illustrating the composition of a network interface card (NIC) provided in this application. Detailed Implementation

[0040] The terms "first," "second," and "third," etc., used in this application specification, claims, and the aforementioned drawings are used to distinguish different objects, not to limit a specific order.

[0041] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0042] The possible embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0043] Figure 1 This is a schematic diagram of the architecture of a communication system provided in an embodiment of this application. Figure 1 As shown, the communication system includes at least one terminal 101 and a data center. The data center includes at least one application server 102. Terminal 101 can access application server 102 via network 103. Network 103 can be the Internet. Network 103 includes network devices 1031 such as routers and switches for transmitting data packets (or data streams). Terminal 101 is connected to network device 1031 wirelessly or via a wired connection. Network device 1031 is connected wirelessly or via a wired connection. Network device 1031 is connected to application server 102 wirelessly or via a wired connection. Figure 1 This is merely an illustrative diagram; the embodiments of this application do not limit the number of terminals, network devices, and application servers included in the communication system.

[0044] The terminal 101 can also be referred to as a terminal device, user equipment (UE), mobile station (MS), and mobile terminal (MT), etc. The terminal device can be fixed in location or mobile. For example, the terminal can be a mobile phone, tablet computer, computer with wireless transceiver capabilities, virtual reality (VR) terminal device, augmented reality (AR) terminal device, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical surgery, wireless terminal in smart grid, wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home, etc. The embodiments of this application do not limit the specific technology or device form used in the terminal.

[0045] Multiple application servers 102 can be independent and different physical devices. Alternatively, the functions of multiple application servers 102 can be integrated on the same physical device (e.g., multiple application servers or blade servers within the jurisdiction of a cloud service provider), or some of the functions of application servers 102 can be integrated on a single physical device. Each application server 102 can run one or more services. A service can be deployed on one application server 102 and supported by that application server 102. Alternatively, a service can be deployed on multiple application servers 102 and supported by multiple application servers 102. A service can also be called an application. For example, application server 102 supports running a game service, and terminal 101 runs a client application server 102 that supports running the game service. Terminal 101 can send data to application server 102 or receive data from application server 102.

[0046] Typically, to expand the storage capacity of application server 102, the data on application server 102 is isolated and centrally managed using a disk array. For example, application server 102 can also connect to multiple storage devices 104. Storage device 104 includes disk array 1041. Multiple storage devices 104 can be deployed in different geographical locations without limitation. Application server 102 can access storage device 104 through a storage area network (SAN). The SAN includes multiple switches 105. Application server 102 uses fiber optic connections to switch 105 to communicate with storage device 104. Because application server 102 uses a fiber optic interface to access storage device 104, the data transmission rate can be effectively improved. Storage device 104 supports connection to application servers operating various operating systems. Application servers include Windows application servers, Linux application servers, UNIX application servers (such as AIX application servers, HP-UX application servers, and Solaris application servers), and VMware application servers, etc.

[0047] To manage storage arrays effectively, such as Figure 2 As shown, storage device 104 also includes multiple controllers (e.g., controllers C0 to Cn). Each controller manages a portion of the storage space in disk array 1041. Storage device 104 may also include multiple network interface cards (NICs) (e.g., NICs D0 to Dm). A NIC can support one protocol. Different NICs in storage device 104 can support different protocols or the same protocol, without limitation. For example, Fibre Channel (FC) protocol, Internet Small Computer System Interface (iSCSI) protocol. Here, n and m are both integers greater than or equal to 2. The number of controllers and the number of NICs can be the same or different, without limitation. Controllers and NICs are connected via input / output (I / O) bus 1042. Controllers and disk array 1041 are connected via fiber optic cable 1043. Storage device 104 receives data packets from application server 102 or sends data packets to application server 102 through NICs.

[0048] Next, combined Figure 3 The data transmission method provided in this embodiment will be described in detail. It is assumed here that the application server has established a connection with the network interface card (NIC) in the storage device. The NIC in the storage device has also established a connection with the controller. The application server performs read operations on the data in the disk array.

[0049] S301, The application server sends the first data packet to the network card.

[0050] S302, The network card's processor determines the controller that processes the first data packet.

[0051] After receiving the first data packet from the application server through its included communication interface, the network interface card (NIC) can first place the first data packet into the receive queue. The NIC's processor then processes the data in the receive queue sequentially. Alternatively, the NIC's processor can also process the data in the receive queue according to their priority. For example, the NIC's processor can prioritize processing the first data packet, which has the highest priority.

[0052] After the network interface card's (NIC) processor reaches the first data packet in the receive queue, it decapsulates and recapsulates the first data packet according to its encapsulation protocol. For example, if the first data packet is encapsulated according to the Fibre Channel protocol, it is decapsulated and recapsulated according to the Fibre Channel protocol. Or, if the first data packet is encapsulated according to the Internet Small Computer System Interface (IMSI) protocol, it is decapsulated and recapsulated according to the IMSI protocol.

[0053] After the network card's processor decapsulates the first data packet, it can obtain the command word, logical unit number (LUN), logical block address (LBA), first memory address, and length of the data to be accessed contained in the first data packet.

[0054] The command word indicates a read or write operation. For example, a command word of 0x2 indicates a read operation. Similarly, a command word of 0x1 indicates a write operation.

[0055] In a storage area network (SLAN), a Logical Unit Number (LUN) identifies a logical unit, which is a device addressed via Small Computer System Interface (SCSI). In other words, a storage system (such as a storage device) partitions a physical hard drive, with each partition becoming a separate part with a logical address, allowing the controller to access it. Such a partition is called a LUN. Typically, LUN also refers to a logical disk created on storage within a storage area network.

[0056] The storage system creates specified LUNs based on business needs. To facilitate unified management of LUNs, the storage system can also create controller groups and map LUN groups to controller groups. The storage system also creates mapping views and adds application servers, LUN groups, and controller groups to these views. In this way, application servers, controller groups, and LUN groups are logically linked as a single entity. Once the storage system establishes a network connection with the application server, the application server can discover the storage space allocated to it by the storage system by scanning LUNs and perform read and write operations on it.

[0057] Logical block addresses are a common mechanism for describing the location of data blocks on computer storage devices, typically used in auxiliary memory devices like hard drives. A logical block address can refer to the address of a specific data block or the data block pointed to by a given address.

[0058] The first memory address indicates a storage space in the application server, which is used to store data read from the disk.

[0059] Length can refer to the length of data read from the disk.

[0060] For example, such as Figure 4 The diagram shown is a structural schematic of a data packet provided in an embodiment of this application.

[0061] In the data packet, byte 0 represents the opcode, which indicates whether a read or write request is being made. For example, opcode 0x2 indicates a read request, while opcode 0x1 indicates a write request.

[0062] Bytes 2 and 3 represent the command identifier. The command identifier is used to uniquely indicate a data packet so that the controller can reply to the network interface card with information related to that data packet.

[0063] Bytes 4 to 15 represent the namespace identifier. The namespace identifier is used to indicate the namespace in which the command is executed.

[0064] Bytes 16 to 39 represent a pointer to the scatter-gather list (SGL). The SGL pointer includes the first memory address and the length.

[0065] Bytes 40 to 47 represent the logical block address. Bytes 48 to 49 represent the logical unit number.

[0066] S303, the network card's processor transmits the first data packet to the controller.

[0067] In some embodiments, the first data packet also includes the IP address of the controller, and the processor of the network card can forward the first data packet to the controller based on the controller's IP address, namely the forwarding command word, length, LUN and LBA.

[0068] In other embodiments, the network interface card (NIC) is pre-configured with distribution rules, and the NIC's processor forwards commands according to these rules. For example, the NIC's processor determines the controller that will handle the read command based on the logical unit number and logical block address, and then transmits the first data packet to the controller. Thus, the method of forwarding commands according to distribution rules simplifies the network configuration of the storage device.

[0069] S304. The controller sends the first confirmation message to the network card's processor.

[0070] After receiving the first data packet from the network interface card (NIC), the controller sends a first acknowledgment message to the NIC's processor. The first acknowledgment message indicates that the controller has received the first data packet.

[0071] In this embodiment, it is assumed that the command is a read command. It should be understood that the controller manages the data to be accessed as indicated by the read command.

[0072] S305, the controller sends the first instruction to the network card's processor.

[0073] After receiving and decapsulating the first data packet from the network interface card (NIC), the controller determines the data to be accessed based on the read command. If the controller determines that it has cached the data to be accessed by the application server, it sends a first instruction to the NIC's processor. If the controller determines that it has not cached the data to be accessed by the application server, it determines the disk where the data to be accessed is stored based on the logical unit number, and determines the location of the data to be accessed on the disk based on the logical block address. Then, the controller reads the data to be accessed from the disk it manages according to the received length, caches the data to be accessed in the controller's memory, and sends a first instruction to the NIC's processor. The first instruction instructs the data transmission chip to read the data read by the controller according to the read command from the controller's memory into the NIC.

[0074] In some embodiments, the controller may employ a polling mechanism to read stored commands. When the controller receives the read command, it determines the location where the data to be accessed is stored based on the logical unit number and logical block address, and reads the data to be accessed, as indicated by the length, from that location. Alternatively, when the controller receives the read command, it sends a first instruction to the network interface card's processor.

[0075] In other embodiments, the network interface card's processor may also transmit the command word, logical unit number, logical block address, and length of the data to be accessed contained in the first data packet to the controller, without the controller needing to decapsulate the first data packet.

[0076] S306, the network card's processor transmits the first instruction from the controller to the data transmission chip.

[0077] S307, The network card's data transmission chip reads the data to be accessed from the controller's memory into the network card's memory according to the first instruction.

[0078] The first instruction may include a command identifier to allow the network card to identify that the first instruction is related to the first data packet. The first instruction contains the physical address of the memory storing the data to be accessed. The network card's data transfer chip reads the data to be accessed from the location indicated by the physical address in the controller's memory, based on the physical address of the memory. For example, assuming the data transfer chip is a DMA controller, the DMA controller uses DMA technology to move the data to be accessed from the location indicated by the physical address in the controller's memory to the DMA controller, so that the DMA controller can transfer the data to be accessed to the application server.

[0079] S308, the network card's data transmission chip sends a second data packet to the application server's network card.

[0080] The network interface card's (NIC) data transmission chip encapsulates the data to be accessed using a protocol, generating a second data packet containing the data to be accessed. The protocol used to encapsulate the second data packet can be the same as the protocol used to parse the first data packet. Furthermore, since the NIC stores the first memory address from the first data packet, the second data packet can also contain the first memory address, so that the application server's NIC can write the data to be accessed from the NIC into the storage space indicated by the first memory address on the application server.

[0081] In some embodiments, the network interface card's (NIC) data transmission chip can first store the second data packet in a transmission queue. The data transmission chip processes the data in the transmission queue sequentially, and when the data transmission chip polls for the second data packet, it sends the second data packet. Alternatively, the NIC's data transmission chip can also process the data in the transmission queue according to the data priority. For example, if the second data packet is a high-priority data packet, the NIC's data transmission chip will send the second data packet first.

[0082] S309. The application server's network card receives the second data packet from the network card's data transmission chip.

[0083] After the data transmission chip of the network card reads the data to be accessed from the memory of the controller and sends the data to be accessed to the network card of the application server, S310 is executed.

[0084] The S310 network card's data transmission chip sends an operation completion message to the application server's network card.

[0085] S311. The network card of the application server writes the data to be accessed into the memory of the application server according to the first memory address.

[0086] S312. The application server's network interface card (NIC) sends a second confirmation message to the NIC's data transmission chip. The second confirmation message indicates that the data to be accessed has been written to the application server.

[0087] In this way, the data transmission chip in the network card reads the data read by the controller according to the read command from the controller's memory and transmits the read data to the application server. This avoids the network card's processor transmitting the data read by the controller according to the read command to the application server, thus effectively improving the efficiency of the application server's read operations on the disk array and shortening the time for reading operations on the disk array.

[0088] Figure 5 Another data transmission method provided in this application embodiment will be described in detail. Here, it is assumed that the application server and the network interface card (NIC) in the storage device have established a connection, and the application server and NIC support the same protocol. The NIC in the storage device has also established a connection with the controller. Figure 5 With the above Figure 3 The difference in the proposed solution is that the application server performs write operations on the data in the disk array.

[0089] S501, The application server sends the first data packet to the network card.

[0090] S502, The network card's processor determines the controller that processes the first data packet.

[0091] The S503 network card's processor transmits the first data packet to the controller.

[0092] S504: The controller sends a first acknowledgment message to the network interface card's processor.

[0093] The first data packet contains a command word, a logical unit number, a logical block address, a second memory address, and the length of the data to be accessed. In this embodiment, the command word may indicate a write operation. The second memory address is the address where the data is written to the memory of the controller.

[0094] For explanations regarding the network card receiving the first data packet and the network card's processor determining the controller, please refer to the descriptions in S301 to S304 above.

[0095] In this embodiment, it is assumed that the command is a write command. It should be understood that the controller manages the storage space for the data to be written as indicated by the write command.

[0096] S505, the controller sends a second instruction to the network card's processor.

[0097] After receiving the first data packet from the network interface card (NIC), the controller determines, based on the write command, that data needs to be written to the storage space it manages, and sends a second instruction to the NIC's processor. The second instruction instructs the data to be written, as indicated by the write command, to be written into the memory of the second controller.

[0098] In some embodiments, the controller may use a polling mechanism to read stored commands. When the controller detects the write command, it sends a second instruction to the network interface card's processor.

[0099] In the S506 network card, the processor transmits the second instruction from the controller to the data transmission chip.

[0100] S507, the network card's data transmission chip receives data to be written from the network card of the application server.

[0101] The second instruction may include a command identifier so that the network card can identify that the read data request is related to the first data packet. Since the first data packet from the application server includes a second memory address and a length, the network card's data transmission chip encapsulates the second memory address and length using a protocol to generate a second data packet including the address and length. The protocol used to encapsulate the second data packet can be the same as the protocol used to parse the first data packet. The second memory address indicates the location where the application server stores the data to be written, and the length indicates the length of the data to be written. The network card sends the second data packet to the application server's network card. After receiving the second data packet from the network card, the application server reads the data to be written from memory according to the second memory address and length. Then, the application server's network card encapsulates the data to be written using a protocol to generate a third data packet and sends the third data packet to the network card. The third data packet includes the data to be written. The protocol used to encapsulate the third data packet can be the same as the protocol used to encapsulate the first data packet.

[0102] The S508 network card's data transmission chip writes the data to be written into the controller's storage space according to the second instruction.

[0103] After receiving the third data packet from the application server's network card, the network card decapsulates the third data packet to obtain the data to be written. Since the second instruction contains the physical address of the controller's memory, the network card's data transmission chip writes the data to be written to the location indicated by the physical address in the controller's memory. Furthermore, the controller can also write the data to be written to the storage space of the disk it manages. For example, the controller determines the disk based on the logical unit number and the location on the disk where the data to be written is stored based on the logical block address, and then writes the data to be written to the storage space of the disk it manages.

[0104] Optionally, the network card's data transmission chip can also send the third data packet to the controller, which will then decapsulate the third data packet, obtain the data to be written, and write the data to be written to the location indicated by the physical address.

[0105] After the data transmission chip of the network card reads the data to be written from the application server and writes the data to be written into the memory of the controller, S509 is executed.

[0106] S509, the network card's data transmission chip sends an operation completion message to the application server's network card.

[0107] In this way, the data transmission chip in the network card writes the data to be written indicated by the write command from the application server into the memory of the second controller, avoiding the network card's processor writing the data to be written indicated by the write command into the memory of the second controller. Therefore, the efficiency of the application server's write operation on the disk array is effectively improved, and the time for writing operation on the disk array is shortened.

[0108] It should be noted that other control commands received by the network card from the application server can still be processed by the network card's processor. This separates the control commands from the read and write operations on the data. The data transfer chip in the network card moves the data, avoiding data transmission between the network card's processor and the controller. This effectively improves the efficiency of the application server's read and write operations on the disk array and shortens the time required for these operations.

[0109] Figure 6 This is a schematic diagram of the structure of a network interface card 600 provided in this embodiment. As shown in the figure, the network interface card 600 includes a processor 610, a data transmission chip 620, main memory 630, memory 640, a bus 650, and a communication interface 660.

[0110] It should be understood that in this embodiment, the processor 610 may be a central processing unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0111] The processor may also be a graphics processing unit (GPU), a neural network processing unit (NPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present application.

[0112] The data transmission chip 620 can be an application-specific integrated circuit (ASIC). For example, it can be a digital signal processor (DSP), one or more field-programmable gate arrays (FPGAs), a graphics processing unit (GPU), a neural network processing unit (NPU), or a direct memory access (DMA) controller. This embodiment does not limit the type of data transmission chip. The data transmission chip 620 is used to implement the data transmission methods described in the above embodiments, namely, reading data to be accessed from the controller and transmitting the data to be accessed to the application server; or, reading data to be written from the application server and writing the data to be written to the storage space managed by the controller.

[0113] Main memory 630 and storage memory 640 are used to store data related to this embodiment, such as addresses, lengths, LUNs, and LBAs as described in the above embodiments. Storage memory 640 can be a disk, such as a hard disk drive or a solid-state drive.

[0114] Bus 650 may include a pathway for transmitting information between the aforementioned components (such as processor 610, data transfer chip 620, main memory 630, and memory 640). In addition to a data bus, bus 650 may also include input / output buses, power buses, control buses, and status signal buses. However, for clarity, all buses are labeled as bus 650 in the figure. This embodiment does not limit the form of the bus; the bus may be a ring bus or a mesh bus, etc.

[0115] Communication interface 660 is used to enable communication between network interface card 600 and external devices or components. For example, network interface card 600 can communicate with the controller of an application server or storage array.

[0116] As an example, the network interface card 600 may include multiple processors. A processor may be a multi-core (multi-CPU) processor. Here, a processor can refer to one or more devices, circuits, and / or computing units used to process data (e.g., computer program instructions).

[0117] It is worth noting that, Figure 6 Taking the network card 600, which includes one processor 610 and one data transmission chip 620, as an example, the processor 610 and the data transmission chip 620 are used to indicate a type of device or equipment. In specific embodiments, the number of each type of device or equipment can be determined according to business requirements.

[0118] The network interface card 600 described above can be a general-purpose device or a special-purpose device. For example, the network interface card 600 can be an x86 or ARM-based server, or it can be other special-purpose servers, such as a policy control and charging (PCC) server. This application does not limit the type of network interface card 600.

[0119] It should be understood that the network card 600 according to this embodiment can correspond to Figure 2 The network interface card in the storage device 104 shown can correspond to the execution according to Figure 3 or Figure 5 The corresponding subject in any of the methods, and the other operations and / or functions of the network card 600 are respectively for the purpose of implementing Figure 3 or Figure 5 For the sake of brevity, the corresponding processes of each method in the code will not be elaborated here.

[0120] In the various embodiments of this application, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions of different embodiments are consistent and can be referenced by each other. The technical features of different embodiments can be combined to form new embodiments according to their inherent logical relationship.

[0121] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application. The order of the process numbers does not imply the order of execution; the execution order of each process should be determined by its function and internal logic. The terms "first," "second," and "third," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to limit a specific order.

[0122] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0123] In this application, "at least one" means one or more. "More than one" means two or more. "And / or" describes the relationship between the related objects, indicating that there can be three relationships. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. In the textual description of this application, the character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, for elements appearing in the singular forms "a", "an", and "the", unless the context explicitly specifies otherwise, it does not mean "one or only one", but rather "one or more one". For example, "a device" means one or more such devices. Moreover, "at least one of..." means one or any combination of the following related objects, such as "at least one of A, B, and C" including A, B, C, AB, AC, BC, or ABC.

Claims

1. A data transmission method applied to a network interface card (NIC) of a storage device, characterized in that, The network interface card includes a processor and a data transmission chip, and the method includes: The processor receives read commands from the application server; The processor determines a first controller in the storage device that processes the read command, and transmits the read command to the first controller; The data transmission chip receives a first instruction sent by the first controller, the first instruction being used to instruct the data transmission chip to read the data read by the first controller according to the read command from the memory of the first controller into the network card; The data transmission chip transmits the read data from the network card to the application server.

2. The method according to claim 1, characterized in that, The processor determines that the first controller in the storage device that processes the read command includes: The processor determines the first controller based on the Internet Protocol IP address of the first controller transmitted by the application server; Alternatively, the processor determines the first controller based on the logical unit number (LUN) and logical block address (LBA) in the read command.

3. The method according to claim 1 or 2, characterized in that, The method further includes: The processor receives write commands from the application server; The processor determines a second controller in the storage device that processes the write command, and transmits the write command to the second controller; The data transmission chip writes the data to be written, as indicated by the write command, into the memory of the second controller.

4. The method according to claim 3, characterized in that, The data transmission chip writes the data to be written indicated by the write command into the memory of the second controller, including: Receive a second instruction sent by the second controller, the second instruction being used to instruct the data to be written indicated by the write command to be written into the memory of the second controller; The data to be written from the application server is written into the memory of the second controller.

5. A network interface card (NIC), characterized in that, The network interface card includes: A processor is configured to receive a read command from an application server, determine a first controller in a storage device that processes the read command, and transmit the read command to the first controller; A data transmission chip is used to receive a first instruction sent by the first controller, the first instruction being used to instruct the data transmission chip to read the data read by the first controller according to the read command from the memory of the first controller into the network card; The data transmission chip is also used to transmit the read data from the network card to the application server.

6. The network interface card according to claim 5, characterized in that, When the processor determines the first controller in the storage device for processing the read command, it specifically performs the following functions: The first controller is determined based on the Internet Protocol IP address of the first controller transmitted by the application server; Alternatively, the first controller can be determined based on the logical unit number (LUN) and logical block address (LBA) in the read command.

7. The network interface card according to claim 5 or 6, characterized in that, The processor is further configured to receive a write command from the application server; the processor determines a second controller in the storage device that processes the write command, and transmits the write command to the second controller; The data transmission chip is also used to write the data to be written indicated by the write command into the memory of the second controller.

8. The network interface card according to claim 7, characterized in that, When the data transmission chip writes the data to be written indicated by the write command into the memory of the second controller, it is specifically used for: Receive a second instruction sent by the second controller, the second instruction being used to instruct the data to be written indicated by the write command to be written into the memory of the second controller; The data to be written from the application server is written into the memory of the second controller.

Citation Information

Patent Citations

  • Application data transmission method, device, application server and application proxy server

    CN107547623A

  • Data access method and device

    CN110419034A