[go: up one dir, main page]

WO2023115852A1 - Pcie-based communication method and apparatus, and computer device and readable storage medium - Google Patents

Pcie-based communication method and apparatus, and computer device and readable storage medium Download PDF

Info

Publication number
WO2023115852A1
WO2023115852A1 PCT/CN2022/099668 CN2022099668W WO2023115852A1 WO 2023115852 A1 WO2023115852 A1 WO 2023115852A1 CN 2022099668 W CN2022099668 W CN 2022099668W WO 2023115852 A1 WO2023115852 A1 WO 2023115852A1
Authority
WO
WIPO (PCT)
Prior art keywords
driver
pcie
data
layer function
target
Prior art date
Application number
PCT/CN2022/099668
Other languages
French (fr)
Chinese (zh)
Inventor
鲁双
Original Assignee
深圳市广和通无线通信软件有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市广和通无线通信软件有限公司 filed Critical 深圳市广和通无线通信软件有限公司
Publication of WO2023115852A1 publication Critical patent/WO2023115852A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter

Definitions

  • the present application relates to the technical field of communication, in particular to a PCIE-based communication method, device, computer equipment and readable storage medium.
  • WWAN Wireless Wide Area Network
  • PCIE Peripheral Component Interconnect Express, high-speed serial computer expansion bus standard
  • a PCIE-based communication method, device, computer equipment, and readable storage medium are provided, which can complete the data communication between the host side and the PCIE endpoint device through PCIE, so that 5G products can be used in The effect of high speed, large bandwidth, and low latency can be achieved on computer equipment.
  • the present application provides a communication method based on PCIE.
  • the method is applied to the host side, and the host side is configured with an upper layer function driver and a kernel driver, and the kernel driver includes a PCIE driver.
  • the methods include:
  • the PCIE drives the first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel; wherein, the hardware queue is the hardware of the PCIE endpoint device access channel;
  • the PCIE driver mounts each of the upper-layer function drivers, and assigns a corresponding virtual channel for each of the upper-layer function drivers, so that the upper-layer function drivers deliver first business data through the corresponding virtual channels;
  • the PCIE driver When the PCIE driver receives the first business data, it determines the first target queue number corresponding to the first target channel number from the first mapping relationship, and sends the first business data to the In the hardware queue corresponding to the first target queue number; wherein, the first target channel number is the channel number of the virtual channel corresponding to the upper layer function driver that delivers the first service data.
  • the kernel driver also includes a network adapter driver.
  • the method also includes:
  • the PCIE driver mounts the network adapter driver, and allocates a corresponding virtual channel for the network adapter driver, so that the network adapter driver sends the second service data through the corresponding virtual channel;
  • the PCIE driver When the PCIE driver receives the second business data, it determines the second target queue number corresponding to the second target channel number from the first mapping relationship, and sends the second business data to the In the hardware queue corresponding to the second target queue number; wherein, the second target channel number is the channel number of the virtual channel corresponding to the network adapter driver.
  • the method further includes: the network adapter driver calls a preset function interface to deliver the second service data to the PCIE driver;
  • the preset function interface is a function interface generated according to the universal unique identification code driven by the PCIE and the universal unique identification code driven by the network adapter.
  • the second service data includes sending IP data and sending MBIM protocol data.
  • the network adapter drives the call of the preset function interface to drive the step of sending the second service data to the PCIE, including:
  • the network adapter driver calls the preset function interface to send the issued IP data to the PCIE driver;
  • the network adapter driver generates a data write request according to the second target channel number and the issued MBIM protocol data, and sends the data write request to the PCIE driver, so as to send the data write request to the PCIE driver.
  • Send MBIM protocol data Send MBIM protocol data.
  • the method further includes: when the PCIE driver obtains the first return data sent by the PCIE endpoint device, calling a preset function interface to send the data to the network adapter driver The first return data; wherein, the preset function interface is a function interface generated according to the UUID code driven by the PCIE and the UUID code driven by the network adapter.
  • the first returned data is returned IP data or returned MBIM protocol data.
  • the PCIE driver calls the preset function interface to drive the step of sending the second service data to the network adapter, including:
  • the PCIE driver calls the preset function interface to send the return IP data to the network adapter driver;
  • the PCIE driver When the first returned data is the returned MBIM data, the PCIE driver writes the returned MBIM data into a corresponding memory queue;
  • the PCIE driver sends the returned MBIM data to the network adapter driver when receiving the data read request sent by the network adapter driver.
  • the PCIE driver mounts each of the upper-layer function drivers, and the step of assigning a corresponding virtual channel for each of the upper-layer function drivers includes:
  • Described PCIE drives generation child node The quantity of described child node is determined according to the quantity that upper layer function drives;
  • the PCIE driver mounts each of the upper-layer function drivers through the sub-node; wherein, different upper-layer function drivers correspond to different sub-nodes;
  • Described PCIE drives and assigns corresponding virtual channel for each described upper layer function driver, and establishes the second mapping relation between the channel number of child node and virtual channel;
  • the step of determining the first target queue number corresponding to the first target channel number from the first mapping relationship it also includes:
  • the PCIE driver determines the first target channel number from the second mapping relationship according to the child node corresponding to the upper layer function driver that delivers the first service data.
  • the method further includes: the PCIE driver acquires the working mode of the host side, and derives a corresponding sub-node according to the working mode.
  • the step of sending the first business data into the hardware queue corresponding to the first target queue number includes: the PCIE driver according to the first target channel number and the first The service data generates a data packet, and sends the data packet into the hardware queue corresponding to the first target queue number.
  • the method also includes:
  • the PCIE driver determines the target upper layer function driver corresponding to the second return data when the second return data sent by the PCIE endpoint device is obtained;
  • the PCIE driver writes the second return data into the memory queue corresponding to the target upper layer function driver, and when receiving the data read request sent by the target upper layer function driver, sends the data to the target The upper layer function driver sends the second return data.
  • the present application also provides a PCIE-based communication device.
  • the device includes a kernel driver configured on the host side, the kernel driver includes a PCIE driver, and the host side is also configured with an upper layer function driver.
  • the PCIE driver includes:
  • the first mapping relationship establishment module is used to establish the first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel when the host side recognizes the PCIE endpoint device; wherein the hardware queue is The hardware access channel of the PCIE endpoint device;
  • An allocation module configured to mount each of the upper-layer function drivers, and assign a corresponding virtual channel to each of the upper-layer function drivers, so that the upper-layer function drivers deliver the first service data through the corresponding virtual channels;
  • a business data writing module configured to determine the first target queue number corresponding to the first target channel number from the first mapping relationship when the first business data is received, and write the first business data The data is sent to the hardware queue corresponding to the first target queue number; wherein, the first target channel number is the channel number of the virtual channel corresponding to the upper layer function driver that delivers the first service data.
  • the present application also provides a computer device.
  • the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
  • the PCIE drives the first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel; wherein, the hardware queue is the hardware of the PCIE endpoint device access channel;
  • the PCIE driver mounts each of the upper-layer function drivers, and assigns a corresponding virtual channel for each of the upper-layer function drivers, so that the upper-layer function drivers deliver first business data through the corresponding virtual channels;
  • the PCIE driver When the PCIE driver receives the first business data, it determines the first target queue number corresponding to the first target channel number from the first mapping relationship, and sends the first business data to the In the hardware queue corresponding to the first target queue number; wherein, the first target channel number is the channel number of the virtual channel corresponding to the upper layer function driver that delivers the first service data.
  • the computer device further includes a PCIE endpoint device, and the PCIE endpoint device is connected to the processor through a PCIE bus.
  • the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium has a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
  • the PCIE drives the first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel; wherein, the hardware queue is the hardware of the PCIE endpoint device access channel;
  • the PCIE driver mounts each of the upper-layer function drivers, and assigns a corresponding virtual channel for each of the upper-layer function drivers, so that the upper-layer function drivers deliver first business data through the corresponding virtual channels;
  • the PCIE driver When the PCIE driver receives the first business data, it determines the first target queue number corresponding to the first target channel number from the first mapping relationship, and sends the first business data to the In the hardware queue corresponding to the first target queue number; wherein, the first target channel number is the channel number of the virtual channel corresponding to the upper layer function driver that delivers the first service data.
  • FIG. 1 is an architecture diagram of a host side of a WWAN product in the prior art
  • Fig. 2 is the application environment figure of the communication method based on PCIE in an embodiment
  • Fig. 3 is one of schematic flow charts of the communication method based on PCIE in an embodiment
  • Fig. 4 is the second schematic flow chart of the communication method based on PCIE in an embodiment
  • Fig. 5 is a schematic flowchart of the step of sending the second service data driven by the network adapter in one embodiment
  • Fig. 6 is a schematic flow chart of the step of sending the first return data by the PCIE driver in one embodiment
  • Fig. 7 is a schematic flow chart of the steps of the PCIE driver mounting the upper layer function driver in one embodiment
  • FIG. 8 is a software architecture diagram of the host side of the present application in an embodiment
  • Fig. 9 is a structural block diagram of a communication device based on PCIE in an embodiment
  • Figure 10 is a diagram of the internal structure of a computer device in one embodiment.
  • Fig. 1 shows a structure diagram of a host side of a WWAN product in the prior art.
  • the host side will emulate the PCIE device as a USB device through the UDE driver, and perform data communication through the virtual USB device.
  • the present application provides a PCIE-based communication method, device, computer equipment and readable storage medium.
  • the PCIE driver mounts each upper-layer function driver respectively, and maps multiple hardware channels of the PCIE endpoint device into multiple virtual channels for use by each upper-layer function driver.
  • Each upper-layer function driver can directly realize data communication with the PCIE endpoint device through the PCIE driver, without simulating the PCIE device as a USB device.
  • the data communication between the host side and the PCIE endpoint device can be completed through PCIE, and the transmission rate can be increased, so that 5G products can achieve high speed, large bandwidth, and low delay on computer equipment, meeting the requirements of 5G products. rate requirements.
  • the present application is also adapted to the NetAdapterCx framework of Microsoft 5G, and the network adapter driver (that is, the NetAdapter driver) is set separately from the PCIE driver, so that the hardware processing logic and business logic are layered.
  • the main hardware logic is realized through the PCIE driver, which can reduce the workload of driving Microsoft certification.
  • the PCIE-based communication method provided by this application can be applied to the computer equipment shown in FIG. 2 .
  • the computer equipment can be, but not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc.
  • Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, and the like.
  • the computer device can be divided into a host side 102 and a PCIE endpoint device 104 .
  • the host side 102 is a part for configuring and running the upper layer function driver and the kernel driver.
  • the upper layer function driver refers to the function driver set in the user layer
  • the kernel driver refers to the function driver set in the kernel layer
  • the kernel driver may include a PCIE driver.
  • the host side 102 can be connected to the PCIE endpoint device 104 through a PCIE interface and/or a PCIE bus. It can be understood that the device type of the PCIE endpoint device 104 can be determined according to the actual situation, and the present application does not make specific limitations on this, as long as it is connected to the host side 102 through a PCIE interface and/or a PCIE bus. In some of the following embodiments, the present application takes the PCIE endpoint device 104 as a 5G communication module as an example for illustration.
  • a PCIE-based communication method is provided, and the method is applied to the host side in FIG. 2 as an example for illustration. Include the following steps:
  • the PCIE driver establishes a first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel; wherein, the hardware queue is a hardware access channel of the PCIE endpoint device.
  • the PCIE endpoint device will set a certain number of hardware access channels, and the hardware access channels are the "hardware queues" involved in each embodiment.
  • the specific device type of the hardware queue can be determined according to the specific hardware structure of the PCIE endpoint device, which is not specifically limited in the present application.
  • a hardware queue can be a memory device. Each hardware queue is identified by a unique queue number, so that each hardware queue can be distinguished by the queue number.
  • the host side when the host side is connected to the PCIE endpoint device, the host side can recognize the access of the PCIE endpoint device.
  • the PCIE driver maps each hardware queue to a different virtual channel, and establishes a first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel.
  • the specific set number of virtual channels may be determined according to the amount of service data, which is not specifically limited in this application.
  • the queue number of the same hardware queue may correspond to the channel number of a virtual channel, that is, there is a one-to-one correspondence between the hardware queue and the virtual channel.
  • the queue number of the same hardware queue can correspond to the channel numbers of multiple different virtual channels, that is, there is a one-to-many correspondence between the hardware queue and the virtual channel, so when the amount of business data When the number of queues exceeds the number of hardware queues, multiple types of business data can be sent to the same hardware queue to further achieve high efficiency, large bandwidth and low latency.
  • the PCIE driver can map the hardware queues into two types of virtual channels to construct data paths and control paths.
  • the data path is a path for transmitting communication data
  • the control path is a path for transmitting control messages.
  • the data path and the control path respectively include their own sending and receiving hardware queues to realize the sending and receiving of communication data and control messages.
  • the PCIE driver mounts each upper-layer function driver, and assigns a corresponding virtual channel to each upper-layer function driver, so that the upper-layer function driver delivers the first service data through the corresponding virtual channel.
  • the upper layer function drivers include but are not limited to GNSS drivers, burning drivers, COM port drivers (which can realize functions such as AT commands, FLASH, log capture, and Coredump export), etc.
  • the first service data refers to the service data delivered by the upper-layer function driver, which may be but not limited to IP (Internet Protocol, Internet Protocol) data and control messages.
  • the PCIE driver can mount each upper-layer function driver separately, and assign a corresponding virtual channel to each upper-layer function driver, so that the upper-layer function driver can be mapped to the underlying virtual channel, and through the assigned virtual channel. data transmission.
  • the upper-layer function driver can send the first business data to the PCIE driver through its corresponding virtual channel, and the PCIE driver will send the first business data to the PCIE driver after subsequent processing.
  • a service data is sent to the PCIE endpoint device.
  • each upper layer function driver may correspond to a different virtual channel.
  • each upper-layer function driver can correspond to multiple virtual channels, for example, the same upper-layer function driver can correspond to two virtual channels, any virtual channel is used to transmit communication data, and the other virtual channel is used for Transmit control messages.
  • the PCIE driver when the PCIE driver receives the first business data, determine the first target queue number corresponding to the first target channel number from the first mapping relationship, and send the first business data into the first target queue number corresponding to In the hardware queue; wherein, the first target channel number is the channel number of the virtual channel corresponding to the upper layer function driver delivering the first service data.
  • the PCIE driver when the PCIE driver receives the first service data delivered by a certain upper-layer function driver, its PCIE driver can determine the channel number corresponding to the virtual channel from the first mapping relationship according to the channel number of the upper-layer function driver. The channel number corresponds to the first target queue number, and the first service data is sent to the hardware queue corresponding to the first target queue number. In this way, the first service data delivered by the upper-layer function driver can be sent to the designated hardware queue to realize data transmission between the host side and the PCIE endpoint device.
  • the upper-layer function driver can send the first service data to a specified hardware queue by sending a data read request or a data write request to the PCIE driver.
  • the PCIE driver on the host side maps multiple hardware queues of the PCIE endpoint device to multiple virtual channels, and establishes the queue number and A first mapping relationship between channel numbers of virtual channels.
  • the PCIE driver can mount various upper-layer function drivers, and assign corresponding virtual channels to the mounted upper-layer function drivers for use by the upper-layer function drivers.
  • the upper-layer function drivers can send the first business data to the PCIE driver through the corresponding virtual channels .
  • the PCIE driver determines the hardware queue number corresponding to the upper-layer driver that issues the first service data from the first mapping relationship, that is, the first target queue number, and transfers the first service data to Send it to the hardware queue corresponding to the first target queue number.
  • each upper-layer function driver can directly implement data communication with the PCIE endpoint device through the PCIE driver, without simulating the PCIE device as a USB device. In this way, the data communication between the host side and the PCIE endpoint device can be completed through PCIE, and the transmission rate can be increased, so that 5G products can achieve high speed, large bandwidth, and low delay on computer equipment, meeting the requirements of 5G products. rate requirements.
  • the kernel driver also includes a network adapter driver, that is, a NetAdapter driver.
  • the PCIE-based communication method also includes:
  • the PCIE driver mounts the network adapter driver, and assigns a corresponding virtual channel to the network adapter driver, so that the network adapter driver sends the second service data through the corresponding virtual channel;
  • the second service data refers to the service data sent by the network adapter driver, which may be but not limited to sending IP data and sending control messages.
  • the PCIE driver is used to realize the logic processing of the hardware link.
  • the network adapter driver is used to implement business logic just like the upper layer function driver. This application separates the function driver from the PCIE driver, so that the business logic and hardware processing logic are layered, so that the business processing can be clearer, and it is convenient for developers to understand, locate and solve problems.
  • the PCIE driver can mount the network adapter driver, and can allocate a corresponding virtual channel to the network adapter driver. Further, the PCIE driver can allocate virtual channels to the upper-layer function drivers and network adapters in the same manner, which can be specifically as described in any of the above embodiments, and will not be repeated here. After the PCIE driver allocates a virtual channel to the network adapter driver, the network adapter driver can map to the underlying virtual channel and implement data transmission through the allocated virtual channel.
  • the corresponding second target queue number can be determined from the first mapping relationship according to the channel number of the virtual channel corresponding to the network adapter, And send the second service data into the hardware queue corresponding to the second target queue number. In this way, the second service data delivered by the network adapter driver can be sent to the designated hardware queue, so as to realize the data transmission between the host side and the PCIE endpoint device.
  • the network adapter driver is a driver implemented based on the NetAdapterCx architecture and adapts to the Windows framework interface.
  • the business logic and the hardware processing logic are layered, so that the business processing can be clearer, and it is convenient for developers to understand, locate and solve problems.
  • the main hardware logic in the PCIE driver the workload of the driver in Microsoft HLK certification can be greatly reduced.
  • the PCIE-based communication method further includes: the network adapter driver calls a preset function interface to deliver the second service data to the PCIE driver.
  • the preset function interface is a function interface generated according to a UUID (Universally Unique Identifier) driven by PCIE and a UUID of a network adapter.
  • the preset function can be generated according to the UUID of the PCIE driver and the UUID of the network adapter through the technology provided by the Microsoft WDF (Windows Driver Framework, Windows Driver Framework) framework. interface.
  • the network adapter driver invokes the preset function interface to transmit data to the PCIE driver to complete the data transmission without any request encapsulation and conversion, thereby speeding up the transmission rate.
  • the application can generate a preset function interface through UUID in the PCIE driver, and define an API (Application Programming Interface, Application Programming Interface) for data transmission in the interface.
  • an API Application Programming Interface, Application Programming Interface
  • the network adapter driver only needs to export the preset function interface, and the API defined by the interface can be used to deliver the second service data to the PCIE driver.
  • the network adapter driver invokes a preset function interface to deliver the second service data to the PCIE driver without any request encapsulation and conversion, thereby speeding up the transmission rate.
  • the second service data includes sending IP data and sending MBIM protocol data.
  • the network adapter driver calls the preset function interface to send the second service data to the PCIE driver, including:
  • the network adapter driver calls a preset function interface to send the issued IP data to the PCIE driver;
  • the network adapter driver generates a data write request according to the second target channel number and the delivered MBIM protocol data, and sends the data write request to the PCIE driver, so as to send the delivered MBIM protocol data to the PCIE driver.
  • the data transmission driven by the network adapter includes sending MBIM protocol data transmission and IP data transmission, wherein the sending MBIM protocol data is a control message.
  • the IP data delivered by the network adapter driver can be directly sent to the PCIE driver through the preset function interface to reduce data encapsulation and conversion, thereby increasing the transmission rate.
  • the network adapter driver can complete the sending of the MBIM protocol data by sending a data write request. Since the data writing request is a standard method, the interface provided by the system can be directly invoked to complete it, without having to define a preset function interface separately, thereby simplifying program implementation. Specifically, in the process of sending the MBIM protocol data, the network adapter driver can generate a data write request according to the channel number of the virtual channel corresponding to the network adapter driver and send the MBIM protocol data, and send the data write request to the PCIE driver. The data writing request enables the PCIE driver to receive the issued MBIM protocol data, and send the issued MBIM protocol data to the corresponding hardware queue, so as to realize the transmission of the issued MBIM protocol data.
  • the network adapter driver sends IP data to the PCIE driver by calling a preset function interface, and sends MBIM protocol data to the PCIE driver through a data write request.
  • the transmission rate can be improved and program implementation can be simplified.
  • the PCIE-based communication method further includes: when the PCIE driver obtains the first return data sent by the PCIE endpoint device, calling a preset function interface to send the first return data to the network adapter driver .
  • the preset function interface is a function interface generated according to the UUID driven by the PCIE and the UUID driven by the network adapter.
  • the first returned data refers to the returned data that needs to be sent to the network adapter driver.
  • the first returned data may be returned IP data or returned MBIM protocol data.
  • the PCIE endpoint device needs to send the first return data to the network adapter driver through the PCIE driver .
  • the PCIE driver acquires the first return data, it can call the preset function interface to send the first return data to the network adapter driver through the preset function interface. In this way, there is no need to do any request encapsulation and conversion, which can speed up the return rate.
  • the first returned data is returned IP data or returned MBIM protocol data.
  • the PCIE driver when the PCIE driver obtains the first return data sent by the PCIE endpoint device, it calls the preset function interface to send the first return data to the network adapter driver, including:
  • the PCIE driver invokes a preset function interface to send the returned IP data to the network adapter driver;
  • the corresponding memory queue refers to the memory queue corresponding to the network adapter driver, and the memory queue refers to the memory mapped in the system for storing the data of the PCIE endpoint device.
  • the PCIE driver can transmit backhaul IP data and backhaul MBIM data in different ways. Considering that the data volume of backhauled IP data may be relatively large, and the transmission rate of backhauled IP data affects the communication rate, therefore, in order to improve data transmission efficiency, 5G products can achieve high speed, large bandwidth, and low cost on computer equipment. Due to the effect of delay, the PCIE driver can directly send back IP data to the network adapter driver by calling the preset function interface to reduce data encapsulation and conversion, thereby increasing the transmission rate.
  • the network adapter driver can complete the sending of the returning MBIM protocol data by sending a data read request. Since the data reading request is a standard method, the interface provided by the system can be directly called to complete it, without having to define a preset function interface separately, thereby simplifying program implementation.
  • the PCIE driver can write the returned MBIM data into the memory queue corresponding to the network adapter driver.
  • the network adapter driver can read the data in the corresponding memory queue by sending a data read request to the PCIE driver, so as to read the returned MBIM data.
  • the PCIE driver returns the IP data to the network adapter driver by calling the preset function interface, and sends the MBIM protocol data back to the network adapter driver through the data read request, so that the transmission rate can be improved and the program can be simplified accomplish.
  • the communication method based on PCIE also includes:
  • the PCIE driver writes the second return data into the memory queue corresponding to the target upper layer function, and sends the second return data to the target upper layer function driver when receiving the data read request sent by the target upper layer function driver.
  • the second return data refers to the return data sent by the PCIE endpoint device to the upper layer function driver.
  • the upper-layer function driver can perform data transmission with the lower-layer driver (ie, PCIE driver) by sending a data read request.
  • PCIE driver ie, PCIE driver
  • the PCIE driver determines the upper-layer function driver that needs to receive the second returned data, and the upper-layer function driver is the target upper-layer function driver.
  • the PCIE driver writes the second return data into the memory queue corresponding to the target upper layer function driver.
  • the target upper layer function driver can read the data in the corresponding memory queue by sending a data read request to the PCIE driver, so as to read the second returned data.
  • the application can obtain the first return data and the second return data in the following manner: the PCIE endpoint device can write the return data into DMA (Direct Memory Access, direct memory access) memory, And the host side is notified through an interrupt, so that the host side is notified that there is returned data for processing. After receiving the interrupt, the host side obtains the returned data from the DMA memory, and analyzes the returned data. Determine the function driver that needs to receive the returned data according to the parsed returned data. When the returned data is sent to the network adapter driver, the parsed returned data is used as the first returned data; when the returned data is sent to the upper layer function driver, the parsed returned data is used The return data of is used as the second return data.
  • DMA Direct Memory Access, direct memory access
  • Data reading request is a standard method, which can directly call the interface provided by the system to realize data reading.
  • the reading of the second returned data is completed by invoking the interface provided by the system, and the data returned between the PCIE endpoint device and the upper-layer function driver is realized, thereby simplifying program implementation.
  • the PCIE driver mounts each upper-layer function driver, and the step of assigning a corresponding virtual channel for each upper-layer function driver includes:
  • the PCIE driver generates child nodes, wherein the number of child nodes is determined according to the number of upper layer function drivers;
  • the PCIE driver mounts each upper-layer function driver through the sub-node; wherein, different upper-layer function drivers correspond to different sub-nodes;
  • the PCIE driver allocates a corresponding virtual channel to each upper-layer function driver, and establishes a second mapping relationship between the child node and the channel number of the virtual channel.
  • the PCIE driver drives the corresponding child node according to the upper layer function that sends the first business data, from the second mapping relationship Determine the first target channel number in .
  • the child node may be a unique identifier, which is used to distinguish the mounted function drivers.
  • the PCIE driver can generate different sub-nodes, and each upper-layer function driver can be mounted through each sub-node. Wherein, one sub-node mounts one upper-layer function driver, and one upper-layer function driver is mounted through one sub-node.
  • the PCIE driver mounts each upper-layer function driver, it can assign corresponding virtual channels to each upper-layer function driver. The method of allocating virtual channels can be as described in the above embodiment, and this application will not repeat it.
  • the PCIE driver can establish a second mapping relationship, so as to reflect the mapping relationship between the child node of each upper layer function driver and the channel number of the corresponding virtual channel through the second mapping relationship.
  • the network adapter driver and each upper-layer function driver serve as the function driver
  • the PCIE driver can also mount the network adapter driver through the sub-node, and different function drivers are mounted on different sub-nodes.
  • the second mapping relationship may also reflect the mapping relationship between the sub-nodes of the network adapter driver and the channel number of the virtual channel corresponding to the network adapter driver.
  • the PCIE driver When the PCIE driver receives the service data issued by the function driver, the PCIE driver can determine the channel number of the virtual channel corresponding to the function driver from the second mapping relationship according to the child node of the function driver that delivered the service data, and then from The queue number of the corresponding hardware queue is determined in the first mapping relationship, so as to deliver service data to the PCIE endpoint device.
  • the child node is a unique number, even if the channel number changes or the first mapping relationship and the second mapping relationship change, the first target channel number can be accurately determined according to the child node, thereby improving the reliability of communication .
  • the PCIE-based communication method further includes: the PCIE driver obtains the working mode of the host side, and derives a corresponding sub-node according to the working mode.
  • the working mode may be the mode that the host side is in when starting up, and may be but not limited to normal mode, debug mode, burning mode and dump mode, etc.
  • the present application can derive corresponding sub-nodes according to the working mode of the host side, so as to complete functions in different states.
  • the application exports NetAdapter ports and GNSS ports in normal mode; exports all ports in debug mode, such as log export ports, etc.; exports burning ports in burning mode for burning of firmware Function; only coredump ports are exported in dump mode.
  • the step of sending the first business data into the hardware queue corresponding to the first target queue number includes: the PCIE driver generates a data packet according to the first target channel number and the first business data, and sends the data packet to into the hardware queue corresponding to the first target queue number.
  • the PCIE driver when the PCIE driver receives the first service data sent by the upper-layer function driver, it can group the first service data with the first target channel number so that the header of the data packet includes the first target channel number , so that the PCIE endpoint device determines the service type of the first service data through the first target channel number, and performs subsequent processing. Further, the packet header of the data packet may also include the first target queue number. The PCIE driver can send the data packet into the corresponding hardware queue.
  • the PCIE driver can also generate a data packet according to the second target channel number and the second service data, and send the data packet into the hardware queue corresponding to the second target queue number.
  • this step please refer to the process of generating data packets by the PCIE driver according to the first target channel number and the first service data, which will not be described in detail in this application.
  • the PCIE endpoint device may also obtain a third mapping relationship between the channel number of the virtual channel and the service type, and determine the service type of the service data according to the third mapping relationship.
  • the PCIE-based driver architecture can be as shown in Figure 8, so that the host side (i.e. the host side in Figure 8) and the PCIE endpoint device (i.e. the PCIE EP in Figure 8) can communicate in a PCIE manner.
  • a PCIE driver is configured on the host side (the PCIE driver is the WWAN host interface in Figure 8).
  • the PCIE driver includes a data path and a control path, and the data path and the control path respectively include their own hardware sending and receiving queues for implementing data sending and receiving.
  • the hardware transceiver queue in the data path and the hardware transceiver queue in the control path are mapped to different virtual channels for data transmission from the function driver.
  • the PCIE driver generates different sub-nodes for mounting functional drivers such as network adapters, GNSS, AT, FLASH, log, and Coredump. These function drivers are mapped to different virtual channels at the bottom layer through a certain mapping relationship, and other function drivers (that is, each upper-layer function driver) except the network adapter driver can send data read requests and/or data write requests. Send to the specified hardware queue of the PCIE endpoint device.
  • functional drivers such as network adapters, GNSS, AT, FLASH, log, and Coredump.
  • Both the PCIE driver and the network adapter driver are configured in the kernel layer, and the other function drivers except the network adapter driver are configured in the user layer, so data transmission can be performed between the PCIE driver and the network adapter driver through a preset function interface.
  • the MBIM protocol data can be transmitted through the control channel. Since the MBIM protocol data does not require a high rate, the transmission of the MBIM protocol data can be completed by sending a data read and write request. IP data needs to be transmitted through the data channel.
  • the technology provided by the Microsoft WDF framework can be used to generate a preset function interface through UUID in the PCIE driver, and define the API interface for data transmission in the preset function interface , in order to realize the sending and receiving of IP data.
  • the network adapter driver can directly use the API interface defined by the preset function interface by exporting the preset function interface to transfer the IP data to the PCIE driver to complete the delivery of the IP data without doing Any request encapsulation and transformation.
  • port export can be divided into multiple modes.
  • This application can export the port corresponding to the network adapter driver and the port corresponding to the GNSS driver in the normal mode; in the debug mode, export all ports, including log export, etc.; in the burning mode, export the burning port for the burning function of the firmware. Export the Coredump port in dump mode. In this way, the functions of different states can be completed.
  • This application relies on Microsoft's NetAdapterCx framework, through PCIE driver development, to achieve the application of computer equipment on the host side, and to achieve the effect of 5G products on computer equipment that can meet high speed and large bandwidth.
  • steps in the flow charts involved in the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flow charts involved in the above-mentioned embodiments may include multiple steps or stages, and these steps or stages are not necessarily executed at the same time, but may be performed at different times For execution, the execution order of these steps or stages is not necessarily performed sequentially, but may be executed in turn or alternately with other steps or at least a part of steps or stages in other steps.
  • an embodiment of the present application further provides a PCIE-based communication device for implementing the above-mentioned PCIE-based communication method.
  • the solution to the problem provided by the device is similar to the implementation described in the above method, so the specific limitations in one or more PCIE-based communication device embodiments provided below can be referred to above for PCIE-based communication The limitation of the method will not be repeated here.
  • a PCIE-based communication device includes a kernel driver configured on the host side, the kernel driver includes a PCIE driver, and the host side is also configured with an upper layer function driver.
  • PCIE drivers include:
  • the first mapping relationship establishment module is used to establish the first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel when the host side recognizes the PCIE endpoint device; wherein, the hardware queue is of the PCIE endpoint device hardware access channel;
  • An allocation module configured to mount each upper-layer function driver, and assign a corresponding virtual channel to each upper-layer function driver, so that the upper-layer function driver sends the first business data through the corresponding virtual channel;
  • the business data writing module is used to determine the first target queue number corresponding to the first target channel number from the first mapping relationship when the first business data is received, and send the first business data to the first target In the hardware queue corresponding to the queue number; wherein, the first target channel number is the channel number of the virtual channel corresponding to the upper layer function driver delivering the first service data.
  • the kernel driver also includes a network adapter driver.
  • the allocation module is also used to mount the network adapter driver, and allocate a corresponding virtual channel to the network adapter driver, so that the network adapter driver delivers the second service data through the corresponding virtual channel.
  • the business data writing module is also used to determine the second target queue number corresponding to the second target channel number from the first mapping relationship when receiving the second business data, and send the second business data to the second target In the hardware queue corresponding to the queue number; wherein, the second target channel number is the channel number of the virtual channel corresponding to the network adapter driver.
  • the network adapter driver includes a first interface calling module, configured to call a preset function interface to send the second service data to the PCIE driver.
  • the preset function interface is a function interface generated according to the UUID code driven by the PCIE and the UUID code driven by the network adapter.
  • the second service data includes sending IP data and sending MBIM protocol data.
  • the first interface calling module includes an IP data delivery unit and an MBIM protocol data delivery unit.
  • the IP data delivery unit calls a preset function interface to send the IP data to the PCIE driver.
  • the MBIM protocol data sending unit is used to generate a data write request according to the second target channel number and the sent MBIM protocol data, and send a data write request to the PCIE driver to send the sent MBIM protocol data to the PCIE driver.
  • the PCIE driver further includes a second interface calling module.
  • the second interface calling module is used to call a preset function interface to send the first return data to the network adapter driver when the first return data sent by the PCIE endpoint device is obtained.
  • the preset function interface is a function interface generated according to the UUID code driven by the PCIE and the UUID code driven by the network adapter.
  • the first returned data is returned IP data or returned MBIM protocol data.
  • the second interface calling module includes an IP data return unit and an MBIM protocol data return unit.
  • the IP data return unit is configured to call a preset function interface to send the return IP data to the network adapter driver when the first return data is return IP data.
  • the MBIM protocol data return unit is used to write the returned MBIM data into the corresponding memory queue when the first returned data is the returned MBIM data; it is also used to read the data sent by the network adapter driver If requested, send back MBIM data to the network adapter driver.
  • the allocation module includes a child node generating unit, a mounting unit and a second mapping relationship establishing unit.
  • the PCIE driver also includes a first target channel number determination module.
  • the sub-node generation unit is used to generate sub-nodes; the number of sub-nodes is determined according to the number of upper layer function drivers.
  • the mounting unit is used to mount each upper-layer function driver through sub-nodes; wherein, different upper-layer function drivers correspond to different sub-nodes.
  • the second mapping relation establishing unit is used for assigning a corresponding virtual channel to each upper layer function driver, and establishing a second mapping relation between the sub-node and the channel number of the virtual channel.
  • the module for determining the first target channel number is configured to determine the first target channel number from the second mapping relationship according to the sub-node corresponding to the upper-layer function driver that delivers the first service data.
  • the PCIE driver further includes an export module, which is used to obtain the working mode of the host, and derive corresponding sub-nodes according to the working mode.
  • the business data writing module includes a data packet generation unit, which is used to generate a data packet according to the first target channel number and the first business data, and send the data packet to the first target queue number in the corresponding hardware queue.
  • the PCIE driver further includes a target upper layer function driver module and a return module.
  • the target upper-layer function driver module is configured to determine the target upper-layer function driver corresponding to the second return data when the second return data sent by the PCIE endpoint device is obtained.
  • the return module is used to write the second return data into the memory queue corresponding to the target upper-layer function driver, and send the second return to the target upper-layer function driver when receiving the data read request sent by the target upper-layer function driver data.
  • Each module in the above-mentioned PCIE communication device can be fully or partially realized by software, hardware and a combination thereof.
  • the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of the above modules.
  • a component may be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and or a computer.
  • a component may be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and or a computer.
  • an application running on a server and a server can be a component.
  • One or more components can reside within a process and or thread of execution, and a component can be localized on one computer and or distributed between two or more computers.
  • a computer device is provided.
  • the computer device may be a terminal, and its internal structure may be as shown in FIG. 10 .
  • the computer device includes a processor, memory and a communication interface connected by a system bus. Wherein, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and computer programs.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies.
  • WIFI wireless cellular network
  • NFC Near Field Communication
  • FIG. 10 is only a block diagram of a part of the structure related to the solution of this application, and does not constitute a limitation to the computer equipment on which the solution of this application is applied.
  • the specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
  • a computer device including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
  • the computer device may further include a PCIE endpoint device, and the PCIE endpoint device is connected to the processor through a PCIE bus.
  • the PCIE endpoint device is a 5G communication module.
  • the PCIE endpoint device can be a 5G modem.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.
  • a computer program product including a computer program, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.
  • any reference to storage, database or other media used in the various embodiments provided in the present application may include at least one of non-volatile and volatile storage.
  • Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive variable memory (ReRAM), magnetic variable memory (Magnetoresistive Random Access Memory, MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (Phase Change Memory, PCM), graphene memory, etc.
  • the volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory, etc.
  • RAM Random Access Memory
  • RAM Random Access Memory
  • RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
  • the databases involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database.
  • the non-relational database may include a blockchain-based distributed database, etc., but is not limited thereto.
  • the processors involved in the various embodiments provided by this application can be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., and are not limited to this.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Systems (AREA)

Abstract

The present application relates to a PCIE-based communication method and apparatus, and a computer device and a readable storage medium. The method comprises: when a host side identifies a PCIE endpoint device, a PCIE driver establishing a first mapping relationship between queue numbers of hardware queues and channel numbers of virtual channels, wherein each hardware queue is a hardware access channel of the PCIE endpoint device (S202); the PCIE driver mounting each upper-layer function driver, and allocating a corresponding virtual channel to each upper-layer function driver, such that the upper-layer function driver issues first service data by means of the corresponding virtual channel (S204); and after receiving the first service data, the PCIE driver determining from the first mapping relationship a first target queue number which corresponds to a first target channel number, and sending the first service data to a hardware queue which corresponds to the first target queue number, wherein the first target channel number is a channel number of a virtual channel corresponding to the upper-layer function driver which issues the first service data (S206).

Description

基于PCIE的通信方法、装置、计算机设备和可读存储介质PCIE-based communication method, device, computer equipment and readable storage medium

相关申请的交叉引用Cross References to Related Applications

本申请要求于2021年12月24日提交中国专利局、申请号为2021116033043、发明名称为“基于PCIE的通信方法、装置、计算机设备和可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application submitted to the China Patent Office on December 24, 2021, with the application number 2021116033043, and the title of the invention is "PCIE-based communication method, device, computer equipment, and readable storage medium", all of which The contents are incorporated by reference in this application.

技术领域technical field

本申请涉及通信技术领域,特别是涉及一种基于PCIE的通信方法、装置、计算机设备和可读存储介质。The present application relates to the technical field of communication, in particular to a PCIE-based communication method, device, computer equipment and readable storage medium.

背景技术Background technique

目前,在WWAN(Wireless Wide Area Network,无线广域网)产品中,主机侧配置有多个功能驱动。为实现各功能驱动与PCIE(Peripheral Component Interconnect Express,高速串行计算机扩展总线标准)端点设备之间的通信,现有技术会在主机侧配置UDE(USB Device Emulation,USB设备模拟)驱动,以将PCIE设备模拟成USB(Universal Serial Bus,通用串行总线)设备,然后提供端口挂载微软的MBIM(Mobile Broadband Interface Model,移动宽带接口模型)、ACM等驱动,以及挂载编写的GNSS(Global Navigation Satellite System,全球卫星导航系统)驱动,进而支持WWAN产品所需要的各种业务。Currently, in WWAN (Wireless Wide Area Network, wireless wide area network) products, there are multiple function drivers configured on the host side. In order to realize the communication between each function driver and the PCIE (Peripheral Component Interconnect Express, high-speed serial computer expansion bus standard) endpoint device, the prior art will configure a UDE (USB Device Emulation, USB device simulation) driver on the host side to The PCIE device is simulated as a USB (Universal Serial Bus, Universal Serial Bus) device, and then provides ports to mount Microsoft's MBIM (Mobile Broadband Interface Model, Mobile Broadband Interface Model), ACM and other drivers, as well as GNSS (Global Navigation Satellite System, global satellite navigation system) to support various services required by WWAN products.

然而,在新一代的5G通信要求下,传统的驱动方式已经难以满足高性能产品的高速率要求。However, under the requirements of the new generation of 5G communication, the traditional driving method has been difficult to meet the high-speed requirements of high-performance products.

发明内容Contents of the invention

根据本申请的各种实施例,提供一种基于PCIE的通信方法、装置、计算机设备和可读存储介质,能够通过PCIE方式完成主机侧与PCIE端点设备之间的数据通信,使得5G产品能够在计算机设备上达到高速率、大带宽、低时延的效果。According to various embodiments of the present application, a PCIE-based communication method, device, computer equipment, and readable storage medium are provided, which can complete the data communication between the host side and the PCIE endpoint device through PCIE, so that 5G products can be used in The effect of high speed, large bandwidth, and low latency can be achieved on computer equipment.

第一方面,本申请提供了一种基于PCIE的通信方法。所述方法应用于主机侧,所述主机侧配置有上层功能驱动及内核驱动,所述内核驱动包括PCIE驱动。所述方法包括:In a first aspect, the present application provides a communication method based on PCIE. The method is applied to the host side, and the host side is configured with an upper layer function driver and a kernel driver, and the kernel driver includes a PCIE driver. The methods include:

当所述主机侧识别到PCIE端点设备,则所述PCIE驱动建立硬件队列的队列号与虚拟通道的通道号之间的第一映射关系;其中,所述硬件队列为所述PCIE端点设备的硬件访问通道;When the host side recognizes the PCIE endpoint device, the PCIE drives the first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel; wherein, the hardware queue is the hardware of the PCIE endpoint device access channel;

所述PCIE驱动挂载每一所述上层功能驱动,并为每一所述上层功能驱动分配对应的虚拟通道,以使所述上层功能驱动通过对应的虚拟通道下发第一业务数据;The PCIE driver mounts each of the upper-layer function drivers, and assigns a corresponding virtual channel for each of the upper-layer function drivers, so that the upper-layer function drivers deliver first business data through the corresponding virtual channels;

所述PCIE驱动在接收到所述第一业务数据的情况下,从所述第一映射关系中确定第一目标通道号对应的第一目标队列号,并将所述第一业务数据送入所述第一目标队列号对应的硬件队列中;其中,第一目标通道号为下发所述第一业务数据的上层功能驱动所对应的虚拟通道的通道号。When the PCIE driver receives the first business data, it determines the first target queue number corresponding to the first target channel number from the first mapping relationship, and sends the first business data to the In the hardware queue corresponding to the first target queue number; wherein, the first target channel number is the channel number of the virtual channel corresponding to the upper layer function driver that delivers the first service data.

在其中一个实施例中,所述内核驱动还包括网络适配器驱动。所述方法还包括:In one of the embodiments, the kernel driver also includes a network adapter driver. The method also includes:

所述PCIE驱动挂载所述网络适配器驱动,并为所述网络适配器驱动分配对应的虚拟通道,以使所述网络适配器驱动通过对应的虚拟通道下发第二业务数据;The PCIE driver mounts the network adapter driver, and allocates a corresponding virtual channel for the network adapter driver, so that the network adapter driver sends the second service data through the corresponding virtual channel;

所述PCIE驱动在接收到所述第二业务数据的情况下,从所述第一映射关系中确定第二目标通道号对应的第二目标队列号,并将所述第二业务数据送入所述第二目标队列号对应的硬件队列中;其中,所述第二目标通道号为所述网络适配器驱动所对应的虚拟通道的通道号。When the PCIE driver receives the second business data, it determines the second target queue number corresponding to the second target channel number from the first mapping relationship, and sends the second business data to the In the hardware queue corresponding to the second target queue number; wherein, the second target channel number is the channel number of the virtual channel corresponding to the network adapter driver.

在其中一个实施例中,所述方法还包括:所述网络适配器驱动调用预设函数接口,以向所述PCIE驱动下发所述第二业务数据;In one of the embodiments, the method further includes: the network adapter driver calls a preset function interface to deliver the second service data to the PCIE driver;

其中,所述预设函数接口为根据所述PCIE驱动的通用唯一识别码及所述网络适配器驱动的通用唯一识别码生成的函数接口。Wherein, the preset function interface is a function interface generated according to the universal unique identification code driven by the PCIE and the universal unique identification code driven by the network adapter.

在其中一个实施例中,所述第二业务数据包括下发IP数据和下发MBIM协议数据。所述网络适配 器驱动调用所述预设函数接口,以向所述PCIE驱动下发所述第二业务数据的步骤,包括:In one of the embodiments, the second service data includes sending IP data and sending MBIM protocol data. The network adapter drives the call of the preset function interface to drive the step of sending the second service data to the PCIE, including:

所述网络适配器驱动调用所述预设函数接口,以向所述PCIE驱动发送所述下发IP数据;The network adapter driver calls the preset function interface to send the issued IP data to the PCIE driver;

所述网络适配器驱动根据所述第二目标通道号及所述下发MBIM协议数据生成数据写入请求,并向所述PCIE驱动发送所述数据写入请求,以向所述PCIE驱动发送所述下发MBIM协议数据。The network adapter driver generates a data write request according to the second target channel number and the issued MBIM protocol data, and sends the data write request to the PCIE driver, so as to send the data write request to the PCIE driver. Send MBIM protocol data.

在其中一个实施例中,所述方法还包括:所述PCIE驱动在获取到所述PCIE端点设备发送的第一回传数据的情况下,调用预设函数接口,以向所述网络适配器驱动发送所述第一回传数据;其中,所述预设函数接口为根据所述PCIE驱动的通用唯一识别码及所述网络适配器驱动的通用唯一识别码生成的函数接口。In one of the embodiments, the method further includes: when the PCIE driver obtains the first return data sent by the PCIE endpoint device, calling a preset function interface to send the data to the network adapter driver The first return data; wherein, the preset function interface is a function interface generated according to the UUID code driven by the PCIE and the UUID code driven by the network adapter.

在其中一个实施例中,所述第一回传数据为回传IP数据或回传MBIM协议数据。所述PCIE驱动调用预设函数接口,以向所述网络适配器驱动发送第二业务数据的步骤,包括:In one of the embodiments, the first returned data is returned IP data or returned MBIM protocol data. The PCIE driver calls the preset function interface to drive the step of sending the second service data to the network adapter, including:

当所述第一回传数据为所述回传IP数据,则所述PCIE驱动调用所述预设函数接口,以向所述网络适配器驱动发送所述回传IP数据;When the first return data is the return IP data, the PCIE driver calls the preset function interface to send the return IP data to the network adapter driver;

当所述第一回传数据为所述回传MBIM数据,则所述PCIE驱动将所述回传MBIM数据写入对应的内存队列中;When the first returned data is the returned MBIM data, the PCIE driver writes the returned MBIM data into a corresponding memory queue;

所述PCIE驱动在接收到所述网络适配器驱动发送的数据读取请求的情况下,向所述网络适配器驱动发送所述回传MBIM数据。The PCIE driver sends the returned MBIM data to the network adapter driver when receiving the data read request sent by the network adapter driver.

在其中一个实施例中,所述PCIE驱动挂载每一所述上层功能驱动,并为每一所述上层功能驱动分配对应的虚拟通道的步骤,包括:In one of the embodiments, the PCIE driver mounts each of the upper-layer function drivers, and the step of assigning a corresponding virtual channel for each of the upper-layer function drivers includes:

所述PCIE驱动生成子节点;所述子节点的数量根据上层功能驱动的数量确定;Described PCIE drives generation child node; The quantity of described child node is determined according to the quantity that upper layer function drives;

所述PCIE驱动通过所述子节点挂载每一所述上层功能驱动;其中,不同的上层功能驱动对应于不同的子节点;The PCIE driver mounts each of the upper-layer function drivers through the sub-node; wherein, different upper-layer function drivers correspond to different sub-nodes;

所述PCIE驱动为每一所述上层功能驱动分配对应的虚拟通道,并建立子节点与虚拟通道的通道号之间的第二映射关系;Described PCIE drives and assigns corresponding virtual channel for each described upper layer function driver, and establishes the second mapping relation between the channel number of child node and virtual channel;

从所述第一映射关系中确定第一目标通道号对应的第一目标队列号的步骤之前,还包括:Before the step of determining the first target queue number corresponding to the first target channel number from the first mapping relationship, it also includes:

所述PCIE驱动根据下发所述第一业务数据的上层功能驱动所对应的子节点,从所述第二映射关系中确定所述第一目标通道号。The PCIE driver determines the first target channel number from the second mapping relationship according to the child node corresponding to the upper layer function driver that delivers the first service data.

在其中一个实施例中,所述方法还包括:所述PCIE驱动获取所述主机侧的工作模式,并根据所述工作模式导出对应的子节点。In one of the embodiments, the method further includes: the PCIE driver acquires the working mode of the host side, and derives a corresponding sub-node according to the working mode.

在其中一个实施例中,将所述第一业务数据送入所述第一目标队列号对应的硬件队列中的步骤,包括:所述PCIE驱动根据所述第一目标通道号及所述第一业务数据生成数据包,并将所述数据包送入所述第一目标队列号对应的硬件队列中。In one of the embodiments, the step of sending the first business data into the hardware queue corresponding to the first target queue number includes: the PCIE driver according to the first target channel number and the first The service data generates a data packet, and sends the data packet into the hardware queue corresponding to the first target queue number.

在其中一个实施例中,所述方法还包括:In one embodiment, the method also includes:

所述PCIE驱动在获取到所述PCIE端点设备发送的第二回传数据的情况下,确定所述第二回传数据对应的目标上层功能驱动;The PCIE driver determines the target upper layer function driver corresponding to the second return data when the second return data sent by the PCIE endpoint device is obtained;

所述PCIE驱动将所述第二回传数据写入所述目标上层功能驱动对应的内存队列中,并在接收到所述目标上层功能驱动发送的数据读取请求的情况下,向所述目标上层功能驱动发送所述第二回传数据。The PCIE driver writes the second return data into the memory queue corresponding to the target upper layer function driver, and when receiving the data read request sent by the target upper layer function driver, sends the data to the target The upper layer function driver sends the second return data.

第二方面,本申请还提供了一种基于PCIE的通信装置。所述装置包括配置于主机侧的内核驱动,所述内核驱动包括PCIE驱动,所述主机侧还配置有上层功能驱动。所述PCIE驱动包括:In a second aspect, the present application also provides a PCIE-based communication device. The device includes a kernel driver configured on the host side, the kernel driver includes a PCIE driver, and the host side is also configured with an upper layer function driver. The PCIE driver includes:

第一映射关系建立模块,用于在所述主机侧识别到PCIE端点设备的情况下,建立硬件队列的队列号与虚拟通道的通道号之间的第一映射关系;其中,所述硬件队列为所述PCIE端点设备的硬件访问通道;The first mapping relationship establishment module is used to establish the first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel when the host side recognizes the PCIE endpoint device; wherein the hardware queue is The hardware access channel of the PCIE endpoint device;

分配模块,用于挂载每一所述上层功能驱动,并为每一所述上层功能驱动分配对应的虚拟通道,以使所述上层功能驱动通过对应的虚拟通道下发第一业务数据;An allocation module, configured to mount each of the upper-layer function drivers, and assign a corresponding virtual channel to each of the upper-layer function drivers, so that the upper-layer function drivers deliver the first service data through the corresponding virtual channels;

业务数据写入模块,用于在接收到所述第一业务数据的情况下,从所述第一映射关系中确定第一目标通道号对应的第一目标队列号,并将所述第一业务数据送入所述第一目标队列号对应的硬件队列 中;其中,第一目标通道号为下发所述第一业务数据的上层功能驱动所对应的虚拟通道的通道号。A business data writing module, configured to determine the first target queue number corresponding to the first target channel number from the first mapping relationship when the first business data is received, and write the first business data The data is sent to the hardware queue corresponding to the first target queue number; wherein, the first target channel number is the channel number of the virtual channel corresponding to the upper layer function driver that delivers the first service data.

第三方面,本申请还提供了一种计算机设备。所述计算机设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

当所述主机侧识别到PCIE端点设备,则所述PCIE驱动建立硬件队列的队列号与虚拟通道的通道号之间的第一映射关系;其中,所述硬件队列为所述PCIE端点设备的硬件访问通道;When the host side recognizes the PCIE endpoint device, the PCIE drives the first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel; wherein, the hardware queue is the hardware of the PCIE endpoint device access channel;

所述PCIE驱动挂载每一所述上层功能驱动,并为每一所述上层功能驱动分配对应的虚拟通道,以使所述上层功能驱动通过对应的虚拟通道下发第一业务数据;The PCIE driver mounts each of the upper-layer function drivers, and assigns a corresponding virtual channel for each of the upper-layer function drivers, so that the upper-layer function drivers deliver first business data through the corresponding virtual channels;

所述PCIE驱动在接收到所述第一业务数据的情况下,从所述第一映射关系中确定第一目标通道号对应的第一目标队列号,并将所述第一业务数据送入所述第一目标队列号对应的硬件队列中;其中,第一目标通道号为下发所述第一业务数据的上层功能驱动所对应的虚拟通道的通道号。When the PCIE driver receives the first business data, it determines the first target queue number corresponding to the first target channel number from the first mapping relationship, and sends the first business data to the In the hardware queue corresponding to the first target queue number; wherein, the first target channel number is the channel number of the virtual channel corresponding to the upper layer function driver that delivers the first service data.

在其中一个实施例中,所述计算机设备还包括PCIE端点设备,所述PCIE端点设备通过PCIE总线连接所述处理器。In one of the embodiments, the computer device further includes a PCIE endpoint device, and the PCIE endpoint device is connected to the processor through a PCIE bus.

第四方面,本申请还提供了一种计算机可读存储介质。所述计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium has a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

当所述主机侧识别到PCIE端点设备,则所述PCIE驱动建立硬件队列的队列号与虚拟通道的通道号之间的第一映射关系;其中,所述硬件队列为所述PCIE端点设备的硬件访问通道;When the host side recognizes the PCIE endpoint device, the PCIE drives the first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel; wherein, the hardware queue is the hardware of the PCIE endpoint device access channel;

所述PCIE驱动挂载每一所述上层功能驱动,并为每一所述上层功能驱动分配对应的虚拟通道,以使所述上层功能驱动通过对应的虚拟通道下发第一业务数据;The PCIE driver mounts each of the upper-layer function drivers, and assigns a corresponding virtual channel for each of the upper-layer function drivers, so that the upper-layer function drivers deliver first business data through the corresponding virtual channels;

所述PCIE驱动在接收到所述第一业务数据的情况下,从所述第一映射关系中确定第一目标通道号对应的第一目标队列号,并将所述第一业务数据送入所述第一目标队列号对应的硬件队列中;其中,第一目标通道号为下发所述第一业务数据的上层功能驱动所对应的虚拟通道的通道号。When the PCIE driver receives the first business data, it determines the first target queue number corresponding to the first target channel number from the first mapping relationship, and sends the first business data to the In the hardware queue corresponding to the first target queue number; wherein, the first target channel number is the channel number of the virtual channel corresponding to the upper layer function driver that delivers the first service data.

本发明的一个或多个实施例的细节在下面的附图和描述中提出。本发明的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below. Other features, objects and advantages of the invention will be apparent from the description, drawings and claims.

附图说明Description of drawings

为了更好地描述和说明这里公开的那些发明的实施例和或示例,可以参考一幅或多幅附图。用于描述附图的附加细书或示例不应当被认为是对所公开的发明、目前描述的实施例和或示例以及目前理解的这些发明的最佳模式中的任何一者的范围的限制。In order to better describe and illustrate embodiments and or examples of the inventions disclosed herein, reference may be made to one or more of the accompanying drawings. The accompanying specification or examples used to describe the drawings should not be considered limiting of the scope of any of the disclosed inventions, the presently described embodiments and or examples, and the best mode of these inventions currently understood.

图1为现有技术中WWAN产品主机侧的架构图;FIG. 1 is an architecture diagram of a host side of a WWAN product in the prior art;

图2为一个实施例中基于PCIE的通信方法的应用环境图;Fig. 2 is the application environment figure of the communication method based on PCIE in an embodiment;

图3为一个实施例中基于PCIE的通信方法的流程示意图之一;Fig. 3 is one of schematic flow charts of the communication method based on PCIE in an embodiment;

图4为一个实施例中基于PCIE的通信方法的流程示意图之二;Fig. 4 is the second schematic flow chart of the communication method based on PCIE in an embodiment;

图5为一个实施例中网络适配器驱动下发第二业务数据步骤的流程示意图;Fig. 5 is a schematic flowchart of the step of sending the second service data driven by the network adapter in one embodiment;

图6为一个实施例中PCIE驱动发送第一回传数据步骤的流程示意图;Fig. 6 is a schematic flow chart of the step of sending the first return data by the PCIE driver in one embodiment;

图7为一个实施例中PCIE驱动挂载上层功能驱动步骤的流程示意图;Fig. 7 is a schematic flow chart of the steps of the PCIE driver mounting the upper layer function driver in one embodiment;

图8为一个实施例中本申请主机侧的软件架构图;FIG. 8 is a software architecture diagram of the host side of the present application in an embodiment;

图9为一个实施例中基于PCIE的通信装置的结构框图;Fig. 9 is a structural block diagram of a communication device based on PCIE in an embodiment;

图10为一个实施例中计算机设备的内部结构图。Figure 10 is a diagram of the internal structure of a computer device in one embodiment.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.

图1示出了现有技术中WWAN产品主机侧的架构图。如图1所示,在现有WWAN产品的Windows驱动中,虽然其为PCIE设备,但是主机侧会通过UDE驱动将PCIE设备模拟为USB设备,并通过虚拟USB设备来进行数据通信。利用USB的成熟技术完成WWAN产品的MBIM通信、数据传输及设 备的电源管理等工作。但是,在新一代的5G通信要求下,基于USB的通信已然难以满足高性能产品的高速率、低时延和大带宽要求。因此,需要采用其他方式来实现。Fig. 1 shows a structure diagram of a host side of a WWAN product in the prior art. As shown in Figure 1, in the Windows driver of the existing WWAN product, although it is a PCIE device, the host side will emulate the PCIE device as a USB device through the UDE driver, and perform data communication through the virtual USB device. Utilize the mature technology of USB to complete the work of MBIM communication, data transmission and equipment power management of WWAN products. However, under the requirements of the new generation of 5G communication, it is already difficult for USB-based communication to meet the high-speed, low-latency and large-bandwidth requirements of high-performance products. Therefore, other methods are required to achieve it.

同时,在现有产品的Windows驱动中(如4G WWAN产品的Windows驱动中),多采用微软系统内置的MBIM驱动来实现MBIM数据的传输,无需独立开发。然而,在Windows最新的5G架构中,微软设计了NetAdapterCx架构,仅提供接口方法和接口适配,而没有提供成熟可供直接使用的MBIM驱动。对于IHV(Independent Hardware Vendor,独立硬件供应商)而言,其必须按照微软的驱动架构要求开发对应的驱动。At the same time, in the Windows driver of existing products (such as the Windows driver of 4G WWAN products), the built-in MBIM driver of Microsoft system is mostly used to realize the transmission of MBIM data, without independent development. However, in the latest 5G architecture of Windows, Microsoft designed the NetAdapterCx architecture, which only provides interface methods and interface adaptation, but does not provide a mature MBIM driver that can be used directly. For IHV (Independent Hardware Vendor, Independent Hardware Vendor), it must develop corresponding drivers in accordance with Microsoft's driver architecture requirements.

为解决前述问题,本申请提供了一种基于PCIE的通信方法、装置、计算机设备和可读存储介质。其中,PCIE驱动分别挂载各个上层功能驱动,并将PCIE端点设备的多个硬件通道映射为多个虚拟通道,以供各上层功能驱动使用。各上层功能驱动可直接通过PCIE驱动实现与PCIE端点设备之间的数据通信,无需将PCIE设备模拟为USB设备。如此,可通过PCIE方式完成主机侧与PCIE端点设备之间的数据通信,进而可提高传输速率,使得5G产品在计算机设备上能达到高速率、大带宽、低时延的效果,满足5G产品的速率要求。In order to solve the aforementioned problems, the present application provides a PCIE-based communication method, device, computer equipment and readable storage medium. Wherein, the PCIE driver mounts each upper-layer function driver respectively, and maps multiple hardware channels of the PCIE endpoint device into multiple virtual channels for use by each upper-layer function driver. Each upper-layer function driver can directly realize data communication with the PCIE endpoint device through the PCIE driver, without simulating the PCIE device as a USB device. In this way, the data communication between the host side and the PCIE endpoint device can be completed through PCIE, and the transmission rate can be increased, so that 5G products can achieve high speed, large bandwidth, and low delay on computer equipment, meeting the requirements of 5G products. rate requirements.

在一些实施例中,本申请还适配于微软5G的NetAdapterCx框架,将网络适配器驱动(即NetAdapter驱动)与PCIE驱动分开设置,使得硬件处理逻辑与业务逻辑分层。通过PCIE驱动实现主体硬件逻辑,从而可减少驱动微软认证等工作量。In some embodiments, the present application is also adapted to the NetAdapterCx framework of Microsoft 5G, and the network adapter driver (that is, the NetAdapter driver) is set separately from the PCIE driver, so that the hardware processing logic and business logic are layered. The main hardware logic is realized through the PCIE driver, which can reduce the workload of driving Microsoft certification.

本申请提供的基于PCIE的通信方法,可以应用于如图2所示的计算机设备中。该计算机设备可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑、物联网设备和便携式可穿戴设备,物联网设备可为智能音箱、智能电视、智能空调、智能车载设备等。便携式可穿戴设备可为智能手表、智能手环、头戴设备等。The PCIE-based communication method provided by this application can be applied to the computer equipment shown in FIG. 2 . The computer equipment can be, but not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, and the like.

其中,计算机设备可被划分为主机侧102与PCIE端点设备104。主机侧102为配置和运行上层功能驱动及内核驱动的部分。在计算机系统的架构中,其可被划分为用户层、内核层和硬件层。其中,上层功能驱动是指设于用户层的功能驱动,内核驱动是指设于内核层的功能驱动,内核驱动可包括PCIE驱动。Among them, the computer device can be divided into a host side 102 and a PCIE endpoint device 104 . The host side 102 is a part for configuring and running the upper layer function driver and the kernel driver. In the architecture of a computer system, it can be divided into user layer, kernel layer and hardware layer. Wherein, the upper layer function driver refers to the function driver set in the user layer, and the kernel driver refers to the function driver set in the kernel layer, and the kernel driver may include a PCIE driver.

主机侧102可通过PCIE接口和/或PCIE总线实现与PCIE端点设备104的连接。可以理解,PCIE端点设备104的设备类型可以依据实际情况确定,本申请对此不作具体限制,只需其通过PCIE接口和/或PCIE总线与主机侧102相连接即可。在下述一些实施例中,本申请以PCIE端点设备104为5G通信模组为例进行说明。The host side 102 can be connected to the PCIE endpoint device 104 through a PCIE interface and/or a PCIE bus. It can be understood that the device type of the PCIE endpoint device 104 can be determined according to the actual situation, and the present application does not make specific limitations on this, as long as it is connected to the host side 102 through a PCIE interface and/or a PCIE bus. In some of the following embodiments, the present application takes the PCIE endpoint device 104 as a 5G communication module as an example for illustration.

在一个实施例中,如图3所示,提供了一种基于PCIE的通信方法,以该方法应用于图2中的主机侧为例进行说明。包括以下步骤:In one embodiment, as shown in FIG. 3 , a PCIE-based communication method is provided, and the method is applied to the host side in FIG. 2 as an example for illustration. Include the following steps:

S202,当主机侧识别到PCIE端点设备,则PCIE驱动建立硬件队列的队列号与虚拟通道的通道号之间的第一映射关系;其中,硬件队列为PCIE端点设备的硬件访问通道。S202. When the host side recognizes the PCIE endpoint device, the PCIE driver establishes a first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel; wherein, the hardware queue is a hardware access channel of the PCIE endpoint device.

其中,PCIE端点设备会设定一定数量的硬件访问通道,该硬件访问通道即为各实施例涉及的“硬件队列”。可以理解,该硬件队列的具体器件类型可以依据PCIE端点设备的具体硬件结构来确定,本申请对此不作具体限制。在一个示例中,硬件队列可以为存储器件。对于每一硬件队列,其均有唯一的队列号来进行标识,从而可通过队列号对各个硬件队列进行区分。Wherein, the PCIE endpoint device will set a certain number of hardware access channels, and the hardware access channels are the "hardware queues" involved in each embodiment. It can be understood that the specific device type of the hardware queue can be determined according to the specific hardware structure of the PCIE endpoint device, which is not specifically limited in the present application. In one example, a hardware queue can be a memory device. Each hardware queue is identified by a unique queue number, so that each hardware queue can be distinguished by the queue number.

具体而言,在主机侧与PCIE端点设备相连接的情况下,主机侧可识别到PCIE端点设备的接入。PCIE驱动将各硬件队列映射为不同的虚拟通道,并建立硬件队列的队列号与虚拟通道的通道号之间的第一映射关系。进一步地,虚拟通道的具体设置数量可以依据业务数据的数量来确定,本申请对此不作具体限制。在其中一个实施例中,同一硬件队列的队列号可对应着一个虚拟通道的通道号,即硬件队列与虚拟通道之间为一一对应的关系。在另一个实施例中,同一硬件队列的队列号可对应着多个不同虚拟通道的通道号,也即,硬件队列与虚拟通道之间为一对多的对应关系,如此,当业务数据的数量超过硬件队列的队列数时,可将多类业务数据送入同一硬件队列中,以进一步实现高效率、大带宽与低时延。Specifically, when the host side is connected to the PCIE endpoint device, the host side can recognize the access of the PCIE endpoint device. The PCIE driver maps each hardware queue to a different virtual channel, and establishes a first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel. Further, the specific set number of virtual channels may be determined according to the amount of service data, which is not specifically limited in this application. In one embodiment, the queue number of the same hardware queue may correspond to the channel number of a virtual channel, that is, there is a one-to-one correspondence between the hardware queue and the virtual channel. In another embodiment, the queue number of the same hardware queue can correspond to the channel numbers of multiple different virtual channels, that is, there is a one-to-many correspondence between the hardware queue and the virtual channel, so when the amount of business data When the number of queues exceeds the number of hardware queues, multiple types of business data can be sent to the same hardware queue to further achieve high efficiency, large bandwidth and low latency.

在其中一个实施例中,PCIE驱动可将硬件队列映射为两种类型的虚拟通道,以构建数据通路和 控制通路。其中,数据通路为用于传输通信数据的通路,控制通路为用于传输控制消息的通路。数据通路与控制通路分别包括自身的收发硬件队列,以实现通信数据与控制消息的收发。In one of the embodiments, the PCIE driver can map the hardware queues into two types of virtual channels to construct data paths and control paths. Wherein, the data path is a path for transmitting communication data, and the control path is a path for transmitting control messages. The data path and the control path respectively include their own sending and receiving hardware queues to realize the sending and receiving of communication data and control messages.

S204,PCIE驱动挂载每一上层功能驱动,并为每一上层功能驱动分配对应的虚拟通道,以使上层功能驱动通过对应的虚拟通道下发第一业务数据。S204. The PCIE driver mounts each upper-layer function driver, and assigns a corresponding virtual channel to each upper-layer function driver, so that the upper-layer function driver delivers the first service data through the corresponding virtual channel.

其中,上层功能驱动包括但不局限于GNSS驱动、烧录驱动、COM端口驱动(可以实现AT命令、FLASH、log抓取和Coredump导出等功能)等。第一业务数据是指上层功能驱动下发的业务数据,其可以但不限于是IP(Internet Protocol,网际互联协议)数据和控制消息等。Among them, the upper layer function drivers include but are not limited to GNSS drivers, burning drivers, COM port drivers (which can realize functions such as AT commands, FLASH, log capture, and Coredump export), etc. The first service data refers to the service data delivered by the upper-layer function driver, which may be but not limited to IP (Internet Protocol, Internet Protocol) data and control messages.

具体而言,PCIE驱动可以分别挂载每一上层功能驱动,并为每一上层功能驱动分配对应的虚拟通道,使得上层功能驱动可以映射到底层的虚拟通道,并通过所分配的虚拟通道来实现数据传输。当某一上层功能驱动需要向PCIE端点设备发送对应的业务数据,则该上层功能驱动可通过其对应的虚拟通道向PCIE驱动发送该第一业务数据,PCIE驱动在进行后续处理后,再将第一业务数据发送至PCIE端点设备。Specifically, the PCIE driver can mount each upper-layer function driver separately, and assign a corresponding virtual channel to each upper-layer function driver, so that the upper-layer function driver can be mapped to the underlying virtual channel, and through the assigned virtual channel. data transmission. When a certain upper-layer function driver needs to send corresponding business data to the PCIE endpoint device, the upper-layer function driver can send the first business data to the PCIE driver through its corresponding virtual channel, and the PCIE driver will send the first business data to the PCIE driver after subsequent processing. A service data is sent to the PCIE endpoint device.

在其中一个实施例中,每一上层功能驱动可对应不同的虚拟通道。在另一个实施例中,每一上层功能驱动可对应着多个虚拟通道,例如,同一上层功能驱动可对应着2个虚拟通道,任一虚拟通道用于传输通信数据,另一虚拟通道用于传输控制消息。In one embodiment, each upper layer function driver may correspond to a different virtual channel. In another embodiment, each upper-layer function driver can correspond to multiple virtual channels, for example, the same upper-layer function driver can correspond to two virtual channels, any virtual channel is used to transmit communication data, and the other virtual channel is used for Transmit control messages.

S206,PCIE驱动在接收到第一业务数据的情况下,从第一映射关系中确定第一目标通道号对应的第一目标队列号,并将第一业务数据送入第一目标队列号对应的硬件队列中;其中,第一目标通道号为下发第一业务数据的上层功能驱动所对应的虚拟通道的通道号。S206, when the PCIE driver receives the first business data, determine the first target queue number corresponding to the first target channel number from the first mapping relationship, and send the first business data into the first target queue number corresponding to In the hardware queue; wherein, the first target channel number is the channel number of the virtual channel corresponding to the upper layer function driver delivering the first service data.

具体而言,当PCIE驱动接收到某一上层功能驱动下发的第一业务数据,则其PCIE驱动可根据该上层功能驱动所对应的虚拟通道的通道号,从第一映射关系中确定与该通道号相对应的第一目标队列号,并将第一业务数据送入第一目标队列号对应的硬件队列中。如此,可将上层功能驱动下发的第一业务数据送入指定的硬件队列上,实现主机侧与PCIE端点设备之间的数据传输。在其中一个实施例中,上层功能驱动可通过向PCIE驱动发送数据读取请求或者数据写入请求,以将第一业务数据发送到指定的硬件队列上。Specifically, when the PCIE driver receives the first service data delivered by a certain upper-layer function driver, its PCIE driver can determine the channel number corresponding to the virtual channel from the first mapping relationship according to the channel number of the upper-layer function driver. The channel number corresponds to the first target queue number, and the first service data is sent to the hardware queue corresponding to the first target queue number. In this way, the first service data delivered by the upper-layer function driver can be sent to the designated hardware queue to realize data transmission between the host side and the PCIE endpoint device. In one of the embodiments, the upper-layer function driver can send the first service data to a specified hardware queue by sending a data read request or a data write request to the PCIE driver.

上述基于PCIE的通信方法中,在主机侧与PCIE端点设备相连接的情况下,主机侧的PCIE驱动将PCIE端点设备的多个硬件队列映射为多个虚拟通道,并建立硬件队列的队列号与虚拟通道的通道号之间的第一映射关系。PCIE驱动可挂载各个上层功能驱动,并为所挂载的上层功能驱动分配对应的虚拟通道,以供上层功能驱动使用,上层功能驱动可通过对应的虚拟通道向PCIE驱动下发第一业务数据。在接收到第一业务数据的情况下,PCIE驱动从第一映射关系中确定下发该第一业务数据的上层驱动所对应的硬件队列号,即第一目标队列号,并将第一业务数据送入至第一目标队列号对应的硬件队列中。本申请中,各上层功能驱动可直接通过PCIE驱动实现与PCIE端点设备之间的数据通信,无需将PCIE设备模拟为USB设备。如此,可通过PCIE方式完成主机侧与PCIE端点设备之间的数据通信,进而可提高传输速率,使得5G产品在计算机设备上能达到高速率、大带宽、低时延的效果,满足5G产品的速率要求。In the above-mentioned PCIE-based communication method, when the host side is connected to the PCIE endpoint device, the PCIE driver on the host side maps multiple hardware queues of the PCIE endpoint device to multiple virtual channels, and establishes the queue number and A first mapping relationship between channel numbers of virtual channels. The PCIE driver can mount various upper-layer function drivers, and assign corresponding virtual channels to the mounted upper-layer function drivers for use by the upper-layer function drivers. The upper-layer function drivers can send the first business data to the PCIE driver through the corresponding virtual channels . In the case of receiving the first service data, the PCIE driver determines the hardware queue number corresponding to the upper-layer driver that issues the first service data from the first mapping relationship, that is, the first target queue number, and transfers the first service data to Send it to the hardware queue corresponding to the first target queue number. In this application, each upper-layer function driver can directly implement data communication with the PCIE endpoint device through the PCIE driver, without simulating the PCIE device as a USB device. In this way, the data communication between the host side and the PCIE endpoint device can be completed through PCIE, and the transmission rate can be increased, so that 5G products can achieve high speed, large bandwidth, and low delay on computer equipment, meeting the requirements of 5G products. rate requirements.

在一个实施例中,内核驱动还包括网络适配器驱动,即NetAdapter驱动。如图4所示,基于PCIE的通信方法还包括:In one embodiment, the kernel driver also includes a network adapter driver, that is, a NetAdapter driver. As shown in Figure 4, the PCIE-based communication method also includes:

S208,PCIE驱动挂载网络适配器驱动,并为网络适配器驱动分配对应的虚拟通道,以使网络适配器驱动通过对应的虚拟通道下发第二业务数据;S208, the PCIE driver mounts the network adapter driver, and assigns a corresponding virtual channel to the network adapter driver, so that the network adapter driver sends the second service data through the corresponding virtual channel;

S210,PCIE驱动在接收到第二业务数据的情况下,从第一映射关系中确定第二目标通道号对应的第二目标队列号,并将第二业务数据送入第二目标队列号对应的硬件队列中;其中,第二目标通道号为网络适配器驱动所对应的虚拟通道的通道号。S210, when the PCIE driver receives the second business data, determine the second target queue number corresponding to the second target channel number from the first mapping relationship, and send the second business data to the second target queue number corresponding to In the hardware queue; wherein, the second target channel number is the channel number of the virtual channel corresponding to the network adapter driver.

其中,第二业务数据是指网络适配器驱动发送的业务数据,其可以但不限于是下发IP数据和下发控制消息等。Wherein, the second service data refers to the service data sent by the network adapter driver, which may be but not limited to sending IP data and sending control messages.

PCIE驱动作为总线驱动,用于实现硬件链路的逻辑处理。而网络适配器驱动作为功能驱动的一种,与上层功能驱动一样,用于实现业务逻辑。本申请将功能驱动与PCIE驱动分开,使得业务逻辑与 硬件处理逻辑分层,进而能够在业务处理上更为清晰,便于开发人员理解、定位和解决问题。As a bus driver, the PCIE driver is used to realize the logic processing of the hardware link. As a kind of function driver, the network adapter driver is used to implement business logic just like the upper layer function driver. This application separates the function driver from the PCIE driver, so that the business logic and hardware processing logic are layered, so that the business processing can be clearer, and it is convenient for developers to understand, locate and solve problems.

具体而言,PCIE驱动可挂载网络适配器驱动,并可为网络适配器驱动分配对应的虚拟通道。进一步地,PCIE驱动可以以相同的方式来为各上层功能驱动和网络适配器分配虚拟通道,具体可如上述任一实施例所述,此处不再赘述。在PCIE驱动为网络适配器驱动分配虚拟通道之后,网络适配器驱动可以映射到底层的虚拟通道,并通过所分配的虚拟通道来实现数据传输。当PCIE驱动接收到网络适配器驱动通过对应的虚拟通道下发的第二业务数据,则可根据网络适配器所对应的虚拟通道的通道号,从第一映射关系中确定对应的第二目标队列号,并将第二业务数据送入第二目标队列号对应的硬件队列中。如此,可将网络适配器驱动下发的第二业务数据送入指定的硬件队列上,实现主机侧与PCIE端点设备之间的数据传输。Specifically, the PCIE driver can mount the network adapter driver, and can allocate a corresponding virtual channel to the network adapter driver. Further, the PCIE driver can allocate virtual channels to the upper-layer function drivers and network adapters in the same manner, which can be specifically as described in any of the above embodiments, and will not be repeated here. After the PCIE driver allocates a virtual channel to the network adapter driver, the network adapter driver can map to the underlying virtual channel and implement data transmission through the allocated virtual channel. When the PCIE driver receives the second service data sent by the network adapter driver through the corresponding virtual channel, the corresponding second target queue number can be determined from the first mapping relationship according to the channel number of the virtual channel corresponding to the network adapter, And send the second service data into the hardware queue corresponding to the second target queue number. In this way, the second service data delivered by the network adapter driver can be sent to the designated hardware queue, so as to realize the data transmission between the host side and the PCIE endpoint device.

在其中一个实施例中,网络适配器驱动为基于NetAdapterCx架构实现的驱动,并适配Windows框架接口。In one of the embodiments, the network adapter driver is a driver implemented based on the NetAdapterCx architecture and adapts to the Windows framework interface.

本申请中,PCIE驱动与各个功能驱动(包括网络适配器驱动和各上层功能驱动)之间为父子关系,各功能驱动作为子驱动,只提供业务处理接口。在子驱动稳定后,只需要修改PCIE驱动,即可实现主机侧与PCIE端点设备之间的适配。而微软的驱动HLK(测试自动化工具组)认证对于PCIE驱动的认证项较少,对于功能驱动的认证项较多。本申请通过将主体硬件逻辑置于PCIE驱动中,从而可极大的减少驱动在微软HLK认证中的工作量。In this application, there is a parent-child relationship between the PCIE driver and each function driver (including the network adapter driver and each upper-layer function driver), and each function driver serves as a child driver and only provides a service processing interface. After the sub-driver is stable, only the PCIE driver needs to be modified to realize the adaptation between the host side and the PCIE endpoint device. However, Microsoft's driver HLK (test automation tool group) certification has fewer certification items for PCIE drivers, and more certification items for function drivers. This application puts the main hardware logic in the PCIE driver, thereby greatly reducing the workload of the driver in Microsoft HLK certification.

本实施例中,通过将功能驱动与PCIE驱动分开,使得业务逻辑与硬件处理逻辑分层,进而能够在业务处理上更为清晰,便于开发人员理解、定位和解决问题。同时,通过将主体硬件逻辑置于PCIE驱动中,从而可极大的减少驱动在微软HLK认证中的工作量。In this embodiment, by separating the function driver from the PCIE driver, the business logic and the hardware processing logic are layered, so that the business processing can be clearer, and it is convenient for developers to understand, locate and solve problems. At the same time, by placing the main hardware logic in the PCIE driver, the workload of the driver in Microsoft HLK certification can be greatly reduced.

在一个实施例中,基于PCIE的通信方法还包括:网络适配器驱动调用预设函数接口,以向PCIE驱动下发第二业务数据。其中,预设函数接口为根据PCIE驱动的UUID(Universally Unique Identifier,通用唯一识别码)及网络适配器的UUID生成的函数接口。In one embodiment, the PCIE-based communication method further includes: the network adapter driver calls a preset function interface to deliver the second service data to the PCIE driver. Wherein, the preset function interface is a function interface generated according to a UUID (Universally Unique Identifier) driven by PCIE and a UUID of a network adapter.

具体而言,由于PCIE驱动与网络适配器驱动都位于内核层,因此,可以通过微软WDF(Windows Driver Framework,Windows驱动架构)框架提供的技术,根据PCIE驱动的UUID和网络适配器的UUID生成预设函数接口。网络适配器驱动调用该预设函数接口实现将数据传输至PCIE驱动,完成数据传输,无需做任何请求封装和转换,进而可加快传输速率。Specifically, since both the PCIE driver and the network adapter driver are located at the kernel layer, the preset function can be generated according to the UUID of the PCIE driver and the UUID of the network adapter through the technology provided by the Microsoft WDF (Windows Driver Framework, Windows Driver Framework) framework. interface. The network adapter driver invokes the preset function interface to transmit data to the PCIE driver to complete the data transmission without any request encapsulation and conversion, thereby speeding up the transmission rate.

在其中一个实施例中,本申请可在PCIE驱动中通过UUID生成预设函数接口,并在该接口中定义用于进行数据传输的API(Application Programming Interface,应用程序接口)。如此,网络适配器驱动只需导出预设函数接口,即可利用该接口定义的API将第二业务数据下发至PCIE驱动中。In one of the embodiments, the application can generate a preset function interface through UUID in the PCIE driver, and define an API (Application Programming Interface, Application Programming Interface) for data transmission in the interface. In this way, the network adapter driver only needs to export the preset function interface, and the API defined by the interface can be used to deliver the second service data to the PCIE driver.

本实施例中,网络适配器驱动调用预设函数接口来向PCIE驱动下发第二业务数据,无需做任何请求封装和转换,进而可加快传输速率。In this embodiment, the network adapter driver invokes a preset function interface to deliver the second service data to the PCIE driver without any request encapsulation and conversion, thereby speeding up the transmission rate.

在一个实施例中,第二业务数据包括下发IP数据和下发MBIM协议数据。如图5所示,网络适配器驱动调用预设函数接口,以向PCIE驱动下发第二业务数据的步骤,包括:In one embodiment, the second service data includes sending IP data and sending MBIM protocol data. As shown in Figure 5, the network adapter driver calls the preset function interface to send the second service data to the PCIE driver, including:

S302,网络适配器驱动调用预设函数接口,以向PCIE驱动发送该下发IP数据;S302. The network adapter driver calls a preset function interface to send the issued IP data to the PCIE driver;

S304,网络适配器驱动根据第二目标通道号及下发MBIM协议数据生成数据写入请求,并向PCIE驱动发送数据写入请求,以向PCIE驱动发送该下发MBIM协议数据。S304. The network adapter driver generates a data write request according to the second target channel number and the delivered MBIM protocol data, and sends the data write request to the PCIE driver, so as to send the delivered MBIM protocol data to the PCIE driver.

具体而言,在网络适配器驱动的数据传输中,包括下发MBIM协议数据传输和下发IP数据传输,其中下发MBIM协议数据为控制消息。考虑到下发IP数据的数据量比较大,且下发IP数据的传输速率影响着通信速率,为了提升数据传输效率,使得5G产品在计算机设备上能达到高速率、大带宽、低时延的效果,满足5G产品的速率要求,网络适配器驱动的下发IP数据可以直接通过预设函数接口发送到PCIE驱动,以减少数据的封装和转换,进而提升传输速率。Specifically, the data transmission driven by the network adapter includes sending MBIM protocol data transmission and IP data transmission, wherein the sending MBIM protocol data is a control message. Considering that the amount of IP data delivered is relatively large, and the transmission rate of delivered IP data affects the communication rate, in order to improve data transmission efficiency, 5G products can achieve high speed, large bandwidth, and low delay on computer equipment. As a result, to meet the rate requirements of 5G products, the IP data delivered by the network adapter driver can be directly sent to the PCIE driver through the preset function interface to reduce data encapsulation and conversion, thereby increasing the transmission rate.

由于下发MBIM协议数据对于速率要求不高,因此网络适配器驱动可通过发送数据写入请求来完成下发MBIM协议数据的发送。由于数据写入请求是标准的方式,可以直接调用系统所提供的接口来完成,而无需再单独定义预设的函数接口,进而可简化程序实现。具体地,网络适配器驱动在发送该下发MBIM协议数据的过程中,可根据网络适配器驱动所对应的虚拟通道的通道号,以及下发MBIM 协议数据生成数据写入请求,并向PCIE驱动发送该数据写入请求,使得PCIE驱动可以接收该下发MBIM协议数据,并将下发MBIM协议数据送入对应的硬件队列中,实现下发MBIM协议数据的传输。Since sending the MBIM protocol data does not require a high rate, the network adapter driver can complete the sending of the MBIM protocol data by sending a data write request. Since the data writing request is a standard method, the interface provided by the system can be directly invoked to complete it, without having to define a preset function interface separately, thereby simplifying program implementation. Specifically, in the process of sending the MBIM protocol data, the network adapter driver can generate a data write request according to the channel number of the virtual channel corresponding to the network adapter driver and send the MBIM protocol data, and send the data write request to the PCIE driver. The data writing request enables the PCIE driver to receive the issued MBIM protocol data, and send the issued MBIM protocol data to the corresponding hardware queue, so as to realize the transmission of the issued MBIM protocol data.

本实施例中,网络适配器驱动通过调用预设函数接口向PCIE驱动下发IP数据,以及通过数据写入请求向PCIE驱动发送MBIM协议数据,如此,既可提升传输速率,又可简化程序实现。In this embodiment, the network adapter driver sends IP data to the PCIE driver by calling a preset function interface, and sends MBIM protocol data to the PCIE driver through a data write request. In this way, the transmission rate can be improved and program implementation can be simplified.

在一个实施例中,基于PCIE的通信方法还包括:PCIE驱动在获取到PCIE端点设备发送的第一回传数据的情况下,调用预设函数接口,以向网络适配器驱动发送第一回传数据。其中,预设函数接口为根据PCIE驱动的UUID和网络适配器驱动的UUID生成的函数接口。In one embodiment, the PCIE-based communication method further includes: when the PCIE driver obtains the first return data sent by the PCIE endpoint device, calling a preset function interface to send the first return data to the network adapter driver . Wherein, the preset function interface is a function interface generated according to the UUID driven by the PCIE and the UUID driven by the network adapter.

其中,该预设函数接口可如上实施例所述,本申请在此不再赘述。第一回传数据是指需要发送至网络适配器驱动的回传数据,在其中一个实施例中,第一回传数据可以为回传IP数据或者回传MBIM协议数据。Wherein, the preset function interface can be as described in the above embodiment, and the present application will not repeat it here. The first returned data refers to the returned data that needs to be sent to the network adapter driver. In one embodiment, the first returned data may be returned IP data or returned MBIM protocol data.

具体而言,在PCIE端点设备向网络适配器驱动回传数据的过程中,由于PCIE驱动与网络适配器驱动的关系为父子关系,因此PCIE端点设备需要经过PCIE驱动向网络适配器驱动发送第一回传数据。PCIE驱动在获取到第一回传数据的情况下,可调用预设函数接口,以通过预设函数接口向网络适配器驱动发送该第一回传数据。如此,无需做任何请求封装和转换,进而可加快回传速率。Specifically, in the process of returning data from the PCIE endpoint device to the network adapter driver, since the relationship between the PCIE driver and the network adapter driver is a parent-child relationship, the PCIE endpoint device needs to send the first return data to the network adapter driver through the PCIE driver . When the PCIE driver acquires the first return data, it can call the preset function interface to send the first return data to the network adapter driver through the preset function interface. In this way, there is no need to do any request encapsulation and conversion, which can speed up the return rate.

在一个实施例中,第一回传数据为回传IP数据或回传MBIM协议数据。如图6所示,PCIE驱动在获取到PCIE端点设备发送的第一回传数据的情况下,调用预设函数接口,以向网络适配器驱动发送第一回传数据的步骤,包括:In one embodiment, the first returned data is returned IP data or returned MBIM protocol data. As shown in Figure 6, when the PCIE driver obtains the first return data sent by the PCIE endpoint device, it calls the preset function interface to send the first return data to the network adapter driver, including:

S402,当第一回传数据为回传IP数据,则PCIE驱动调用预设函数接口,以向网络适配器驱动发送回传IP数据;S402, when the first returned data is returned IP data, the PCIE driver invokes a preset function interface to send the returned IP data to the network adapter driver;

S404,当第一回传数据为回传MBIM数据,则PCIE驱动将回传MBIM数据写入对应的内存队列中;S404, when the first returned data is the returned MBIM data, the PCIE driver writes the returned MBIM data into the corresponding memory queue;

S406,PCIE驱动在接收到网络适配器驱动发送的数据读取请求的情况下,向网络适配器驱动发送该回传MBIM数据。S406, when the PCIE driver receives the data reading request sent by the network adapter driver, send the returned MBIM data to the network adapter driver.

本实施例中,对应的内存队列是指对应于网络适配器驱动的内存队列,该内存队列是指在系统中映射的内存,用于存储PCIE端点设备的数据。In this embodiment, the corresponding memory queue refers to the memory queue corresponding to the network adapter driver, and the memory queue refers to the memory mapped in the system for storing the data of the PCIE endpoint device.

具体而言,PCIE驱动可通过不同的方式来传输回传IP数据和回传MBIM数据。考虑到回传IP数据的数据量可能比较大,且回传IP数据的传输速率影响着通信速率,因此,为提升数据传输效率,使得5G产品在计算机设备上能达到高速率、大带宽、低时延的效果,PCIE驱动可直接通过调用预设函数接口来向网络适配器驱动发送回传IP数据,以减少数据的封装和转换,进而提升传输速率。Specifically, the PCIE driver can transmit backhaul IP data and backhaul MBIM data in different ways. Considering that the data volume of backhauled IP data may be relatively large, and the transmission rate of backhauled IP data affects the communication rate, therefore, in order to improve data transmission efficiency, 5G products can achieve high speed, large bandwidth, and low cost on computer equipment. Due to the effect of delay, the PCIE driver can directly send back IP data to the network adapter driver by calling the preset function interface to reduce data encapsulation and conversion, thereby increasing the transmission rate.

由于回传MBIM协议数据对于速率要求不高,因此网络适配器驱动可通过发送数据读取请求来完成回传MBIM协议数据的发送。由于数据读取请求是标准的方式,可以直接调用系统所提供的接口来完成,而无需再单独定义预设的函数接口,进而可简化程序实现。具体地,PCIE驱动可将回传MBIM数据写入至网络适配器驱动对应的内存队列中。网络适配器驱动可通过向PCIE驱动发送数据读取请求,来读取对应的内存队列中的数据,以读取该回传MBIM数据。Since the rate requirement for returning the MBIM protocol data is not high, the network adapter driver can complete the sending of the returning MBIM protocol data by sending a data read request. Since the data reading request is a standard method, the interface provided by the system can be directly called to complete it, without having to define a preset function interface separately, thereby simplifying program implementation. Specifically, the PCIE driver can write the returned MBIM data into the memory queue corresponding to the network adapter driver. The network adapter driver can read the data in the corresponding memory queue by sending a data read request to the PCIE driver, so as to read the returned MBIM data.

本实施例中,PCIE驱动通过调用预设函数接口向网络适配器驱动回传IP数据,以及通过数据读取请求向网络适配器驱动回传MBIM协议数据,如此,既可提升传输速率,又可简化程序实现。In this embodiment, the PCIE driver returns the IP data to the network adapter driver by calling the preset function interface, and sends the MBIM protocol data back to the network adapter driver through the data read request, so that the transmission rate can be improved and the program can be simplified accomplish.

在一个实施例中,基于PCIE的通信方法还包括:In one embodiment, the communication method based on PCIE also includes:

PCIE驱动在获取到PCIE端点设备发送的第二回传数据的情况下,确定第二回传数据对应的目标上层功能驱动;When the PCIE driver obtains the second return data sent by the PCIE endpoint device, determine the target upper layer function driver corresponding to the second return data;

PCIE驱动将第二回传数据写入目标上层功能对应的内存队列中,并在接收到目标上层功能驱动发送的数据读取请求的情况下,向目标上层功能驱动发送第二回传数据。The PCIE driver writes the second return data into the memory queue corresponding to the target upper layer function, and sends the second return data to the target upper layer function driver when receiving the data read request sent by the target upper layer function driver.

其中,第二回传数据是指PCIE端点设备发送给上层功能驱动的回传数据。Wherein, the second return data refers to the return data sent by the PCIE endpoint device to the upper layer function driver.

具体而言,按照微软的驱动架构,上层功能驱动可通过发送数据读取请求与底层驱动(即PCIE驱动)进行数据传输。具体地,PCIE驱动在获取到第二回传数据的情况下,确定需要接收第二回传数据的上层功能驱动,该上层功能驱动即为目标上层功能驱动。PCIE驱动将第二回传数据写入至目标上 层功能驱动所对应的内存队列中。目标上层功能驱动可通过向PCIE驱动发送数据读取请求,来读取对应内存队列中的数据,以读取该第二回传数据。Specifically, according to the driver architecture of Microsoft, the upper-layer function driver can perform data transmission with the lower-layer driver (ie, PCIE driver) by sending a data read request. Specifically, when the PCIE driver obtains the second returned data, it determines the upper-layer function driver that needs to receive the second returned data, and the upper-layer function driver is the target upper-layer function driver. The PCIE driver writes the second return data into the memory queue corresponding to the target upper layer function driver. The target upper layer function driver can read the data in the corresponding memory queue by sending a data read request to the PCIE driver, so as to read the second returned data.

在其中一个实施例中,本申请可通过以下方式来获取第一回传数据与第二回传数据:PCIE端点设备可将回传数据写入DMA(Direct Memory Access,直接存储器访问)内存中,并通过中断的方式通知主机侧,以使主机侧获知有回传数据进行处理。主机侧在接收到中断后,从DMA内存中获取该回传数据,并对该回传数据进行解析。根据解析后的回传数据判断需要接收该回传数据的功能驱动。当该回传数据为发送至网络适配器驱动的回传数据,则以解析后的回传数据作为第一回传数据;当回传数据为发送至上层功能驱动的回传数据,则以解析后的回传数据作为第二回传数据。In one of the embodiments, the application can obtain the first return data and the second return data in the following manner: the PCIE endpoint device can write the return data into DMA (Direct Memory Access, direct memory access) memory, And the host side is notified through an interrupt, so that the host side is notified that there is returned data for processing. After receiving the interrupt, the host side obtains the returned data from the DMA memory, and analyzes the returned data. Determine the function driver that needs to receive the returned data according to the parsed returned data. When the returned data is sent to the network adapter driver, the parsed returned data is used as the first returned data; when the returned data is sent to the upper layer function driver, the parsed returned data is used The return data of is used as the second return data.

数据读取请求作为标准的方式,可以直接调用系统所提供的接口来实现数据读取。本实施例通过调用系统所提供的接口来完成第二回传数据的读取,实现PCIE端点设备与上层功能驱动之间的数据回传,从而可简化程序实现。Data reading request is a standard method, which can directly call the interface provided by the system to realize data reading. In this embodiment, the reading of the second returned data is completed by invoking the interface provided by the system, and the data returned between the PCIE endpoint device and the upper-layer function driver is realized, thereby simplifying program implementation.

在一个实施例中,如图7所示,PCIE驱动挂载每一上层功能驱动,并为每一上层功能驱动分配对应的虚拟通道的步骤,包括:In one embodiment, as shown in Figure 7, the PCIE driver mounts each upper-layer function driver, and the step of assigning a corresponding virtual channel for each upper-layer function driver includes:

S502,PCIE驱动生成子节点,其中,子节点的数量根据上层功能驱动的数量确定;S502, the PCIE driver generates child nodes, wherein the number of child nodes is determined according to the number of upper layer function drivers;

S504,PCIE驱动通过子节点挂载每一上层功能驱动;其中,不同的上层功能驱动对应于不同的子节点;S504, the PCIE driver mounts each upper-layer function driver through the sub-node; wherein, different upper-layer function drivers correspond to different sub-nodes;

S506,PCIE驱动为每一上层功能驱动分配对应的虚拟通道,并建立子节点与虚拟通道的通道号之间的第二映射关系。S506. The PCIE driver allocates a corresponding virtual channel to each upper-layer function driver, and establishes a second mapping relationship between the child node and the channel number of the virtual channel.

从第一映射关系中确定第一目标通道号对应的第一目标队列号的步骤之前,还包括:PCIE驱动根据下发第一业务数据的上层功能驱动所对应的子节点,从第二映射关系中确定第一目标通道号。Before the step of determining the first target queue number corresponding to the first target channel number from the first mapping relationship, it also includes: the PCIE driver drives the corresponding child node according to the upper layer function that sends the first business data, from the second mapping relationship Determine the first target channel number in .

其中,子节点可以是唯一标识,用于对所挂载的功能驱动进行区分。Wherein, the child node may be a unique identifier, which is used to distinguish the mounted function drivers.

具体而言,PCIE驱动可生成不同的子节点,并通过各个子节点分别挂载各个上层功能驱动。其中,一个子节点挂载一个上层功能驱动,且一个上层功能驱动通过一个子节点挂载。PCIE驱动在挂载各上层功能驱动的情况下,可为各上层功能驱动分配对应的虚拟通道,分配虚拟通道的方式可如上实施例所述,本申请对此不作赘述。虚拟通道分配后,PCIE驱动可建立第二映射关系,以通过第二映射关系反映每一上层功能驱动的子节点与其所对应的虚拟通道的通道号之间的映射关系。Specifically, the PCIE driver can generate different sub-nodes, and each upper-layer function driver can be mounted through each sub-node. Wherein, one sub-node mounts one upper-layer function driver, and one upper-layer function driver is mounted through one sub-node. When the PCIE driver mounts each upper-layer function driver, it can assign corresponding virtual channels to each upper-layer function driver. The method of allocating virtual channels can be as described in the above embodiment, and this application will not repeat it. After the virtual channel is allocated, the PCIE driver can establish a second mapping relationship, so as to reflect the mapping relationship between the child node of each upper layer function driver and the channel number of the corresponding virtual channel through the second mapping relationship.

在其中一个实施例中,网络适配器驱动与各个上层功能驱动同作为功能驱动,PCIE驱动还可通过子节点挂载网络适配器驱动,且不同的功能驱动挂载于不同的子节点。第二映射关系还可反映网络适配器驱动的子节点与网络适配器驱动所对应的虚拟通道的通道号之间的映射关系。In one of the embodiments, the network adapter driver and each upper-layer function driver serve as the function driver, and the PCIE driver can also mount the network adapter driver through the sub-node, and different function drivers are mounted on different sub-nodes. The second mapping relationship may also reflect the mapping relationship between the sub-nodes of the network adapter driver and the channel number of the virtual channel corresponding to the network adapter driver.

当PCIE驱动接收到功能驱动下发的业务数据,PCIE驱动可根据下发该业务数据的功能驱动的子节点,从第二映射关系中确定该功能驱动所对应的虚拟通道的通道号,进而从第一映射关系中确定对应的硬件队列的队列号,以向PCIE端点设备下发业务数据。When the PCIE driver receives the service data issued by the function driver, the PCIE driver can determine the channel number of the virtual channel corresponding to the function driver from the second mapping relationship according to the child node of the function driver that delivered the service data, and then from The queue number of the corresponding hardware queue is determined in the first mapping relationship, so as to deliver service data to the PCIE endpoint device.

本实施例中,由于子节点是唯一编号,即使通道号发生变化或者第一映射关系、第二映射关系有所变化,均可根据子节点准确确定第一目标通道号,进而提高通信的可靠性。In this embodiment, since the child node is a unique number, even if the channel number changes or the first mapping relationship and the second mapping relationship change, the first target channel number can be accurately determined according to the child node, thereby improving the reliability of communication .

在一个实施例中,基于PCIE的通信方法还包括:PCIE驱动获取主机侧的工作模式,并根据工作模式导出对应的子节点。In one embodiment, the PCIE-based communication method further includes: the PCIE driver obtains the working mode of the host side, and derives a corresponding sub-node according to the working mode.

其中,工作模式可以是主机侧在启动时所处的模式,可以但不限于是正常模式、debug模式、烧录模式和dump模式等。Wherein, the working mode may be the mode that the host side is in when starting up, and may be but not limited to normal mode, debug mode, burning mode and dump mode, etc.

具体而言,本申请可根据主机侧的工作模式导出对应的子节点,以完成不同状态的功能。在其中一个实施例中,本申请在正常模式下导出NetAdapter端口和GNSS端口;在debug模式下导出所有端口,如日志导出端口等;在烧录模式下导出烧录端口,用于固件的烧录功能;在dump模式下只导出coredump端口。Specifically, the present application can derive corresponding sub-nodes according to the working mode of the host side, so as to complete functions in different states. In one of the embodiments, the application exports NetAdapter ports and GNSS ports in normal mode; exports all ports in debug mode, such as log export ports, etc.; exports burning ports in burning mode for burning of firmware Function; only coredump ports are exported in dump mode.

在一个实施例中,将第一业务数据送入第一目标队列号对应的硬件队列中的步骤,包括:PCIE驱动根据第一目标通道号及第一业务数据生成数据包,并将数据包送入第一目标队列号对应的硬件队列中。In one embodiment, the step of sending the first business data into the hardware queue corresponding to the first target queue number includes: the PCIE driver generates a data packet according to the first target channel number and the first business data, and sends the data packet to into the hardware queue corresponding to the first target queue number.

具体而言,PCIE驱动在接收到上层功能驱动下发的第一业务数据的情况下,可根据第一目标通道号与第一业务数据进行组包,使得数据包的包头包括第一目标通道号,以便于PCIE端点设备通过第一目标通道号确定第一业务数据的业务类型,并进行后续的处理。进一步地,数据包的包头还可包括第一目标队列号。PCIE驱动可将数据包送入对应的硬件队列中。Specifically, when the PCIE driver receives the first service data sent by the upper-layer function driver, it can group the first service data with the first target channel number so that the header of the data packet includes the first target channel number , so that the PCIE endpoint device determines the service type of the first service data through the first target channel number, and performs subsequent processing. Further, the packet header of the data packet may also include the first target queue number. The PCIE driver can send the data packet into the corresponding hardware queue.

在其中一个实施例中,类似地,PCIE驱动还可根据第二目标通道号及第二业务数据生成数据包,并将该数据包送入第二目标队列号对应的硬件队列中。本步骤的具体实现过程可参阅PCIE驱动根据第一目标通道号及第一业务数据生成数据包的过程,本申请对此不作赘述。In one of the embodiments, similarly, the PCIE driver can also generate a data packet according to the second target channel number and the second service data, and send the data packet into the hardware queue corresponding to the second target queue number. For the specific implementation process of this step, please refer to the process of generating data packets by the PCIE driver according to the first target channel number and the first service data, which will not be described in detail in this application.

在另一个实施例中,PCIE端点设备还可获取虚拟通道的通道号与业务类型之间的第三映射关系,并根据第三映射关系确定业务数据的业务类型。In another embodiment, the PCIE endpoint device may also obtain a third mapping relationship between the channel number of the virtual channel and the service type, and determine the service type of the service data according to the third mapping relationship.

为便于理解本申请的方案,下面通过一个具体的示例进行说明。基于PCIE的驱动架构可如图8所示,使得主机侧(即图8中的host侧)与PCIE端点设备(即图8中的PCIE EP)可以采用PCIE方式进行通信。In order to facilitate the understanding of the solution of the present application, a specific example is used below to illustrate. The PCIE-based driver architecture can be as shown in Figure 8, so that the host side (i.e. the host side in Figure 8) and the PCIE endpoint device (i.e. the PCIE EP in Figure 8) can communicate in a PCIE manner.

在host侧配置有PCIE驱动(该PCIE驱动为图8中的WWAN host interface)。该PCIE驱动包括数据通路和控制通路,数据通路和控制通路分别包括自身的硬件收发队列,用于实现数据的收发。数据通路中的硬件收发队列与控制通路中的硬件收发队列映射为不同的虚拟通道,用于来自功能驱动的数据传输。A PCIE driver is configured on the host side (the PCIE driver is the WWAN host interface in Figure 8). The PCIE driver includes a data path and a control path, and the data path and the control path respectively include their own hardware sending and receiving queues for implementing data sending and receiving. The hardware transceiver queue in the data path and the hardware transceiver queue in the control path are mapped to different virtual channels for data transmission from the function driver.

PCIE驱动生成不同的子节点用于挂载网络适配器、GNSS、AT、FLASH、log及Coredump等功能驱动。这些功能驱动通过一定的映射关系映射到底层不同的虚拟通道上,除网络适配器驱动外的其他功能驱动(即各上层功能驱动)可通过发送数据读取请求和/或数据写入请求来将数据发送到PCIE端点设备的指定硬件队列上。The PCIE driver generates different sub-nodes for mounting functional drivers such as network adapters, GNSS, AT, FLASH, log, and Coredump. These function drivers are mapped to different virtual channels at the bottom layer through a certain mapping relationship, and other function drivers (that is, each upper-layer function driver) except the network adapter driver can send data read requests and/or data write requests. Send to the specified hardware queue of the PCIE endpoint device.

PCIE驱动与网络适配器驱动均配置于内核层,而除网络适配器驱动外的其余功能驱动都配置于用户层,因此PCIE驱动与网络适配器驱动之间可以通过预设函数接口来进行数据传输。在网络适配器驱动中存在两种数据,分别是MBIM协议数据和IP数据。MBIM协议数据可以通过控制通道来进行传输,由于MBIM协议数据对速率要求不高,因此可以通过发送数据读写请求来完成MBIM协议数据的传输。IP数据需要通过数据通道来进行传输,为了加快传输速率,可通过微软WDF框架提供的技术,在PCIE驱动中通过UUID生成预设函数接口,并在该预设函数接口中定义数据传输的API接口,以实现IP数据的收发。在数据传输时,网络适配器驱动可通过导出该预设函数接口,即可直接利用该预设函数接口所定义的API接口,将IP数据传输到PCIE驱动中,完成IP数据的下发,无需做任何请求封装和转换。Both the PCIE driver and the network adapter driver are configured in the kernel layer, and the other function drivers except the network adapter driver are configured in the user layer, so data transmission can be performed between the PCIE driver and the network adapter driver through a preset function interface. There are two kinds of data in the network adapter driver, namely MBIM protocol data and IP data. The MBIM protocol data can be transmitted through the control channel. Since the MBIM protocol data does not require a high rate, the transmission of the MBIM protocol data can be completed by sending a data read and write request. IP data needs to be transmitted through the data channel. In order to speed up the transmission rate, the technology provided by the Microsoft WDF framework can be used to generate a preset function interface through UUID in the PCIE driver, and define the API interface for data transmission in the preset function interface , in order to realize the sending and receiving of IP data. During data transmission, the network adapter driver can directly use the API interface defined by the preset function interface by exporting the preset function interface to transfer the IP data to the PCIE driver to complete the delivery of the IP data without doing Any request encapsulation and transformation.

本申请的驱动架构中,端口导出可分为多种模式。本申请可在正常模式下导出网络适配器驱动对应的端口和GNSS驱动对应的端口;debug模式则导出所有端口,包括日志导出等;烧录模式下导出烧录端口,用于固件的烧录功能。Dump模式下导出Coredump端口。如此,可完成不同状态的功能。In the driver architecture of this application, port export can be divided into multiple modes. This application can export the port corresponding to the network adapter driver and the port corresponding to the GNSS driver in the normal mode; in the debug mode, export all ports, including log export, etc.; in the burning mode, export the burning port for the burning function of the firmware. Export the Coredump port in dump mode. In this way, the functions of different states can be completed.

本申请依靠微软的NetAdapterCx框架,通过PCIE驱动开发实现,达到计算机设备在主机侧的应用,实现5G产品的在计算机设备上能满足高速率,大带宽的效果。This application relies on Microsoft's NetAdapterCx framework, through PCIE driver development, to achieve the application of computer equipment on the host side, and to achieve the effect of 5G products on computer equipment that can meet high speed and large bandwidth.

应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flow charts involved in the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flow charts involved in the above-mentioned embodiments may include multiple steps or stages, and these steps or stages are not necessarily executed at the same time, but may be performed at different times For execution, the execution order of these steps or stages is not necessarily performed sequentially, but may be executed in turn or alternately with other steps or at least a part of steps or stages in other steps.

基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的基于PCIE的通信方法的基于PCIE的通信装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个基于PCIE的通信装置实施例中的具体限定可以参见上文中对于基于PCIE的通信方法的限定,在此不再赘述。Based on the same inventive concept, an embodiment of the present application further provides a PCIE-based communication device for implementing the above-mentioned PCIE-based communication method. The solution to the problem provided by the device is similar to the implementation described in the above method, so the specific limitations in one or more PCIE-based communication device embodiments provided below can be referred to above for PCIE-based communication The limitation of the method will not be repeated here.

在一个实施例中,如图9所示,提供了一种基于PCIE的通信装置,装置包括配置于主机侧的内 核驱动,内核驱动包括PCIE驱动,主机侧还配置有上层功能驱动。PCIE驱动包括:In one embodiment, as shown in Figure 9, a PCIE-based communication device is provided, the device includes a kernel driver configured on the host side, the kernel driver includes a PCIE driver, and the host side is also configured with an upper layer function driver. PCIE drivers include:

第一映射关系建立模块,用于在主机侧识别到PCIE端点设备的情况下,建立硬件队列的队列号与虚拟通道的通道号之间的第一映射关系;其中,硬件队列为PCIE端点设备的硬件访问通道;The first mapping relationship establishment module is used to establish the first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel when the host side recognizes the PCIE endpoint device; wherein, the hardware queue is of the PCIE endpoint device hardware access channel;

分配模块,用于挂载每一上层功能驱动,并为每一上层功能驱动分配对应的虚拟通道,以使上层功能驱动通过对应的虚拟通道下发第一业务数据;An allocation module, configured to mount each upper-layer function driver, and assign a corresponding virtual channel to each upper-layer function driver, so that the upper-layer function driver sends the first business data through the corresponding virtual channel;

业务数据写入模块,用于在接收到第一业务数据的情况下,从第一映射关系中确定第一目标通道号对应的第一目标队列号,并将第一业务数据送入第一目标队列号对应的硬件队列中;其中,第一目标通道号为下发第一业务数据的上层功能驱动所对应的虚拟通道的通道号。The business data writing module is used to determine the first target queue number corresponding to the first target channel number from the first mapping relationship when the first business data is received, and send the first business data to the first target In the hardware queue corresponding to the queue number; wherein, the first target channel number is the channel number of the virtual channel corresponding to the upper layer function driver delivering the first service data.

在一个实施例中,内核驱动还包括网络适配器驱动。该分配模块还用于挂载网络适配器驱动,并为网络适配器驱动分配对应的虚拟通道,以使网络适配器驱动通过对应的虚拟通道下发第二业务数据。业务数据写入模块还用于在接收到第二业务数据的情况下,从第一映射关系中确定第二目标通道号对应的第二目标队列号,并将第二业务数据送入第二目标队列号对应的硬件队列中;其中,第二目标通道号为网络适配器驱动所对应的虚拟通道的通道号。In one embodiment, the kernel driver also includes a network adapter driver. The allocation module is also used to mount the network adapter driver, and allocate a corresponding virtual channel to the network adapter driver, so that the network adapter driver delivers the second service data through the corresponding virtual channel. The business data writing module is also used to determine the second target queue number corresponding to the second target channel number from the first mapping relationship when receiving the second business data, and send the second business data to the second target In the hardware queue corresponding to the queue number; wherein, the second target channel number is the channel number of the virtual channel corresponding to the network adapter driver.

在一个实施例中,网络适配器驱动包括第一接口调用模块,用于调用预设函数接口,以向PCIE驱动下发第二业务数据。其中,预设函数接口为根据PCIE驱动的通用唯一识别码及网络适配器驱动的通用唯一识别码生成的函数接口。In one embodiment, the network adapter driver includes a first interface calling module, configured to call a preset function interface to send the second service data to the PCIE driver. Wherein, the preset function interface is a function interface generated according to the UUID code driven by the PCIE and the UUID code driven by the network adapter.

在一个实施例中,第二业务数据包括下发IP数据和下发MBIM协议数据。第一接口调用模块包括IP数据下发单元和MBIM协议数据下发单元。其中,该IP数据下发单元调用预设函数接口,以向PCIE驱动发送下发IP数据。MBIM协议数据下发单元用于根据第二目标通道号及下发MBIM协议数据生成数据写入请求,并向PCIE驱动发送数据写入请求,以向PCIE驱动发送下发MBIM协议数据。In one embodiment, the second service data includes sending IP data and sending MBIM protocol data. The first interface calling module includes an IP data delivery unit and an MBIM protocol data delivery unit. Wherein, the IP data delivery unit calls a preset function interface to send the IP data to the PCIE driver. The MBIM protocol data sending unit is used to generate a data write request according to the second target channel number and the sent MBIM protocol data, and send a data write request to the PCIE driver to send the sent MBIM protocol data to the PCIE driver.

在一个实施例中,PCIE驱动还包括第二接口调用模块。该第二接口调用模块用于在获取到PCIE端点设备发送的第一回传数据的情况下,调用预设函数接口,以向网络适配器驱动发送第一回传数据。其中,预设函数接口为根据PCIE驱动的通用唯一识别码及网络适配器驱动的通用唯一识别码生成的函数接口。In one embodiment, the PCIE driver further includes a second interface calling module. The second interface calling module is used to call a preset function interface to send the first return data to the network adapter driver when the first return data sent by the PCIE endpoint device is obtained. Wherein, the preset function interface is a function interface generated according to the UUID code driven by the PCIE and the UUID code driven by the network adapter.

在一个实施例中,第一回传数据为回传IP数据或回传MBIM协议数据。第二接口调用模块包括IP数据回传单元和MBIM协议数据回传单元。其中,IP数据回传单元用于在第一回传数据为回传IP数据的情况下,调用预设函数接口,以向网络适配器驱动发送回传IP数据。MBIM协议数据回传单元用于在第一回传数据为回传MBIM数据的情况下,将回传MBIM数据写入对应的内存队列中;还用于在接收到网络适配器驱动发送的数据读取请求的情况下,向网络适配器驱动发送回传MBIM数据。In one embodiment, the first returned data is returned IP data or returned MBIM protocol data. The second interface calling module includes an IP data return unit and an MBIM protocol data return unit. Wherein, the IP data return unit is configured to call a preset function interface to send the return IP data to the network adapter driver when the first return data is return IP data. The MBIM protocol data return unit is used to write the returned MBIM data into the corresponding memory queue when the first returned data is the returned MBIM data; it is also used to read the data sent by the network adapter driver If requested, send back MBIM data to the network adapter driver.

在一个实施例中,分配模块包括子节点生成单元、挂载单元和第二映射关系建立单元。PCIE驱动还包括第一目标通道号确定模块。其中,子节点生成单元用于生成子节点;子节点的数量根据上层功能驱动的数量确定。挂载单元用于通过子节点挂载每一上层功能驱动;其中,不同的上层功能驱动对应于不同的子节点。第二映射关系建立单元用于为每一上层功能驱动分配对应的虚拟通道,并建立子节点与虚拟通道的通道号之间的第二映射关系。第一目标通道号确定模块用于根据下发第一业务数据的上层功能驱动所对应的子节点,从第二映射关系中确定第一目标通道号。In one embodiment, the allocation module includes a child node generating unit, a mounting unit and a second mapping relationship establishing unit. The PCIE driver also includes a first target channel number determination module. Wherein, the sub-node generation unit is used to generate sub-nodes; the number of sub-nodes is determined according to the number of upper layer function drivers. The mounting unit is used to mount each upper-layer function driver through sub-nodes; wherein, different upper-layer function drivers correspond to different sub-nodes. The second mapping relation establishing unit is used for assigning a corresponding virtual channel to each upper layer function driver, and establishing a second mapping relation between the sub-node and the channel number of the virtual channel. The module for determining the first target channel number is configured to determine the first target channel number from the second mapping relationship according to the sub-node corresponding to the upper-layer function driver that delivers the first service data.

在一个实施例中,PCIE驱动还包括导出模块,该导出模块用于获取主机侧的工作模式,并根据工作模式导出对应的子节点。In one embodiment, the PCIE driver further includes an export module, which is used to obtain the working mode of the host, and derive corresponding sub-nodes according to the working mode.

在一个实施例中,业务数据写入模块包括数据包生成单元,该数据包生成单元用于根据第一目标通道号及第一业务数据生成数据包,并将数据包送入第一目标队列号对应的硬件队列中。In one embodiment, the business data writing module includes a data packet generation unit, which is used to generate a data packet according to the first target channel number and the first business data, and send the data packet to the first target queue number in the corresponding hardware queue.

在一个实施例中,PCIE驱动还包括目标上层功能驱动模块和回传模块。其中,目标上层功能驱动模块用于在获取到PCIE端点设备发送的第二回传数据的情况下,确定第二回传数据对应的目标上层功能驱动。回传模块用于第二回传数据写入目标上层功能驱动对应的内存队列中,并在接收到目标上层功能驱动发送的数据读取请求的情况下,向目标上层功能驱动发送第二回传数据。In one embodiment, the PCIE driver further includes a target upper layer function driver module and a return module. Wherein, the target upper-layer function driver module is configured to determine the target upper-layer function driver corresponding to the second return data when the second return data sent by the PCIE endpoint device is obtained. The return module is used to write the second return data into the memory queue corresponding to the target upper-layer function driver, and send the second return to the target upper-layer function driver when receiving the data read request sent by the target upper-layer function driver data.

上述PCIE的通信装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存 储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above-mentioned PCIE communication device can be fully or partially realized by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of the above modules.

如在本申请中所使用的,术语“组件”、“模块”和“系统”等旨在表示计算机相关的实体,它可以是硬件、硬件和软件的组台、软件、或者执行中的软件。例如,组件可以是但不限于是,在处理器上运行的进程、处理器、对象、可执行码、执行的线程、程序和或计算机。作为说明,运行在服务器上的应用程序和服务器都可以是组件。一个或多个组件可以驻留在进程和或执行的线程中,并且组件可以位于一个计算机内和或分布在两个或更多的计算机之间。As used in this application, the terms "component," "module," and "system" and the like are intended to mean a computer-related entity, which may be hardware, a combination of hardware and software, software, or software in execution. For example, a component may be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and or a computer. As an illustration, both an application running on a server and a server can be a component. One or more components can reside within a process and or thread of execution, and a component can be localized on one computer and or distributed between two or more computers.

在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图10所示。该计算机设备包括通过系统总线连接的处理器、存储器和通信接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、移动蜂窝网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种PCIE的通信方法。In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure may be as shown in FIG. 10 . The computer device includes a processor, memory and a communication interface connected by a system bus. Wherein, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies. When the computer program is executed by the processor, a PCIE communication method is realized.

本领域技术人员可以理解,图10中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in Figure 10 is only a block diagram of a part of the structure related to the solution of this application, and does not constitute a limitation to the computer equipment on which the solution of this application is applied. The specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.

在一个实施例中,还提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In one embodiment, there is also provided a computer device, including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

在一个实施例中,计算机设备还可以包括PCIE端点设备,该PCIE端点设备通过PCIE总线连接所述处理器。在其中一个实施例中,该PCIE端点设备为5G通信模组。在一个示例中,PCIE端点设备可为5G调制解调器。In an embodiment, the computer device may further include a PCIE endpoint device, and the PCIE endpoint device is connected to the processor through a PCIE bus. In one of the embodiments, the PCIE endpoint device is a 5G communication module. In one example, the PCIE endpoint device can be a 5G modem.

一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.

在一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above-mentioned embodiments can be completed by instructing related hardware through computer programs, and the computer programs can be stored in a non-volatile computer-readable memory In the medium, when the computer program is executed, it may include the processes of the embodiments of the above-mentioned methods. Wherein, any reference to storage, database or other media used in the various embodiments provided in the present application may include at least one of non-volatile and volatile storage. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive variable memory (ReRAM), magnetic variable memory (Magnetoresistive Random Access Memory, MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (Phase Change Memory, PCM), graphene memory, etc. The volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a blockchain-based distributed database, etc., but is not limited thereto. The processors involved in the various embodiments provided by this application can be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., and are not limited to this.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered to be within the range described in this specification.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应 以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present application, and the description thereof is relatively specific and detailed, but should not be construed as limiting the patent scope of the present application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the application should be based on the appended claims.

Claims (14)

一种基于PCIE的通信方法,应用于主机侧,所述主机侧配置有上层功能驱动及内核驱动,所述内核驱动包括PCIE驱动;所述方法包括:A communication method based on PCIE is applied to the host side, and the host side is configured with an upper layer function driver and a kernel driver, and the kernel driver includes a PCIE driver; the method includes: 当所述主机侧识别到PCIE端点设备,则所述PCIE驱动建立硬件队列的队列号与虚拟通道的通道号之间的第一映射关系;其中,所述硬件队列为所述PCIE端点设备的硬件访问通道;When the host side recognizes the PCIE endpoint device, the PCIE drives the first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel; wherein, the hardware queue is the hardware of the PCIE endpoint device access channel; 所述PCIE驱动挂载每一所述上层功能驱动,并为每一所述上层功能驱动分配对应的虚拟通道,以使所述上层功能驱动通过对应的虚拟通道下发第一业务数据;The PCIE driver mounts each of the upper-layer function drivers, and assigns a corresponding virtual channel for each of the upper-layer function drivers, so that the upper-layer function drivers deliver first business data through the corresponding virtual channels; 所述PCIE驱动在接收到所述第一业务数据的情况下,从所述第一映射关系中确定第一目标通道号对应的第一目标队列号,并将所述第一业务数据送入所述第一目标队列号对应的硬件队列中;其中,第一目标通道号为下发所述第一业务数据的上层功能驱动所对应的虚拟通道的通道号。When the PCIE driver receives the first business data, it determines the first target queue number corresponding to the first target channel number from the first mapping relationship, and sends the first business data to the In the hardware queue corresponding to the first target queue number; wherein, the first target channel number is the channel number of the virtual channel corresponding to the upper layer function driver that delivers the first service data. 根据权利要求1所述的通信方法,其特征在于,所述内核驱动还包括网络适配器驱动;所述方法还包括:The communication method according to claim 1, wherein the kernel driver also includes a network adapter driver; the method also includes: 所述PCIE驱动挂载所述网络适配器驱动,并为所述网络适配器驱动分配对应的虚拟通道,以使所述网络适配器驱动通过对应的虚拟通道下发第二业务数据;The PCIE driver mounts the network adapter driver, and allocates a corresponding virtual channel for the network adapter driver, so that the network adapter driver sends the second service data through the corresponding virtual channel; 所述PCIE驱动在接收到所述第二业务数据的情况下,从所述第一映射关系中确定第二目标通道号对应的第二目标队列号,并将所述第二业务数据送入所述第二目标队列号对应的硬件队列中;其中,所述第二目标通道号为所述网络适配器驱动所对应的虚拟通道的通道号。When the PCIE driver receives the second business data, it determines the second target queue number corresponding to the second target channel number from the first mapping relationship, and sends the second business data to the In the hardware queue corresponding to the second target queue number; wherein, the second target channel number is the channel number of the virtual channel corresponding to the network adapter driver. 根据权利要求2所述的通信方法,其特征在于,所述方法还包括:The communication method according to claim 2, wherein the method further comprises: 所述网络适配器驱动调用预设函数接口,以向所述PCIE驱动下发所述第二业务数据;The network adapter driver calls a preset function interface to deliver the second service data to the PCIE driver; 其中,所述预设函数接口为根据所述PCIE驱动的通用唯一识别码及所述网络适配器驱动的通用唯一识别码生成的函数接口。Wherein, the preset function interface is a function interface generated according to the universal unique identification code driven by the PCIE and the universal unique identification code driven by the network adapter. 根据权利要求3所述的通信方法,其特征在于,所述第二业务数据包括下发IP数据和下发MBIM协议数据;The communication method according to claim 3, wherein the second service data includes sending IP data and sending MBIM protocol data; 所述网络适配器驱动调用所述预设函数接口,以向所述PCIE驱动下发所述第二业务数据的步骤,包括:The network adapter driver calls the preset function interface to send the second service data to the PCIE driver, including: 所述网络适配器驱动调用所述预设函数接口,以向所述PCIE驱动发送所述下发IP数据;The network adapter driver calls the preset function interface to send the issued IP data to the PCIE driver; 所述网络适配器驱动根据所述第二目标通道号及所述下发MBIM协议数据生成数据写入请求,并向所述PCIE驱动发送所述数据写入请求,以向所述PCIE驱动发送所述下发MBIM协议数据。The network adapter driver generates a data write request according to the second target channel number and the issued MBIM protocol data, and sends the data write request to the PCIE driver, so as to send the data write request to the PCIE driver. Send MBIM protocol data. 根据权利要求2所述的通信方法,其特征在于,所述方法还包括:The communication method according to claim 2, wherein the method further comprises: 所述PCIE驱动在获取到所述PCIE端点设备发送的第一回传数据的情况下,调用预设函数接口,以向所述网络适配器驱动发送所述第一回传数据;When the PCIE driver obtains the first return data sent by the PCIE endpoint device, it calls a preset function interface to send the first return data to the network adapter driver; 其中,所述预设函数接口为根据所述PCIE驱动的通用唯一识别码及所述网络适配器驱动的通用唯一识别码生成的函数接口。Wherein, the preset function interface is a function interface generated according to the universal unique identification code driven by the PCIE and the universal unique identification code driven by the network adapter. 根据权利要求5所述的通信方法,其特征在于,所述第一回传数据为回传IP数据或回传MBIM协议数据;The communication method according to claim 5, wherein the first returned data is returned IP data or returned MBIM protocol data; 所述PCIE驱动调用预设函数接口,以向所述网络适配器驱动发送第二业务数据的步骤,包括:The PCIE driver calls the preset function interface to drive the step of sending the second service data to the network adapter, including: 当所述第一回传数据为所述回传IP数据,则所述PCIE驱动调用所述预设函数接口,以向所述网络适配器驱动发送所述回传IP数据;When the first return data is the return IP data, the PCIE driver calls the preset function interface to send the return IP data to the network adapter driver; 当所述第一回传数据为所述回传MBIM数据,则所述PCIE驱动将所述回传MBIM数据写入对应的内存队列中;When the first returned data is the returned MBIM data, the PCIE driver writes the returned MBIM data into a corresponding memory queue; 所述PCIE驱动在接收到所述网络适配器驱动发送的数据读取请求的情况下,向所述网络适配器驱动发送所述回传MBIM数据。The PCIE driver sends the returned MBIM data to the network adapter driver when receiving the data read request sent by the network adapter driver. 根据权利要求1所述的通信方法,其特征在于,所述PCIE驱动挂载每一所述上层功能驱动,并为每一所述上层功能驱动分配对应的虚拟通道的步骤,包括:The communication method according to claim 1, wherein the PCIE driver mounts each of the upper-layer function drivers, and the step of assigning a corresponding virtual channel for each of the upper-layer function drivers includes: 所述PCIE驱动生成子节点;所述子节点的数量根据上层功能驱动的数量确定;Described PCIE drives generation child node; The quantity of described child node is determined according to the quantity that upper layer function drives; 所述PCIE驱动通过所述子节点挂载每一所述上层功能驱动;其中,不同的上层功能驱动对应于不同的子节点;The PCIE driver mounts each of the upper-layer function drivers through the sub-node; wherein, different upper-layer function drivers correspond to different sub-nodes; 所述PCIE驱动为每一所述上层功能驱动分配对应的虚拟通道,并建立子节点与虚拟通道的通道号之间的第二映射关系;Described PCIE drives and assigns corresponding virtual channel for each described upper layer function driver, and establishes the second mapping relation between the channel number of child node and virtual channel; 从所述第一映射关系中确定第一目标通道号对应的第一目标队列号的步骤之前,还包括:Before the step of determining the first target queue number corresponding to the first target channel number from the first mapping relationship, it also includes: 所述PCIE驱动根据下发所述第一业务数据的上层功能驱动所对应的子节点,从所述第二映射关系中确定所述第一目标通道号。The PCIE driver determines the first target channel number from the second mapping relationship according to the child node corresponding to the upper layer function driver that delivers the first service data. 根据权利要求7所述的通信方法,其特征在于,所述方法还包括:The communication method according to claim 7, wherein the method further comprises: 所述PCIE驱动获取所述主机侧的工作模式,并根据所述工作模式导出对应的子节点。The PCIE driver obtains the working mode of the host side, and derives the corresponding sub-node according to the working mode. 根据权利要求1所述的通信方法,其特征在于,将所述第一业务数据送入所述第一目标队列号对应的硬件队列中的步骤,包括:The communication method according to claim 1, wherein the step of sending the first business data into the hardware queue corresponding to the first target queue number comprises: 所述PCIE驱动根据所述第一目标通道号及所述第一业务数据生成数据包,并将所述数据包送入所述第一目标队列号对应的硬件队列中。The PCIE driver generates a data packet according to the first target channel number and the first service data, and sends the data packet into a hardware queue corresponding to the first target queue number. 根据权利要求1至9任一项所述的通信方法,其特征在于,所述方法还包括:The communication method according to any one of claims 1 to 9, wherein the method further comprises: 所述PCIE驱动在获取到所述PCIE端点设备发送的第二回传数据的情况下,确定所述第二回传数据对应的目标上层功能驱动;The PCIE driver determines the target upper layer function driver corresponding to the second return data when the second return data sent by the PCIE endpoint device is obtained; 所述PCIE驱动将所述第二回传数据写入所述目标上层功能驱动对应的内存队列中,并在接收到所述目标上层功能驱动发送的数据读取请求的情况下,向所述目标上层功能驱动发送所述第二回传数据。The PCIE driver writes the second return data into the memory queue corresponding to the target upper layer function driver, and when receiving the data read request sent by the target upper layer function driver, sends the data to the target The upper layer function driver sends the second return data. 一种基于PCIE的通信装置,所述装置包括配置于主机侧的内核驱动,所述内核驱动包括PCIE驱动,所述主机侧还配置有上层功能驱动;所述PCIE驱动包括:A communication device based on PCIE, the device includes a kernel driver configured on the host side, the kernel driver includes a PCIE driver, and the host side is also configured with an upper layer function driver; the PCIE driver includes: 第一映射关系建立模块,用于在所述主机侧识别到PCIE端点设备的情况下,建立硬件队列的队列号与虚拟通道的通道号之间的第一映射关系;其中,所述硬件队列为所述PCIE端点设备的硬件访问通道;The first mapping relationship establishment module is used to establish the first mapping relationship between the queue number of the hardware queue and the channel number of the virtual channel when the host side recognizes the PCIE endpoint device; wherein the hardware queue is The hardware access channel of the PCIE endpoint device; 分配模块,用于挂载每一所述上层功能驱动,并为每一所述上层功能驱动分配对应的虚拟通道,以使所述上层功能驱动通过对应的虚拟通道下发第一业务数据;An allocation module, configured to mount each of the upper-layer function drivers, and assign a corresponding virtual channel to each of the upper-layer function drivers, so that the upper-layer function drivers deliver the first service data through the corresponding virtual channels; 业务数据写入模块,用于在接收到所述第一业务数据的情况下,从所述第一映射关系中确定第一目标通道号对应的第一目标队列号,并将所述第一业务数据送入所述第一目标队列号对应的硬件队列中;其中,第一目标通道号为下发所述第一业务数据的上层功能驱动所对应的虚拟通道的通道号。A business data writing module, configured to determine the first target queue number corresponding to the first target channel number from the first mapping relationship when the first business data is received, and write the first business data The data is sent to the hardware queue corresponding to the first target queue number; wherein, the first target channel number is the channel number of the virtual channel corresponding to the upper layer function driver that delivers the first service data. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现权利要求1至10中任一项所述的方法的步骤。A computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 10 when executing the computer program. 根据权利要求12所述的计算机设备,其特征在于,所述计算机设备还包括PCIE端点设备,所述PCIE端点设备通过PCIE总线连接所述处理器。The computer device according to claim 12, wherein the computer device further comprises a PCIE endpoint device, and the PCIE endpoint device is connected to the processor through a PCIE bus. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至10中任一项所述的方法的步骤。A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
PCT/CN2022/099668 2021-12-24 2022-06-20 Pcie-based communication method and apparatus, and computer device and readable storage medium WO2023115852A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111603304.3A CN114416630B (en) 2021-12-24 2021-12-24 PCIE-based communication method, PCIE-based communication device, computer equipment and readable storage medium
CN202111603304.3 2021-12-24

Publications (1)

Publication Number Publication Date
WO2023115852A1 true WO2023115852A1 (en) 2023-06-29

Family

ID=81269437

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/099668 WO2023115852A1 (en) 2021-12-24 2022-06-20 Pcie-based communication method and apparatus, and computer device and readable storage medium

Country Status (2)

Country Link
CN (1) CN114416630B (en)
WO (1) WO2023115852A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114416630B (en) * 2021-12-24 2024-09-06 深圳市广和通无线通信软件有限公司 PCIE-based communication method, PCIE-based communication device, computer equipment and readable storage medium
CN114817115A (en) * 2022-05-20 2022-07-29 深圳市广和通无线通信软件有限公司 Serial port communication method and related device
CN115277407B (en) * 2022-07-25 2024-01-23 北京天融信网络安全技术有限公司 Internet access configuration processing method and device, electronic equipment and storage medium
CN118295954B (en) * 2024-04-25 2025-03-11 清华大学 Data transmission method and communication system of processing card based on PCIe protocol

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020000489A1 (en) * 2018-06-30 2020-01-02 华为技术有限公司 Pcie sending and receiving method, apparatus, device and system
CN111966613A (en) * 2020-07-20 2020-11-20 深圳市广和通无线股份有限公司 Communication module data processing method and device, computer equipment and storage medium
CN112148422A (en) * 2019-06-29 2020-12-29 华为技术有限公司 IO processing method and device
CN113296884A (en) * 2021-02-26 2021-08-24 阿里巴巴集团控股有限公司 Virtualization method, virtualization device, electronic equipment, virtualization medium and resource virtualization system
CN114416630A (en) * 2021-12-24 2022-04-29 深圳市广和通无线通信软件有限公司 Communication method and device based on PCIE, computer equipment and readable storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8284768B2 (en) * 2005-10-06 2012-10-09 Sierra Wireless, Inc. Dynamic bus-based virtual channel multiplexing device driver architecture
US7587575B2 (en) * 2006-10-17 2009-09-08 International Business Machines Corporation Communicating with a memory registration enabled adapter using cached address translations
CN102263698B (en) * 2011-08-11 2014-01-22 福建星网锐捷网络有限公司 Method for establishing virtual channel, method of data transmission and line card
CN106933775B (en) * 2013-10-29 2021-08-20 华为技术有限公司 Data processing system and method for data processing
CN107656884A (en) * 2016-07-25 2018-02-02 中兴通讯股份有限公司 A kind of data processing method and system, the quick interconnection equipment of peripheral assembly and main frame
CN110888827B (en) * 2018-09-10 2021-04-09 华为技术有限公司 Data transmission method, device, equipment and storage medium
US10891414B2 (en) * 2019-05-23 2021-01-12 Xilinx, Inc. Hardware-software design flow for heterogeneous and programmable devices
CN110688237B (en) * 2019-06-25 2024-02-09 华为技术有限公司 Method for forwarding message, intermediate device and computer device
CN112000593B (en) * 2020-07-31 2022-03-25 瑞芯微电子股份有限公司 PCIe equipment management method and operation system thereof
CN112631969B (en) * 2020-12-30 2024-01-30 凌云光技术股份有限公司 Virtual multichannel data transmission method and system based on PCIE interface

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020000489A1 (en) * 2018-06-30 2020-01-02 华为技术有限公司 Pcie sending and receiving method, apparatus, device and system
CN112148422A (en) * 2019-06-29 2020-12-29 华为技术有限公司 IO processing method and device
CN111966613A (en) * 2020-07-20 2020-11-20 深圳市广和通无线股份有限公司 Communication module data processing method and device, computer equipment and storage medium
CN113296884A (en) * 2021-02-26 2021-08-24 阿里巴巴集团控股有限公司 Virtualization method, virtualization device, electronic equipment, virtualization medium and resource virtualization system
CN114416630A (en) * 2021-12-24 2022-04-29 深圳市广和通无线通信软件有限公司 Communication method and device based on PCIE, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN114416630B (en) 2024-09-06
CN114416630A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
WO2023115852A1 (en) Pcie-based communication method and apparatus, and computer device and readable storage medium
US9678918B2 (en) Data processing system and data processing method
CN103888293A (en) Data channel scheduling method of multichannel FC network data simulation system
US20190327190A1 (en) Technologies for scalable packet reception and transmission
CN116774933A (en) Virtualization processing method of storage device, bridging device, system and medium
WO2022141250A1 (en) Data transmission method and related apparatus
CN116881191B (en) Data processing method, device, equipment and storage medium
CN114691037B (en) Uninstall card namespace management, input and output request processing system and method
US12014173B2 (en) Data processing method for network adapter and network adapter
CN117369734B (en) Storage resource management system, method and storage virtualization system
JP2018524751A (en) Computer device and method for reading / writing data by computer device
CN116860391A (en) GPU computing power resource scheduling method, device, equipment and medium
EP3051426B1 (en) Method, device, and system for accessing memory
CN116383127A (en) Inter-node communication method, device, electronic device and storage medium
WO2020083067A1 (en) Resource management method and apparatus
US20240356886A1 (en) Network Node Configuration Method and Apparatus, and Access Request Processing Method and Apparatus
CN116204463A (en) Data processing method and system, electronic device, storage medium
CN117648264A (en) Network card equipment and data transmission system
CN115883022A (en) DMA (direct memory access) transmission control method and device, electronic equipment and readable storage medium
CN117215803A (en) Process communication method and device, electronic equipment and readable storage medium
CN109947572B (en) Communication control method, device, electronic device and storage medium
WO2023065853A1 (en) Data transmission method and apparatus, device, storage medium, and program
CN118368256A (en) Queue data receiving and transmitting method, device and computer readable storage medium
CN118152075A (en) Lightweight RDMA virtualization method, system, device, electronic equipment and medium
CN103617130A (en) Multiple-protocol-supportive storage virtualization system

Legal Events

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

Ref document number: 22909184

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22909184

Country of ref document: EP

Kind code of ref document: A1