Programmable data transmission method and device based on RDMA of ASIC chip
By integrating the P4 programmable engine into the ASIC chip of the RNIC card, the problem of microprocessor core processing efficiency of ASIC RDMA network cards is solved. This enables dynamic construction of RoCEv2 protocol frames and programmable processing at the protocol layer, improving the flexibility and compatibility of data transmission and optimizing end-to-end data transmission efficiency.
Patent Information
- Application Number
- CN202511481951.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-16
- Publication Date
- 2026-01-20
AI Technical Summary
Existing ASIC-based RDMA network cards suffer from performance loss due to microprocessor core processing efficiency issues when pursuing ultimate latency and bandwidth performance. Furthermore, software cannot effectively avoid bugs or protocol compatibility problems after chip fabrication, resulting in high RDMA development risks.
The RNIC card integrates a P4 programmable engine within its ASIC chip, enabling dynamic construction and programmable processing of RoCEv2 protocol frames. Through the P4 programmable engine, it dynamically adapts the BTH header, optimizes multi-level protocols, and refines the construction of RoCEv2 protocol frames, thereby improving the flexibility and compatibility of data transmission.
It significantly improves the flexibility, low latency, and compatibility with diverse network protocols of data transmission, optimizes end-to-end data transmission efficiency, reduces host intervention, and achieves low-latency, highly reliable, and customizable network data transmission.
Smart Images

Figure CN121365031A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronics, and in particular to a programmable data transmission method and device based on an ASIC chip RDMA. BACKGROUND
[0002] In order to pursue the ultimate latency and bandwidth performance, the existing ASIC RDMA network card generally adopts a full RTL hardening mode for implementation. If there is a bug or protocol compatibility problem after the chip is put into production, the software cannot effectively avoid it, which will cause the RDMA card development risk of the full hardening scheme to be very high. Therefore, the industry proposes a solution of embedding a microprocessor core in the ASIC chip. The RDMA programmability is realized through the microprocessor core. Due to the microprocessor core processing efficiency problem, the RDMA performance is greatly lost compared with the full RTL hardening. SUMMARY
[0003] The present application aims to provide a programmable data transmission method and device based on an ASIC chip RDMA, to alleviate the technical problem that the RDMA performance is greatly lost due to the microprocessor core processing efficiency problem compared with the full RTL hardening. The RDMA function is fixed in the ASIC chip to ensure the performance, and the programmability of the key module is retained to enhance the adaptability, which is suitable for scenarios that require high throughput, low delay and variable protocols or scenes.
[0004] In a first aspect, an embodiment of the present application provides a programmable data transmission method based on an ASIC chip RDMA, applied to an RNIC card. The method comprises: in response to an RDMA operation request, generating a send queue work queue item through an RDMA driver, and triggering a doorbell notification; based on the doorbell notification, reading the send queue work queue item from the host memory; parsing the send queue work queue item to determine a transmission instruction; constructing a payload of a to-be-sent data packet and an initial BTH header according to the transmission instruction; through a P4 programmable engine integrated in the ASIC chip, dynamically constructing a RoCEv2 protocol frame conforming to the RoCEv2 protocol specification according to the initial BTH header and the payload; and based on the constructed RoCEv2 protocol frame, sending the to-be-sent data packet to a target port.
[0005] In the preferred embodiment of the present application, the step of dynamically constructing a RoCEv2 protocol frame conforming to the RoCEv2 protocol specification according to the initial BTH header and the payload by the P4 programmable engine integrated in the ASIC chip includes: modifying the initial BTH header by the P4 programmable engine integrated in the ASIC chip to obtain a first BTH header, so that the first BTH header conforms to the transmission requirements corresponding to the transmission instruction; constructing a protocol header of a first preset layer of the RoCEv2 protocol frame; selecting a PFC priority queue based on the tc corresponding to the dscp in the transmission requirements; adding check information in the RoCEv2 protocol frame based on the transmission requirements; padding the payload so that the padded payload conforms to the preset protocol specified in the transmission requirements; and performing check calculation on the network layer of the IP header of the RoCEv2 protocol frame to obtain a check result; and constructing the RoCEv2 protocol frame according to the first BTH header, the protocol header, the PFC priority queue, the check information, the padded payload, and the check result.
[0006] In the preferred embodiment of the present application, the first preset layer is the L2 network layer, the L3 network layer, and the L4 network layer.
[0007] In the preferred embodiment of the present application, the step of reading the send queue work queue entry from the host memory based on the doorbell notification includes: receiving the doorbell notification by the RDMA engine, and reading the send queue work queue entry from the host memory according to the doorbell page index in the doorbell notification.
[0008] In the preferred embodiment of the present application, the method further includes: receiving a RoCEv2 data packet by the MAC component, and transmitting a RoCEv2 protocol frame of the RoCEv2 data packet to the P4 programmable engine; extracting information of a second preset layer from the RoCEv2 protocol frame of the RoCEv2 data packet by the P4 programmable engine, and writing the information into metadata; performing ICRC check on the RoCEv2 protocol frame of the RoCEv2 data packet; and stripping the padding field of the payload in the RoCEv2 protocol frame of the RoCEv2 data packet and the encapsulation information of the second preset layer in the RoCEv2 protocol frame of the RoCEv2 data packet; combining the metadata, a second BTH header of the RoCEv2 protocol frame of the RoCEv2 data packet, and the payload of the RoCEv2 protocol frame of the RoCEv2 data packet, and sending the combination to the RDMA engine; and performing an RDMA protocol processing flow corresponding to the second BTH header by the RDMA engine according to the second BTH header until the transmission of the payload of the RoCEv2 data packet is completed.
[0009] In the preferred embodiment of the present application, the step of performing the RDMA protocol processing procedure corresponding to the second BTH header by the RDMA engine according to the second BTH header includes: performing the RDMA protocol processing procedure corresponding to the destination queue number and the information operation code carried in the second BTH header by the RDMA engine according to the destination queue number and the information operation code until the transmission of the payload of the RoCEv2 data packet is completed.
[0010] In the preferred embodiment of the present application, after the step of completing the transmission of the payload of the RoCEv2 data packet, the method includes: generating a completion queue event, writing the completion queue event into a completion queue, and triggering an interrupt.
[0011] In the preferred embodiment of the present application, after the step of generating the completion queue event, writing the completion queue event into the completion queue, and triggering the interrupt, the method includes: processing the interrupt and the completion queue event by the RDMA driver, and reporting work completion information to an RDMA application.
[0012] In the second aspect, the embodiment of the present application further provides a programmable data transmission device based on an ASIC chip RDMA, which is applied to an RNIC card. The device includes: a response module, configured to generate a send queue work queue item and trigger a doorbell notification by an RDMA driver in response to an RDMA operation request; read the send queue work queue item from a host memory based on the doorbell notification; a processing module, configured to parse the send queue work queue item to determine a transmission instruction; construct a payload and an initial BTH header of a to-be-sent data packet according to the transmission instruction; dynamically construct a RoCEv2 protocol frame conforming to a RoCEv2 protocol specification according to the initial BTH header and the payload by a P4 programmable engine integrated in the ASIC chip; and a transmission module, configured to send the to-be-sent data packet to a target port based on the constructed RoCEv2 protocol frame.
[0013] In the third aspect, the embodiment of the present application provides an electronic device. The electronic device includes a processor and a memory. The memory stores computer executable instructions capable of being executed by the processor. The processor executes the computer executable instructions to implement the programmable data transmission method based on the ASIC chip RDMA.
[0014] The embodiment of the present application has the following beneficial technical effects: The embodiment of the present application provides a programmable data transmission method and device based on an ASIC chip RDMA, which is applied to an RNIC card; the method comprises the following steps: in response to an RDMA operation request, generating a sending queue work queue item through an RDMA driver and triggering a doorbell notification; based on the doorbell notification, reading the sending queue work queue item from a host memory; analyzing the sending queue work queue item to determine a transmission instruction; constructing a payload of a to-be-sent data packet and an initial BTH header according to the transmission instruction; constructing a RoCEv2 protocol frame conforming to a RoCEv2 protocol specification according to the initial BTH header and the payload through a P4 programmable engine integrated in the ASIC chip; and sending the to-be-sent data packet to a target port based on the constructed RoCEv2 protocol frame. The method integrates the P4 programmable engine in the ASIC chip of the RNIC card, realizes dynamic construction of the RoCEv2 protocol frame and programmable processing of the protocol layer, significantly improves the flexibility, low-delay characteristics and compatibility of diversified network protocols of data transmission, reduces the involvement of the host, and optimizes the end-to-end data transmission efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the specific embodiments of the present application or the prior art, the drawings needed in the specific embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0016] Figure 1 A flowchart of a programmable data transmission method based on an ASIC chip RDMA provided by the embodiment of the present application is shown in the figure. Figure 2 A flowchart of a second programmable data transmission method based on an ASIC chip RDMA provided by the embodiment of the present application is shown in the figure. Figure 3 A structure diagram of a programmable data transmission device based on an ASIC chip RDMA provided by the embodiment of the present application is shown in the figure. Figure 4 A structure diagram of an electronic device provided by the embodiment of the present application is shown in the figure.
[0017] Icon: 31 - response module; 32 - processing module; 33 - transmission module; 41 - memory; 42 - processor; 43 - bus; 44 - communication interface. DETAILED DESCRIPTION
[0018] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0019] At present, in order to pursue the extreme delay and bandwidth performance, the existing ASIC-based RDMA network card generally adopts a full RTL hardening mode for implementation. If there is a bug or protocol compatibility problem after the chip is put into production, the software cannot effectively avoid it, which will lead to a very high risk of RDMA card development of the full hardening scheme. Therefore, the industry proposes a solution of embedding a microprocessor core in an ASIC chip, which realizes RDMA programmability through the microprocessor core. Due to the processing efficiency problem of the microprocessor core, the RDMA performance is greatly lost compared with the full RTL hardening.
[0020] Based on this, the embodiments of the present application provide a programmable data transmission method and device based on an ASIC chip RDMA. The method integrates a P4 programmable engine in an ASIC chip of an RNIC card, realizes dynamic construction of a RoCEv2 protocol frame and programmable processing of a protocol layer, significantly improves the flexibility, low delay characteristics and compatibility of diversified network protocols of data transmission, reduces the host intervention, and optimizes the end-to-end data transmission efficiency. In order to facilitate understanding, first, a programmable data transmission method based on an ASIC chip RDMA is introduced.
[0021] Embodiment 1 In this embodiment, Figure 1 A flowchart of a programmable data transmission method based on an ASIC chip RDMA provided by the embodiments of the present application is shown.
[0022] The method is applied to an RNIC card; the above method comprises: Step S101: In response to an RDMA operation request, a sending queue work queue item is generated by an RDMA driver, and a doorbell notification is triggered.
[0023] Here, the RDMA driver encapsulates the application sending request as a work queue item (WQE) written into a sending queue (SQ), and triggers a doorbell notification by updating the tail pointer, so that the hardware immediately processes the WQE to complete data transmission.
[0024] Step S102: Based on the above doorbell notification, the sending queue work queue item is read from the host memory.
[0025] The step S102 comprises: receiving the doorbell notification by the RDMA engine, and reading the send queue work queue item from the host memory according to the doorbell page index in the doorbell notification.
[0026] The step S103 comprises: parsing the send queue work queue item to determine the transmission instruction.
[0027] Here, the RDMA engine receives the doorbell notification, reads the wqe from the host memory according to the doorbell.pi information, and parses and processes the wqe.
[0028] The step S104 comprises: constructing the payload and the initial BTH header of the to-be-sent data packet according to the transmission instruction.
[0029] The step S105 comprises: constructing the RoCEv2 protocol frame conforming to the RoCEv2 protocol specification according to the initial BTH header and the payload by the P4 programmable engine integrated in the ASIC chip.
[0030] The step S106 comprises: sending the to-be-sent data packet to the target port based on the constructed RoCEv2 protocol frame.
[0031] Further, the method further comprises: receiving the RoCEv2 data packet by the MAC component, and transmitting the RoCEv2 protocol frame of the RoCEv2 data packet to the P4 programmable engine; extracting the information of the second preset layer from the RoCEv2 protocol frame of the RoCEv2 data packet by the P4 programmable engine, and writing the information into the metadata; performing ICRC check on the RoCEv2 protocol frame of the RoCEv2 data packet; stripping the padding field of the payload in the RoCEv2 protocol frame of the RoCEv2 data packet and the encapsulation information of the second preset layer in the RoCEv2 protocol frame of the RoCEv2 data packet; combining the metadata, the second BTH header of the RoCEv2 protocol frame of the RoCEv2 data packet, and the payload of the RoCEv2 protocol frame of the RoCEv2 data packet to send to the RDMA engine; and performing the RDMA protocol processing flow corresponding to the second BTH header by the RDMA engine according to the second BTH header until the transmission of the payload of the RoCEv2 data packet is completed.
[0032] Here, the second preset layer is the L2 network layer, the L3 network layer, and the L4 network layer.
[0033] The step of performing, by the RDMA engine, an RDMA protocol processing procedure corresponding to the second BTH header according to the second BTH header includes: performing, by the RDMA engine, an RDMA protocol processing procedure corresponding to a destination queue number and an information operation code carried in the second BTH header according to the destination queue number and the information operation code, until the transmission of the payload of the RoCEv2 data packet is completed.
[0034] Further, after the step of completing the transmission of the payload of the RoCEv2 data packet, the method includes: generating a completion queue event, writing the completion queue event into a completion queue, and triggering an interrupt.
[0035] Further, after the step of generating the completion queue event, writing the completion queue event into the completion queue, and triggering the interrupt, the method includes: processing the interrupt and the completion queue event by the RDMA driver, and reporting work completion information to an RDMA application.
[0036] An embodiment of the present application provides a programmable data transmission method based on an ASIC chip RDMA, which is applied to an RNIC card; the method includes: in response to an RDMA operation request, generating a send queue work queue item by an RDMA driver, and triggering a doorbell notification; based on the doorbell notification, reading the send queue work queue item from a host memory; analyzing the send queue work queue item to determine a transmission instruction; constructing a payload of a to-be-sent data packet and an initial BTH header according to the transmission instruction; constructing a RoCEv2 protocol frame conforming to a RoCEv2 protocol specification by a P4 programmable engine integrated in the ASIC chip according to the initial BTH header and the payload; and sending the to-be-sent data packet to a target port based on the constructed RoCEv2 protocol frame. The method integrates the P4 programmable engine in the ASIC chip of the RNIC card, realizes dynamic construction of the RoCEv2 protocol frame and programmable processing of a protocol layer, significantly improves flexibility, low-delay characteristics and compatibility with diversified network protocols of data transmission, reduces host intervention, and optimizes end-to-end data transmission efficiency.
[0037] Embodiment 2 On the basis of the above embodiment, Figure 2 A flowchart of a second programmable data transmission method based on an ASIC chip RDMA provided by an embodiment of the present application is shown.
[0038] The method is applied to an RNIC card; the method includes: Step S201: in response to an RDMA operation request, generating a send queue work queue item by an RDMA driver, and triggering a doorbell notification.
[0039] Step S202: Based on the above doorbell notification, read the above sending queue work queue item from the host memory.
[0040] Step S203: Analyze the above sending queue work queue item to determine the transmission instruction.
[0041] Step S204: According to the above transmission instruction, construct the payload of the to-be-sent data packet and the initial BTH header.
[0042] Step S205: Modify the initial BTH header through the P4 programmable engine integrated in the ASIC chip to obtain a first BTH header, so that the first BTH header meets the transmission requirements corresponding to the transmission instruction; and construct the protocol header of the first preset layer of the RoCEv2 protocol frame; and select the PFC priority queue based on the tc corresponding to the dscp in the transmission requirement; and add the check information in the RoCEv2 protocol frame based on the transmission requirement; and fill the payload to make the filled payload meet the preset protocol specified in the transmission requirement; and perform check calculation on the network layer of the IP header of the RoCEv2 protocol frame to obtain a check result.
[0043] Here, the first preset layer is the L2 network layer, the L3 network layer, and the L4 network layer.
[0044] Step S206: According to the first BTH header, the protocol header, the PFC priority queue, the check information, the filled payload, and the check result, construct the RoCEv2 protocol frame.
[0045] Step S207: Based on the constructed RoCEv2 protocol frame, send the to-be-sent data packet to the target port.
[0046] In some examples, the embodiment also adds a layer of tunnel outside the RoCEv2 protocol frame through the network programmable capability of the P4 programmable engine, which can be a VXLAN tunnel, so that the RoCEv2 protocol frame is carried in the overlay network, realizing the RDMA capability of virtual machines, bare machines, and containers in the network virtualization scenario.
[0047] The embodiment of the application provides a programmable data transmission method based on an ASIC chip RDMA, which is applied to an RNIC card; the method comprises the following steps: in response to an RDMA operation request, generating a sending queue work queue item through an RDMA driver and triggering a doorbell notification; based on the doorbell notification, reading the sending queue work queue item from a host memory; analyzing the sending queue work queue item to determine a transmission instruction; constructing a payload of a to-be-sent data packet and an initial BTH header according to the transmission instruction; modifying the initial BTH header through a P4 programmable engine integrated in an ASIC chip to obtain a first BTH header, so that the first BTH header meets transmission requirements corresponding to the transmission instruction; constructing a protocol header of a first preset layer of the RoCEv2 protocol frame; selecting a PFC priority queue based on a tc corresponding to dscp in the transmission requirements; adding check information in the RoCEv2 protocol frame based on the transmission requirements; filling the payload so that the filled payload meets preset protocol regulations in the transmission requirements; performing check calculation on a network layer of an IP header of the RoCEv2 protocol frame to obtain a check result; and constructing the RoCEv2 protocol frame according to the first BTH header, the protocol header, the PFC priority queue, the check information, the filled payload and the check result. Based on the constructed RoCEv2 protocol frame, the to-be-sent data packet is sent to a target port. The method integrates the P4 programmable engine in the ASIC chip of the RNIC card, realizes dynamic construction of the RoCEv2 protocol frame and programmable processing of protocol layers, significantly improves the flexibility, low-delay characteristics and compatibility of diversified network protocols of data transmission, reduces the intervention of the host and optimizes the end-to-end data transmission efficiency. The method dynamically adapts the BTH header, optimizes the multi-layer protocol and finely constructs the RoCEv2 protocol frame through the P4 programmable engine, significantly improves the RDMA transmission efficiency, flexibility and QoS guarantee capability based on the ASIC, and realizes low-latency, high-reliability and customizable network data transmission.
[0048] Embodiment 3 Based on the above-mentioned embodiments, Figure 3 A structure schematic diagram of a programmable data transmission device based on an ASIC chip RDMA provided by the embodiment of the application is provided.
[0049] The method is applied to an RNIC card; the device comprises: The response module 31 is configured to, in response to an RDMA operation request, generate a sending queue work queue item through an RDMA driver and trigger a doorbell notification; and based on the doorbell notification, read the sending queue work queue item from a host memory.
[0050] The processing module 32 is configured to parse the sending queue work queue item to determine a transmission instruction, construct a payload of the to-be-sent data packet and an initial BTH header according to the transmission instruction, and dynamically construct a RoCEv2 protocol frame conforming to a RoCEv2 protocol specification according to the initial BTH header and the payload by using a P4 programmable engine integrated in the ASIC chip.
[0051] The transmission module 33 is configured to send the to-be-sent data packet to a target port based on the constructed RoCEv2 protocol frame.
[0052] The response module 31, the processing module 32, and the transmission module 33 are sequentially connected.
[0053] In one embodiment, the processing module 32 is further configured to modify the initial BTH header to obtain a first BTH header by using the P4 programmable engine integrated in the ASIC chip, so that the first BTH header meets transmission requirements corresponding to the transmission instruction, construct a protocol header of a first preset layer of the RoCEv2 protocol frame, select a PFC priority queue based on a tc corresponding to a dscp in the transmission requirements, add check information in the RoCEv2 protocol frame based on the transmission requirements, fill the payload so that the filled payload meets preset protocol regulations in the transmission requirements, perform check calculation on a network layer of an IP header of the RoCEv2 protocol frame to obtain a check result, and construct the RoCEv2 protocol frame according to the first BTH header, the protocol header, the PFC priority queue, the check information, the filled payload, and the check result.
[0054] In one embodiment, the response module 31 is further configured to receive the doorbell notification by using the RDMA engine, and read the sending queue work queue item from the host memory according to a doorbell page index in the doorbell notification.
[0055] In one of the implementations, the response module 31 is further configured to receive the RoCEv2 packet through the MAC component, and transmit a RoCEv2 protocol frame of the RoCEv2 packet to the P4 programmable engine; the processing module 32 is further configured to extract information of a second preset layer from the RoCEv2 protocol frame of the RoCEv2 packet through the P4 programmable engine, write the information into metadata, perform ICRC check on the RoCEv2 protocol frame of the RoCEv2 packet, and strip a padding field of a payload of the RoCEv2 protocol frame of the RoCEv2 packet and encapsulation information of the second preset layer in the RoCEv2 protocol frame of the RoCEv2 packet; combine the metadata, a second BTH header of the RoCEv2 protocol frame of the RoCEv2 packet, and the payload of the RoCEv2 protocol frame of the RoCEv2 packet, and send the combination to the RDMA engine; and the transmission module 33 is further configured to execute an RDMA protocol processing procedure corresponding to the second BTH header according to the second BTH header through the RDMA engine, until the transmission of the payload of the RoCEv2 packet is completed.
[0056] In one of the implementations, the processing module 32 is further configured to execute an RDMA protocol processing procedure corresponding to a destination queue number and an information operation code carried in the second BTH header according to the destination queue number and the information operation code through the RDMA engine, until the transmission of the payload of the RoCEv2 packet is completed.
[0057] In one of the implementations, the transmission module 33 is further configured to generate a completion queue event, write the completion queue event into a completion queue, and trigger an interrupt.
[0058] In one of the implementations, the transmission module 33 is further configured to process the interrupt and the completion queue event through the RDMA driver, and report work completion information to an RDMA application.
[0059] The programmable data transmission device based on the ASIC chip RDMA provided by the embodiments has the same technical features as the programmable data transmission method based on the ASIC chip RDMA provided by the embodiments, and can solve the same technical problems and achieve the same technical effects. It can be clearly understood by those skilled in the art that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the foregoing method embodiments, which will not be described herein.
[0060] Embodiment 4 This embodiment provides an electronic device, including a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of a programmable data transfer method based on ASIC chip RDMA.
[0061] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a programmable data transfer method based on ASIC chip RDMA.
[0062] See Figure 4 The diagram shows the structure of an electronic device, which includes a memory 41 and a processor 42. The memory 41 stores a computer program that can run on the processor 42. When the processor executes the computer program, it implements the steps provided by the above-mentioned programmable data transmission method based on ASIC chip RDMA.
[0063] like Figure 4 As shown, the device also includes a bus 43 and a communication interface 44, with the processor 42, the communication interface 44 and the memory 41 connected via the bus 43; the processor 42 is used to execute executable modules, such as computer programs, stored in the memory 41.
[0064] The memory 41 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this device network element and at least one other network element is achieved through at least one communication interface 44 (which may be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.
[0065] Bus 43 can be an ISA bus, PCI bus, or EISA bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0066] The memory 41 is configured to store a program, and the processor 42 is configured to execute the program after receiving an execution instruction. The method performed by the programmable data transmission device based on the ASIC chip RDMA according to any of the embodiments of the present application can be applied to the processor 42 or implemented by the processor 42. The processor 42 can be an integrated circuit chip with a processing capability of signals. In the implementation process, each step of the above method can be completed by an integrated logic circuit in hardware or an instruction in software form in the processor 42. The processor 42 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; or a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage media in the art. The storage medium is located in the memory 41, and the processor 42 reads the information in the memory 41 and combines the hardware to complete the steps of the above method.
[0067] Further, the embodiments of the present application also provide a machine readable storage medium, which stores machine executable instructions. When the machine executable instructions are called and executed by the processor 42, the machine executable instructions cause the processor 42 to implement the programmable data transmission method based on the ASIC chip RDMA.
[0068] The electronic device and the computer readable storage medium provided by the embodiments of the present application have the same technical features, so they can also solve the same technical problems and achieve the same technical effects.
[0069] In addition, in the description of the embodiments of the present application, unless specifically defined and limited, the terms "mounting", "connection", "connecting" should be understood in a broad sense, for example, can be fixedly connected, can also be detachably connected, or integrally connected; can be mechanically connected, can also be electrically connected; can be directly connected, can also be indirectly connected through an intermediate medium, can be internal communication of two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0070] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.
Claims
1. A programmable data transfer method based on ASIC chip RDMA, characterized in that, The method is applied to an RNIC card, and comprises the following steps: In response to an RDMA operation request, generating a send queue work queue item by an RDMA driver and triggering a doorbell notification; Based on the doorbell notification, reading the send queue work queue item from a host memory; Analyzing the send queue work queue item to determine a transmission instruction; According to the transmission instruction, constructing a payload and an initial BTH header of a to-be-sent data packet; According to the initial BTH header and the payload, dynamically constructing, by a P4 programmable engine integrated in the ASIC chip, a RoCEv2 protocol frame conforming to a RoCEv2 protocol specification; Based on the constructed RoCEv2 protocol frame, sending the to-be-sent data packet to a target port.
2. The programmable data transfer method based on ASIC chip RDMA according to claim 1, wherein, The step of dynamically constructing, by the P4 programmable engine integrated in the ASIC chip, the RoCEv2 protocol frame conforming to the RoCEv2 protocol specification according to the initial BTH header and the payload comprises the following steps: By the P4 programmable engine integrated in the ASIC chip, modifying the initial BTH header to obtain a first BTH header, so that the first BTH header conforms to transmission requirements corresponding to the transmission instruction; constructing a protocol header of a first preset layer of the RoCEv2 protocol frame; selecting a PFC priority queue based on a dscp corresponding to the transmission requirements; adding check information in the RoCEv2 protocol frame based on the transmission requirements; padding the payload so that the padded payload conforms to a preset protocol specified in the transmission requirements; and performing check calculation on a network layer of an IP header of the RoCEv2 protocol frame to obtain a check result. According to the first BTH header, the protocol header, the PFC priority queue, the check information, the padded payload, and the check result, the RoCEv2 protocol frame is constructed.
3. The programmable data transfer method based on ASIC chip RDMA according to claim 2, characterized in that, The first preset layer is an L2 network layer, an L3 network layer, and an L4 network layer.
4. The programmable data transfer method based on ASIC chip RDMA according to claim 1, wherein, The step of reading the send queue work queue item from the host memory based on the doorbell notification comprises the following steps: According to a doorbell page index in the doorbell notification, reading the send queue work queue item from the host memory by the RDMA engine.
5. The programmable data transfer method based on ASIC chip RDMA according to claim 4, characterized in that, The method further comprises the following steps: Receiving a RoCEv2 data packet by a MAC component and transmitting a RoCEv2 protocol frame of the RoCEv2 data packet to the P4 programmable engine. The P4 programmable engine extracts information of a second preset layer from a RoCEv2 protocol frame of the RoCEv2 data packet, writes the information into metadata, performs ICRC check on the RoCEv2 protocol frame of the RoCEv2 data packet, and strips a padding field of a payload of the RoCEv2 protocol frame of the RoCEv2 data packet and encapsulation information of the second preset layer in the RoCEv2 protocol frame of the RoCEv2 data packet; and the RoCEv2 protocol frame of the RoCEv2 data packet, the second BTH header, and the payload of the RoCEv2 protocol frame of the RoCEv2 data packet are combined and sent to the RDMA engine; The RDMA engine performs an RDMA protocol processing flow corresponding to the second BTH header according to the second BTH header until the transmission of the payload of the RoCEv2 data packet is completed.
6. The programmable data transfer method based on ASIC chip RDMA according to claim 5, wherein, The step of performing an RDMA protocol processing flow corresponding to the second BTH header according to the second BTH header by the RDMA engine includes: The RDMA engine performs an RDMA protocol processing flow corresponding to the destination queue number and the information operation code according to the destination queue number and the information operation code carried in the second BTH header until the transmission of the payload of the RoCEv2 data packet is completed.
7. The programmable data transfer method based on ASIC chip RDMA according to claim 6, characterized in that, After the step of completing the transmission of the payload of the RoCEv2 data packet, the method includes: generating a completion queue event, writing the completion queue event into a completion queue, and triggering an interrupt.
8. The programmable data transfer method based on ASIC chip RDMA according to claim 7, characterized in that, After the step of generating a completion queue event, writing the completion queue event into a completion queue, and triggering an interrupt, the method includes: The RDMA driver processes the interrupt and the completion queue event, and reports work completion information to an RDMA application.
9. A programmable data transfer device based on ASIC chip RDMA, characterized in that, The device is applied to an RNIC card and includes: a response module configured to, in response to an RDMA operation request, generate a send queue work queue entry by an RDMA driver, and trigger a doorbell notification; and based on the doorbell notification, read the send queue work queue entry from a host memory; a processing module configured to parse the send queue work queue entry, determine a transmission instruction, construct a payload of a to-be-sent data packet and an initial BTH header according to the transmission instruction, and dynamically construct a RoCEv2 protocol frame conforming to a RoCEv2 protocol specification according to the initial BTH header and the payload by a P4 programmable engine integrated in the ASIC chip; a transmission module configured to send the to-be-sent data packet to a target port based on the constructed RoCEv2 protocol frame.
10. An electronic device, comprising: The electronic device includes a processor and a memory, the memory stores computer executable instructions capable of being executed by the processor, and the processor executes the computer executable instructions to implement the ASIC chip-based RDMA programmable data transmission method in any one of claims 1 to 8.
Citation Information
Patent Citations
Programmable hardware logic architecture implemented based on P4 language and logic implementation method
CN113157254A
Network interface device-based computing
CN119011309A
End-to-end data plane offloading for distributed storage using protocol hardware and PISA devices
US20210103403A1