WO2015168946A1 - 快速输入输出报文处理方法、装置及系统 - Google Patents

快速输入输出报文处理方法、装置及系统 Download PDF

Info

Publication number
WO2015168946A1
WO2015168946A1 PCT/CN2014/077183 CN2014077183W WO2015168946A1 WO 2015168946 A1 WO2015168946 A1 WO 2015168946A1 CN 2014077183 W CN2014077183 W CN 2014077183W WO 2015168946 A1 WO2015168946 A1 WO 2015168946A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
rapid10
virtual machine
sending
packet
Prior art date
Application number
PCT/CN2014/077183
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to PCT/CN2014/077183 priority Critical patent/WO2015168946A1/zh
Priority to CN201480033945.1A priority patent/CN105324973B/zh
Publication of WO2015168946A1 publication Critical patent/WO2015168946A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines

Definitions

  • the embodiments of the present invention relate to communication technologies, and in particular, to a fast input and output packet processing method, apparatus, and system suitable for interconnection of multiple virtual machine systems. Background technique
  • RapidlO Fast Input/Output
  • Parallel RapidlO and Serial RapidlO have the same programming model and transaction. Processing and addressing mechanisms.
  • the RapidlO interconnect architecture is an open standard for connecting memory-mapped I/O devices, storage subsystems, and general-purpose computing platforms on multiple processors, memory, and network devices to improve system hardware and software interface processing performance.
  • the RapidlO protocol is divided into three layers: the logical layer, the transport layer, and the physical layer.
  • the logical layer defines the operating protocol and the corresponding packet format.
  • the transport layer defines the packet switching, routing, and addressing mechanisms.
  • the physical layer defines the electrical characteristics and chains. Road control and error correction retransmission.
  • RapidlO is a packet-switching-based interconnect technology.
  • the RapidlO data packet consists of a header, a payload, and a Cyclic Redundancy Check (CRC).
  • CRC Cyclic Redundancy Check
  • the RapidlO message type includes 10 types and packet types, which are defined in the Format Type (Ftype) field of the header.
  • 10 types of messages are used to directly read and write the memory of the destination device, and 10 data are sent and received based on a unified address window mapping method, including: read operation (NREAD), write operation (NWRITE), with response write operation (NWRITE_R), flow Write (SWRITE) and so on.
  • Packet type message mainly used for message passing (Message Passing), determines the position of the data in the destination device by the mailbox number (mbox), saves the data to the corresponding buffer according to the mailbox number of the received message, and uses the unified Address receiving space, including: Message, Data Streaming, Doorbell, etc.
  • the present invention provides a method, a device, and a system for processing a fast input and output packet, so as to solve the problem that RapidlO cannot flexibly process RapidlO packet transmission of a virtual machine of different configurations in the prior art, and affects the RapidlO packet in multiple virtual machines.
  • the problem of processing efficiency in the system In a first aspect, the embodiment of the present invention provides a fast input and output RapidlO packet processing method, including:
  • the RapidlO packet sending device acquires the RapidlO packet to be sent by the local virtual machine.
  • the RapidlO packet sending device sends the RapidlO packet to the peer end by using a virtual RapidlO channel corresponding to the local virtual machine.
  • the RapidlO message sending device allocates a corresponding virtual RapidlO channel to the local virtual machine.
  • the RapidlO packet sending device allocates a corresponding virtual Rapid10 channel to the local virtual machine, including:
  • the RapidlO packet sending device acquires performance requirement information of the local virtual machine, where the performance requirement information includes: input/output 10 bandwidth and/or quality of service QoS configuration;
  • the RapidlO message sending device allocates a virtual RapidlO channel that satisfies the performance requirement information for the local virtual machine.
  • the RapidlO packet sending device acquires a RapidlO report to be sent by the local virtual machine Text, including: The RapidlO packet sending device preferentially acquires a RapidlO packet to be sent of a local virtual machine with a higher priority according to the priority of the local virtual machine.
  • the RapidDO packet sending apparatus adopts a virtual corresponding to the local virtual machine
  • the RapidlO channel sends the RapidlO packet to the peer end, including:
  • the RapidlO packet sending apparatus determines a sending engine that is in a mode corresponding to the packet type of the RapidlO packet
  • the RapidlO packet sending apparatus sends the RapidlO packet to the peer end on the virtual RapidlO channel corresponding to the local virtual machine by using a determined sending engine.
  • the RapidDO packet sending apparatus determines a sending engine that corresponds to a packet type of the RapidDO packet , including:
  • the RapidlO packet sending apparatus determines that the sending engine corresponding to the packet type of the RapidlO packet is a direct memory access DMA mode sending engine;
  • the RapidlO packet sending device determines that the sending engine corresponding to the packet type of the RapidlO packet is a sending mode of the message mode.
  • the RapidDO packet sending apparatus determines a sending engine that corresponds to a packet type of the RapidOO packet
  • the send engine for direct memory access to DMA mode including:
  • the RapidlO sending engine determines that the sending engine corresponding to the packet type of the RapidlO message is in the DMA read mode, and if the RapidlO message is a DMA write operation And the RapidlO sending engine determines that the sending engine corresponding to the packet type of the RapidlO packet is combined with the first aspect of the sending of the DMA write mode and the first to sixth possible implementation manners of the first aspect,
  • the method further includes: And if the packet type of the RapidlO packet is a packet type, the RapidlO packet sending apparatus receives the packet receiving notification message returned by the peer end, and forwards the packet receiving notification message to the local virtual machine. .
  • an embodiment of the present invention provides a fast input and output RapidlO packet processing method, including:
  • the RapidlO packet sending device acquires the RapidlO packet to be sent by the local virtual machine, and the RapidlO packet sending device determines the virtual machine identifier VMID of the peer virtual machine corresponding to the RapidlO packet;
  • the RapidlO packet sending device encapsulates the VMID into the RapidlO packet; the RapidlO packet sending device sends the RapidlO packet to the peer end, so that the peer end reports the RapidlO packet.
  • the file is forwarded to the virtual machine corresponding to the VMID.
  • the RapidlO packet sending apparatus by using the VMID, in the RapidlO packet, includes:
  • the RapidlO message sending apparatus encapsulates the VMID into a service Transaction field of a packet header part of the RapidlO packet;
  • the RapidlO message transmitting device encapsulates the VMID into a header of a payload portion of the RapidlO message.
  • the RapidDO packet sending apparatus determines the peer virtual machine corresponding to the Rapid10 message When the VM identifies the VMID, it also includes:
  • the RapidlO packet sending device determines the grouping group information of the peer virtual machine corresponding to the RapidDO packet, where the group information corresponds to the virtual processor used by the peer virtual machine corresponding to the VMID to process the RapidlO packet. ;
  • the method further includes:
  • the RapidlO packet sending apparatus encapsulates the Group information into the RapidlO packet
  • the method includes: sending, by the remote end, the RapidlO packet sending device, to send, by the peer end, the RapidlO packet And forwarded to the virtual processor corresponding to the group information.
  • the apparatus for sending, by the RapidlO packet, the group information is encapsulated into the RapidOO packet, including:
  • the RapidlO message transmitting apparatus encapsulates the Group information into a header of a payload portion of the RapidlO message.
  • the Rapid1O message sending device acquires the local The RapidlO packet to be sent by the virtual machine, including:
  • the RapidlO packet sending device preferentially acquires the RapidlO packet to be sent of the local virtual machine with a higher priority according to the priority of the local virtual machine.
  • the RapidDO packet sending apparatus is opposite to the opposite end
  • the RapidlO packet receiving device sends the RapidlO packet, including:
  • the RapidlO packet sending device sends the RapidlO packet to the peer end by using a virtual RapidlO channel corresponding to the local virtual machine.
  • the apparatus for sending a RapidlO message, using a virtual RapidDO channel corresponding to the local virtual machine, to the opposite end before the RapidlO packet receiving device sends the RapidlO packet, the method further includes:
  • the RapidlO packet sending device allocates a corresponding virtual RapidlO channel to the local virtual machine.
  • the RapidlO packet sending device acquires performance requirement information of the local virtual machine, where the performance requirement information includes: input/output 10 bandwidth and/or quality of service QoS configuration;
  • the RapidlO message sending device allocates a virtual RapidlO channel that satisfies the performance requirement information for the local virtual machine.
  • the RapidDO message sending apparatus adopts the local virtual The sending, by the virtual RapidD0 channel, the RapidlO packet to the peer end, the method includes: sending, by the RapidlO packet sending device, a sending engine that corresponds to a packet type of the RapidlO packet;
  • the RapidlO packet sending apparatus sends the RapidlO packet to the peer end on the virtual RapidlO channel corresponding to the local virtual machine by using a determined sending engine.
  • the RapidlO packet sending apparatus determines a sending engine that corresponds to a packet type of the RapidOO packet , including:
  • the RapidlO packet sending apparatus determines that the sending engine corresponding to the packet type of the RapidlO packet is a direct memory access DMA mode sending engine;
  • the RapidlO packet sending device determines that the sending engine corresponding to the packet type of the RapidlO packet is a sending mode of the message mode.
  • the RapidlO packet sending apparatus determines a sending engine that corresponds to a packet type of the Rapid10 O packet
  • the send engine for direct memory access to DMA mode including:
  • the RapidlO sending engine determines that the sending engine corresponding to the packet type of the RapidlO message is in the DMA read mode, and if the RapidlO message is a DMA write operation And the RapidlO sending engine determines that the sending engine corresponding to the packet type of the RapidlO packet is in combination with the sending of the DMA write mode in the second aspect and the first to tenth possible implementation manners of the second aspect
  • the method further includes:
  • the RapidlO packet sending apparatus receives the packet receiving notification message returned by the peer end, and forwards the packet receiving notification message to the local virtual machine. .
  • an embodiment of the present invention provides a fast input and output RapidlO packet processing method.
  • the RapidlO packet receiving device receives the RapidlO packet sent by the peer end, where the RapidlO packet encapsulates the VM ID of the local virtual machine;
  • the RapidlO packet receiving device parses and acquires the VMID
  • the RapidlO packet receiving device forwards the RapidlO packet to a local virtual machine corresponding to the VMID.
  • the RapidlO packet receiving device the parsing and acquiring the VMID, includes:
  • the RapidlO packet receiving device obtains the VMID from a service Transaction field of the RapidlO packet header portion or from a header of the RapidlO packet payload portion.
  • the RapidOO packet receiving device forwards the Rapid10 message to the VMID Before the local virtual machine, it also includes:
  • the RapidlO packet receiving device allocates a corresponding RapidlO receiving window and/or a RapidlO packet receiving channel to the local virtual machine;
  • the RapidlO packet receiving device forwards the RapidlO packet to the local virtual machine corresponding to the VMID, including:
  • the RapidlO packet receiving device forwards the Rapid10 message to the RapidlO receiving window corresponding to the VMID; if the packet of the RapidlO packet The type is a packet type, and the RapidlO packet receiving device forwards the Rapid10 message to the RapidlO packet receiving channel corresponding to the VMID.
  • the RapidOO packet receiving device forwards the Rapid10 message to a RapidDO receiving window corresponding to the VMID , including:
  • the RapidlO packet receiving device sends the RapidlO packet to the packet receiving address corresponding to the address information according to the address information included in the offset address field of the packet header portion of the RapidlO packet;
  • RapidlO packet receiving device forwards the RapidlO packet to the RapidlO packet receiving channel corresponding to the VMID, including: And the RapidlO packet receiving device forwards the RapidlO packet to the received packet storage address corresponding to the address information according to the address information included in the offset address field of the header portion of the Rapid packet.
  • the RapidlO message receiving device is configured according to the RapidlO The address information included in the address field of the packet header part of the packet, after the RapidlO packet is forwarded to the storage address of the received packet corresponding to the address information, the method further includes: if the packet type of the RapidlO packet is a packet Type, the RapidlO message receiving device returns a message receiving notification message to the peer end.
  • the RapidDO packet is further encapsulated with grouping group information.
  • the group information corresponding to the virtual processor used by the local virtual machine corresponding to the VMID to process the RapidlO packet;
  • the RapidlO message receiving device parses and acquires the group information.
  • the RapidlO packet receiving device forwards the RapidlO packet to the local virtual machine corresponding to the VMID, including:
  • the RapidlO packet receiving device forwards the RapidlO packet to a virtual processor corresponding to the group information of the local virtual machine corresponding to the VMID, so that the virtual processor processes the RapidlO packet.
  • the apparatus for receiving, by the RapidlO packet, the parsing and acquiring the group information includes: receiving, the RapidlO packet The device obtains the group information from the header of the RapidlO message payload portion.
  • the embodiment of the present invention provides a fast input and output RapidlO packet sending apparatus, including:
  • An obtaining module configured to obtain a RapidlO packet to be sent by the local virtual machine
  • the sending module is configured to send the RapidlO packet to the peer end by using a virtual RapidlO channel corresponding to the local virtual machine.
  • the method further includes: an allocating module, configured to use the virtual Rapidl corresponding to the local virtual machine in the sending module Before the channel sends the RapidlO packet to the peer end, the local virtual machine is allocated a corresponding virtual Rapid10 channel.
  • performance requirement information of the local virtual machine includes: input and output 10 bandwidth and/or quality of service QoS configuration;
  • the acquiring module is specifically configured to:
  • the RapidlO packet to be sent of the local VM with higher priority is preferentially obtained.
  • the determining module is configured to determine a sending engine that is in a mode corresponding to a packet type of the RapidlO packet;
  • the sending module is specifically configured to:
  • the determining module is specifically configured to:
  • the sending engine that determines the mode corresponding to the packet type of the RapidlO packet is a direct memory access DMA mode sending engine; if the RapidlO packet is The packet type is a packet type, and the sending engine that determines the mode corresponding to the packet type of the RapidlO packet is a message mode sending engine.
  • the determining module is specifically configured to:
  • the RapidlO packet is a DMA read operation, determining that the sending engine corresponding to the packet type of the RapidlO packet is a sending engine of the DMA read mode;
  • the transmission engine corresponding to the message type of the RapidOO message is a transmission engine of the DMA write mode.
  • the receiving module is configured to adopt, in the sending module, a virtual corresponding to the local virtual machine
  • the packet receiving the notification message returned by the peer end is received, and the packet receiving notification message is forwarded to the local virtual machine.
  • a fifth aspect, the embodiment of the present invention provides a RapidlO packet sending apparatus, including: an acquiring module, configured to acquire a RapidlO packet to be sent by the local virtual machine;
  • a determining module configured to determine a virtual machine identifier VMID of the peer virtual machine corresponding to the RapidlO packet
  • An encapsulation module configured to encapsulate the VMID into the RapidlO packet
  • the sending module is configured to send the RapidlO packet to the peer end, so that the peer end forwards the RapidlO packet to the virtual machine corresponding to the VMID.
  • the encapsulating module is specifically configured to:
  • the VMID is encapsulated into the header of the payload portion of the RapidlO message.
  • the determining module is configured to determine a virtual location of the peer virtual machine corresponding to the RapidDO packet When the machine identifies the VMID, it is also used to:
  • the encapsulating module is further configured to: encapsulate the group information into the RapidlO packet when the VMID is encapsulated into the RapidlO packet;
  • the sending module is specifically configured to:
  • the encapsulating module is specifically configured to:
  • the acquiring module is specifically configured to: Priority of the VM, which is used to obtain the RapidIO packets to be sent from the local VM with higher priority.
  • the sending module is specifically configured to: The virtual RapidIO channel corresponding to the local virtual machine sends the RapidIO packet to the peer end.
  • the method further includes:
  • the allocating module is configured to allocate a corresponding virtual RapidIO channel to the local virtual machine before the sending module sends the RapidIO packet to the peer end by using the virtual RapidIO channel corresponding to the local virtual machine.
  • performance requirement information of the local virtual machine includes: input and output 10 bandwidth and/or quality of service QoS configuration;
  • the sending module is specifically configured to:
  • the RapidIO packet is sent to the peer end on the virtual RapidIO channel corresponding to the local virtual machine by using a determined sending engine.
  • the sending module is specifically configured to:
  • the packet type of the RapidIO packet is an I/O type, determining that the sending engine corresponding to the packet type of the RapidIO packet is a direct memory access DMA mode sending engine; If the packet type of the RapidlO packet is a packet type, the sending engine that determines the mode corresponding to the packet type of the RapidlO packet is a message mode sending engine.
  • the sending module is specifically configured to:
  • the RapidlO packet is a DMA read operation, determining that the sending engine corresponding to the packet type of the RapidlO packet is a sending engine of the DMA read mode;
  • the RapidlO message is a DMA write operation, it is determined that the transmission engine corresponding to the message type of the RapidlO message is a transmission engine of the DMA write mode.
  • the receiving module is configured to: after the sending module sends the RapidlO packet to the peer end by using the virtual Rapid10 channel corresponding to the local virtual machine, if the packet type of the RapidlO packet is a packet type, the receiving station The packet returned by the peer end receives the notification message, and forwards the packet reception notification message to the local virtual machine.
  • the embodiment of the present invention provides a fast input and output RapidlO packet receiving apparatus, including:
  • a receiving module configured to receive a RapidlO packet sent by the peer end, where the RapidlO packet is encapsulated with a virtual machine identifier VMID of the local virtual machine;
  • a parsing module configured to parse and obtain the VMID
  • a forwarding module configured to forward the RapidlO packet to a local virtual machine corresponding to the VMID.
  • the parsing module is specifically configured to:
  • the VMID is obtained from a service Transaction field of the RapidlO packet header portion or from a header of the RapidlO packet payload portion.
  • the method further includes:
  • An allocating module configured to allocate a corresponding RapidlO receiving window and/or a RapidlO packet receiving channel to the local virtual machine before the forwarding module forwards the RapidlO packet to the local virtual machine corresponding to the VMID;
  • the forwarding module is specifically configured to:
  • the packet type of the RapidlO packet is an input/output 10 type, forwarding the RapidlO packet to a RapidlO receiving window corresponding to the VMID;
  • the RapidlO packet is forwarded to the RapidlO packet receiving channel corresponding to the VMID.
  • the forwarding module is specifically configured to:
  • the RapidlO packet is sent to the packet corresponding to the address information according to the address information included in the offset address field of the header portion of the RapidDO packet.
  • the packet type of the RapidlO packet is a packet type, forwarding the RapidlO packet to the received packet corresponding to the address information according to the address information included in the offset address field of the packet header part of the RapidlO packet. Storage address.
  • the sending module is configured to: after the forwarding module forwards the RapidDO packet to the local virtual machine corresponding to the VMID, if the packet type of the RapidlO packet is a packet type, returning the packet to the peer end The text receives the notification message.
  • the RapidlO packet is further encapsulated with a grouping group Information, where the group information corresponds to a virtual processor used by the local virtual machine corresponding to the VMID to process the RapidlO message;
  • the parsing module is further configured to: parse and obtain the group information
  • the forwarding module is further configured to: forward the RapidDO packet to a virtual processor corresponding to the group information of the local virtual machine corresponding to the VMID, so that the virtual processor performs the RapidlO packet deal with.
  • the parsing module is specifically configured to:
  • an embodiment of the present invention provides a fast input and output RapidlO message sending device.
  • the method includes: a first processor, and a first memory connected to the first processor, where the first memory stores a set of program codes, and the first processor can execute the program code to implement In one aspect, and as described in any one of the first to seventh possible implementations of the first aspect
  • an embodiment of the present invention provides a fast input and output RapidlO message sending apparatus, including: a second processor, and a second memory connected to the second processor, where the second memory stores a group
  • the program code the second processor may execute the program code to implement the RapidOO message processing method according to any one of the first to eleventh possible implementation manners of the second aspect The steps in the middle.
  • an embodiment of the present invention provides a fast input and output RapidlO message receiving apparatus, including: a third processor, and a third memory connected to the third processor, where the third memory stores a group
  • the program code the third processor may execute the program code to implement the RapidOO message processing method according to any one of the first to sixth possible implementation manners of the third aspect The steps.
  • the tenth aspect of the present invention provides a fast input and output RapidlO message processing system, comprising: the RapidlO message sending device according to the eighth aspect, and the RapidlO message receiving device according to the ninth aspect, wherein The Rapiod 10 message sending device and the Rapid 10 O message receiving device are connected by a Rapid lO channel.
  • a virtual channel is allocated to each virtual machine by using a RapidlO packet sending device, and a virtual channel that meets its performance requirement is allocated according to performance requirements of each virtual machine, thereby realizing physical resources of different virtual machine RapidlO transmission channels.
  • Configurable use enables RapidlO packet transmission to support the isolation of physical resources between multiple virtual machines, and can flexibly handle the sending of RapidlO packets according to the configuration requirements of each virtual machine.
  • the corresponding type of RapidlO packets are processed to improve the access efficiency of the virtual machine to the I/O interface, thereby improving the overall processing performance of the system.
  • FIG. 1 is a flowchart of Embodiment 1 of a method for processing a RapidIO packet according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a sending process of a RapidIO packet in the method embodiment shown in FIG. A flowchart of the second embodiment of the RapidIO packet processing method
  • FIG. 2 is a schematic diagram of the packaging of the RapidIO packet in the method embodiment shown in FIG. 2;
  • FIG. 2B is a schematic diagram of a system architecture corresponding to a virtual processor in the method embodiment shown in FIG. 2;
  • FIG. 3 is a flowchart of Embodiment 3 of a method for processing a RapidIO packet according to an embodiment of the present invention;
  • FIG. 5 is a schematic structural diagram of Embodiment 2 of a device for sending a RapidIO packet according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of Embodiment 1 of a device for receiving a RapidIO packet according to an embodiment of the present disclosure
  • FIG. 7 is a schematic structural diagram of Embodiment 3 of a device for sending a RapidIO packet according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of Embodiment 4 of a device for sending a RapidIO packet according to an embodiment of the present invention
  • FIG. 9 is a schematic structural diagram of Embodiment 2 of a device for receiving a RapidIO packet according to an embodiment of the present disclosure
  • FIG. 10 is a schematic structural diagram of an embodiment of a RapidIO packet processing system according to an embodiment of the present invention. detailed description
  • FIG. 1 is a flowchart of Embodiment 1 of a method for processing a RapidIO packet according to an embodiment of the present disclosure, where As shown in FIG. 1 , the method embodiment includes:
  • Step 101 The RapidIO packet sending device acquires the RapidlO packet to be sent by the local virtual machine.
  • Step 102 The RapidlO packet sending device sends the RapidlO packet to the peer end by using the virtual RapidlO channel corresponding to the local virtual machine.
  • step 102 also includes:
  • the RapidlO packet sending device allocates a corresponding virtual RapidlO channel to the local virtual machine.
  • the RapidlO packet sending device may obtain performance requirement information of the local virtual machine, where the performance requirement information includes but is not limited to: Input and Output (abbreviation: 10) bandwidth and/or quality of service (Quality of Service, referred to as : QoS ) Configures and assigns a virtual RapidDO channel to the local virtual machine that meets the performance requirements, so that RapidlO packets can be sent according to the performance requirements of each local virtual machine.
  • the method further includes: if the RapidlO packet is a packet type packet, the RapidlO packet sending device receives the packet receiving notification message returned by the peer end, and forwards the packet receiving notification message to the local virtual machine.
  • the RapidlO packet sending device may preferentially acquire the RapidlO packet to be sent of the local virtual machine with a higher priority according to the priority of the local virtual machine.
  • the RapidlO packet sending device can obtain the packet type of the RapidlO packet, determine a sending engine corresponding to the packet type of the RapidlO packet, and adopt a determined sending engine, and the virtual machine corresponding to the local virtual machine
  • the RapidlO packet is sent to the peer end on the RapidlO channel. If the packet type of the RapidlO packet is an I/O type, including: NREAD, NWRITE, NWRITE_R, S WRITE, etc., the description will not be repeated, and the RapidlO packet sending apparatus determines
  • the sending engine corresponding to the packet type of the RapidlO packet is a sending engine of Direct Memory Access (DMA) mode;
  • DMA Direct Memory Access
  • the J RapidlO packet sending device determines the content of the RapidlO packet.
  • the sending engine of the message type corresponding mode is the sending of the message mode.
  • the RapidlO packet sending device determines that the sending engine corresponding to the packet type of the RapidlO packet is the sending engine of the DMA mode, and can further determine:
  • the corresponding mode of the sending engine is the DMA read mode. Transmitting engine;
  • the corresponding mode of the transmit engine is the transmit engine of the DMA write mode.
  • the local virtual machine system includes at least one virtual machine
  • the RapidlO packet sending device may allocate a corresponding virtual channel for each local virtual machine, and allocate and satisfy the performance of the virtual machine according to the performance requirement information of each virtual machine.
  • the virtual RapidDO channel of the request information is obtained.
  • the RapidlO packet of the local virtual machine with the higher priority is preferentially obtained according to the priority of each virtual machine.
  • the RapidlO packet sending device sends the RapidlO packet on the virtual RapidlO channel according to the performance requirement of the virtual machine.
  • the RapidDO message sending device may include a different mode sending engine, configured to send a corresponding type of RapidlO message: for a type 10 RapidlO message, it may be sent by using a DMA mode sending engine, for a packet type of RapidlO.
  • the message can be sent in a message mode.
  • the DMA mode sending engine can also be divided into a DMA read engine and a DMA write engine, which can be used to send 10 read type Rapid messages and 10 write types respectively. RapidlO message.
  • the RapidlO packet sending device can divide the RapidlO physical transmission channel into the same number of virtual channels according to the number of local virtual machines, so that each virtual machine has a relatively independent transmission channel, and can set corresponding 10 Bandwidth and/or QoS configuration to ensure relatively independent transmission bandwidth and transmission quality of each virtual machine.
  • the RapidlO packet sending device can allocate a corresponding RapidlO message queue to each virtual machine, and set the same priority as the virtual machine for each message queue, and preferentially obtain the to-be-sent report from the higher priority message queue. Text.
  • the RapidlO packet sending device may include multiple sending engines, and each processing engine is assigned a corresponding processing task, so that each sending engine can specifically use the same type of RapidlO packet to reduce the sending engine pair.
  • the RapidlO packet type is parsed to improve the transmission efficiency of RapidlO packets.
  • Figure la is a schematic diagram of a process of sending a RapidlO packet in the method embodiment shown in Figure 1. As shown in Figure la, the RapidlO packet first arrives from the local virtual machine to the RapidlO message queue corresponding to the local virtual machine, and then according to the RapidlO. The packet type of the packet is sent to the sending engine of the corresponding mode, and finally sent to the peer through the corresponding virtual channel.
  • a virtual channel is allocated to each virtual machine by using a RapidlO packet sending device, and a virtual channel that meets its performance requirement is allocated according to performance requirements of each virtual machine.
  • the configurable use of the physical resources of the RapidlO transmission channel of different virtual machines enables the RapidlO packet transmission to support the isolation of physical resource access between multiple virtual machines, and can flexibly handle the transmission of RapidlO packets according to the configuration requirements of each virtual machine.
  • the access efficiency of the virtual machine to the I/O interface is improved, thereby improving the overall processing performance of the system.
  • the peer end if the peer end is also a multi-virtual machine system, the peer end cannot forward the RapidlO packet directly to the corresponding virtual machine, but needs to use the application software to analyze the RapidlO packet and then forward it to the corresponding For the virtual machine, there is a problem that the processing efficiency is low.
  • the present invention also provides an embodiment of the RapidlO packet processing method shown in FIG. 2.
  • FIG. 2 is a flowchart of Embodiment 2 of a method for processing a Rapidl O packet according to an embodiment of the present invention. As shown in FIG. 2, the method embodiment includes:
  • Step 201 The RapidIO packet sending device acquires a RapidlO packet to be sent by the local virtual machine.
  • Step 202 The RapidlO packet sending device determines a virtual machine identifier VMID of the peer virtual machine corresponding to the RapidlO packet.
  • Step 203 The RapidIO packet sending device encapsulates the VMID into the RapidlO packet.
  • Step 204 The RapidlO packet sending device sends a RapidlO packet to the peer end, so that the peer end forwards the RapidlO packet to the VMID. Corresponding virtual machine.
  • the RapidlO packet sending device determines the VMID of the peer virtual machine corresponding to the RapidlO packet
  • the packet information corresponding to the RapidlO packet is determined, and the group information is encapsulated in the RapidlO packet.
  • the group information corresponds to a virtual processor used by the peer virtual machine to process the RapidlO packet;
  • the RapidlO packet sending device sends the RapidlO packet to the peer end, so that the peer end forwards the RapidlO packet to the virtual processor corresponding to the Group information.
  • VMs Virtual Machines
  • VCPU Virtual CPU, Abbreviation: VCPU
  • FIG. 2b VM1 and VM2 are installed on the dual-core CPU system, and the CPU 1 is allocated to V1 and BVCPU12 to VM1 and B VM2.
  • the CPU 2 allocates the VCPU 21 and the VCPU 22 to VM1 and VM2, respectively, so that VM1 operates on the VCPU 11 and On the VCPU 21, the VM 2 operates on the VCPU 12 and the VCPU 22, and it seems that VM1 and VM2 operate independently on the CPU 1 and the CPU 2.
  • the group information is used to instruct the VM to process the RapidlO message by using the VCPU located on the physical CPU, that is, whether the VM1 uses VCPU11 or VCPU21 to process the RapidlO message.
  • the VMID is encapsulated into the service Transaction field of the header portion of the RapidlO message, or the VMID is encapsulated into the header of the RapidlO packet payload portion; the Group information is encapsulated into the header of the payload portion of the RapidlO message.
  • the RapidlO packet sending apparatus in the method embodiment may use the sending method of the RapidlO packet sending apparatus in the method embodiment shown in FIG. 1 to obtain the RapidlO packet to be sent according to the priority, and adopt the same with RapidlO.
  • the sending engine of the packet corresponding mode sends a RapidlO packet to the peer on the virtual RapidD0 channel corresponding to the local VM.
  • the RapidlO packet sending apparatus may encapsulate the VMID in the service Transcation field of the packet header part of the RapidlO packet or the payload payload part of the RapidlO packet.
  • the header as shown by the shaded portion in Figure 2a, and/or the Group information is placed in the header of the payload portion of the RapidlO packet.
  • the RapidlO packet is sent to the peer to make the pair.
  • the RapidlO packet receiving device may parse and obtain the VMID and/or the group information, and forward the RapidlO to the virtual machine corresponding to the VMID, and forward to the virtual corresponding to the VMID.
  • the machine processes the virtual processor corresponding to the RapidlO.
  • the RapidlO packet sending device can negotiate with the peer through the application software to determine the VMID and Group information of the peer virtual machine, and then encapsulate the VMID and Group information into the Rapid packet to be sent.
  • the RapidlO packet sending device encapsulates the VMID and/or the group information of the peer virtual machine corresponding to the RapidlO packet, so that the peer directly forwards the RapidDO to the VMID after receiving the RapidlO packet.
  • the processing efficiency in the RapidlO packet virtual machine environment can be improved.
  • Step 301 The RapidlO packet receiving device receives the RapidlO packet sent by the peer end, where the RapidlO packet encapsulates the VMID of the local virtual machine.
  • Step 302 The RapidlO packet receiving device parses and acquires the VMID.
  • Step 303 The RapidlO packet receiving device forwards the RapidlO packet to the local virtual machine corresponding to the VMID.
  • the RapidlO packet receiving device may obtain the VMID from the service Transaction field of the RapidlO packet header or from the header of the RapidlO packet payload portion.
  • step 303 also includes:
  • the RapidlO packet receiving device allocates a corresponding RapidlO receiving window and/or a RapidlO packet receiving channel to the local virtual machine;
  • the RapidlO packet receiving device forwards the RapidlO packet to the RapidlO receiving window corresponding to the VMID;
  • the RapidlO packet receiving device forwards the RapidlO packet to the RapidlO packet receiving channel corresponding to the VMID.
  • the RapidlO packet receiving device sends the RapidlO packet to the packet corresponding to the address information according to the address information included in the offset address field of the header portion of the RapidlO packet.
  • the RapidlO packet receiving device forwards the RapidlO packet to the received packet storage address corresponding to the address information according to the address information included in the offset address field of the header portion of the RapidlO packet, and Return the message to the peer to receive the notification message.
  • the RapidlO packet is further encapsulated with grouping information, wherein the group information corresponds to a virtual processor used by the local virtual machine corresponding to the VMID to process the RapidlO packet, and the RapidlO packet receiving device parses and acquires the group information, and accordingly, Forwarding the RapidlO packet to the virtual processor corresponding to the group information of the local virtual machine corresponding to the VMID, so that the virtual processor processes the RapidlO packet, wherein the RapidlO packet receiving device can load the payload from the RapidlO packet. Part of the first parsing gets Group information.
  • the RapidlO packet receiving device allocates corresponding processing for the local virtual machine.
  • the rapidlO packet obtains the address information included in the offset address of the header portion of the RapidlO packet (the offset address shown in the shaded portion of FIG. 2a), and for the type 10 packet, sending the RapidlO packet to the A packet receiving address corresponding to the address information, where the address information corresponds to an offset address in a memory of the system where the virtual machine is located, so that the peer virtual machine can directly read and write the storage address accessible by the virtual machine directly;
  • the type of the packet is sent to the received packet storage address corresponding to the address information, so that the virtual machine corresponding to the VMID can obtain the RapidlO packet from the received message storage address and process the packet.
  • the peer end returns a packet receiving notification message of the RapidlO packet, where the RapidlO packet receiving device can return the packet receiving notification message to the peer end by using a message or an interrupt manner.
  • the RapidlO packet receiving device may further obtain the group information from the header of the load portion of the RapidlO packet, and forward the corresponding information according to the group information.
  • the virtual processor processes the RapidlO message.
  • RapidlO packets if the RapidlO packet is forwarded to the packet receiving address corresponding to the address information in the offset address field, if the storage address corresponding to the virtual machine system has the permission access setting, It is necessary to determine that the peer virtual machine has the right to access the memory address corresponding to the address information.
  • the RapidlO packet receiving device parses and obtains the VMID and/or the group information, and directly forwards the RapidlO packet to the VM corresponding to the VMID, and/or the corresponding virtual processor, and implements the RapidlO packet to support the virtual machine.
  • the mapping between the virtual processor and the virtual processor improves the processing performance of the virtual machine system 10 interface, improves the processing efficiency of the RapidlO packet, and implements the local virtual machine by setting the receiving window and/or receiving channel corresponding to the local virtual machine.
  • the receiving channels and accesses are isolated from each other.
  • Embodiments of the present invention further provide an apparatus embodiment for implementing the above method embodiments.
  • FIG. 4 is a schematic structural diagram of Embodiment 1 of a device for sending a RapidlO packet according to an embodiment of the present invention.
  • the RapidlO message sending apparatus 400 includes: an obtaining module 401, a sending module 402, where
  • the obtaining module 401 is configured to obtain a RapidlO packet to be sent by the local virtual machine.
  • the sending module 402 is configured to send the RapidlO packet to the peer by using a virtual Rapid10 channel corresponding to the local virtual machine.
  • the RapidlO message transmitting apparatus 400 further includes:
  • the allocation module 403 is configured to allocate a corresponding virtual RapidlO channel to the local virtual machine before the sending module 402 sends the RapidlO packet to the peer by using the virtual RapidlO channel corresponding to the local virtual machine.
  • the allocation module 403 is specifically configured to obtain performance requirement information of the local virtual machine, where the performance requirement information includes: input/output 10 bandwidth and/or quality of service QoS configuration; and allocate a virtual RapidDO channel that satisfies performance requirement information for the local virtual machine. .
  • the RapidlO message sending apparatus 400 further includes: a receiving module 404, configured to: after the sending module 402 sends a RapidlO message to the peer end by using a virtual RapidlO channel corresponding to the local virtual machine,
  • the packet received by the peer end receives the notification message, and the packet receiving notification message is forwarded to the local virtual machine.
  • the obtaining module 401 is specifically configured to:
  • the RapidlO packet to be sent of the local VM with higher priority is preferentially obtained.
  • the RapidlO packet sending apparatus 400 further includes: a determining module 405, configured to determine a sending engine that corresponds to a packet type of the RapidlO packet;
  • the sending module 402 is specifically configured to:
  • the sending engine determined by the determining module 405 sends a RapidlO packet to the peer on the virtual RapidlO channel corresponding to the local virtual machine.
  • the determining module 405 is specifically configured to:
  • the sending engine that determines the mode corresponding to the packet type of the RapidlO packet is a direct memory access DMA mode sending engine.
  • the sending engine that determines the mode corresponding to the packet type of the RapidlO packet is the sending mode of the message mode.
  • the foregoing determining module 405 is specific. Used for:
  • the RapidlO packet is a DMA read operation, it is determined that the sending engine corresponding to the packet type of the RapidlO packet is the sending engine of the DMA read mode;
  • the RapidlO message is a DMA write operation, it is determined that the transmission engine corresponding to the message type of the RapidlO message is the transmission engine of the DMA write mode.
  • the RapidlO packet sending apparatus 400 provided in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 1.
  • the implementation principle and technical effects are similar, and details are not described herein.
  • FIG. 5 is a schematic structural diagram of Embodiment 2 of a device for sending a RapidlO packet according to an embodiment of the present invention.
  • the RapidlO packet receiving apparatus 500 includes: an obtaining module 501, a determining module 502, a packaging module 503, and sending Module 504, wherein
  • the obtaining module 501 is configured to obtain a RapidlO packet to be sent by the local virtual machine.
  • a determining module 502 configured to determine a virtual machine identifier VMID of the peer virtual machine corresponding to the RapidlO packet;
  • a package module 503, configured to encapsulate the VMID into the RapidlO packet
  • the sending module 504 is configured to send the RapidlO packet to the peer end, so that the peer end forwards the RapidlO packet to the virtual machine corresponding to the VMID.
  • the foregoing encapsulation module 503 is specifically configured to:
  • the VMID is encapsulated into the service Transaction field of the header portion of the RapidlO packet; or, the VMID is encapsulated into the header of the payload portion of the RapidlO packet.
  • the determining module 502 determines the VM ID of the peer virtual machine corresponding to the RapidlO packet
  • the determining module 502 is further configured to:
  • the packet group information of the peer virtual machine corresponding to the RapidlO packet is determined, where the group information corresponds to the virtual processor used by the peer virtual machine corresponding to the VMID to process the RapidlO packet; the encapsulating module 503, when the VMID is encapsulated into the RapidlO packet , and is also used to: encapsulate the group information into the RapidlO packet;
  • the sending module 504 is specifically configured to:
  • the RapidlO packet is sent to the peer end, so that the peer end forwards the RapidlO packet to the virtual processor corresponding to the group information.
  • the encapsulation module 503 is specifically configured to:
  • the Group information is encapsulated into the header of the payload portion of the RapidlO message.
  • the obtaining module 501 is specifically configured to:
  • the RapidlO packet to be sent of the local VM with higher priority is preferentially obtained.
  • the sending module 504 is specifically configured to:
  • the RapidlO packet is sent to the peer end by using the virtual RapidlO channel corresponding to the local VM.
  • the RapidlO message sending device 500 further includes:
  • the allocation module 505 is configured to allocate a corresponding virtual RapidlO channel to the local virtual machine before the sending module 504 sends the RapidlO packet to the peer end by using the virtual RapidlO channel corresponding to the local virtual machine.
  • the distribution module 505 is specifically configured to:
  • Obtain performance requirement information of the local virtual machine includes: input and output 10 bandwidth and/or quality of service QoS configuration;
  • the determining module 502 is further configured to: determine a sending engine that corresponds to a packet type of the RapidlO packet;
  • the sending module 504 is specifically configured to:
  • a RapidlO packet is sent to the peer end on the virtual RapidlO channel corresponding to the local virtual machine.
  • the determining module 502 is specifically configured to:
  • the sending engine that determines the mode corresponding to the packet type of the RapidlO packet is a direct memory access DMA mode sending engine.
  • the sending engine that determines the mode corresponding to the packet type of the RapidlO packet is the sending mode of the message mode.
  • the determining module 502 is further configured to: if the RapidlO packet is a DMA read operation, determine that the sending engine corresponding to the packet type of the RapidlO packet is the DMA read mode. Transmitting engine;
  • the RapidlO message is a DMA write operation, it is determined that the transmission engine corresponding to the message type of the RapidlO message is the transmission engine of the DMA write mode.
  • the RapidlO message sending device 500 further includes a receiving module 506, configured to send, by the sending module 504, a virtual RapidlO channel corresponding to the local virtual machine to the opposite end. After the RapidlO message,
  • the packet received by the peer end receives the notification message, and the packet receiving notification message is forwarded to the local virtual machine.
  • the RapidlO packet sending apparatus 500 provided in this embodiment may be used to implement the technical solution in the embodiment of the method shown in FIG. 2, and the implementation principle and technical effects are similar, and details are not described herein.
  • FIG. 6 is a schematic structural diagram of Embodiment 1 of a device for receiving a RapidlO packet according to an embodiment of the present invention.
  • the RapidlO packet receiving device 600 includes: a receiving module 601, a parsing module 602, and a forwarding module 603. ,
  • the receiving module 601 is configured to receive the RapidlO packet sent by the peer end, where the RapidlO packet encapsulates the VM ID of the local virtual machine;
  • the parsing module 602 is configured to parse and obtain a VMID.
  • the forwarding module 603 is configured to forward the RapidlO packet to the local virtual machine corresponding to the VMID. Further, the parsing module 602 is specifically configured to:
  • the VMID is obtained from the service Transaction field of the RapidlO packet header or from the header of the RapidlO message payload portion.
  • the RapidlO message receiving device 600 further includes:
  • the allocation module 604 is configured to allocate a corresponding RapidlO receiving window and/or a RapidlO packet receiving channel to the local virtual machine before the forwarding module 603 forwards the RapidlO packet to the local virtual machine corresponding to the VMID.
  • the forwarding module 603 is specifically configured to:
  • the RapidlO packet is forwarded to the RapidlO receiving window corresponding to the VMID.
  • the RapidlO packet is forwarded to the RapidlO packet receiving channel corresponding to the VMID.
  • the forwarding module 603 is specifically configured to:
  • the RapidlO packet is sent to the packet receiving address corresponding to the address information according to the address information included in the offset address field of the packet header in the RapidlO packet.
  • the RapidlO packet is forwarded to the corresponding address information according to the address information included in the offset address field of the header portion of the RapidlO packet. Message storage address.
  • the RapidlO packet receiving apparatus 600 further includes a sending module 605, configured to: after the forwarding module 603 forwards the RapidlO packet to the local virtual machine corresponding to the VMID,
  • the packet type of the RapidlO packet is the packet type
  • the packet is returned to the peer to receive the notification message.
  • the RapidlO packet is further encapsulated with packet group information, where the group information corresponds to a virtual processor used by the local virtual machine corresponding to the VMID to process the RapidlO packet;
  • the parsing module 602 is further configured to: parse and obtain group information
  • the forwarding module 603 is further configured to: forward the RapidlO packet to a virtual processor corresponding to the group information of the local virtual machine corresponding to the VMID, so that the virtual processor processes the RapidlO packet.
  • the parsing module 602 is specifically configured to:
  • the Group information is obtained from the header of the RapidlO message payload portion.
  • the RapidlO packet receiving apparatus provided in this embodiment may be used to implement the technical solution in the method embodiment shown in FIG. 3, and the implementation principle and technical effects are similar, and details are not described herein.
  • FIG. 7 is a schematic structural diagram of Embodiment 3 of a device for sending a RapidlO packet according to an embodiment of the present invention.
  • the RapidlO packet sending apparatus 700 includes: a first processor 701, and the first processing
  • the first memory 702 is connected to the first memory 702, wherein the first memory 702 stores a set of program codes, and the first processor 701 can execute the set of program codes to implement the technical solution in the method embodiment shown in FIG.
  • the implementation principle is similar to the technical effect, and will not be described in detail.
  • FIG. 8 is a schematic structural diagram of Embodiment 4 of a device for sending a RapidlO packet according to an embodiment of the present invention.
  • the RapidlO packet sending apparatus 800 includes: a second processor 801, and a second processor 801. a second memory 802, wherein the second memory 802 stores a set of program codes, and the second processor 801 can execute the set of program codes to implement the technical solution in the method embodiment shown in FIG. The principle and technical effect are similar, and will not be described in detail.
  • FIG. 9 is a schematic structural diagram of Embodiment 2 of a RapidlO packet receiving apparatus according to an embodiment of the present invention.
  • the RapidlO packet receiving apparatus 900 includes: a third processor 901, and a third processor 901.
  • the third memory 902 is connected to the third memory 902, and the third processor 901 can execute the program code.
  • the third processor 901 can execute the program code to implement the technical solution in the method embodiment shown in FIG. The technical effects are similar and will not be described in detail.
  • FIG. 10 is a schematic structural diagram of an embodiment of a RapidlO packet processing system according to an embodiment of the present disclosure
  • the RapidOO message processing system 1000 includes a RapidlO message transmitting device 1001, and a RapidlO message receiving device 1002, wherein the RapidoIO message transmitting device 1001 and the RapidlO message receiving device 1002 pass The RapidlO channels are connected.
  • the RapidlO message transmitting apparatus 1001 and the RapidlO message receiving apparatus 1002 are respectively the RapidlO message transmitting apparatus shown in FIG. 8 and the RapidlO message receiving apparatus shown in FIG. 9, which can be respectively used to execute FIG. 2 and FIG.
  • the technical solutions in the method embodiments are similar, and the implementation principles and technical effects are similar, and details are not described herein.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the software functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the method of various embodiments of the present invention.
  • a computer device which may be a personal computer, a server, or a network device, etc.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Abstract

本发明实施例提供一种快速输入输出报文处理方法、装置及系统,该方法包括:RapidIO报文发送装置获取本地虚拟机待发送的RapidIO报文; RapidIO报文发送装置采用与所述本地虚拟机对应的虚拟RapidIO通道向对端发送所述RapidIO报文。本发明通过RapidIO报文发送装置为每个虚拟机分配对应的虚拟通道,并根据各虚拟机的性能需求分配满足其性能需求的虚拟通道,实现了不同虚拟机RapidIO传输通道物理资源的可配置使用使得RapidIO报文传输支持多虚拟机之间物理资源访问的的相互隔离,并可按照各虚拟机的配置需求灵活处理其RapidIO报文的发送,同时,通过配置不同模式的发送引擎处理对应类型的RapidIO报文,进一步提升虚拟机对I/O接口的访问效率。

Description

快速输入输出报文处理方法、 装置及系统 技术领域
本发明实施例涉及通信技术, 尤其涉及一种适用于多虚拟机系统互连的 快速输入输出报文处理方法、 装置及系统。 背景技术
快速输入输出 (英文: Rapid Input/Output, 简称: RapidlO) 是一种高可 靠性、 高性能的互连技术, 包括并行 RapidlO和串行 RapidlO, 并行 RapidlO 和串行 RapidlO具有相同的编程模型、事务处理和寻址机制。 RapidlO互连架 构是一个开放的标准, 可用于连接多处理器、 存储器、 网络设备上的存储器 映射 I/O器件、 存储子系统和通用计算平台, 以提高系统的软硬件接口处理 性能。
RapidlO协议分为三层: 逻辑层、传输层和物理层, 其中逻辑层定义了操 作协议和相应的包格式; 传输层定义了包交换、 路由和寻址机制; 物理层定 义了电气特性、链路控制和纠错重传等。 RapidlO是一种基于包交换的互连技 术, RapidlO 数据报文由包头、 载荷 (英文: payload) 和循环冗余校验 (英 文: Cyclic Redundancy Check, 简称: CRC) 三部分组成。 RapidlO报文类型 包括 10类型和包类型, 在包头部分的格式类型(Format Type, 简称: Ftype) 字段定义。 10类型报文用于直接读写目的器件的存储器, 基于统一的地址窗 口映射方式进行 10数据的收发,包括:读操作(NREAD),写操作(NWRITE) , 带响应写操作 (NWRITE_R) , 流写 (SWRITE) 等。 包类型报文, 主要用 于消息传递 (Message Passing) , 通过邮箱号 (mbox) 确定数据在目的器件 中的位置, 根据接收到的报文的邮箱号把数据保存到对应的缓冲区, 使用统 一的地址接收空间, 包括: 消息 (Message) , 数据流 (Data Streaming ) , 门铃 (Doorbell) 等。
随着虚拟机 (英文: Virtual Machine, 简称: VM) 应用的不断发展, 多 虚拟机系统由于其灵活性广泛存在,可以为不同的虚拟机配置不同的优先级、 访问权限、 10带宽、 服务质量(英文: Quality of Service, 简称: QoS )等, 以 灵活处理不同的事务。
现有技术中,对于多虚拟机系统而言, RapidlO报文的传输是物理资源共 享的, 不能灵活处理不同配置的虚拟机的 RapidlO报文传输, 影响 RapidlO 报文在多虚拟机系统中的处理效率。 发明内容 本发明实施例提供一种快速输入输出报文处理方法、装置及系统, 以解 决现有技术中 RapidlO不能灵活处理不同配置的虚拟机的 RapidlO报文传 输, 影响 RapidlO报文在多虚拟机系统中的处理效率的问题。 第一方面,本发明实施例提供一种快速输入输出 RapidlO报文处理方法, 包括:
RapidlO报文发送装置获取本地虚拟机待发送的 RapidlO报文; 所述 RapidlO报文发送装置采用与所述本地虚拟机对应的虚拟 RapidlO 通道向对端发送所述 RapidlO报文。
结合第一方面, 在第一方面的第一种可能的实现方式中, 所述 RapidlO 报文发送装置采用所述本地虚拟机对应的虚拟 RapidlO通道向对端发送所述 RapidlO报文之前, 还包括:
所述 RapidlO报文发送装置为所述本地虚拟机分配对应的虚拟 RapidlO 通道。
结合第一方面的第一种可能的实现方式, 在第一方面的第二种可能的实 现方式中, 所述 RapidlO 报文发送装置为所述本地虚拟机分配对应的虚拟 RapidlO通道, 包括:
所述 RapidlO报文发送装置获取所述本地虚拟机的性能需求信息, 所述 性能需求信息包括: 输入输出 10带宽和 /或服务质量 QoS配置;
所述 RapidlO报文发送装置为所述本地虚拟机分配满足所述性能需求信 息的虚拟 RapidlO通道。
结合第一方面以及第一方面的第一至第二种可能的实现方式, 在第一方 面的第三种可能的实现方式中, 所述 RapidlO报文发送装置获取本地虚拟机 待发送的 RapidlO报文, 包括: 所述 RapidlO报文发送装置, 按照本地虚拟机的优先级, 优先获取具有 较高优先级的本地虚拟机的待发送 RapidlO报文。
结合第一方面以及第一方面的第一至第三种可能的实现方式, 在第一方 面的第四种可能的实现方式中, 所述 RapidlO报文发送装置采用所述本地虚 拟机对应的虚拟 RapidlO通道向对端发送所述 RapidlO报文, 包括:
所述 RapidlO报文发送装置确定与所述 RapidlO报文的报文类型对应模 式的发送引擎;
所述 RapidlO报文发送装置采用确定的发送引擎, 在所述本地虚拟机对 应的虚拟 RapidlO通道上向对端发送所述 RapidlO报文。
结合第一方面的第四种可能的实现方式, 在第一方面的第五种可能的实 现方式中, 所述 RapidlO报文发送装置确定与所述 RapidlO报文的报文类型 对应模式的发送引擎, 包括:
若所述 RapidlO报文的报文类型为 I/O类型, 则所述 RapidlO报文发送 装置确定与所述 RapidlO报文的报文类型对应模式的发送引擎为直接内存访 问 DMA模式的发送引擎;
若所述 RapidlO报文的报文类型为包类型, 则所述 RapidlO报文发送装 置确定与所述 RapidlO报文的报文类型对应模式的发送引擎为消息模式的发 送引擎。
结合第一方面的第五种可能的实现方式, 在第一方面的第六种可能的实 现方式中, 所述 RapidlO报文发送装置确定与所述 RapidlO报文的报文类型 对应模式的发送引擎为直接内存访问 DMA模式的发送引擎, 包括:
若所述 RapidlO报文为 DMA读操作, 则所述 RapidlO发送引擎, 确定 与所述 RapidlO报文的报文类型对应模式的发送引擎为 DMA读模式的发送 若所述 RapidlO报文为 DMA写操作, 则所述 RapidlO发送引擎, 确定 与所述 RapidlO报文的报文类型对应模式的发送引擎为 DMA写模式的发送 结合第一方面以及第一方面的第一至第六种可能的实现方式, 在第一方 面的第七种可能的实现方式中, 所述 RapidlO报文发送装置采用与所述本地 虚拟机对应的虚拟 RapidlO通道向对端发送所述 RapidlO报文之后, 还包括: 若所述 RapidlO报文的报文类型为包类型, 所述 RapidlO报文发送装置 接收所述对端返回的报文接收通知消息, 并且将所述报文接收通知消息转发 给所述本地虚拟机。
第二方面,本发明实施例提供一种快速输入输出 RapidlO报文处理方法, 包括:
RapidlO报文发送装置, 获取所述本地虚拟机的待发送 RapidlO报文; 所述 RapidlO报文发送装置, 确定所述 RapidlO报文对应的对端虚拟机 的虚拟机标识 VMID;
所述 RapidlO报文发送装置,将所述 VMID封装到所述 RapidlO报文中; 所述 RapidlO报文发送装置, 向对端发送所述 RapidlO报文, 以使所述 对端将所述 RapidlO报文转发给与所述 VMID对应的虚拟机。
结合第二方面, 在第二方面的第一种可能的实现方式中, 所述 RapidlO 报文发送装置将所述 VMID封装到所述 RapidlO报文中, 包括:
所述 RapidlO报文发送装置将所述 VMID封装到所述 RapidlO报文的包 头部分的业务 Transaction字段中;
或者, 所述 RapidlO报文发送装置将所述 VMID封装到所述 RapidlO报 文的载荷 payload部分的首部。
结合第二方面或第二方面的第一种可能的实现方式, 在第二方面的第二 种可能的实现方式中, 所述 RapidlO报文发送装置确定所述 RapidlO报文对 应的对端虚拟机的虚拟机标识 VMID时, 还包括:
所述 RapidlO报文发送装置确定所述 RapidlO报文对应的对端虚拟机的 分组 Group信息, 其中所述 Group信息对应所述 VMID对应的对端虚拟机处 理所述 RapidlO报文采用的虚拟处理器;
所述 RapidlO报文发送装置将所述 VMID封装到所述 RapidlO报文中时, 还包括:
所述 RapidlO报文发送装置将所述 Group信息封装到所述 RapidlO报文 中;
所述 RapidlO报文发送装置, 向对端发送所述 RapidlO报文, 包括: 所述 RapidlO报文发送装置, 向对端发送所述 RapidlO报文, 以使所述 对端将所述 RapidlO报文, 转发到所述 Group信息对应的虚拟处理器。 结合第二方面的第二种可能的实现方式, 在第二方面的第三种可能的实 现方式中,所述 RapidlO报文发送装置将所述 Group信息封装到所述 RapidlO 报文中, 包括:
所述 RapidlO报文发送装置将所述 Group信息封装到所述 RapidlO报文 的载荷 payload部分的首部。
结合第二方面以及第二方面的第一至第三种可能的实现方式中的任一 项, 在第二方面的第四种可能的实现方式中, 所述 RapidlO报文发送装置获 取所述本地虚拟机的待发送 RapidlO报文, 包括:
所述 RapidlO报文发送装置, 按照本地虚拟机的优先级, 优先获取具有 较高优先级的本地虚拟机的待发送 RapidlO报文。
结合第二方面以及第二方面的第一至第四种可能的实现方式中的任一 项, 在第二方面的第五种可能的实现方式中, 所述 RapidlO报文发送装置, 向对端 RapidlO报文接收装置发送所述 RapidlO报文, 包括:
所述 RapidlO报文发送装置,采用与所述本地虚拟机对应的虚拟 RapidlO 通道, 向对端发送所述 RapidlO报文。
结合第二方面的第五种可能的实现方式, 在第二方面的第六种可能的实 现方式中, 所述 RapidlO 报文发送装置, 采用所述本地虚拟机对应的虚拟 RapidlO通道, 向对端 RapidlO报文接收装置发送所述 RapidlO报文之前, 还 包括:
所述 RapidlO报文发送装置,为所述本地虚拟机分配对应的虚拟 RapidlO 通道。
结合第二方面的第六种可能的实现方式, 在第二方面的第七种可能的实 现方式中, 所述 RapidlO报文发送装置, 为所述本地虚拟机分配对应的虚拟 RapidlO通道, 包括:
所述 RapidlO报文发送装置获取所述本地虚拟机的性能需求信息, 所述 性能需求信息包括: 输入输出 10带宽和 /或服务质量 QoS配置;
所述 RapidlO报文发送装置为所述本地虚拟机分配满足所述性能需求信 息的虚拟 RapidlO通道。
结合第二方面的第五至第七种可能的实现方式中的任一种, 在第二方面 的第八种可能的实现方式中, 所述 RapidlO报文发送装置采用所述本地虚拟 机对应的虚拟 RapidlO通道向对端发送所述 RapidlO报文, 包括: 所述 RapidlO报文发送装置确定与所述 RapidlO报文的报文类型对应模 式的发送引擎;
所述 RapidlO报文发送装置采用确定的发送引擎, 在所述本地虚拟机对 应的虚拟 RapidlO通道上向对端发送所述 RapidlO报文。
结合第二方面的第八种可能的实现方式, 在第二方面的第九种可能的实 现方式中, 所述 RapidlO报文发送装置确定与所述 RapidlO报文的报文类型 对应模式的发送引擎, 包括:
若所述 RapidlO报文的报文类型为 I/O类型, 则所述 RapidlO报文发送 装置确定与所述 RapidlO报文的报文类型对应模式的发送引擎为直接内存访 问 DMA模式的发送引擎;
若所述 RapidlO报文的报文类型为包类型, 则所述 RapidlO报文发送装 置确定与所述 RapidlO报文的报文类型对应模式的发送引擎为消息模式的发 送引擎。
结合第二方面的第九种可能的实现方式, 在第二方面的第十种可能的实 现方式中, 所述 RapidlO报文发送装置确定与所述 RapidlO报文的报文类型 对应模式的发送引擎为直接内存访问 DMA模式的发送引擎, 包括:
若所述 RapidlO报文为 DMA读操作, 则所述 RapidlO发送引擎, 确定 与所述 RapidlO报文的报文类型对应模式的发送引擎为 DMA读模式的发送 若所述 RapidlO报文为 DMA写操作, 则所述 RapidlO发送引擎, 确定 与所述 RapidlO报文的报文类型对应模式的发送引擎为 DMA写模式的发送 结合第二方面以及第二方面的第一至第十种可能的实现方式中的任一 种, 在第二方面的第十一种可能的实现方式中, 所述 RapidlO报文发送装置, 向对端发送所述 RapidlO报文之后, 还包括:
若所述 RapidlO报文的报文类型为包类型, 所述 RapidlO报文发送装置 接收所述对端返回的报文接收通知消息, 并且将所述报文接收通知消息转发 给所述本地虚拟机。
第三方面,本发明实施例提供一种快速输入输出 RapidlO报文处理方法, 包括:
RapidlO报文接收装置接收对端发送的 RapidlO报文,所述 RapidlO报文 中封装有本地虚拟机的虚拟机标识 VMID;
所述 RapidlO报文接收装置, 解析获取所述 VMID;
所述 RapidlO报文接收装置将所述 RapidlO报文转发到所述 VMID对应 的本地虚拟机。
结合第三方面, 在第三方面的第一种可能的实现方式中, 所述 RapidlO 报文接收装置, 解析获取所述 VMID, 包括:
所述 RapidlO 报文接收装置从所述 RapidlO 报文包头部分的业务 Transaction字段或者从所述 RapidlO报文载荷 payload部分的首部解析获取所 述 VMID。
结合第三方面或第三方面的第一种可能的实现方式, 在第三方面的第二 种可能的实现方式中, 所述 RapidlO报文接收装置将所述 RapidlO报文转发 到所述 VMID对应的本地虚拟机之前, 还包括:
所述 RapidlO报文接收装置为本地虚拟机分配对应的 RapidlO接收窗口 和 /或 RapidlO包接收通道;
所述 RapidlO报文接收装置将所述 RapidlO报文转发到所述 VMID对应 的本地虚拟机, 包括:
若所述 RapidlO报文的报文类型为输入输出 10类型,则所述 RapidlO报 文接收装置将所述 RapidlO报文转发到所述 VMID对应的 RapidlO接收窗口; 若所述 RapidlO报文的报文类型为包类型, 则所述 RapidlO报文接收装 置将所述 RapidlO报文转发到所述 VMID对应的 RapidlO包接收通道。
结合第三方面的第二种可能的实现方式, 在第三方面的第三种可能的实 现方式中,所述 RapidlO报文接收装置将所述 RapidlO报文转发到所述 VMID 对应的 RapidlO接收窗口, 包括:
所述 RapidlO报文接收装置根据所述 RapidlO报文中包头部分的偏移地 址字段包括的地址信息, 将所述 RapidlO报文发送到所述地址信息对应的报 文接收地址;
所述 RapidlO报文接收装置将所述 RapidlO报文转发到所述 VMID对应 的 RapidlO包接收通道, 包括: 所述 RapidlO报文接收装置根据所述 Rapid报文中包头部分的偏移地址 字段包括的地址信息, 将所述 RapidlO报文转发到所述地址信息对应的接收 报文存储地址。
结合第三方面以及第三方面的第一至第三种可能的实现方式中的任一 种, 在第三方面的第四种可能的实现方式中, 所述 RapidlO报文接收装置根 据所述 RapidlO 报文中包头部分的地址字段中包括的地址信息, 将所述 RapidlO报文转发到所述地址信息对应的接收报文存储地址之后, 还包括: 若所述 RapidlO报文的报文类型为包类型, 则所述 RapidlO报文接收装 置向对端返回报文接收通知消息。
结合第三方面以及第三方面的第一至第四种可能的实现方式中的任一 种, 在第三方面的第五种可能的实现方式中, 所述 RapidlO报文还封装有分 组 Group信息, 其中所述 Group信息对应所述 VMID对应的本地虚拟机处理 所述 RapidlO报文采用的虚拟处理器;
所述 RapidlO报文接收装置, 解析获取所述 Group信息 ·'
所述 RapidlO报文接收装置将所述 RapidlO报文转发到所述 VMID对应 的本地虚拟机, 包括:
所述 RapidlO报文接收装置将所述 RapidlO报文转发到所述 VMID对应 的本地虚拟机的所述 Group信息对应的虚拟处理器, 以使所述虚拟处理器对 所述 RapidlO报文进行处理。
结合第三方面的第五种可能的实现方式, 在第三方面的第六种可能的实 现方式中, 所述 RapidlO报文接收装置, 解析获取所述 Group信息, 包括: 所述 RapidlO报文接收装置从所述 RapidlO报文载荷 payload部分的首部 解析获取所述 Group信息。
第四方面,本发明实施例提供一种快速输入输出 RapidlO报文发送装置, 包括:
获取模块, 用于获取本地虚拟机待发送的 RapidlO报文;
发送模块, 用于采用与所述本地虚拟机对应的虚拟 RapidlO通道向对端 发送所述 RapidlO报文。
结合第四方面, 在第四方面的第一种可能的实现方式中, 还包括: 分配模块,用于在所述发送模块采用所述本地虚拟机对应的虚拟 RapidlO 通道向对端发送所述 RapidlO报文之前, 为所述本地虚拟机分配对应的虚拟 RapidlO通道。
结合第四方面的第一种可能的实现方式, 在第四方面的第二种可能的实 现方式中, 所述分配模块, 具体用于:
获取所述本地虚拟机的性能需求信息, 所述性能需求信息包括: 输入输 出 10带宽和 /或服务质量 QoS配置;
为所述本地虚拟机分配满足所述性能需求信息的虚拟 RapidlO通道。 结合第四方面以及第四方面的第一至第二种可能的实现方式, 在第四方 面的第三种可能的实现方式中, 所述获取模块, 具体用于:
按照本地虚拟机的优先级, 优先获取具有较高优先级的本地虚拟机的待 发送 RapidlO报文。
结合第四方面以及第四方面的第一至第三种可能的实现方式, 在第四方 面的第四种可能的实现方式中, 还包括确定模块;
所述确定模块, 用于确定与所述 RapidlO报文的报文类型对应模式的发 送引擎;
所述发送模块, 具体用于:
采用所述确定模块确定的发送引擎, 在所述本地虚拟机对应的虚拟 RapidlO通道上向对端发送所述 RapidlO报文。
结合第四方面的第四种可能的实现方式, 在第四方面的第五种可能的实 现方式中, 所述确定模块, 具体用于:
若所述 RapidlO报文的报文类型为 I/O类型, 则确定与所述 RapidlO报 文的报文类型对应模式的发送引擎为直接内存访问 DMA模式的发送引擎; 若所述 RapidlO报文的报文类型为包类型, 则确定与所述 RapidlO报文 的报文类型对应模式的发送引擎为消息模式的发送引擎。
结合第四方面的第五种可能的实现方式, 在第四方面的第六种可能的实 现方式中, 所述确定模块, 具体用于:
若所述 RapidlO报文为 DMA读操作, 则确定与所述 RapidlO报文的报 文类型对应模式的发送引擎为 DMA读模式的发送引擎;
若所述 RapidlO报文为 DMA写操作, 则确定与所述 RapidlO报文的报 文类型对应模式的发送引擎为 DMA写模式的发送引擎。 结合第四方面以及第四方面的第一至第六种可能的实现方式, 在第四方 面的第七种可能的实现方式中, 还包括接收模块;
所述接收模块, 用于在所述发送模块采用与所述本地虚拟机对应的虚拟
RapidlO通道向对端发送所述 RapidlO报文之后,
若所述 RapidlO报文的报文类型为包类型, 接收所述对端返回的报文接 收通知消息, 并且将所述报文接收通知消息转发给所述本地虚拟机。
第五方面, 本发明实施例提供一种 RapidlO报文发送装置, 包括: 获取模块, 用于获取所述本地虚拟机的待发送 RapidlO报文;
确定模块, 用于确定所述 RapidlO报文对应的对端虚拟机的虚拟机标识 VMID;
封装模块, 用于将所述 VMID封装到所述 RapidlO报文中;
发送模块, 用于向对端发送所述 RapidlO 报文, 以使所述对端将所述 RapidlO报文转发给与所述 VMID对应的虚拟机。
结合第五方面, 在第五方面的第一种可能的实现方式中, 所述封装模块, 具体用于:
将所述 VMID封装到所述 RapidlO报文的包头部分的业务 Transaction字 段中;
或者, 将所述 VMID封装到所述 RapidlO报文的载荷 payload部分的首 部。
结合第五方面或第五方面的第一种可能的实现方式, 在第五方面的第二 种可能的实现方式中, 所述确定模块在确定所述 RapidlO报文对应的对端虚 拟机的虚拟机标识 VMID时, 还用于:
确定所述 RapidlO报文对应的对端虚拟机的分组 Group信息, 其中所述 Group信息对应所述 VMID对应的对端虚拟机处理所述 RapidlO报文采用的 虚拟处理器;
所述封装模块,在将所述 VMID封装到所述 RapidlO报文中时, 还用于: 将所述 Group信息封装到所述 RapidlO报文中;
所述发送模块, 具体用于:
向对端发送所述 RapidlO报文, 以使所述对端将所述 RapidlO报文, 转 发到所述 Group信息对应的虚拟处理器。 结合第五方面的第二种可能的实现方式, 在第五方面的第三种可能的实 现方式中, 所述封装模块, 具体用于:
将所述 Group信息封装到所述 RapidIO报文的载荷 payload部分的首部。 结合第五方面以及第五方面的第一至第三种可能的实现方式中的任一 项, 在第五方面的第四种可能的实现方式中, 所述获取模块, 具体用于: 按照本地虚拟机的优先级, 优先获取具有较高优先级的本地虚拟机的待 发送 RapidIO报文。
结合第五方面以及第五方面的第一至第四种可能的实现方式中的任一 项, 在第五方面的第五种可能的实现方式中, 所述发送模块, 具体用于: 采用与所述本地虚拟机对应的虚拟 RapidIO 通道, 向对端发送所述 RapidIO报文。
结合第五方面的第五种可能的实现方式, 在第五方面的第六种可能的实 现方式中, 还包括:
分配模块,用于在所述发送模块采用所述本地虚拟机对应的虚拟 RapidIO 通道向对端发送所述 RapidIO报文之前, 为所述本地虚拟机分配对应的虚拟 RapidIO通道。
结合第五方面的第六种可能的实现方式, 在第五方面的第七种可能的实 现方式中, 所述分配模块, 具体用于:
获取所述本地虚拟机的性能需求信息, 所述性能需求信息包括: 输入输 出 10带宽和 /或服务质量 QoS配置;
为所述本地虚拟机分配满足所述性能需求信息的虚拟 RapidIO通道。 结合第五方面的第五至第七种可能的实现方式中的任一种, 在第五方面 的第八种可能的实现方式中, 所述发送模块, 具体用于:
确定与所述 RapidIO报文的报文类型对应模式的发送引擎;
采用确定的发送引擎, 在所述本地虚拟机对应的虚拟 RapidIO通道上向 对端发送所述 RapidIO报文。
结合第五方面的第八种可能的实现方式, 在第五方面的第九种可能的实 现方式中, 所述发送模块, 具体用于:
若所述 RapidIO报文的报文类型为 I/O类型, 则确定与所述 RapidIO报 文的报文类型对应模式的发送引擎为直接内存访问 DMA模式的发送引擎; 若所述 RapidlO报文的报文类型为包类型, 则确定与所述 RapidlO报文 的报文类型对应模式的发送引擎为消息模式的发送引擎。
结合第五方面的第九种可能的实现方式, 在第五方面的第十种可能的实 现方式中, 所述发送模块, 具体用于:
若所述 RapidlO报文为 DMA读操作, 则确定与所述 RapidlO报文的报 文类型对应模式的发送引擎为 DMA读模式的发送引擎;
若所述 RapidlO报文为 DMA写操作, 则确定与所述 RapidlO报文的报 文类型对应模式的发送引擎为 DMA写模式的发送引擎。
结合第五方面以及第五方面的第一至第十种可能的实现方式中的任一 种, 在第五方面的第十一种可能的实现方式中, 还包括接收模块;
所述接收模块用于在所述发送模块采用与所述本地虚拟机对应的虚拟 RapidlO通道向对端发送所述 RapidlO报文之后,若所述 RapidlO报文的报文 类型为包类型, 接收所述对端返回的报文接收通知消息, 并且将所述报文接 收通知消息转发给所述本地虚拟机。
第六方面,本发明实施例提供一种快速输入输出 RapidlO报文接收装置, 包括:
接收模块, 用于接收对端发送的 RapidlO报文, 所述 RapidlO报文中封 装有本地虚拟机的虚拟机标识 VMID;
解析模块, 用于解析获取所述 VMID;
转发模块, 用于将所述 RapidlO报文转发到所述 VMID对应的本地虚拟 机。
结合第六方面, 在第六方面的第一种可能的实现方式中, 所述解析模块, 具体用于:
从所述 RapidlO 报文包头部分的业务 Transaction 字段或者从所述 RapidlO报文载荷 payload部分的首部解析获取所述 VMID。
结合第六方面或第六方面的第一种可能的实现方式, 在第六方面的第二 种可能的实现方式中, 还包括:
分配模块, 用于在所述转发模块将所述 RapidlO报文转发到所述 VMID 对应的本地虚拟机之前, 为本地虚拟机分配对应的 RapidlO 接收窗口和 /或 RapidlO包接收通道; 所述转发模块, 具体用于:
若所述 RapidlO报文的报文类型为输入输出 10类型, 则将所述 RapidlO 报文转发到所述 VMID对应的 RapidlO接收窗口;
若所述 RapidlO报文的报文类型为包类型, 则将所述 RapidlO报文转发 到所述 VMID对应的 RapidlO包接收通道。
结合第六方面的第二种可能的实现方式, 在第六方面的第三种可能的实 现方式中, 所述转发模块, 具体用于:
若所述 RapidlO报文的报文类型为 10类型,根据所述 RapidlO报文中包 头部分的偏移地址字段包括的地址信息, 将所述 RapidlO报文发送到所述地 址信息对应的报文接收地址;
若所述 RapidlO报文的报文类型为包类型, 根据所述 RapidlO报文中包 头部分的偏移地址字段包括的地址信息, 将所述 RapidlO报文转发到所述地 址信息对应的接收报文存储地址。
结合第六方面以及第六方面的第一至第三种可能的实现方式中的任一 种, 在第六方面的第四种可能的实现方式中, 还包括发送模块;
所述发送模块, 用于在所述转发模块在将所述 RapidlO报文转发到所述 VMID对应的本地虚拟机之后, 若所述 RapidlO报文的报文类型为包类型, 向对端返回报文接收通知消息。
结合第六方面以及第六方面的第一至第四种可能的实现方式中的任一 种, 在第六方面的第五种可能的实现方式中, 所述 RapidlO报文中还封装有 分组 Group信息, 其中所述 Group信息对应所述 VMID对应的本地虚拟机处 理所述 RapidlO报文采用的虚拟处理器;
所述解析模块, 还用于: 解析获取所述 Group信息;
所述转发模块, 还用于: 将所述 RapidlO报文转发到所述 VMID对应的 本地虚拟机的所述 Group信息对应的虚拟处理器, 以使所述虚拟处理器对所 述 RapidlO报文进行处理。
结合第六方面的第五种可能的实现方式, 在第六方面的第六种可能的实 现方式中, 所述解析模块, 具体用于:
从所述 RapidlO报文载荷 payload部分的首部解析获取所述 Group信息。 第七方面,本发明实施例提供一种快速输入输出 RapidlO报文发送装置, 包括: 第一处理器, 以及与所述第一处理器相连的第一存储器, 所述第一存 储器中存储一组程序代码, 所述第一处理器可以执行所述程序代码, 以实现 如第一方面以及第一方面的第一至第七种可能的实现方式中任一项所述的
RapidlO报文处理方法中的歩骤。
第八方面,本发明实施例提供一种快速输入输出 RapidlO报文发送装置, 包括: 第二处理器, 以及与所述第二处理器相连的第二存储器, 所述第二存 储器中存储一组程序代码, 所述第二处理器可以执行所述程序代码, 以实现 如第二方面以及第二方面的第一至第十一种可能的实现方式中任一项所述的 RapidlO报文处理方法中的歩骤。
第九方面,本发明实施例提供一种快速输入输出 RapidlO报文接收装置, 包括: 第三处理器, 以及与所述第三处理器相连的第三存储器, 所述第三存 储器中存储一组程序代码, 所述第三处理器可以执行所述程序代码, 以实现 如第三方面以及第三方面的第一至第六种可能的实现方式中任一项所述的 RapidlO报文处理方法中的歩骤。
第十方面,本发明实施例提供一种快速输入输出 RapidlO报文处理系统, 包括: 如第八方面所述的 RapidlO报文发送装置, 以及如第九方面所述的 RapidlO报文接收装置, 其中所述 RapiodlO报文发送装置与所述 RapidlO报 文接收装置通过 RapidlO通道相连接。
本发明实施例, 通过 RapidlO报文发送装置为每个虚拟机分配对应的虚 拟通道, 并根据各虚拟机的性能需求分配满足其性能需求的虚拟通道, 实现 了不同虚拟机 RapidlO传输通道物理资源的可配置使用使得 RapidlO报文传 输支持多虚拟机之间物理资源访问的的相互隔离, 并可按照各虚拟机的配置 需求灵活处理其 RapidlO报文的发送, , 同时, 通过配置不同模式的发送引 擎处理对应类型的 RapidlO报文, 进一歩提升虚拟机对 I/O接口的访问效率, 从而提升系统的整体处理性能。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将 对实施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易 见地, 下面描述中的附图是本发明的一些实施例, 对于本领域普通技术 人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得 其他的附图。
图 1为本发明实施例提供的 RapidIO报文处理方法实施例一的流程图; 图 la为图 1所示方法实施例中一个 RapidIO报文的发送过程示意图; 图 2为本发明实施例提供的 RapidIO报文处理方法实施例二的流程图; 图 2a为图 2所示方法实施例中 RapidIO报文的封装示意图;
图 2b为图 2所示方法实施例中虚拟处理器对应的系统架构示意图; 图 3为本发明实施例提供的 RapidIO报文处理方法实施例三的流程图; 图 4为本发明实施例提供的 RapidIO报文发送装置实施例一的结构示意 图;
图 5为本发明实施例提供的 RapidIO报文发送装置实施例二的结构示意 图;
图 6为本发明实施例提供的 RapidIO报文接收装置实施例一的结构示意 图;
图 7为本发明实施例提供的 RapidIO报文发送装置实施例三的结构示意 图;
图 8为本发明实施例提供的 RapidIO报文发送装置实施例四的结构示意 图;
图 9为本发明实施例提供的 RapidIO报文接收装置实施例二的结构示意 图;
图 10为本发明实施例提供的 RapidIO报文处理系统实施例的结构示意 图。 具体实施方式
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
图 1为本发明实施例提供的 RapidIO报文处理方法实施例一的流程图, 如图 1所示, 该方法实施例, 包括:
歩骤 101、RapidIO报文发送装置获取本地虚拟机待发送的 RapidlO报文; 歩骤 102、 RapidlO报文发送装置采用与本地虚拟机对应的虚拟 RapidlO 通道向对端发送 RapidlO报文。
进一歩地, 歩骤 102之前, 还包括:
RapidlO报文发送装置,为本地虚拟机分配对应的虚拟 RapidlO通道。其 中, RapidlO报文发送装置可以获取本地虚拟机的性能需求信息,所述性能需 求信息包括但不限于: 输入输出 (Input and Output, 简称: 10) 带宽和 /或服 务质量 (Quality of Service, 简称: QoS ) 配置, 并为本地虚拟机分配满足性 能需求信息的虚拟 RapidlO通道, 从而可以按照各本地虚拟机的性能需求发 送 RapidlO报文。
歩骤 102之后, 还包括: 若 RapidlO报文为包类型的报文, RapidlO报文 发送装置接收对端返回的报文接收通知消息, 并将该报文接收通知消息转发 给本地虚拟机。
优选地, 歩骤 101中, RapidlO报文发送装置, 可按照本地虚拟机的优先 级, 优先获取具有较高优先级的本地虚拟机的待发送 RapidlO报文。
优选地, RapidlO报文发送装置, 可获取 RapidlO报文的报文类型, 确定 与 RapidlO报文的报文类型对应模式的发送引擎, 并采用确定的发送引擎, 在所述本地虚拟机对应的虚拟 RapidlO通道上向对端发送所述 RapidlO报文: 若 RapidlO报文的报文类型为 I/O 类型, 包括: NREAD, NWRITE, NWRITE_R, S WRITE等,不再赘述,则 RapidlO报文发送装置确定与 RapidlO 报文的报文类型对应模式的发送引擎为直接内存访问 (Direct Memory Access, 简称: DMA) 模式的发送引擎;
若 RapidlO报文的报文类型为包类型, 包括: 消息 (Message) , 数据流 (Data Streaming) , 门铃 (Doorbell) 等, 不再赘述, 贝 !J RapidlO报文发送 装置确定与 RapidlO报文的报文类型对应模式的发送引擎为消息模式的发送 其中, RapidlO报文发送装置确定与 RapidlO报文的报文类型对应模式的 发送引擎为 DMA模式的发送引擎, 更进一歩地可以确定:
若 RapidlO报文为 DMA读操作,则对应模式的发送引擎为 DMA读模式 的发送引擎;
若 RapidlO报文为 DMA写操作,则对应模式的发送引擎为 DMA写模式 的发送引擎。
具体来说,本地虚拟机系统包括至少一个虚拟机, RapidlO报文发送装置, 可以为每一个本地虚拟机分配相应的虚拟通道, 并且根据每一个虚拟机的性 能需求信息, 分配满足该虚拟机性能需求信息的虚拟 RapidlO通道, 同时, 在获取本地虚拟机待发送报文时, 按照各虚拟机的优先等级, 优先获取具有 较高优先级的本地虚拟机的待发送 RapidlO报文。 RapidlO报文发送装置,在 获取待发送的 RapidlO报文后, 按照虚拟机的性能需求在虚拟 RapidlO通道 上发送该 RapidlO报文。 优选地, 该 RapidlO报文发送装置, 可以包括不同 模式的发送引擎,用于发送对应类型的 RapidlO报文:对于 10类型的 RapidlO 报文, 可以采用 DMA模式的发送引擎发送, 对于包类型的 RapidlO报文, 可以采用消息模式的发送引擎, 进一歩地, 该 DMA模式的发送引擎还可以 分为 DMA读引擎和 DMA写引擎, 可以分别用于发送 10读类型的 Rapid报 文和 10写类型的 RapidlO报文。
具体实现时, RapidlO 报文发送装置, 可以根据本地虚拟机的数量, 将 RapidlO物理传输通道划分为相同数量的虚拟通道,使得每个虚拟机都有相对 独立的传输通道, 并且可设置相应的 10带宽和 /或 QoS配置, 以保证每台虚 拟机相对独立的传输带宽和传输质量。 RapidlO报文发送装置,可以为每一个 虚拟机分配相应的待发送 RapidlO消息队列, 给每个消息队列设置与虚拟机 相同的优先级, 优先从较高优先级的消息队列中获取待发送的报文。 在发送 RapidlO报文时, RapidlO报文发送装置, 可包括多个发送引擎, 并且为每个 发送引擎分配相应的处理任务, 使得每个发送引擎可以专门相同类型的 RapidlO报文,减少发送引擎对 RapidlO报文类型的解析, 提高 RapidlO报文 的发送效率。 图 la为图 1所示方法实施例中一个 RapidlO报文的发送过程示 意图, 如图 la所示, 该 RapidlO报文首先从本地虚拟机, 到达本地虚拟机对 应的 RapidlO消息队列, 然后根据该 RapidlO报文的报文类型发送到对应模 式的发送引擎, 最后通过对应的虚拟通道发送到对端。
该方法实施例, 通过 RapidlO报文发送装置为每个虚拟机分配对应的虚 拟通道, 并根据各虚拟机的性能需求分配满足其性能需求的虚拟通道, 实现 了不同虚拟机 RapidlO传输通道物理资源的可配置使用使得 RapidlO报文传 输支持多虚拟机之间物理资源访问的的相互隔离, 并可按照各虚拟机的配置 需求灵活处理其 RapidlO报文的发送, , 同时, 通过配置不同模式的发送引 擎处理对应类型的 RapidlO报文, 进一歩提升虚拟机对 I/O接口的访问效率, 从而提升系统的整体处理性能。
现有技术中, 如果对端也是多虚拟机系统, 则对端在接收到 RapidlO报 文后, 不能直接转发到对应的虚拟机上, 而需要采用应用软件对 RapidlO报 文进行分析之后转发到对应的虚拟机, 存在处理效率低下的问题, 针对此问 题, 本发明还提供图 2所示的 RapidlO报文处理方法实施例。
图 2为本发明实施例提供的 RapidlO报文处理方法实施例二的流程图, 如图 2所示, 该方法实施例, 包括:
歩骤 201、RapidIO报文发送装置获取本地虚拟机的待发送 RapidlO报文; 歩骤 202、 RapidlO报文发送装置确定上述 RapidlO报文对应的对端虚拟 机的虚拟机标识 VMID;
歩骤 203、RapidIO报文发送装置将该 VMID封装到上述 RapidlO报文中; 歩骤 204、 RapidlO报文发送装置向对端发送 RapidlO报文, 以使对端将 该 RapidlO报文转发给与 VMID对应的虚拟机。
优选地,歩骤 201中, RapidlO报文发送装置确定 RapidlO报文对应的对 端虚拟机的 VMID时, 还确定该 RapidlO报文对应的分组 Group信息, 并将 该 Group信息封装在 RapidlO报文中, 其中该 Group信息与对端虚拟机处理 该 RapidlO报文采用的虚拟处理器对应;
相应地, RapidlO报文发送装置, 向对端发送 RapidlO报文, 以使对端将 该 RapidlO报文, 进一歩地转发到 Group信息对应的虚拟处理器。
通常地, 在多核处理器(Central Processing Unit)系统中, 存在多个虚拟 机 (Virtual Machine, 简称: VM) , 相应的多核处理器为每个 VM分配相应 的虚拟处理器(英文: Virtual CPU, 简称: VCPU) , 使得在用户看来, 每个 VM都工作在独立的多核处理器上, 可独立使用这多个 CPU。 以多核处理器 系统包括两个处理器为例来说, 如图 2b所示,该双核 CPU系统上安装有 VM1 禾口 VM2, 贝 lj CPU1分另 lj给 VM1禾 B VM2分配 VCPU11禾 B VCPU12, CPU2分 别给 VM1和 VM2分配 VCPU21和 VCPU22, 使得 VM1工作在 VCPU11和 VCPU21上, VM2工作在 VCPU12和 VCPU22上, 看似 VM1和 VM2各自 独立工作在 CPU1和 CPU2上。 该 Group信息则用于指示 VM到底采用位于 那个物理 CPU上的 VCPU进行处理 RapidlO报文, 即对于 VM1 是采用 VCPU11还是 VCPU21处理该 RapidlO报文。
进一歩地, 该 VMID封装到 RapidlO报文的包头部分的业务 Transaction 字段,或者,该 VMID封装到 RapidlO报文载荷 payload部分的首部;该 Group 信息封装到 RapidlO报文的载荷 payload部分的首部。
进一歩地, 该方法实施例中的 RapidlO报文发送装置, 可以采用图 1所 示方法实施例中 RapidlO报文发送装置的发送方法, 按照优先级获取待发送 的 RapidlO报文, 并采用与 RapidlO报文对应模式的发送引擎, 在本地虚拟 机对应的虚拟 RapidlO通道上向对端发送 RapidlO报文, 具体不再赘述。
具体来说, RapidlO报文发送装置, 在确定对端虚拟机的 VMID和 /或分 组 Group 信息后, 可将 VMID 封装在 RapidlO 报文的包头部分的业务 Transcation字段或者该 RapidlO报文的载荷 payload部分的首部, 如图 2a中 的斜线阴影部分所示, 和 /或将 Group 信息分装在该 RapidlO 报文的载荷 payload部分的首部,封装后,将 RapidlO报文发送给对端,以使对端的 RapidlO 报文接收装置,在接收该 RapidlO报文后,可以解析获取该 VMID和 /或 Group 信息, 并将该 RapidlO转发到 VMID对应的虚拟机上, 进一歩地, 转发到该 VMID对应的虚拟机处理该 RapidlO对应的虚拟处理器上。
需说明的是, RapidlO报文发送装置可通过应用软件与对端协商,确定对 端虚拟机的 VMID和 Group信息,进而将该 VMID和 Group信息封装进待发 送的 Rapid报文中。
该方法实施例, 通过 RapidlO报文发送装置, 封装 RapidlO报文对应的 对端虚拟机的 VMID和 /或 Group信息, 使得对端在接收该 RapidlO报文后, 可直接将该 RapidlO转发到 VMID对应的虚拟机上,和 /或转发到该 Group信 息对应的虚拟处理器上, 可在图 1 方法实施例的基础上, 进一歩地, 提高 RapidlO报文虚拟机环境下的处理效率。
图 3为本发明实施例提供的 RapidlO报文处理方法实施例三的流程图, 该实施例中所述的 RapidlO报文接收装置与图 2所示方法实施例中的 RapidlO 报文发送装置对应, 如图 3所示, 该方法实施例, 包括如下歩骤: 歩骤 301、 RapidlO 报文接收装置接收对端发送的 RapidlO 报文, 该 RapidlO报文中封装有本地虚拟机的 VMID;
歩骤 302、 RapidlO报文接收装置, 解析获取 VMID;
歩骤 303、 RapidlO报文接收装置将该 RapidlO报文转发到 VMID对应的 本地虚拟机。
进一歩地,歩骤 302中, RapidlO报文接收装置可以从 RapidlO报文包头 部分的业务 Transaction字段或者从 RapidlO报文载荷 payload部分的首部解 析获取 VMID。
进一歩地, 歩骤 303之前, 还包括:
RapidlO报文接收装置为本地虚拟机分配对应的 RapidlO接收窗口和 /或 RapidlO包接收通道;
相应地, 若 RapidlO报文的报文类型为输入输出 10类型, 则 RapidlO报 文接收装置将 RapidlO报文转发到该 VMID对应的 RapidlO接收窗口;
若 RapidlO 报文的报文类型为包类型, 则 RapidlO 报文接收装置将 RapidlO报文转发到 VMID对应的 RapidlO包接收通道。
更进一歩地, 对于 10类型的 RapidlO报文, RapidlO报文接收装置根据 该 RapidlO报文中包头部分的偏移地址字段包括的地址信息, 将该 RapidlO 报文发送到地址信息对应的报文接收地址; 对于包类型的 RapidlO 报文, RapidlO报文接收装置根据 RapidlO报文中包头部分的偏移地址字段包括的 地址信息, 将该 RapidlO报文转发到地址信息对应的接收报文存储地址, 并 向对端返回报文接收通知消息。
优选地, 当 RapidlO报文还封装有分组 Group信息, 其中 Group信息对 应该 VMID 对应的本地虚拟机处理 RapidlO 报文时采用的虚拟处理器, RapidlO报文接收装置, 解析获取 Group信息, 相应地, 将该 RapidlO报文转 发到该 VMID对应的本地虚拟机的 Group信息对应的虚拟处理器, 以使该虚 拟处理器对 RapidlO报文进行处理,其中, RapidlO报文接收装置可从 RapidlO 报文载荷 payload部分的首部解析获取 Group信息。
需说明的是, 该实施例中的虚拟处理器, 与图 2所示方法实施例中相同, 具体不再赘述。
具体来说, RapidlO 报文接收装置, 为本地虚拟机分配对应的用于处理 10类型报文的 RapidlO接收窗口,和 /或用于处理包类型的 RapidlO包接收通 道,该 RapidlO接收窗口和 RapidlO包接收通道与本地虚拟机的 VMID对应; 在接收到对端发送的 RapidlO报文后, 解析获取该 RapidlO报文对应的本地 虚拟机的 VMID, 然后确定该 RapidlO报文的报文类型, 若是 10类型报文, 则将该 RapidlO报文转发到 VMID对应的 RapidlO接收窗口, 若是包类型报 文, 则将 RapidlO报文转发到 VMID对应的 RapidlO包接收通道。进一歩地, 获取该 RapidlO报文包头部分的偏移地址(如图 2a中阴影部分所示的偏移地 址)字段包括的地址信息, 对于 10类型报文, 将该 RapidlO报文进一歩发送 到该地址信息对应的报文接收地址, 该地址信息对应虚拟机所在系统的存储 器中的偏移地址, 使得对端虚拟机可以直接对该虚拟机可访问的存储地址进 行直接 10读写; 对于包类型的报文, 将该 RapidlO报文进一歩发送到该地址 信息对应的接收报文存储地址, 使得 VMID对应的虚拟机可以从该接收报文 存储地址获取该 RapidlO报文并进行处理, 同时向对端返回该 RapidlO报文 的报文接收通知消息,其中, RapidlO报文接收装置可以通过消息或中断方式 将该报文接收通知消息返回给对端。 优选地, 若对端在发送的 RapidlO报文 中封装有 Group信息, RapidlO报文接收装置可进一歩从该 RapidlO报文的负 载部分的首部获取该 Group信息, 并根据该 Group信息, 转发到对应的虚拟 处理器对该 RapidlO报文进行处理。
需说明的是, 对于 10类型的 RapidlO报文, 在将该 RapidlO报文转发到 偏移地址字段中地址信息对应的报文接收地址之前, 若该虚拟机系统对应的 存储地址有权限访问设置, 需要确定对端虚拟机有权限访问该地址信息对应 的存储器地址。
该方法实施例, 通过 RapidlO报文接收装置解析获取 VMID和 /或 Group 信息, 直接将 RapidlO报文转发到 VMID对应的虚拟机, 和 /或对应的虚拟处 理器, 实现了 RapidlO报文支持虚拟机和 /或虚拟处理器的映射, 提升了虚拟 机系统 10接口的处理性能, 提高了 RapidlO报文的处理效率, 同时通过设置 本地虚拟机对应的接收窗口和 /或接收通道, 实现了本地虚拟机之间的接收通 道及访问的相互隔离。
本发明实施例进一歩给出实现上述方法实施例的装置实施例。
图 4为本发明实施例提供的 RapidlO报文发送装置实施例一的结构示意 图, 如图 4所示, 该 RapidlO报文发送装置 400, 包括: 获取模块 401、 发送 模块 402, 其中,
获取模块 401, 用于获取本地虚拟机待发送的 RapidlO报文;
发送模块 402,用于采用与所述本地虚拟机对应的虚拟 RapidlO通道向对 端发送所述 RapidlO报文。
进一歩地, 该 RapidlO报文发送装置 400, 还包括:
分配模块 403,用于在发送模块 402采用本地虚拟机对应的虚拟 RapidlO 通道向对端发送 RapidlO报文之前, 为本地虚拟机分配对应的虚拟 RapidlO 通道。 其中, 该分配模块 403, 具体用于获取本地虚拟机的性能需求信息, 性能需求信息包括: 输入输出 10带宽和 /或服务质量 QoS配置; 并为本地虚 拟机分配满足性能需求信息的虚拟 RapidlO通道。
进一歩地, 该 RapidlO报文发送装置 400, 还包括: 接收模块 404, 用于 在上述发送模块 402采用与本地虚拟机对应的虚拟 RapidlO通道向对端发送 RapidlO报文之后,
若 RapidlO报文的报文类型为包类型, 接收对端返回的报文接收通知消 息, 并且将报文接收通知消息转发给本地虚拟机。
优选地, 上述获取模块 401, 具体用于:
按照本地虚拟机的优先级, 优先获取具有较高优先级的本地虚拟机的待 发送 RapidlO报文。
优选地, 上述 RapidlO报文发送装置 400, 还包括: 确定模块 405, 用于 确定与 RapidlO报文的报文类型对应模式的发送引擎;
相应地, 发送模块 402, 具体用于:
采用确定模块 405确定的发送引擎, 在本地虚拟机对应的虚拟 RapidlO 通道上向对端发送 RapidlO报文。
上述确定模块 405, 具体用于:
若 RapidlO报文的报文类型为 I/O类型, 则确定与 RapidlO报文的报文 类型对应模式的发送引擎为直接内存访问 DMA模式的发送引擎;
若 RapidlO报文的报文类型为包类型, 则确定与 RapidlO报文的报文类 型对应模式的发送引擎为消息模式的发送引擎。
其中, 若 RapidlO报文的报文类型为 I/O类型, 上述确定模块 405, 具体 用于:
若 RapidlO报文为 DMA读操作, 则确定与 RapidlO报文的报文类型对 应模式的发送引擎为 DMA读模式的发送引擎;
若 RapidlO报文为 DMA写操作, 则确定与 RapidlO报文的报文类型对 应模式的发送引擎为 DMA写模式的发送引擎。
本实施例提供的 RapidlO报文发送装置 400,可用于执行图 1所示方法实 施例的技术方案, 其实现原理和技术效果类似, 具体不再赘述。
图 5为本发明实施例提供的 RapidlO报文发送装置实施例二的结构示意 图, 如图 5所示, 该 RapidlO报文接收装置 500, 包括: 获取模块 501、 确定 模块 502、 封装模块 503以及发送模块 504, 其中,
获取模块 501, 用于获取本地虚拟机的待发送 RapidlO报文;
确定模块 502, 用于确定 RapidlO报文对应的对端虚拟机的虚拟机标识 VMID;
封装模块 503, 用于将 VMID封装到 RapidlO报文中;
发送模块 504,用于向对端发送 RapidlO报文, 以使对端将 RapidlO报文 转发给与 VMID对应的虚拟机。
进一歩地, 上述封装模块 503, 具体用于:
将 VMID封装到 RapidlO报文的包头部分的业务 Transaction字段中; 或者, 将 VMID封装到 RapidlO报文的载荷 payload部分的首部。
优选地, 上述确定模块 502在确定 RapidlO报文对应的对端虚拟机的虚 拟机标识 VMID时, 还用于:
确定 RapidlO报文对应的对端虚拟机的分组 Group信息, 其中 Group信 息对应 VMID对应的对端虚拟机处理 RapidlO报文采用的虚拟处理器; 封装模块 503, 在将 VMID封装到 RapidlO报文中时, 还用于: 将 Group信息封装到 RapidlO报文中;
发送模块 504, 具体用于:
向对端发送 RapidlO报文, 以使对端将 RapidlO报文, 转发到 Group信 息对应的虚拟处理器。
进一歩地, 封装模块 503, 具体用于:
将 Group信息封装到 RapidlO报文的载荷 payload部分的首部。 优选地, 上述获取模块 501, 具体用于:
按照本地虚拟机的优先级, 优先获取具有较高优先级的本地虚拟机的待 发送 RapidlO报文。
优选地, 上述发送模块 504, 具体用于:
采用与本地虚拟机对应的虚拟 RapidlO通道, 向对端发送 RapidlO报文。 相应地, 该 RapidlO报文发送装置 500, 还包括:
分配模块 505,用于在发送模块 504采用本地虚拟机对应的虚拟 RapidlO 通道向对端发送 RapidlO报文之前, 为本地虚拟机分配对应的虚拟 RapidlO 通道。
其中, 该分配模块 505, 具体用于:
获取本地虚拟机的性能需求信息, 性能需求信息包括: 输入输出 10带宽 和 /或服务质量 QoS配置;
为本地虚拟机分配满足性能需求信息的虚拟 RapidlO通道。
优选地, 上述确定模块 502, 还用于: 确定与 RapidlO报文的报文类型对 应模式的发送引擎;
发送模块 504, 具体用于:
采用确定的发送引擎, 在本地虚拟机对应的虚拟 RapidlO通道上向对端 发送 RapidlO报文。
其中, 该确定模块 502, 具体用于:
若 RapidlO报文的报文类型为 I/O类型, 则确定与 RapidlO报文的报文 类型对应模式的发送引擎为直接内存访问 DMA模式的发送引擎;
若 RapidlO报文的报文类型为包类型, 则确定与 RapidlO报文的报文类 型对应模式的发送引擎为消息模式的发送引擎。
若 RapidlO报文的报文类型为 I/O类型, 确定模块 502, 还用于: 若 RapidlO报文为 DMA读操作, 则确定与 RapidlO报文的报文类型对 应模式的发送引擎为 DMA读模式的发送引擎;
若 RapidlO报文为 DMA写操作, 则确定与 RapidlO报文的报文类型对 应模式的发送引擎为 DMA写模式的发送引擎。
进一歩地, 该 RapidlO报文发送装置 500, 还包括接收模块 506, 用于在 上述发送模块 504 采用与本地虚拟机对应的虚拟 RapidlO通道向对端发送 RapidlO报文之后,
若 RapidlO报文的报文类型为包类型, 接收对端返回的报文接收通知消 息, 并且将报文接收通知消息转发给本地虚拟机。
本实施例提供的 RapidlO报文发送装置 500,可用于执行图 2所示方法实 施例中的技术方案, 其实现原理和技术效果类似, 具体不再赘述。
图 6为本发明实施例提供的 RapidlO报文接收装置实施例一的结构示意 图, 如图 6所示, 该 RapidlO报文接收装置 600, 包括: 接收模块 601, 解析 模块 602, 转发模块 603, 其中,
接收模块 601, 用于接收对端发送的 RapidlO报文, RapidlO报文中封装 有本地虚拟机的虚拟机标识 VMID;
解析模块 602, 用于解析获取 VMID;
转发模块 603, 用于将 RapidlO报文转发到 VMID对应的本地虚拟机。 进一歩地, 上述解析模块 602, 具体用于:
从 RapidlO报文包头部分的业务 Transaction字段或者从 RapidlO报文载 荷 payload部分的首部解析获取 VMID。
优选地, 该 RapidlO报文接收装置 600, 还包括:
分配模块 604, 用于在转发模块 603将 RapidlO报文转发到 VMID对应 的本地虚拟机之前,为本地虚拟机分配对应的 RapidlO接收窗口和 /或 RapidlO 包接收通道;
转发模块 603, 具体用于:
若 RapidlO报文的报文类型为输入输出 10类型,则将 RapidlO报文转发 到 VMID对应的 RapidlO接收窗口;
若 RapidlO报文的报文类型为包类型, 则将 RapidlO报文转发到 VMID 对应的 RapidlO包接收通道。
进一歩地, 上述转发模块 603, 具体用于:
若 RapidlO报文的报文类型为 10类型,根据 RapidlO报文中包头部分的 偏移地址字段包括的地址信息, 将 RapidlO报文发送到地址信息对应的报文 接收地址;
若 RapidlO报文的报文类型为包类型, 根据 RapidlO报文中包头部分的 偏移地址字段包括的地址信息, 将 RapidlO报文转发到地址信息对应的接收 报文存储地址。
进一歩地, 该 RapidlO报文接收装置 600, 还包括发送模块 605, 用于在 转发模块 603在将 RapidlO报文转发到 VMID对应的本地虚拟机之后,
若 RapidlO报文的报文类型为包类型, 向对端返回报文接收通知消息。 优选地, 若 RapidlO报文中还封装有分组 Group信息, 其中 Group信息 对应 VMID对应的本地虚拟机处理 RapidlO报文采用的虚拟处理器;
解析模块 602, 还用于: 解析获取 Group信息;
转发模块 603, 还用于: 将 RapidlO报文转发到 VMID对应的本地虚拟 机的 Group信息对应的虚拟处理器, 以使虚拟处理器对 RapidlO报文进行处 理。
其中, 解析模块 602, 具体用于:
从 RapidlO报文载荷 payload部分的首部解析获取 Group信息。
本实施例提供的 RapidlO报文接收装置, 可用于执行图 3所示方法实施 例中的技术方案, 其实现原理和技术效果类似, 具体不再赘述。
图 7为本发明实施例提供的 RapidlO报文发送装置实施例三的结构示意 图, 如图 7所示, 该 RapidlO报文发送装置 700, 包括: 第一处理器 701, 以 及与所述第一处理器 701 相连的第一存储器 702, 其中, 该第一存储器 702 中存储一组程序代码, 第一处理器 701可以执行该组程序代码, 以实现图 1 所示方法实施例中的技术方案, 其实现原理和技术效果类似, 具体不再赘述。
图 8为本发明实施例提供的 RapidlO报文发送装置实施例四的结构示意 图, 如图 8所示, 该 RapidlO报文发送装置 800, 包括: 第二处理器 801, 以 及与第二处理器 801相连的第二存储器 802, 其中, 该第二存储器 802中存 储一组程序代码, 第二处理器 801可以执行该组程序代码, 以实现如图 2所 示方法实施例中的技术方案, 其实现原理和技术效果类似, 具体不再赘述。
图 9为本发明实施例提供的 RapidlO报文接收装置实施例二的结构示意 图, 如图 9所示, 该 RapidlO报文接收装置 900, 包括: 第三处理器 901, 以 及与第三处理器 901相连的第三存储器 902, 该第三存储器 902中存储一组 程序代码, 第三处理器 901可以执行该组程序代码, 以实现如图 3所示方法 实施例中的技术方案, 其实现原理和技术效果类似, 具体不再赘述。
图 10为本发明实施例提供的 RapidlO报文处理系统实施例的结构示意 图, 如图 10所示, 该 RapidlO报文处理系统 1000, 包括 RapidlO报文发送装 置 1001, 以及与 RapidlO报文接收装置 1002, 其中该 RapiodIO报文发送装 置 1001与该 RapidlO报文接收装置 1002通过 RapidlO通道相连接。该 RapidlO 报文发送装置 1001 以及 RapidlO报文接收装置 1002可分别为图 8所示的 RapidlO报文发送装置和图 9所示的 RapidlO报文接收装置,可分别用于执行 图 2和图 3所示的方法实施例中的技术方案, 其实现原理和技术效果类似, 具体不再赘述。
本领域技术人员可以清楚地了解到, 为描述的方便和简洁, 仅以上述各 功能模块的划分进行举例说明, 实际应用中, 可以根据需要而将上述功能分 配由不同的功能模块完成, 即将装置的内部结构划分成不同的功能模块, 以 完成以上描述的全部或者部分功能。 上述描述的装置的具体工作过程, 可以 参考前述方法实施例中的对应过程, 在此不再赘述。
上述以软件功能单元的形式实现的集成的单元, 可以存储在一个计算机 可读取存储介质中。 上述软件功能单元存储在一个存储介质中, 包括若干指 令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等) 或处理器 (processor) 执行本发明各个实施例所述方法的部分歩骤。 而前述 的存储介质包括: U盘、移动硬盘、只读存储器(Read-Only Memory, ROM)、 随机存取存储器(Random Access Memory, RAM) 、 磁碟或者光盘等各种可 以存储程序代码的介质。
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims

权 利 要 求 书
1、 一种快速输入输出 RapidlO报文处理方法, 其特征在于, 包括: RapidlO报文发送装置获取本地虚拟机待发送的 RapidlO报文; 所述 RapidlO报文发送装置采用与所述本地虚拟机对应的虚拟 RapidlO 通道向对端发送所述 RapidlO报文。
2、 根据权利要求 1所述的方法, 其特征在于, 所述 RapidlO报文发送装 置采用所述本地虚拟机对应的虚拟 RapidlO通道向对端发送所述 RapidlO报 文之前, 还包括:
所述 RapidlO报文发送装置为所述本地虚拟机分配对应的虚拟 RapidlO 通道。
3、 根据权利要求 2所述的方法, 其特征在于, 所述 RapidlO报文发送装 置为所述本地虚拟机分配对应的虚拟 RapidlO通道, 包括:
所述 RapidlO报文发送装置获取所述本地虚拟机的性能需求信息, 所述 性能需求信息包括: 输入输出 10带宽和 /或服务质量 QoS配置;
所述 RapidlO报文发送装置为所述本地虚拟机分配满足所述性能需求信 息的虚拟 RapidlO通道。
4、 根据权利要求 1-3任一项所述的方法, 其特征在于, 所述 RapidlO报 文发送装置获取本地虚拟机待发送的 RapidlO报文, 包括:
所述 RapidlO报文发送装置, 按照本地虚拟机的优先级, 优先获取具有 较高优先级的本地虚拟机的待发送 RapidlO报文。
5、 根据权利要求 1-4任一项所述的方法, 其特征在于, 所述 RapidlO报 文发送装置采用所述本地虚拟机对应的虚拟 RapidlO 通道向对端发送所述 RapidlO报文, 包括:
所述 RapidlO报文发送装置确定与所述 RapidlO报文的报文类型对应模 式的发送引擎;
所述 RapidlO报文发送装置采用确定的发送引擎, 在所述本地虚拟机对 应的虚拟 RapidlO通道上向对端发送所述 RapidlO报文。
6、 根据权利要求 5所述的方法, 其特征在于, 所述 RapidlO报文发送装 置确定与所述 RapidlO报文的报文类型对应模式的发送引擎, 包括:
若所述 RapidlO报文的报文类型为 I/O类型, 则所述 RapidlO报文发送 装置确定与所述 RapidlO报文的报文类型对应模式的发送引擎为直接内存访 问 DMA模式的发送引擎;
若所述 RapidlO报文的报文类型为包类型, 则所述 RapidlO报文发送装 置确定与所述 RapidlO报文的报文类型对应模式的发送引擎为消息模式的发 送引擎。
7、 根据权利要求 6所述的方法, 其特征在于, 所述 RapidlO报文发送装 置确定与所述 RapidlO报文的报文类型对应模式的发送引擎为直接内存访问 DMA模式的发送引擎, 包括:
若所述 RapidlO报文为 DMA读操作, 则所述 RapidlO发送引擎, 确定 与所述 RapidlO报文的报文类型对应模式的发送引擎为 DMA读模式的发送 若所述 RapidlO报文为 DMA写操作, 则所述 RapidlO发送引擎, 确定 与所述 RapidlO报文的报文类型对应模式的发送引擎为 DMA写模式的发送
8、 根据权利要求 1-7任一项所述的方法, 其特征在于, 所述 RapidlO报 文发送装置采用与所述本地虚拟机对应的虚拟 RapidlO通道向对端发送所述 RapidlO报文之后, 还包括:
若所述 RapidlO报文的报文类型为包类型, 所述 RapidlO报文发送装置 接收所述对端返回的报文接收通知消息, 并且将所述报文接收通知消息转发 给所述本地虚拟机。
9、 一种快速输入输出 RapidlO报文处理方法, 其特征在于, 包括:
RapidlO报文发送装置, 获取所述本地虚拟机的待发送 RapidlO报文; 所述 RapidlO报文发送装置, 确定所述 RapidlO报文对应的对端虚拟机 的虚拟机标识 VMID;
所述 RapidlO报文发送装置,将所述 VMID封装到所述 RapidlO报文中; 所述 RapidlO报文发送装置, 向对端发送所述 RapidlO报文, 以使所述 对端将所述 RapidlO报文转发给与所述 VMID对应的虚拟机。
10、 根据权利要求 9所述的方法, 其特征在于, 所述 RapidlO报文发送 装置将所述 VMID封装到所述 RapidlO报文中, 包括:
所述 RapidlO报文发送装置将所述 VMID封装到所述 RapidlO报文的包 头部分的业务 Transaction字段中;
或者, 所述 RapidlO报文发送装置将所述 VMID封装到所述 RapidlO报 文的载荷 payload部分的首部。
11、 根据权利要求 9或 10所述的方法, 其特征在于, 所述 RapidlO报文 发送装置确定所述 RapidlO报文对应的对端虚拟机的虚拟机标识 VMID时, 还包括:
所述 RapidlO报文发送装置确定所述 RapidlO报文对应的对端虚拟机的 分组 Group信息, 其中所述 Group信息对应所述 VMID对应的对端虚拟机处 理所述 RapidlO报文采用的虚拟处理器;
所述 RapidlO报文发送装置将所述 VMID封装到所述 RapidlO报文中时, 还包括:
所述 RapidlO报文发送装置将所述 Group信息封装到所述 RapidlO报文 中;
所述 RapidlO报文发送装置, 向对端发送所述 RapidlO报文, 包括: 所述 RapidlO报文发送装置, 向对端发送所述 RapidlO报文, 以使所述 对端将所述 RapidlO报文, 转发到所述 Group信息对应的虚拟处理器。
12、 根据权利要求 11所述的方法, 其特征在于, 所述 RapidlO报文发送 装置将所述 Group信息封装到所述 RapidlO报文中, 包括:
所述 RapidlO报文发送装置将所述 Group信息封装到所述 RapidlO报文 的载荷 payload部分的首部。
13、 根据权利要求 9-12任一项所述的方法, 其特征在于, 所述 RapidlO 报文发送装置获取所述本地虚拟机的待发送 RapidlO报文, 包括:
所述 RapidlO报文发送装置, 按照本地虚拟机的优先级, 优先获取具有 较高优先级的本地虚拟机的待发送 RapidlO报文。
14、 根据权利要求 9-13任一项所述的方法, 其特征在于, 所述 RapidlO 报文发送装置, 向对端 RapidlO报文接收装置发送所述 RapidlO报文, 包括: 所述 RapidlO报文发送装置,采用与所述本地虚拟机对应的虚拟 RapidlO 通道, 向对端发送所述 RapidlO报文。
15、 根据权利要求 14所述的方法, 其特征在于, 所述 RapidlO报文发送 装置, 采用所述本地虚拟机对应的虚拟 RapidlO通道, 向对端 RapidlO报文 接收装置发送所述 RapidlO报文之前, 还包括:
所述 RapidlO报文发送装置,为所述本地虚拟机分配对应的虚拟 RapidlO 通道。
16、 根据权利要求 15所述的方法, 其特征在于, 所述 RapidlO报文发送 装置, 为所述本地虚拟机分配对应的虚拟 RapidlO通道, 包括:
所述 RapidlO报文发送装置获取所述本地虚拟机的性能需求信息, 所述 性能需求信息包括: 输入输出 10带宽和 /或服务质量 QoS配置;
所述 RapidlO报文发送装置为所述本地虚拟机分配满足所述性能需求信 息的虚拟 RapidlO通道。
17、 根据权利要求 14-16任一项所述的方法, 其特征在于, 所述 RapidlO 报文发送装置采用所述本地虚拟机对应的虚拟 RapidlO通道向对端发送所述 RapidlO报文, 包括:
所述 RapidlO报文发送装置确定与所述 RapidlO报文的报文类型对应模 式的发送引擎;
所述 RapidlO报文发送装置采用确定的发送引擎, 在所述本地虚拟机对 应的虚拟 RapidlO通道上向对端发送所述 RapidlO报文。
18、 根据权利要求 17所述的方法, 其特征在于, 所述 RapidlO报文发送 装置确定与所述 RapidlO报文的报文类型对应模式的发送引擎, 包括:
若所述 RapidlO报文的报文类型为 I/O类型, 则所述 RapidlO报文发送 装置确定与所述 RapidlO报文的报文类型对应模式的发送引擎为直接内存访 问 DMA模式的发送引擎;
若所述 RapidlO报文的报文类型为包类型, 则所述 RapidlO报文发送装 置确定与所述 RapidlO报文的报文类型对应模式的发送引擎为消息模式的发 送引擎。
19、 根据权利要求 18所述的方法, 其特征在于, 所述 RapidlO报文发送 装置确定与所述 RapidlO报文的报文类型对应模式的发送引擎为直接内存访 问 DMA模式的发送引擎, 包括:
若所述 RapidlO报文为 DMA读操作, 则所述 RapidlO发送引擎, 确定 与所述 RapidlO报文的报文类型对应模式的发送引擎为 DMA读模式的发送 若所述 RapidlO报文为 DMA写操作, 则所述 RapidlO发送引擎, 确定 与所述 RapidlO报文的报文类型对应模式的发送引擎为 DMA写模式的发送
20、 根据权利要求 9-19任一项所述的方法, 其特征在于, 所述 RapidlO 报文发送装置, 向对端发送所述 RapidlO报文之后, 还包括:
若所述 RapidlO报文的报文类型为包类型, 所述 RapidlO报文发送装置 接收所述对端返回的报文接收通知消息, 并且将所述报文接收通知消息转发 给所述本地虚拟机。
21、 一种快速输入输出 RapidlO报文处理方法, 其特征在于, 包括: RapidlO报文接收装置接收对端发送的 RapidlO报文,所述 RapidlO报文 中封装有本地虚拟机的虚拟机标识 VMID;
所述 RapidlO报文接收装置, 解析获取所述 VMID;
所述 RapidlO报文接收装置将所述 RapidlO报文转发到所述 VMID对应 的本地虚拟机。
22、 根据权利要求 21所述的方法, 其特征在于, 所述 RapidlO报文接收 装置, 解析获取所述 VMID, 包括:
所述 RapidlO 报文接收装置从所述 RapidlO 报文包头部分的业务 Transaction字段或者从所述 RapidlO报文载荷 payload部分的首部解析获取所 述 VMID。
23、 根据权利要求 21或 22所述的方法, 其特征在于, 所述 RapidlO报 文接收装置将所述 RapidlO报文转发到所述 VMID对应的本地虚拟机之前, 还包括:
所述 RapidlO报文接收装置为本地虚拟机分配对应的 RapidlO接收窗口 和 /或 RapidlO包接收通道;
所述 RapidlO报文接收装置将所述 RapidlO报文转发到所述 VMID对应 的本地虚拟机, 包括:
若所述 RapidlO报文的报文类型为输入输出 10类型,则所述 RapidlO报 文接收装置将所述 RapidlO报文转发到所述 VMID对应的 RapidlO接收窗口; 若所述 RapidlO报文的报文类型为包类型, 则所述 RapidlO报文接收装 置将所述 RapidlO报文转发到所述 VMID对应的 RapidlO包接收通道。
24、 根据权利要求 23所述的方法, 其特征在于, 所述 RapidlO报文接收 装置将所述 RapidlO报文转发到所述 VMID对应的 RapidlO接收窗口,包括: 所述 RapidlO报文接收装置根据所述 RapidlO报文中包头部分的偏移地 址字段包括的地址信息, 将所述 RapidlO报文发送到所述地址信息对应的报 文接收地址;
所述 RapidlO报文接收装置将所述 RapidlO报文转发到所述 VMID对应 的 RapidlO包接收通道, 包括:
所述 RapidlO报文接收装置根据所述 Rapid报文中包头部分的偏移地址 字段包括的地址信息, 将所述 RapidlO报文转发到所述地址信息对应的接收 报文存储地址。
25、 根据权利要求 21-24任一项所述的方法, 其特征在于, 所述 RapidlO 报文接收装置根据所述 RapidlO报文中包头部分的地址字段中包括的地址信 息,将所述 RapidlO报文转发到所述地址信息对应的接收报文存储地址之后, 还包括:
若所述 RapidlO报文的报文类型为包类型, 则所述 RapidlO报文接收装 置向对端返回报文接收通知消息。
26、 根据权利要求 21-25任一项所述的方法, 其特征在于, 所述 RapidlO 报文还封装有分组 Group信息, 其中所述 Group信息对应所述 VMID对应的 本地虚拟机处理所述 RapidlO报文采用的虚拟处理器;
所述 RapidlO报文接收装置, 解析获取所述 Group信息 ·'
所述 RapidlO报文接收装置将所述 RapidlO报文转发到所述 VMID对应 的本地虚拟机, 包括:
所述 RapidlO报文接收装置将所述 RapidlO报文转发到所述 VMID对应 的本地虚拟机的所述 Group信息对应的虚拟处理器, 以使所述虚拟处理器对 所述 RapidlO报文进行处理。
27、 根据权利要求 26所述的方法, 其特征在于, 所述 RapidlO报文接收 装置, 解析获取所述 Group信息, 包括:
所述 RapidlO报文接收装置从所述 RapidlO报文载荷 payload部分的首部 解析获取所述 Group信息。
28、 一种快速输入输出 RapidlO报文发送装置, 其特征在于, 包括: 获取模块, 用于获取本地虚拟机待发送的 RapidlO报文;
发送模块, 用于采用与所述本地虚拟机对应的虚拟 RapidlO通道向对端 发送所述 RapidlO报文。
29、 根据权利要求 28所述的 RapidlO报文发送装置, 其特征在于, 还包 括:
分配模块,用于在所述发送模块采用所述本地虚拟机对应的虚拟 RapidlO 通道向对端发送所述 RapidlO报文之前, 为所述本地虚拟机分配对应的虚拟 RapidlO通道。
30、 根据权利要求 29所述的 RapidlO报文发送装置, 其特征在于, 所述 分配模块, 具体用于:
获取所述本地虚拟机的性能需求信息, 所述性能需求信息包括: 输入输 出 10带宽和 /或服务质量 QoS配置;
为所述本地虚拟机分配满足所述性能需求信息的虚拟 RapidlO通道。
31、 根据权利要求 28-30任一项所述的 RapidlO报文发送装置, 其特征 在于, 所述获取模块, 具体用于:
按照本地虚拟机的优先级, 优先获取具有较高优先级的本地虚拟机的待 发送 RapidlO报文。
32、 根据权利要求 28-31任一项所述的 RapidlO报文发送装置, 其特征 在于, 还包括确定模块;
所述确定模块, 用于确定与所述 RapidlO报文的报文类型对应模式的发 送引擎;
所述发送模块, 具体用于:
采用所述确定模块确定的发送引擎, 在所述本地虚拟机对应的虚拟 RapidlO通道上向对端发送所述 RapidlO报文。
33、 根据权利要求 32所述的 RapidlO报文发送装置, 其特征在于, 所述 确定模块, 具体用于:
若所述 RapidlO报文的报文类型为 I/O类型, 则确定与所述 RapidlO报 文的报文类型对应模式的发送引擎为直接内存访问 DMA模式的发送引擎; 若所述 RapidlO报文的报文类型为包类型, 则确定与所述 RapidlO报文 的报文类型对应模式的发送引擎为消息模式的发送引擎。
34、 根据权利要求 33所述的 RapidlO报文发送装置, 其特征在于, 所述 确定模块, 具体用于:
若所述 RapidlO报文为 DMA读操作, 则确定与所述 RapidlO报文的报 文类型对应模式的发送引擎为 DMA读模式的发送引擎;
若所述 RapidlO报文为 DMA写操作, 则确定与所述 RapidlO报文的报 文类型对应模式的发送引擎为 DMA写模式的发送引擎。
35、 根据权利要求 28-34任一项所述的 RapidlO报文发送装置, 其特征 在于, 还包括接收模块;
所述接收模块, 用于在所述发送模块采用与所述本地虚拟机对应的虚拟 RapidlO通道向对端发送所述 RapidlO报文之后,
若所述 RapidlO报文的报文类型为包类型, 接收所述对端返回的报文接 收通知消息, 并且将所述报文接收通知消息转发给所述本地虚拟机。
36、 一种 RapidlO报文发送装置, 其特征在于, 包括:
获取模块, 用于获取所述本地虚拟机的待发送 RapidlO报文;
确定模块, 用于确定所述 RapidlO报文对应的对端虚拟机的虚拟机标识 VMID;
封装模块, 用于将所述 VMID封装到所述 RapidlO报文中;
发送模块, 用于向对端发送所述 RapidlO 报文, 以使所述对端将所述 RapidlO报文转发给与所述 VMID对应的虚拟机。
37、 根据权利要求 36所述的 RapidlO报文发送装置, 其特征在于, 所述 封装模块, 具体用于:
将所述 VMID封装到所述 RapidlO报文的包头部分的业务 Transaction字 段中;
或者, 将所述 VMID封装到所述 RapidlO报文的载荷 payload部分的首 部。
38、 根据权利要求 36或 37所述的 RapidlO报文发送装置, 其特征在于, 所述确定模块在确定所述 RapidlO 报文对应的对端虚拟机的虚拟机标识 VMID时, 还用于:
确定所述 RapidlO报文对应的对端虚拟机的分组 Group信息, 其中所述 Group信息对应所述 VMID对应的对端虚拟机处理所述 RapidlO报文采用的 虚拟处理器;
所述封装模块,在将所述 VMID封装到所述 RapidlO报文中时, 还用于: 将所述 Group信息封装到所述 RapidlO报文中;
所述发送模块, 具体用于:
向对端发送所述 RapidlO报文, 以使所述对端将所述 RapidlO报文, 转 发到所述 Group信息对应的虚拟处理器。
39、 根据权利要求 38所述的 RapidlO报文发送装置, 其特征在于, 所述 封装模块, 具体用于:
将所述 Group信息封装到所述 RapidlO报文的载荷 payload部分的首部。
40、 根据权利要求 36-39任一项所述的 RapidlO报文发送装置, 其特征 在于, 所述获取模块, 具体用于:
按照本地虚拟机的优先级, 优先获取具有较高优先级的本地虚拟机的待 发送 RapidlO报文。
41、 根据权利要求 36-40任一项所述的 RapidlO报文发送装置, 其特征 在于, 所述发送模块, 具体用于:
采用与所述本地虚拟机对应的虚拟 RapidlO 通道, 向对端发送所述 RapidlO报文。
42、 根据权利要求 41所述的 RapidlO报文发送装置, 其特征在于, 还包 括:
分配模块,用于在所述发送模块采用所述本地虚拟机对应的虚拟 RapidlO 通道向对端发送所述 RapidlO报文之前, 为所述本地虚拟机分配对应的虚拟 RapidlO通道。
43、 根据权利要求 42所述的 RapidlO报文发送装置, 其特征在于, 所述 分配模块, 具体用于:
获取所述本地虚拟机的性能需求信息, 所述性能需求信息包括: 输入输 出 10带宽和 /或服务质量 QoS配置;
为所述本地虚拟机分配满足所述性能需求信息的虚拟 RapidlO通道。
44、 根据权利要求 41-43任一项所述的 RapidlO报文发送装置, 其特征 在于, 所述发送模块, 具体用于:
确定与所述 RapidlO报文的报文类型对应模式的发送引擎; 采用确定的发送引擎, 在所述本地虚拟机对应的虚拟 RapidlO通道上向 对端发送所述 RapidlO报文。
45、 根据权利要求 44所述的 RapidlO报文发送装置, 其特征在于, 所述 发送模块, 具体用于:
若所述 RapidlO报文的报文类型为 I/O类型, 则确定与所述 RapidlO报 文的报文类型对应模式的发送引擎为直接内存访问 DMA模式的发送引擎; 若所述 RapidlO报文的报文类型为包类型, 则确定与所述 RapidlO报文 的报文类型对应模式的发送引擎为消息模式的发送引擎。
46、 根据权利要求 45所述的 RapidlO报文发送装置, 其特征在于, 所述 发送模块, 具体用于:
若所述 RapidlO报文为 DMA读操作, 则确定与所述 RapidlO报文的报 文类型对应模式的发送引擎为 DMA读模式的发送引擎;
若所述 RapidlO报文为 DMA写操作, 则确定与所述 RapidlO报文的报 文类型对应模式的发送引擎为 DMA写模式的发送引擎。
47、 根据权利要求 38-46任一项所述的 RapidlO报文发送装置, 其特征 在于, 还包括发送模块;
所述发送模块, 用于在所述发送模块采用与所述本地虚拟机对应的虚拟 RapidlO通道向对端发送所述 RapidlO报文之后,若所述 RapidlO报文的报文 类型为包类型, 接收所述对端返回的报文接收通知消息, 并且将所述报文接 收通知消息转发给所述本地虚拟机。
48、 一种快速输入输出 RapidlO报文接收装置, 其特征在于, 包括: 接收模块, 用于接收对端发送的 RapidlO报文, 所述 RapidlO报文中封 装有本地虚拟机的虚拟机标识 VMID;
解析模块, 用于解析获取所述 VMID;
转发模块, 用于将所述 RapidlO报文转发到所述 VMID对应的本地虚拟 机。
49、 根据权利要求 48所述的 RapidlO报文接收装置, 其特征在于, 所述 解析模块, 具体用于:
从所述 RapidlO 报文包头部分的业务 Transaction 字段或者从所述 RapidlO报文载荷 payload部分的首部解析获取所述 VMID。
50、 根据权利要求 48或 49所述的 RapidlO报文接收装置, 其特征在于, 还包括:
分配模块, 用于在所述转发模块将所述 RapidlO报文转发到所述 VMID 对应的本地虚拟机之前, 为本地虚拟机分配对应的 RapidlO 接收窗口和 /或 RapidlO包接收通道;
所述转发模块, 具体用于:
若所述 RapidlO报文的报文类型为输入输出 10类型, 则将所述 RapidlO 报文转发到所述 VMID对应的 RapidlO接收窗口;
若所述 RapidlO报文的报文类型为包类型, 则将所述 RapidlO报文转发 到所述 VMID对应的 RapidlO包接收通道。
51、 根据权利要求 50所述的 RapidlO报文接收装置, 其特征在于, 所述 转发模块, 具体用于:
若所述 RapidlO报文的报文类型为 10类型,根据所述 RapidlO报文中包 头部分的偏移地址字段包括的地址信息, 将所述 RapidlO报文发送到所述地 址信息对应的报文接收地址;
若所述 RapidlO报文的报文类型为包类型, 根据所述 RapidlO报文中包 头部分的偏移地址字段包括的地址信息, 将所述 RapidlO报文转发到所述地 址信息对应的接收报文存储地址。
52、 根据权利要求 48-51任一项所述的 RapidlO报文接收装置, 其特征 在于, 还包括发送模块;
所述发送模块, 用于在所述转发模块在将所述 RapidlO报文转发到所述 VMID对应的本地虚拟机之后, 若所述 RapidlO报文的报文类型为包类型, 向对端返回报文接收通知消息。
53、 根据权利要求 48-52任一项所述的 RapidlO报文接收装置, 其特征 在于, 所述 RapidlO报文中还封装有分组 Group信息, 其中所述 Group信息 对应所述 VMID对应的本地虚拟机处理所述 RapidlO报文采用的虚拟处理器; 所述解析模块, 还用于: 解析获取所述 Group信息;
所述转发模块, 还用于: 将所述 RapidlO报文转发到所述 VMID对应的 本地虚拟机的所述 Group信息对应的虚拟处理器, 以使所述虚拟处理器对所 述 RapidlO报文进行处理。
54、 根据权利要求 53所述的 RapidlO报文接收装置, 其特征在于, 所述 解析模块, 具体用于:
从所述 RapidlO报文载荷 payload部分的首部解析获取所述 Group信息。
55、 一种快速输入输出 RapidlO报文发送装置, 其特征在于, 包括: 第 一处理器, 以及与所述第一处理器相连的第一存储器, 所述第一存储器中存 储一组程序代码, 所述第一处理器可以执行所述程序代码, 以实现如权利要 求 1-8中任一项所述的 RapidlO报文处理方法中的歩骤。
56、 一种快速输入输出 RapidlO报文发送装置, 其特征在于, 包括: 第 二处理器, 以及与所述第二处理器相连的第二存储器, 所述第二存储器中存 储一组程序代码, 所述第二处理器可以执行所述程序代码, 以实现如权利要 求 9-20中任一项所述的 RapidlO报文处理方法中的歩骤。
57、 一种快速输入输出 RapidlO报文接收装置, 其特征在于, 包括: 第 三处理器, 以及与所述第三处理器相连的第三存储器, 所述第三存储器中存 储一组程序代码, 所述第三处理器可以执行所述程序代码, 以实现如权利要 求 21-27中任一项所述的 RapidlO报文处理方法中的歩骤。
58、 一种快速输入输出 RapidlO报文处理系统, 其特征在于, 包括: 如 权利要求 56所述的 RapidlO报文发送装置, 以及如权利要求 57所述的 RapidlO报文接收装置, 其中所述 RapiodlO报文发送装置与所述 RapidlO报 文接收装置通过 RapidlO通道相连接。
PCT/CN2014/077183 2014-05-09 2014-05-09 快速输入输出报文处理方法、装置及系统 WO2015168946A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2014/077183 WO2015168946A1 (zh) 2014-05-09 2014-05-09 快速输入输出报文处理方法、装置及系统
CN201480033945.1A CN105324973B (zh) 2014-05-09 2014-05-09 快速输入输出报文处理方法、装置及系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/077183 WO2015168946A1 (zh) 2014-05-09 2014-05-09 快速输入输出报文处理方法、装置及系统

Publications (1)

Publication Number Publication Date
WO2015168946A1 true WO2015168946A1 (zh) 2015-11-12

Family

ID=54392027

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/077183 WO2015168946A1 (zh) 2014-05-09 2014-05-09 快速输入输出报文处理方法、装置及系统

Country Status (2)

Country Link
CN (1) CN105324973B (zh)
WO (1) WO2015168946A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159727A (zh) * 2007-11-15 2008-04-09 中兴通讯股份有限公司 一种iq数据传输装置和方法
CN101515841A (zh) * 2009-04-03 2009-08-26 华为技术有限公司 一种基于RapidIO协议的数据包传输的方法、设备和系统
US8402461B2 (en) * 2009-11-15 2013-03-19 Hewlett-Packard Development Company, L. P. Switching between direct mode and indirect mode for virtual machine I/O requests
CN103116517A (zh) * 2013-01-24 2013-05-22 华为技术有限公司 虚拟化平台下i/o通道的调整方法和调整装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102801729B (zh) * 2012-08-13 2015-06-17 福建星网锐捷网络有限公司 虚拟机报文转发方法、网络交换设备及通信系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159727A (zh) * 2007-11-15 2008-04-09 中兴通讯股份有限公司 一种iq数据传输装置和方法
CN101515841A (zh) * 2009-04-03 2009-08-26 华为技术有限公司 一种基于RapidIO协议的数据包传输的方法、设备和系统
US8402461B2 (en) * 2009-11-15 2013-03-19 Hewlett-Packard Development Company, L. P. Switching between direct mode and indirect mode for virtual machine I/O requests
CN103116517A (zh) * 2013-01-24 2013-05-22 华为技术有限公司 虚拟化平台下i/o通道的调整方法和调整装置

Also Published As

Publication number Publication date
CN105324973A (zh) 2016-02-10
CN105324973B (zh) 2019-05-24

Similar Documents

Publication Publication Date Title
US11799764B2 (en) System and method for facilitating efficient packet injection into an output buffer in a network interface controller (NIC)
US10868767B2 (en) Data transmission method and apparatus in optoelectronic hybrid network
US9112801B2 (en) Quantized congestion notification in a virtual networking system
JP6188093B2 (ja) 通信トラフィック処理アーキテクチャおよび方法
US10084647B2 (en) Data forwarding to server via virtual network card or to external network via network interface, based on fusion descriptor
WO2018023498A1 (zh) 网络接口卡、计算设备以及数据包处理方法
US11240155B2 (en) Technologies for network device load balancers for accelerated functions as a service
US7502884B1 (en) Resource virtualization switch
WO2020052605A1 (zh) 一种网络切片的选择方法及装置
CN109547531B (zh) 数据处理的方法、装置和计算设备
WO2015058699A1 (en) Data forwarding
CN112291293B (zh) 任务处理方法、相关设备及计算机存储介质
WO2018113622A1 (zh) 基于虚拟机的数据包发送和接收方法及装置
WO2017028399A1 (zh) 通信数据传输方法及系统
WO2022068756A1 (zh) 基于微服务的服务网格系统及服务治理方法
WO2021185083A1 (zh) Vnf实例化方法及装置
US9203895B1 (en) System and method for lateral connection between interface devices with bypass of external network
CN112291259B (zh) 一种协议转换方法、网关、设备及可读存储介质
WO2015081534A1 (zh) 一种数据报文的传输系统、传输方法和设备
Suzuki et al. Disaggregation and sharing of I/O devices in cloud data centers
WO2018057165A1 (en) Technologies for dynamically transitioning network traffic host buffer queues
WO2023179457A1 (zh) 业务连接的标识方法、装置、系统及存储介质
WO2022160714A1 (zh) 一种通信方法、装置以及系统
WO2015168946A1 (zh) 快速输入输出报文处理方法、装置及系统
WO2016074179A1 (zh) 一种数据处理方法及多核处理器系统

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201480033945.1

Country of ref document: CN

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

Ref document number: 14891159

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: 14891159

Country of ref document: EP

Kind code of ref document: A1