Computing system, data processing method, offload card and storage medium
By introducing a programmable hardware unit into the programmable offload card for storage protocol conversion, the IO delay problem caused by CPU participation in the existing technology is solved, and hardware acceleration and access efficiency improvement of the network storage system are achieved.
Patent Information
- Application Number
- CN202211429480.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-15
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2042-11-15
AI Technical Summary
Existing network storage access based on hardware offload technology needs to rely on the CPU for storage protocol conversion, which increases IO latency and increases the access latency of the network storage system.
By introducing a programmable hardware unit into the programmable offload card, storage protocol conversion is performed directly at the hardware level, avoiding CPU involvement. The converted access request is sent using the network card, reducing the number of data copies and shortening the IO link path.
It achieves hardware acceleration for access to network storage systems, reduces IO latency, and improves access efficiency.
Smart Images

Figure CN115866082B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and in particular, relates to a computing system, a data processing method, an offload card and a storage medium. BACKGROUND
[0002] The network storage system is an online storage mode on the network, that is, data is stored on a server (such as a cloud server). The network storage generally has the advantages of elastic storage space, high capacity and high bandwidth, and gradually becomes the main data storage channel for people. A local computer needs to access the network storage system for data storage and reading.
[0003] In actual application, the hardware offload technology is often used to realize access acceleration of the network storage system. However, the existing network storage access based on the hardware offload technology needs to rely on the computing power of the central processing unit (CPU) of the offload card, and therefore needs to copy the direct memory access (DMA) of the memory data multiple times, which increases the transmission link of the network storage system access, and causes the input / output (IO) delay of the network storage system to increase. SUMMARY
[0004] Aspects of the present application provide a computing system, a data processing method, an offload card and a storage medium to realize access acceleration of the network storage system.
[0005] The embodiment of the present application provides a computing system, comprising: a host and a programmable offload card; the host and the programmable offload card are in communication connection; the programmable offload card comprises: a programmable hardware unit and a network card;
[0006] The host is configured to issue a first access request for accessing a network storage system to the programmable offload card; the first access request complies with a first storage protocol;
[0007] The programmable hardware unit is configured to convert the first access request from the first storage protocol into a second storage protocol supported by the network storage system to obtain a second access request; and send the second access request to the network storage system through the network card, so that the network storage system performs an access operation based on the second access request.
[0008] The embodiment of the present application also provides a data processing method, which is suitable for a programmable hardware unit in a programmable offload card; the programmable offload card is in communication connection with a host; and the method comprises:
[0009] Obtaining a first access request for accessing a network storage system, which is sent by the host to the programmable offload card; the first access request complies with a first storage protocol;
[0010] Converting the first access request from the first storage protocol to a second storage protocol supported by the network storage system to obtain a second access request;
[0011] The second access request is sent to the network storage system through the network card of the programmable offload card, so that the network storage system performs an access operation based on the second access request.
[0012] The embodiment of the present application further provides an offload card, comprising: a programmable hardware unit and a network card; the offload card is used to communicate with a host;
[0013] The programmable hardware unit is configured to obtain a first access request issued by the host for accessing the network storage system, wherein the first access request complies with a first storage protocol; and convert the first access request from the first storage protocol to a second storage protocol supported by the network storage system to obtain a second access request.
[0014] The network card is configured to send the second access request to the network storage system, so that the network storage system performs an access operation based on the second access request.
[0015] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, causes the one or more processors to execute the steps in the above-mentioned data processing method.
[0016] In an embodiment of the present application, the programmable hardware unit in the programmable offload card can perform storage protocol conversion on the obtained access request to obtain an access request that complies with the storage protocol supported by the network storage system. Subsequently, the access request that complies with the storage protocol supported by the network storage system can be sent to the network storage system via the network card in the programmable offload card, thereby achieving access to the network storage system. The entire network storage system access process offloads the storage protocol conversion process to the programmable hardware unit, allowing the protocol conversion process to be executed by hardware without the need for the CPU of the programmable offload card to participate. This shortens the IO link path, reduces the number of data copies, and achieves hardware acceleration of network storage system access. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 Schematic diagram of the access process of the network storage system provided by the traditional solution;
[0019] Figure 2 and Figure 3 A schematic diagram of the structure of a computing system provided in an embodiment of the present application;
[0020] Figure 4 A schematic diagram of the access process of the network storage system provided in an embodiment of the present application;
[0021] Figure 5 A schematic diagram of the structure of a disk storage array provided in an embodiment of the present application;
[0022] Figure 6 A flowchart of a data processing method provided in an embodiment of the present application;
[0023] Figure 7 A schematic diagram of the structure of the uninstall card provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0025] Network storage offers the advantages of flexible storage space, high capacity, and high bandwidth, and large amounts of data are generally stored in network storage systems. In the embodiments of the present application, the implementation of the network storage system is not limited. In some embodiments, the network storage system may include: cloud storage systems and other network storage systems. Cloud storage systems may be object storage service (OSS) systems or file storage systems, etc. Other network storage systems may be network attached storage (NAS) systems or storage area network (SAN) storage, etc. Network storage systems may be distributed storage systems or centralized storage systems.
[0026] When data is stored locally on the client and transferred to the network storage system, the host's virtual machine monitor (VMM) converts the standard block storage protocol issued by the virtual machine into a storage protocol supported by the network storage system, such as a proprietary distributed storage protocol. Standard block storage protocols include the Non-Volatile Memory Express (NVMe) protocol, the Virtual Input / Output-block (VirtIO-blk) protocol, or the Small Computer System Interface (SCSI) protocol.
[0027] In practical applications, hardware offload technology is often used to accelerate access to network storage systems. Figure 1 The process of storage protocol conversion based on hardware offloading provided by the traditional solution is exemplified.
[0028] like Figure 1 As shown, the data storage system may include: a host 10, a programmable offload card 20, and a network storage system 30. The programmable offload card 20 may be virtualized as a virtual block device of the host 10. The programmable offload card 20 may include: a programmable hardware unit 201, a CPU 202, and a network card 203. A DMA engine is deployed on the programmable hardware unit 201.
[0029] based on Figure 1 In the data storage system shown, the storage protocol conversion process based on hardware offload in the traditional solution mainly includes:
[0030] Step 1: The application program inside the virtual machine on the host 10 sends an IO request in accordance with the NVMe protocol to the virtual block device. The IO request carries the data to be stored. The data to be stored is the data to be stored in the network storage system 30.
[0031] Step 2: The DMA engine on the programmable offload card 20 copies the NVMe protocol IO request from the host 10 to the Storage Performance Development Kit (SPDK) of the CPU 202.
[0032] Step 3: The NVMe module in SPDK parses the NVMe protocol header from the I / O request and extracts the user data (Data Payload), which is the payload of the I / O request. The payload is the data to be stored.
[0033] Step 4: The user-defined storage module in SPDK can split the payload into multiple data chunks according to the striping rule. Then, a protocol header of the private storage protocol is added to each data chunk to obtain multiple IO requests encapsulated as the private storage protocol supported by the network storage system.
[0034] Step 5: The DMA engine in the programmable hardware unit 201 copies the multiple IO requests encapsulated as the private storage protocol from the user-defined storage module to the network card 203 and sends them to the remote network storage system 30 through the network card 203.
[0035] Step 6: The network storage system 30 can perform persistent storage on the data carried by the multiple IO requests.
[0036] In the above conventional hardware-based data storage process, the CPU 202 in the programmable offload card 20 needs to perform storage protocol conversion. Therefore, the IO requests need to be copied from the host memory to the SPDK (i.e., offload card memory) of the programmable offload card, and after the SPDK completes the storage protocol conversion, the IO requests after the storage protocol conversion need to be copied from the offload card memory to the buffer of the network card of the programmable offload card. The above conventional storage protocol conversion process needs the participation of the CPU on the programmable offload card, involves multiple DMA copying of memory data, increases the IO transmission link for accessing the network storage system, and causes the IO latency for accessing the network storage system to increase. Figure 1
[0037] In the embodiments of the present application, in order to achieve access acceleration of the network storage system, the programmable hardware unit in the programmable offload card can perform storage protocol conversion on the obtained access request to obtain an access request complying with the storage protocol supported by the network storage system, and then send the access request complying with the storage protocol supported by the network storage system to the network storage system through the network card in the programmable offload card to realize access to the network storage system. The entire network storage system access process offloads the storage protocol conversion process to the programmable hardware unit, so that the protocol conversion process is performed by hardware without the participation of the CPU of the programmable offload card, shortens the IO link path, reduces the number of data copying, and realizes hardware acceleration of network storage system access.
[0038] The technical solutions provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0039] It should be noted that the same reference numerals represent the same objects in the following drawings and embodiments, and therefore, once an object is defined in one drawing or embodiment, it does not need to be further discussed in subsequent drawings and embodiments.
[0040] Figure 2 and Figure 3 The structural schematic diagram of the computing system provided by the embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the computing system comprises a host 10 and a programmable offload card 20. Figure 2 and Figure 3 The host 10 and the programmable offload card 20 are connected through a bus 30.
[0041] In the embodiment, the host 10 refers to any computer device with computing, storage and communication functions. In the embodiment, the host can comprise general processing units, etc. (not shown). In the embodiment, the number of the general processing units is not limited. The general processing units can be at least one, i.e. one or more; each general processing unit can be a single-core processing unit or a multi-core processing unit. Figure 2 Figure 3 In the embodiment, the general processing units are generally processing chips arranged on the mainboard of the host 10, such as the CPU of the host, etc., and cannot realize single-machine expansion. The general processing units can be any processing device with computing capability. The general processing units can be serial processing units or parallel processing units. For example, the general processing units can be general processors, such as CPUs, etc. The parallel processing units refer to processing devices that can perform parallel computing processing. For example, the parallel processing units can be graphics processing units (GPU) or field-programmable gate arrays (FPGA), etc. Alternatively, the memory of the general processing units is greater than that of the parallel processing units.
[0042] The programmable offload card 20 mentioned above refers to any programmable hardware device or device with computing and communication functions. The programmable offload card 20 can comprise programmable hardware units 201 and a network card 203. The network card 203 refers to a computer hardware with network communication functions. In some embodiments, the programmable offload card 20 further comprises a CPU 202.
[0043] The programmable offload card 20 mentioned above refers to any programmable hardware device or device with computing and communication functions. The programmable offload card 20 can comprise programmable hardware units 201 and a network card 203. The network card 203 refers to a computer hardware with network communication functions. In some embodiments, the programmable offload card 20 further comprises a CPU 202.
[0044] The programmable hardware unit 201 refers to a hardware processor that processes data using a hardware description language (HDL). The hardware description language can be Very-High-Speed Integrated Circuit Hardware Description Language (VHDL), Verilog HDL, System Verilog, System C, or the like. The programmable hardware unit 201 can be an FPGA, a Programmable Array Logic (PAL), a General Array Logic (GAL), a Complex Programmable Logic Device (CPLD), or the like. Alternatively, the programmable hardware unit 201 can be an Application Specific Integrated Circuit (ASIC) or the like.
[0045] In this embodiment, the programmable offload card 20 is communicatively connected to the host 10, specifically, the programmable offload card 20 is communicatively connected to the general processing unit of the host 10. Specifically, the programmable offload card 20 and the host 10 can be communicatively connected through a bus interface. The bus interface can be a serial bus interface, such as a Peripheral Component Interconnect Express (PCIe) bus interface, a PCI bus interface, an Ultra Path Interconnect (UPI) bus interface, a USB serial interface, an RS485 interface, or an RS232 interface, or the like. Preferably, the bus interface is a PCIe interface, which can improve the data transmission rate between the programmable offload card 20 and the host 10.
[0046] The bus interface of the host 10 can be expanded according to the specifications of the host 10, and generally the communication interface of the host 10 is multiple. In this embodiment of the present application, “multiple” refers to more than one, i.e., two or more. When the programmable offload card 20 and the host 10 are communicatively connected through the bus interface, the programmable offload card 20 can be multiple, realizing the expansion of the programmable offload card 20.
[0047] In some embodiments, the programmable offload card 20 and the host 10 can be disposed in different physical machines, and the host 10 and the programmable offload card 20 can be communicatively connected through a network. For example, the host 10 and the programmable offload card can be disposed in different cloud servers and communicatively connected through a network; or the like. Figure 2 andFigure 3 Only the host 10 and the programmable offload card 20 are shown to be set on the same physical machine, but not limited thereto.
[0048] In the embodiment, in order to reduce the pressure on the general processing unit (such as CPU) of the host 10 and reduce the probability of the CPU reaching the throughput bottleneck, the host 10 can map the programmable offload card 20 as a block storage device of the host 10 by using the virtualization technology, which can also be referred to as a virtual block device; and offload the storage protocol of the host to the programmable offload card 20 through the mapped block storage device.
[0049] In the embodiment, the specific implementation form of the host 10 mapping the programmable offload card 20 as the block storage device of the host 10 by using the virtualization technology is not limited. In some embodiments, the host 10 can map the programmable offload card 20 as the block storage device of the host 10 by using the semi-virtualization technology. The semi-virtualization technology is compared with the full virtualization. In the full virtualization solution, the client virtual machine (VM) needs to use the underlying host resources, and needs the virtual machine monitor (VMM) to intercept all request instructions, and then simulate the behavior of the instructions, which will inevitably bring a lot of performance overhead. The semi-virtualization completes part of the unnecessary virtualization instructions through the hardware in an underlying hardware assisted manner, and the VMM only needs to complete part of the virtualization of the instructions. To do this, the client needs to cooperate, the client completes the front-end driver of different devices, and the VMM cooperates with the client to complete the corresponding back-end driver. In this way, the two can realize an efficient virtualization process through some interaction mechanism. In the embodiment, the virtualized client mainly refers to mapping the programmable offload card 20 as the block storage device of the host 10.
[0050] In some embodiments, the paravirtualization technology can be VirtIO technology. VirtIO is an I / O paravirtualization solution, a lubricant for communication between a guest and a host, and provides a common framework and standard interface or protocol for interaction between the two, greatly solving the adaptation problem between various drivers and different virtualization solutions. VirtIO technology provides a communication framework and programming interface between upper-layer applications and various VMM virtualization devices (such as Kernel based Virtual Machine (KVM), Xen, Vmware, etc.). In general, VirtIO can be divided into four layers, including various driver modules in the front-end guest, handler modules on the back-end VMM, VirtIO layer and VirtIORing layer for front-end and back-end communication, VirtIO layer implements a virtual queue interface and can be regarded as a bridge for front-end and back-end communication, and VirtIORing layer is a specific implementation of the bridge, which implements two ring buffers for storing information executed by the front-end driver and the back-end handler, respectively.
[0051] Based on the principle of the above-mentioned paravirtualization technology, the host 10 can initialize the programmable offload card 20, and in the process of initializing the programmable offload card 20, configure the identity of the programmable offload card 20 to map the programmable offload card 20 as a virtual block device on the bus of the host 10. The identity of the programmable offload card 20 refers to an identity that uniquely identifies a virtual block device on the bus of a host 10. For embodiments in which the programmable offload card 20 is connected to the bus of the host 10 through a PCIe bus interface and communicates with the host 10, the identity of the programmable offload card 20 can be represented by a bus number (Bus Number), a device number (Device Number), and a function number (Function Number) (referred to as BDF).
[0052] The BDF is a unique identifier for each function of a PCIe device. Each PCIe device can have only one function or multiple functions, and can have up to 8 functions at most. No matter how many functions a PCIe device has, each function has a unique and independent configuration space. The host 10 can obtain some information of the PCIe device through this space, and can also configure the PCIe device through this space, which is called the PCIe configuration space. The PCIe configuration software (such as the PCIe root complex) can identify the topology logic of the PCIe bus system, as well as each bus, each PCIe device, and each function of the PCIe device, i.e., can identify the BDF.
[0053] In the embodiment of the present application, in order to map the programmable offload card 20 as the block storage device of the host 10, the host 10 can configure the function number in the identity of the programmable offload card 20 to include the identity of the storage medium and the network card. For the host 10 to identify the PCIe device, the PCIe device also needs to be enumerated. The PCIe architecture generally includes a root complex, a switch and various PCIe devices. Among them, the PCIe device is the endpoint of the PCIe architecture. For so many devices, after the CPU of the host 10 starts, it needs to enumerate the PCIe device to identify these devices. The root complex usually uses a specific algorithm, such as a depth-first algorithm, to access each possible branch path until it cannot be accessed any further, and each PCIe device is accessed only once. This process is called PCIe device enumeration.
[0054] In the embodiment, for the host 10, the identity of the data processing device can be obtained from the register of the virtual block device in the device enumeration process, and it is determined that the function of the virtual block device is a storage medium and a network card. Further, the host 10 can install a virtual block device driver corresponding to the function of the virtual block device. In this way, for the host 10, the programmable offload card 20 is a storage medium of the host 10, that is, the programmable offload card 20 is mapped as a block storage device of the host 10. Among them, for the VirtIO technology, the virtual block device driver can be a VirtIO-blk driver.
[0055] In the embodiment of the present application, the host 10 and the network storage system 30 are connected by a network. Among them, the host 10 and the network storage system 30 can be connected by a wireless or wired network. Alternatively, the host 10 and the network storage system 30 can be connected by a mobile network communication, and correspondingly, the network standard of the mobile network can be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ (LTE+), 5G, WiMax, etc. In some embodiments, the host 10 and the network storage system 30 can also be connected by a private network, such as a virtual private network (VPN), a virtual private cloud (VPC) network, etc.
[0056] Of course, the programmable offload card 20 and the network storage system 30 can also be connected by a network. The network connection mode can refer to the network connection mode between the host 10 and the network storage system 30 described above, which will not be described here.
[0057] In the embodiment of the present application, the host 10 can offload the processing of the access request to the network storage system 30 to the programmable offload card 20. The access request of the host 10 to the network storage system 30 can be a read request, or a write request, of course, can also be a data definition language (DDL) operation request, and the like.
[0058] In the embodiment, the programmable offload card 20 is virtualized as a block storage device of the host 10, and the communication between the host 10 and the block storage device can follow a general storage protocol, which is defined as a first storage protocol. The storage protocol refers to the protocol for communication between the host and the storage medium. The first storage protocol can be an NVMe protocol, a Virtio-blk protocol, or a SCSI protocol, and the like. Figure 2 And Figure 3 Only taking the first storage protocol as the NVMe protocol as an example for illustration.
[0059] In actual application, the storage protocol supported by the network storage system 30 is generally a private storage protocol independently developed by the manufacturer of the network storage system 30, which is different from the general storage protocol. In the embodiment of the present application, in order to facilitate description and differentiation, the storage protocol supported by the network storage system 30 can be defined as a second storage protocol. The second storage protocol is different from the first storage protocol.
[0060] Since the second storage protocol is different from the first storage protocol, in order to realize the access of the host 10 to the network storage system 30, it is necessary to convert the access request following the first storage protocol into the second storage protocol. When the host 10 accesses the network storage system 30, the host 10 can issue an access request for accessing the network storage system 30 to the programmable offload card 20. The access request can be a read request, a write request, or a DDL request. Specifically, as shown in Figure 3 The DMA engine in the programmable offload card 20 can copy the access request from the host 10 to the programmable hardware unit 201.
[0061] In the embodiment of the present application, in order to shorten the IO link of the host 10 to the network storage system 30, and realize the access acceleration of the network storage system, as shown in Figure 2 And Figure 3As shown, the programmable hardware unit 201 in the programmable offload card 20 can convert an access request from a first storage protocol to a second storage protocol supported by the network storage system 30. In this embodiment of the present application, for ease of description and distinction, an access request issued by the host 10 that complies with the first storage protocol is defined as a first access request, and an access request that complies with the second storage protocol that is converted from the first access request is defined as a second access request. The first and second access requests have different storage protocol headers, but may have the same payload.
[0062] Further, if Figure 2 and Figure 3 As shown, the programmable hardware unit 201 may send the second access request to the network storage system 30 through the network card 203. The network storage system 30 may perform an access operation based on the second access request.
[0063] In this embodiment, the programmable hardware unit in the programmable offload card can perform storage protocol conversion on the obtained access request, obtaining an access request that complies with the storage protocol supported by the network storage system. The access request that complies with the storage protocol supported by the network storage system can then be sent to the network storage system via the network card in the programmable offload card, thereby enabling access to the network storage system. The entire network storage system access process offloads the storage protocol conversion process to the programmable hardware unit, allowing the protocol conversion process to be executed by hardware without the need for the programmable offload card's CPU. This shortens the IO link path, reduces the number of data copies, and achieves hardware acceleration for network storage system access.
[0064] On the other hand, the programmable hardware unit uses dedicated data processing long instructions to implement protocol conversion of access requests, which has higher data processing efficiency than CPU short instructions. Therefore, using programmable hardware units to perform protocol conversion of access requests can improve the efficiency of storage protocol conversion and further improve the access speed to network storage systems.
[0065] In the embodiments of this application, Figure 4 As shown, the programmable hardware unit 201 may include a storage protocol processing module 20a written in a hardware description language. The storage protocol processing module 20a may be composed of storage protocol processing primitives.
[0066] In some embodiments, as Figure 4 As shown, the computing system may further include a CPU. The CPU may be provided in the host or in the programmable offload card 20. The CPU of the programmable offload card 20 is CPU 202; the CPU of the host 10 is CPU 101, i.e., a general-purpose processor of the host 10.
[0067] The storage protocol processing module 20a can provide programmable capability of storage protocol conversion. The CPU runs a development system of programmable hardware unit. The user can write storage protocol processing primitives through the corresponding development system of the programmable hardware unit 201, and burn the storage protocol processing primitives into the programmable hardware unit 201 to obtain the storage protocol processing module 20a. That is, the CPU can include a custom logic module (Code Logic) which can provide programmable interface and custom logic capability for the developer to realize customization of the conversion function of the custom storage protocol. Accordingly, the CPU can burn the storage protocol processing primitives written by the development system into the programmable hardware unit 201 in response to the burning operation of the development system to obtain the storage protocol processing module 20a. The user can realize hardware offloading of the custom storage protocol through the development system.
[0068] In the embodiments of the present application, the specific functions of the storage protocol processing primitives are not limited. In some embodiments, as shown in Figure 4 The storage protocol processing primitives can include a parsing (Parse) module 20a1, a protocol conversion module 20a2 and a sending (Forward) module 20a3. The parsing module 20a1, the protocol conversion module 20a2 and the sending module 20a3 are electrically connected. The parsing (Parse) module 20a1, the protocol conversion module 20a2 and the sending (Forward) module 20a3 are all protocol processing primitives written in hardware description language. Among them, the matching module 20a11 is used for automatically matching the protocol header of the first storage protocol. The parsing module 20a1 is used for parsing the payload from the access request complying with the first storage protocol. The payload is the user data carried by the access request. The protocol conversion module 20a2 can encapsulate the payload according to the protocol header of the second storage protocol supported by the network storage system 30 to realize storage protocol conversion. The sending module 20a3 is used for sending the access request complying with the second storage protocol to the network storage system through the network card 203.
[0069] Based on the above storage protocol processing primitives, in the embodiments, the parsing module 20a1 can perform protocol parsing on the first access request complying with the first storage protocol to obtain the payload of the first access request. The parsing module 20a1 can transmit the payload of the first access request to the protocol conversion module 20a2.
[0070] In some embodiments, as shown in Figure 4As shown, the parsing module 20a1 can include a matching module 20a11 and an extracting module 20a12. The matching module 20a11 is configured to automatically match the protocol header of the first storage protocol. The extracting module 20a12 is configured to extract the payload from the access request complying with the first storage protocol. The matching module 20a11 and the extracting module 20a12 are electrically connected, and the extracting module 20a12 is electrically connected with the protocol conversion module 20a2. The matching module 20a11 and the extracting module 20a12 are both protocol processing primitives written in hardware description language.
[0071] Accordingly, the matching module 20a11 can extract the protocol header of the first access request from the first access request according to the protocol header parameters of the first storage protocol. The protocol header parameters of the first storage protocol can include metadata information describing the payload. The metadata information of the payload can include the data length, data type, and offset address of the payload, etc. The matching module 20a11 can output the protocol header of the first access request to the extracting module 20a12.
[0072] Further, the extracting module 20a12 can extract the payload of the first access request from the first access request according to the metadata of the payload recorded by the protocol header of the first access request. Specifically, the extracting module 20a12 can extract the payload of the first access request from the first access request according to the offset address and data length of the payload.
[0073] Further, the extracting module 20a12 can output the payload to the protocol conversion module 20a2. Accordingly, the protocol conversion module 20a2 can encapsulate the payload according to the protocol header of the second storage protocol to obtain the second access request complying with the second storage protocol.
[0074] In some embodiments, the network storage system 30 is a centralized storage system. Accordingly, the protocol header of the second storage protocol can include the Internet Protocol (IP) address of the computing node in the centralized storage system, etc. Accordingly, the protocol conversion module 20a2 encapsulates the payload with the IP address of the storage node in the centralized storage system as the protocol header to obtain the second access request complying with the second storage protocol. Further, the protocol conversion module 20a3 can transmit the second access request to the sending module 20a3. The sending module 20a3 can send the second access request to the network card 203, which sends the second access request to the corresponding target storage node in the centralized storage system according to the IP address of the storage node. The target storage node can perform an access operation based on the second access request.
[0075] In some embodiments, the access request is a write request, and the payload is the data to be stored. Accordingly, the target storage node may obtain the data to be stored from the second access request, and write the data to be stored into the network storage system.
[0076] In other embodiments, the access request is a read request, and the payload may include an identifier of the data to be read, such as an offset address and data length of the data to be stored. Accordingly, the target storage node may read the data to be read based on the identifier of the data to be read.
[0077] Optionally, the network storage system 30 may also be a distributed storage system. Figure 4 As shown, the programmable hardware unit 201 can maintain a segment information table. The segment information table records stripe rule information. Stripe rule information refers to information describing the storage rules for data blocks in the distributed storage system. It may include: data block size, number of stripe groups, and the correspondence between stripe groups and storage nodes in the distributed storage system.
[0078] Striping is a method of dividing continuous data into multiple data blocks of the same size and writing the multiple data blocks to different disks in the array. A stripe group refers to a combination of data blocks stored on the same disk. Figure 5 As shown in the figure, assuming that the disk array consists of disks D0-D3, the data blocks stored on the same disk form a stripe group. For example, data block 0, data block 4, and data block 8 form stripe group 0. The number of stripe groups can be determined by the number of storage nodes in the distributed storage system.
[0079] In the above correspondence between stripe groups and storage nodes in the distributed storage system, a storage node can be represented by its IP address, and a stripe group can be represented by a stripe group identifier. The stripe group identifier can be the stripe group number, or the stripe group identifier can be represented by the offset address and data length of each data block in the stripe group.
[0080] In the embodiments of this application, Figure 4 As shown, users can also customize the stripe information table through the development system of the programmable hardware unit running on the CPU. The CPU is equipped with a custom stripe rule module (Segment Information), which provides the ability to customize stripe rules. Accordingly, the CPU can save the customized stripe rule information to the stripe rule table in response to the programming operation of the custom stripe rule module in the development system.
[0081] Based on the above strip information table, for a write request, the payload is the data to be stored. Accordingly, the protocol conversion module 20a2 can query the strip information table to obtain the strip rule information. Further, the protocol conversion module 20a2 can split the data to be stored into a plurality of data blocks according to the data block size and the number of strip groups in the strip rule information. The size of each data block is the data block size in the strip rule information.
[0082] Further, the protocol conversion module 20a2 can also determine the target storage nodes of the plurality of data blocks according to the correspondence between the strip groups and the storage nodes in the strip rule information. Further, the protocol conversion module 20a2 encapsulates each data block with the address information of the target storage node of the data block, the data block size, and the strip group information of the data block as the protocol header of the second storage protocol, to obtain a second access request corresponding to the data block. The number of second access requests is the same as the number of data blocks. The strip group information of the data block indicates which strip group the data block belongs to. The address information of the target storage node can be the IP address of the target storage node, etc. For example, Figure 4 The IP address of the target storage node of strip group 1 is XX.XXX.XX.34, etc.
[0083] Further, the protocol conversion module 20a2 can transmit the plurality of second access requests to the sending module 20a3. For any second access request A, the sending module 20a3 can send the second access request A to the target storage node corresponding to the address information of the target storage node of the second access request A through the network card 203 according to the address information of the target storage node of the second access request A. Accordingly, the target storage node can obtain the data block encapsulated by the second access request A from the second access request A and store the data block to the target storage node.
[0084] In some other embodiments, the access request is a read request. Accordingly, the payload of the read request is the identifier of the data to be read. Alternatively, the identifier of the data to be read can be the offset address and the data length of the data to be read. Based on the above correspondence between the strip groups and the storage nodes, the protocol conversion module 20a2 can query the correspondence between the strip groups and the storage nodes using the identifier of the data to be read to determine the target storage node of the data to be read. Alternatively, the protocol conversion module 20a2 can match the strip group identifier in the correspondence between the strip groups and the storage nodes using the offset address and the data length of the data to be read to determine the target storage node where the data to be read is located. The target storage node where the data to be read is located can be one or more. More than two means two or more.
[0085] Further, the protocol conversion module 20a2 can encapsulate the identifiers of the data to be read located at the same target storage node into the same second access request according to the protocol header of the second storage protocol, to obtain at least one second access request. The number of the second access requests is determined by the number of the target storage nodes where the data to be read is located.
[0086] Optionally, for the identifiers of the data to be read located at the same target storage node, the address information (such as IP address) of the same target storage node can be taken as the protocol header of the second storage protocol, and the identifiers of the data blocks to be read located at the same target storage node can be encapsulated into the same second access request, to obtain at least one second access request.
[0087] Further, the protocol conversion module 20a2 can transmit the at least one second access request to the sending module 20a3. For any second access request A, the sending module 20a3 can send the second access request A to the target storage node corresponding to the address information encapsulated in the protocol header of the second access request A. Accordingly, the target storage node can read the data blocks corresponding to the identifiers of the data to be read carried by the second access request A based on the second access request A.
[0088] Further, the target storage node can also encapsulate the read data blocks into a data packet according to the second storage protocol. The data packet complies with the storage protocol supported by the network storage system 30. Further, the target storage node can return the data packet to the network card 203.
[0089] The DMA engine in the programmable offload card 20 can copy the data packet from the network card 203 to the programmable hardware unit 201. The sending module 20a3 of the programmable hardware unit 201 can transmit the data packet to the matching module 20a11. The matching module 20a11 can obtain the protocol header of the data packet from the second storage protocol according to the protocol header parameter of the second storage protocol, and transmit the protocol header of the data packet to the extraction module 20a12. The extraction module 20a12 can obtain the payload from the data packet according to the metadata of the payload contained in the protocol header of the data packet. The payload can be the data to be read.
[0090] Further, the extraction module 20a12 can transmit the payload of the data packet to the protocol conversion module 20a2. Accordingly, the protocol conversion module 20a2 can encapsulate the data to be read according to the protocol header of the first storage protocol, to obtain a data packet complying with the first storage protocol.
[0091] Further, the DMA engine can upload the data packet complying with the first storage protocol to the host 10. The host 10 can obtain the data to be read from the data packet complying with the first storage protocol, to realize the reading of the data in the network storage system.
[0092] The above embodiment takes the write request processing process and the read request processing process of the network storage system as an example to illustrate the processing method of the access request provided by the embodiment of the present application. The above embodiment realizes the free conversion between the general storage protocol and the private storage protocol supported by the network storage system through the hardware in-line computing technology. The access process of the entire network storage system offloads the storage protocol conversion process to the programmable hardware unit, so that the protocol conversion process is executed by hardware without the CPU participation of the programmable offload card, shortening the IO link path, reducing the number of data copies, and realizing hardware acceleration of network storage system access.
[0093] In addition to the computing system provided in the above embodiments, the embodiments of the present application also provide a corresponding data processing method. The data processing method provided in the embodiments of the present application is exemplarily described below.
[0094] Figure 6 Schematic diagram of the data processing method provided in the embodiment of the present application. Figure 6 As shown, the data processing method mainly includes:
[0095] 601. Obtain a first access request sent by a host to a programmable offload card for accessing a network storage system; the first access request complies with a first storage protocol.
[0096] 602. Convert the first access request from the first storage protocol to a second storage protocol supported by the network storage system to obtain a second access request.
[0097] 603. Send the second access request to the network storage system through the network card of the programmable offload card, so that the network storage system performs an access operation based on the second access request.
[0098] The data processing method provided in the embodiment of the present application can be applied to a programmable hardware unit in a programmable offload card. The programmable offload card is communicatively connected to a host.
[0099] In this embodiment, the programmable offload card is virtualized as a block storage device of the host, and the communication between the host and the block storage device can follow a common storage protocol, which is defined as a first storage protocol. The first storage protocol can be NVMe protocol, Virtio-blk protocol, or SCSI protocol.
[0100] In actual applications, the storage protocol supported by the network storage system is different from the general storage protocol. In the embodiments of the present application, for ease of description and distinction, the storage protocol supported by the network storage system can be defined as a second storage protocol. The second storage protocol is different from the first storage protocol.
[0101] Because the second storage protocol differs from the first storage protocol, in order for the host to access the network storage system, it is necessary to convert access requests that follow the first storage protocol into the second storage protocol. When the host accesses the network storage system, it can send an access request to the programmable offload card. This access request can be a read request, a write request, or a Data Descriptor (DDL) request.
[0102] In an embodiment of the present application, in order to shorten the IO link for the host to access the network storage system and realize access acceleration of the network storage system, in step 601, the programmable hardware unit in the programmable offload card can obtain the first access request issued by the host for accessing the network storage system. The first access request follows the first storage protocol. Then, in step 602, the access request can be converted from the first storage protocol to the second storage protocol supported by the network storage system. In an embodiment of the present application, for the convenience of description and distinction, the access request issued by the host that follows the first storage protocol is defined as the first access request; and the access request that follows the second storage protocol that is converted from the first access request is defined as the second access request. Among them, the storage protocol headers of the first access request and the second access request are different, and the payload (Payload) can be the same.
[0103] Furthermore, in step 603, the second access request may be sent to the network storage system via the network card. The network storage system may perform an access operation based on the second access request.
[0104] In this embodiment, the programmable hardware unit in the programmable offload card can perform storage protocol conversion on the obtained access request, obtaining an access request that complies with the storage protocol supported by the network storage system. The access request that complies with the storage protocol supported by the network storage system can then be sent to the network storage system via the network card in the programmable offload card, thereby enabling access to the network storage system. The entire network storage system access process offloads the storage protocol conversion process to the programmable hardware unit, allowing the protocol conversion process to be executed by hardware without the need for the programmable offload card's CPU. This shortens the IO link path, reduces the number of data copies, and achieves hardware acceleration for network storage system access.
[0105] On the other hand, the programmable hardware unit uses dedicated data processing long instructions to implement protocol conversion of access requests, which has higher data processing efficiency than CPU short instructions. Therefore, using programmable hardware units to perform protocol conversion of access requests can improve the efficiency of storage protocol conversion and further improve the access speed to network storage systems.
[0106] In some embodiments, the programmable hardware unit can perform protocol parsing on the first access request to obtain the payload of the first access request; thereafter, the payload can be encapsulated according to the protocol header of the second storage protocol to obtain a second access request that complies with the second storage protocol.
[0107] Optionally, the programmable hardware unit may extract the protocol header of the first access request from the first access request based on the protocol header parameters of the first storage protocol; and extract the payload of the first access request from the first access request based on the metadata of the payload recorded in the protocol header of the first access request.
[0108] In some embodiments, the network storage system is a centralized storage system. Accordingly, the protocol header of the second storage protocol may include, for example, the IP address of a computing node in the centralized storage system. Accordingly, the payload is encapsulated using the IP address of a storage node in the centralized storage system as the protocol header to generate a second access request that complies with the second storage protocol. Furthermore, the second access request may be sent via a network interface card to a corresponding target storage node in the centralized storage system. The target storage node may perform an access operation based on the second access request.
[0109] In some embodiments, the access request is a write request, and the payload is the data to be stored. Accordingly, the target storage node may obtain the data to be stored from the second access request, and write the data to be stored into the network storage system.
[0110] In other embodiments, the access request is a read request, and the payload may include an identifier of the data to be read, such as an offset address and data length of the data to be stored. Accordingly, the target storage node may read the data to be read based on the identifier of the data to be read.
[0111] Optionally, the network storage system can also be a distributed storage system. The programmable hardware unit can maintain a segment information table. The segment information table records stripe rule information. Stripe rule information describes the storage rules for data blocks in the distributed storage system and may include: data block size, number of stripe groups, and the correspondence between stripe groups and storage nodes in the distributed storage system.
[0112] Based on the stripe information table, for write requests, the payload is the data to be stored. Accordingly, the stripe information table can be queried to obtain stripe rule information. Furthermore, the data to be stored can be divided into multiple data blocks based on the data block size and number of stripe groups specified in the stripe rule information. The size of each data block is the data block size specified in the stripe rule information.
[0113] Furthermore, the target storage nodes of multiple data blocks can be determined based on the correspondence between the stripe groups and storage nodes in the stripe rule information. Furthermore, the address information of the target storage node of each data block, the data block size, and the stripe group information of the data block are used as the protocol header of the second storage protocol to encapsulate the data block to obtain a second access request corresponding to the data block. The number of second access requests is the same as the number of data blocks. The stripe group information of the data block indicates to which stripe group the data block belongs. The address information of the target storage node can be the IP address of the target storage node, etc.
[0114] Furthermore, for any second access request A, the network card can be used to send the second access request A to the target storage node corresponding to the address information of the target storage node of the second access request A. Accordingly, the target storage node can obtain the data block encapsulated in the second access request A from the second access request A and store the data block in the target storage node.
[0115] In other embodiments, the access request is a read request. Accordingly, the payload of the read request is an identifier of the data to be read. Optionally, the identifier of the data to be read may be an offset address and a data length of the data to be read. Based on the above-mentioned correspondence between the stripe group and the storage node, the identifier of the data to be read may be used to query the correspondence between the stripe group and the storage node to determine the target storage node of the data to be read. Optionally, the offset address and the data length of the data to be read may be used to match the stripe group identifier in the correspondence between the stripe group and the storage node to determine the target storage node where the data to be read is located. The target storage node where the data to be read is located may be one or more. Multiple refers to two or more.
[0116] Furthermore, according to the protocol header of the second storage protocol, the identifier of the data to be read located at the same target storage node can be encapsulated into the same second access request to obtain at least one second access request. The number of second access requests is determined by the number of target storage nodes where the data to be read is located.
[0117] Optionally, for the identification of the data to be read located at the same target storage node, the address information (such as the IP address) of the above-mentioned same target storage node can be used as the protocol header of the second storage protocol, and the identification of the data block to be read located at the same target storage node can be encapsulated into the same second access request to obtain at least one second access request.
[0118] Furthermore, any second access request A can be sent to a target storage node corresponding to the address information encapsulated in the protocol header of the second access request A. Accordingly, the target storage node can read the data block corresponding to the identifier of the data to be read carried in the second access request A based on the second access request A.
[0119] Furthermore, the target storage node may encapsulate the read data block into a data packet according to the second storage protocol. The data packet complies with the storage protocol supported by the network storage system. Furthermore, the target storage node may return the data packet to the network card.
[0120] The DMA engine in the programmable offload card can copy the data packet from the network card to the programmable hardware unit. The programmable hardware unit can obtain the protocol header of the data packet from the second storage protocol based on the protocol header parameters of the second storage protocol; and obtain the payload from the data packet based on the payload metadata contained in the protocol header of the data packet. The payload can be the data to be read.
[0121] Furthermore, the data to be read may be encapsulated according to the protocol header of the first storage protocol to obtain a data packet complying with the first storage protocol.
[0122] Furthermore, the data packet complying with the first storage protocol may be uploaded to the host, and the host may obtain the data to be read from the data packet complying with the first storage protocol, thereby realizing reading of the data in the network storage system.
[0123] The above embodiment takes the write request processing process and the read request processing process of the network storage system as an example to illustrate the processing method of the access request provided by the embodiment of the present application. The above embodiment realizes the free conversion between the general storage protocol and the private storage protocol supported by the network storage system through the hardware in-line computing technology. The access process of the entire network storage system offloads the storage protocol conversion process to the programmable hardware unit, so that the protocol conversion process is executed by hardware without the CPU participation of the programmable offload card, shortening the IO link path, reducing the number of data copies, and realizing hardware acceleration of network storage system access.
[0124] It should be noted that the execution entity of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution entity of steps 601 and 602 can be device A; for another example, the execution entity of step 601 can be device A, and the execution entity of step 602 can be device B; and so on.
[0125] In addition, some of the processes described in the above embodiments and the accompanying drawings include multiple operations that appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel. The sequence numbers of the operations, such as 601, 602, etc., are merely used to distinguish between different operations and do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel.
[0126] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, causes the one or more processors to execute the steps in the above-mentioned data processing method.
[0127] Figure 7 This is a schematic diagram of the structure of the uninstall card provided in the embodiment of the present application. Figure 7 As shown, the offload card S70 includes: a programmable hardware unit 70 and a network card 80; the offload card S70 is used for communication connection with the host.
[0128] In this embodiment, the programmable hardware unit 70 can obtain a first access request issued by the host for accessing the network storage system; the first access request follows a first storage protocol; and convert the first access request from the first storage protocol to a second storage protocol supported by the network storage system to obtain a second access request.
[0129] The network card 80 may send the second access request to the network storage system, so that the network storage system performs an access operation based on the second access request.
[0130] In the embodiments of this application, Figure 4 As shown, the programmable hardware unit 70 may include a storage protocol processing module 70a written in a hardware description language. The storage protocol processing module 70a may be composed of storage protocol processing primitives.
[0131] In some embodiments, as Figure 7 As shown, the programmable hardware unit may also include a CPU 90. A storage protocol processing module 70a provides programmable storage protocol conversion capabilities. The CPU 90 runs a development system associated with the programmable hardware unit. Users can use the development system corresponding to the programmable hardware unit 70 to write storage protocol processing primitives and burn these into the programmable hardware unit 70 to obtain the storage protocol processing module 70a. Accordingly, the CPU 90 can respond to the burning operation of the development system and burn the storage protocol processing primitives written using the development system into the programmable hardware unit 70 to obtain the storage protocol processing module 70a. Users can implement hardware offload of customized storage protocols through the development system.
[0132] In the embodiments of the present application, the specific functions of the storage protocol processing primitives are not limited. Figure 7 As shown, the storage protocol processing primitive may include: a parsing module 70a1, a protocol conversion module 70a2 and a forwarding module 70a3. The parsing module 70a1, the protocol conversion module 70a2 and the forwarding module 70a3 are electrically connected.
[0133] Accordingly, the parsing module 70a1 may perform protocol parsing on the first access request to obtain a payload of the first access request; and output the payload of the first access request to the protocol conversion module 70a2.
[0134] In some embodiments, the parsing module 70a1 may include a matching module 70a11 and an extraction module 70a12. The matching module 70a11 is electrically connected to the extraction module 70a12; and the extraction module 70a12 is electrically connected to the protocol conversion module 70a2.
[0135] Based on the aforementioned storage protocol processing primitives, in this embodiment, the matching module 70a11 can extract the protocol header of the first access request from the first access request based on the protocol header parameters of the first storage protocol. The protocol header parameters of the first storage protocol may include metadata describing the payload. The payload metadata may include the payload's data length, data type, and payload offset address. The matching module 70a11 can output the protocol header of the first access request to the extraction module 70a12.
[0136] Furthermore, the extraction module 70a12 may extract the payload of the first access request from the first access request based on the payload metadata recorded in the protocol header of the first access request. Specifically, the extraction module 70a12 may extract the payload of the first access request from the first access request based on the offset address and data length of the payload.
[0137] Furthermore, the extraction module 70a12 may output the payload to the protocol conversion module 70a2. Accordingly, the protocol conversion module 70a2 may encapsulate the payload according to the protocol header of the second storage protocol to obtain a second access request that complies with the second storage protocol.
[0138] In some embodiments, the network storage system is a centralized storage system. Accordingly, the protocol header of the second storage protocol may include, for example, the IP address of the computing node in the centralized storage system. Accordingly, the protocol conversion module 70a2 encapsulates the payload using the IP address of the storage node in the centralized storage system as the protocol header to obtain a second access request that complies with the second storage protocol. Further, the protocol conversion module 70a2 may transmit the second access request to the sending module 70a3. The sending module 70a3 may send the second access request to the network card 80. The network card 80 may send the second access request to the corresponding target storage node in the centralized storage system based on the IP address of the storage node. The target storage node may perform an access operation based on the second access request.
[0139] In some embodiments, the access request is a write request, and the payload is the data to be stored. Accordingly, the target storage node may obtain the data to be stored from the second access request, and write the data to be stored into the network storage system.
[0140] In other embodiments, the access request is a read request, and the payload may include an identifier of the data to be read, such as an offset address and data length of the data to be stored. Accordingly, the target storage node may read the data to be read based on the identifier of the data to be read.
[0141] Optionally, the network storage system can also be a distributed storage system. Figure 7 As shown, the programmable hardware unit 70 can maintain a segment information table. The segment information table records stripe rule information. Stripe rule information refers to information describing the storage rules for data blocks in the distributed storage system. It may include: data block size, the number of stripe groups, and the correspondence between stripe groups and storage nodes in the distributed storage system.
[0142] In the embodiments of this application, Figure 7 As shown, users can also customize the stripe information table through the development system of the programmable hardware unit running on the CPU. The CPU is equipped with a custom stripe rule module (Segment Information), which provides the ability to customize stripe rules. Accordingly, CPU 90 can save the customized stripe rule information to the stripe rule table in response to the programming operation of the custom stripe rule module in the development system.
[0143] Based on the stripe information table, for a write request, the payload is the data to be stored. Accordingly, protocol conversion module 70a2 can query the stripe information table to obtain stripe rule information. Furthermore, protocol conversion module 70a2 can divide the data to be stored into multiple data blocks based on the data block size and number of stripe groups in the stripe rule information. The size of each data block is the data block size specified in the stripe rule information.
[0144] Furthermore, the protocol conversion module 70a2 can also determine the target storage nodes for the multiple data blocks based on the correspondence between the stripe groups and storage nodes in the stripe rule information. Furthermore, the protocol conversion module 70a2 uses the address information of the target storage node for each data block, the data block size, and the stripe group information for the data block as a protocol header of the second storage protocol to encapsulate the data block to obtain a second access request corresponding to the data block. The number of second access requests is the same as the number of data blocks.
[0145] Furthermore, protocol conversion module 70a2 can transmit multiple second access requests to sending module 70a3. For any second access request A, sending module 70a3 can, based on the address information of the target storage node of second access request A, send the second access request A to the target storage node corresponding to the address information via network card 80. Accordingly, the target storage node can obtain the data block encapsulated in the second access request A from the second access request A and store the data block in the target storage node.
[0146] In other embodiments, the access request is a read request. Accordingly, the payload of the read request is the identifier of the data to be read. Optionally, the identifier of the data to be read may be the offset address and data length of the data to be read. Based on the above-mentioned correspondence between the stripe group and the storage node, the protocol conversion module 70a2 may use the identifier of the data to be read to query the correspondence between the stripe group and the storage node to determine the target storage node of the data to be read. Optionally, the protocol conversion module 70a2 uses the offset address and data length of the data to be read to match the stripe group identifier in the correspondence between the stripe group and the storage node to determine the target storage node where the data to be read is located. Among them, the target storage node where the data to be read is located may be one or more. Multiple refers to two or more.
[0147] Furthermore, the protocol conversion module 70a2 can encapsulate the identifier of the to-be-read data located at the same target storage node into the same second access request according to the protocol header of the second storage protocol, thereby obtaining at least one second access request. The number of second access requests is determined by the number of target storage nodes where the to-be-read data is located.
[0148] Optionally, for the identification of the data to be read located at the same target storage node, the address information (such as the IP address) of the above-mentioned same target storage node can be used as the protocol header of the second storage protocol, and the identification of the data block to be read located at the same target storage node can be encapsulated into the same second access request to obtain at least one second access request.
[0149] Furthermore, the protocol conversion module 70a2 may transmit at least one second access request to the sending module 70a3. For any second access request A, the sending module 70a3 may send the second access request A to the target storage node corresponding to the address information encapsulated in the protocol header of the second access request A. Accordingly, the target storage node may read the data block corresponding to the identifier of the data to be read carried in the second access request A based on the second access request A.
[0150] Furthermore, the target storage node may encapsulate the read data block into a data packet according to the second storage protocol. The data packet complies with the storage protocol supported by the network storage system. Furthermore, the target storage node may return the data packet to the network card 80.
[0151] The DMA engine in the offload card S70 can copy the data packet from the network card 80 to the programmable hardware unit 70. The sending module 70a3 of the programmable hardware unit 70 can transmit the data packet to the matching module 70a11. The matching module 70a11 can retrieve the data packet's protocol header from the second storage protocol based on the protocol header parameters of the second storage protocol and transmit the data packet's protocol header to the extraction module 70a12. The extraction module 70a12 can retrieve the payload from the data packet based on the payload metadata contained in the protocol header. This payload can be the data to be read.
[0152] Furthermore, the extraction module 70a12 may transmit the payload of the data packet to the protocol conversion module 70a2. Accordingly, the protocol conversion module 70a2 may encapsulate the data to be read according to the protocol header of the first storage protocol to obtain a data packet complying with the first storage protocol.
[0153] Furthermore, the DMA engine can upload the data packet complying with the first storage protocol to the host. The host can obtain the data to be read from the data packet complying with the first storage protocol, thereby reading the data in the network storage system.
[0154] The above embodiment takes the write request processing process and the read request processing process of the network storage system as an example to illustrate the processing method of the access request provided by the embodiment of the present application. The above embodiment realizes the free conversion between the general storage protocol and the private storage protocol supported by the network storage system through the hardware in-line computing technology. The access process of the entire network storage system offloads the storage protocol conversion process to the programmable hardware unit, so that the protocol conversion process is executed by hardware without the CPU participation of the programmable offload card, shortening the IO link path, reducing the number of data copies, and realizing hardware acceleration of network storage system access.
[0155] It should be noted that the terms "first", "second", etc. in the present text are used to distinguish different messages, devices, modules, etc., and do not represent a sequence order, nor limit the "first" and "second" to be different types.
[0156] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0157] The present application is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in the flowcharts and / or block diagrams.
[0158] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction apparatus, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in the flowcharts and / or block diagrams.
[0159] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 Figure 1 an apparatus that implements the functions specified in the flowcharts and / or block diagrams.
[0160] In a typical configuration, a computing device includes one or more processors (CPUs, etc.), input / output interfaces, network interfaces, and memories.
[0161] Memory may include non-permanent storage in a computer-readable medium, in the form of random-access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0162] Computer storage media is readable storage media, also referred to as "readable media." Readable storage media, including permanent and non-permanent, removable and non-removable media, can be implemented using any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0163] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, commodity, or apparatus comprising the aforementioned elements.
[0164] The above contents are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A computing system comprising: host and programmable offload cards; The host is in communication with the programmable offload card; The programmable offload card includes: a programmable hardware unit and a network card; The host is used to send a first access request for accessing the network storage system to the programmable offload card; the first access request complies with a first storage protocol; The programmable hardware unit is configured to convert the first access request from the first storage protocol into a second storage protocol supported by the network storage system to obtain a second access request; and send the second access request to the network storage system via the network card, so that the network storage system performs an access operation based on the second access request; Wherein, the first access request is a write request; the payload of the first access request is data to be stored; the network storage system is a distributed storage system; the programmable hardware unit maintains a stripe information table; The programmable hardware unit is specifically used to: query the stripe information table to obtain stripe rule information; divide the data to be stored into multiple data blocks according to the number of stripe groups and the data block size in the stripe rule information; determine the target storage node of the multiple data blocks according to the correspondence between the stripe group and the storage node in the stripe rule information; the storage node is the storage node in the distributed storage system; for any data block, use the address information of the target storage node of any data block, the data block size and the stripe group information of any data block as the protocol header of the second storage protocol to encapsulate the any data block to obtain the second access request corresponding to the any data block.
2. The system according to claim 1, wherein the programmable hardware unit comprises: Storage protocol processing module written in hardware description language; The storage protocol processing module includes: a parsing module, a protocol conversion module, and a sending module; the parsing module, the protocol conversion module, and the sending module are electrically connected; the parsing module is used to perform protocol parsing on the first access request to obtain a payload of the first access request; The protocol conversion module is configured to encapsulate the payload according to a protocol header of the second storage protocol to obtain a second access request that complies with the second storage protocol; The sending module is configured to send the second access request to the network storage system through the network card, so that the network storage system performs an access operation based on the second access request.
3. The system according to claim 2, wherein when the sending module sends the second access request to the network storage system through the network card, the sending module is specifically configured to: For any data block, based on the address information of the target storage node of any data block, the second access request corresponding to any data block is sent to the target storage node of any data block through the network card, so that the target storage node of any data block can store any data block based on the second access request corresponding to any data block.
4. The system according to claim 2, wherein the computing system further comprises: Central processing unit (CPU); the CPU is provided in the host; or the CPU is provided in the programmable offload card; The CPU runs a development system having the programmable hardware unit; In response to the burning operation of the development system, the CPU burns the storage protocol processing primitives written by the development system into the programmable hardware unit to obtain the storage protocol processing module.
5. A data processing method, applicable to a programmable hardware unit in a programmable offload card; the programmable offload card is communicatively connected to a host; the method comprising: Obtaining a first access request for accessing a network storage system, sent by the host to the programmable offload card; The first access request complies with a first storage protocol; Converting the first access request from the first storage protocol to a second storage protocol supported by the network storage system to obtain a second access request; sending the second access request to the network storage system through the network card of the programmable offload card, so that the network storage system performs an access operation based on the second access request; Wherein, the first access request is a write request; the payload of the first access request is data to be stored; the network storage system is a distributed storage system; the programmable hardware unit maintains a stripe information table; The converting the first access request from the first storage protocol to a second storage protocol supported by the network storage system to obtain a second access request includes: Query the stripe information table to obtain stripe rule information; Dividing the data to be stored into a plurality of data blocks according to the number of stripe groups and the size of the data blocks recorded in the stripe rule information; Determining target storage nodes for the plurality of data blocks according to a correspondence between stripe groups and storage nodes recorded in the stripe rule information; the storage nodes are storage nodes in the distributed storage system; For any data block, the address information of the target storage node of any data block, the size of the data block and the stripe group information of any data block are used as the protocol header of the second storage protocol to encapsulate the any data block to obtain the second access request corresponding to the any data block.
6. The method according to claim 5, wherein converting the first access request from the first storage protocol to a second storage protocol supported by the network storage system comprises: performing protocol parsing on the first access request to obtain a payload of the first access request; The payload is encapsulated according to a protocol header of the second storage protocol to obtain a second access request that complies with the second storage protocol.
7. The method according to claim 6, wherein performing protocol parsing on the first access request to obtain a payload of the first access request comprises: extracting a protocol header of the first access request from the first access request according to a protocol header parameter of the first storage protocol; The payload of the first access request is extracted from the first access request according to metadata of the payload recorded in a protocol header of the first access request.
8. The method according to claim 5, wherein when the second access request is sent to the network storage system through the network card of the programmable offload card, the method further comprises: For any data block, based on the address information of the target storage node of any data block, the second access request corresponding to any data block is sent to the target storage node of any data block through the network card, so that the target storage node of any data block can store any data block based on the second access request corresponding to any data block.
9. The method according to claim 6, wherein the first access request is a read request; The payload is an identifier of the data to be read; The encapsulating of the payload according to the protocol header of the second storage protocol includes: Using the identifier of the data to be read, querying the corresponding relationship between the stripe groups and storage nodes recorded in the stripe information table to determine at least one target storage node where the data to be read is located; the storage node is a storage node in the distributed storage system; For any target storage node, the address information of the target storage node is used as the protocol header of the second storage protocol, and the identifier of the data block to be read located at the target storage node is encapsulated into the same second access request to obtain at least one second access request.
10. The method according to claim 9, wherein when the second access request is sent to the network storage system through the network card of the programmable offload card, the method further comprises: For any second access request, the any second access request is sent to the target storage node corresponding to the address information encapsulated by the any second access request, so that the target storage node corresponding to the address information encapsulated by the any second access request can read the target data block corresponding to the identifier of the data to be read carried by the any second access request based on the any second access request.
11. The method according to claim 10, further comprising: Obtaining, through the network card, a first data packet returned by the target storage node corresponding to the address information encapsulated in any second access request; The first data packet complies with the second storage protocol; The payload of the first data packet includes the target data block; converting the first data packet into a second data packet complying with the first storage protocol; The second data packet is uploaded to the host, so that the host can obtain the target data block based on the second data packet.
12. An uninstall card, comprising: Programmable hardware unit and network card; the offload card is used to communicate with the host; The programmable hardware unit is used to obtain a first access request sent by the host for accessing the network storage system; The first access request complies with a first storage protocol; Converting the first access request from the first storage protocol to a second storage protocol supported by the network storage system to obtain a second access request; The network card is configured to send the second access request to the network storage system, so that the network storage system performs an access operation based on the second access request; Wherein, the first access request is a write request; the payload of the first access request is data to be stored; the network storage system is a distributed storage system; the programmable hardware unit maintains a stripe information table; The programmable hardware unit is specifically used to: query the stripe information table to obtain stripe rule information; divide the data to be stored into multiple data blocks according to the number of stripe groups and the data block size in the stripe rule information; determine the target storage node of the multiple data blocks according to the correspondence between the stripe group and the storage node in the stripe rule information; the storage node is the storage node in the distributed storage system; for any data block, use the address information of the target storage node of any data block, the data block size and the stripe group information of any data block as the protocol header of the second storage protocol to encapsulate the any data block to obtain the second access request corresponding to the any data block.
13. A computer-readable storage medium storing computer instructions, which, when executed by one or more processors, causes the one or more processors to perform the steps of the method according to any one of claims 5 to 11.
Citation Information
Patent Citations
Data processing method, device and system
CN106610789A