Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
According to embodiments of the invention, a kind of command handling method is provided, Fig. 1 is the process flow diagram of the command handling method of the embodiment of the invention, as shown in Figure 1, comprises according to the command handling method of the embodiment of the invention:
Step 101 receives the order that main frame issues by the processing layer packet.
Step 102 is obtained the base address of carrying in the space, high address in processing layer packet packet header.This base address is allocated in advance by main frame, and is used for the action type of marking command.
Particularly, this base address is the start address that sends the address field of order, and equipment can that is to say by self configuration space to the main frame application, and main frame is by being that the address space of start address sends this order with the base address.In embodiments of the present invention, this base address also is used for the action type of marking command.
Step 103 is operated accordingly according to the action type of the order of base address sign.
Particularly, the action type of mentioned order can comprise: read operation and write operation.Need to prove that in embodiments of the present invention, the action type of order can also comprise multiple action types such as query manipulation.
Below, the details in the above-mentioned processing procedure is described in detail.
In the description below the embodiment of the invention, for convenience, the read operation and the write operation order that issue with the reception main frame are that example describes.
Particularly, for carrying out the described technical scheme of the embodiment of the invention, equipment need pass through the configuration space of self to main frame application base address.Fig. 2 is the synoptic diagram of configuration space of the equipment of the embodiment of the invention, as shown in Figure 2, in the configuration space 00-15 of this equipment, comprise preserve first base address (BaseAddress 0) to the 6th base address the address space of (Base Address 5), equipment can be by this six sector addresses space to main frame (or system) application base address, the base address quantity of application can be provided with according to actual needs, to apply for that two base address are that example describes, equipment is respectively applied for sign read operation and write operation to two base address of main frame application in the present embodiment.Above-mentioned two base address are the start address of the address space or the address field of host assignment, and the shared bit number of this address space or address field can be adjusted according to actual conditions.Need to prove that owing to only comprise six sector address spaces in the configuration space, therefore, equipment at most can only be by configuration space to six base address of main frame application.
Main frame is after the address field application of the equipment of receiving, can correspondingly distribute two address fields to give equipment, one sector address is used to send the read operation order, the base address of this sector address (promptly, the start address of this sector address) is used to identify the read operation order, another sector address is used to send the write operation order, and the base address of this sector address is used to identify the write operation life.Subsequently, main frame will be distributed in the corresponding address space of base address write device configuration space of two address fields of equipment, as shown in Figure 2, in an embodiment of the present invention, main frame will represent that the base address of the address field of read operation has write in the space, first base address of configuration space, and the read command that All hosts is handed down to this equipment all issues by this base address, promptly, main frame is carried at this base address in the space, high address in TLP packet header when issuing read operation; Main frame will represent that the base address of the address field of write operation has write in the space, second base address of configuration space, the write order that All hosts is handed down to this equipment all issues by this base address, that is, main frame is carried at this base address in the space, high address in TLP packet header when issuing write operation.
Concrete, main frame is carried at the base address of distributing to this equipment mark read operation in the space, high address in TLP packet header when issuing the read operation order, and this high address is used to route to the equipment that receives this order.For example, as shown in Figure 3, Fig. 3 is the synoptic diagram in 32 TLP packet header of the embodiment of the invention, as shown in Figure 3, address [31:2] (Address[31:2]) be the space, high address in the TLP packet header, in actual applications, can write the Address[31:2 in TLP packet header successively from the most significant digit in space, high address according to the shared concrete bit number in base address].Fig. 4 is the synoptic diagram in 64 TLP packet header of the embodiment of the invention, as shown in Figure 4, address [63:32] (Address[63:32]) and address [31:2] (Address[31:2]) be the space, high address in the TLP packet header, in actual applications, can write the Address[63:32 in TLP packet header successively from the most significant digit in space, high address according to the shared concrete bit number in base address] and/or Address[31:2].The base address of carrying in the space, above-mentioned high address participates in route as start address.After equipment receives order, can begin from the most significant digit the space, high address in packet header, resolve the base address in the space, high address, TLP packet header, and determine that according to the base address that parses the action type that receives orders is read operation or write operation.Thereby the action type according to order is operated accordingly.
Need to prove that the described equipment of the embodiment of the invention is the equipment with quick peripheral component interconnect standard interface, comprise solid state hard disc (SolidState Disk with quick peripheral component interconnect standard interface; Hereinafter to be referred as: SSD).It will be appreciated by persons skilled in the art that the embodiment of the invention not only can be used among the SSD with PCIE interface, can also be used for all by the communication between two equipment of PCIE bus interconnection.
By above-mentioned processing, in the useful load of TLP bag, just do not need to use special byte to represent the action type of ordering, thereby can reduce the length of order itself, can reduce simultaneously the number of times of the memory read write operation that carries out owing to frequent execution read write command, thereby improved the utilization factor of link, and improved treatable maximum I/O frequency (the Input/Output Per Second in the unit interval of system; Hereinafter to be referred as: IOPS) and streamability.
In addition, from above-mentioned processing procedure as can be seen, the embodiment of the invention is directly used the action type of the base address marking command in the space, high address, no longer need in the order to use special byte to represent the action type of ordering, thereby increased the reservation position in the order, this reservation position can be used for carrying out the expansion of order.When order needs expansion, just do not need again multiple read write command, also can improve utilization factor, IOPS and the streamability of link to a certain extent.
According to another embodiment of the present invention, provide a kind of command sending method, Fig. 5 is the process flow diagram of the command sending method of the embodiment of the invention, as shown in Figure 5, comprises according to the command sending method of the embodiment of the invention:
Step 501, main frame issues the base address according to the application of equipment to equipment, and this base address is used to identify the action type of the order that main frame issues to equipment.
Particularly, the action type of order can comprise: read operation and write operation.Need to prove that in embodiments of the present invention, the action type of order can also comprise multiple action types such as query manipulation, still, in the description below the embodiment of the invention, is that example describes with read operation and write operation only.
At first, equipment need pass through the configuration space of self to main frame application base address, the configuration space of equipment can be understood with reference to Fig. 2, in addition, in the above embodiments, equipment is had been described in detail by the process of configuration space to main frame application base address, particular content can be understood with reference to the corresponding contents in the foregoing description, does not repeat them here.
Main frame can correspondingly distribute two address fields to give equipment after the address field application of the equipment of receiving, and a sector address is used to identify read operation, and another sector address is used to identify write operation.Subsequently, main frame will distribute to equipment two address fields the base address (promptly, the start address of address field) writes in the corresponding address space in equipment disposition space, as shown in Figure 2, in an embodiment of the present invention, main frame will represent that the base address of the address field of read operation has write in the space, first base address of configuration space, the read command that All hosts is handed down to this equipment all issues by this base address, promptly, main frame is carried at this base address in the space, high address in TLP packet header when issuing read operation; Main frame will represent that the base address of the address field of write operation has write in the space, second base address of configuration space, and the write order that All hosts is handed down to this equipment all issues by this base address.
Step 502, main frame to the equipment transmitting order to lower levels, wherein, carries the base address in the space, high address of processing layer packet by the processing layer packet, and this base address is used for the action type of marking command.
Concrete, when main frame when issuing read operation, the base address of distributing to this equipment mark read operation order is carried in the space, high address in TLP packet header, this high address is used to route to the equipment that receives this order.As shown in Figure 3, address [31:2] (Address[31:2]) be the space, high address in the TLP packet header, in actual applications, can write the Address[31:2 in TLP packet header successively from the most significant digit in space, high address according to the shared concrete bit number in base address].As shown in Figure 4, address [63:32] (Address[63:32]) and address [31:2] (Address[31:2]) be the space, high address in the TLP packet header, in actual applications, can write the Address[63:32 in TLP packet header successively from the most significant digit in space, high address according to the shared concrete bit number in base address] and/or Address[31:2].
Main frame by TLP behind the equipment transmitting order to lower levels, this base address of wherein carrying participates in route as start address, make the equipment that receives this order can determine the action type of order, and operate accordingly according to the action type of order according to the base address in the TLP packet header.
By above-mentioned processing, come the marking command type by the partial information of utilizing address in the TLP packet header, reduce the order length of main frame when the read write command of equipment sending data, thereby reduce the number of times that carries out the memory read write operation, and then improve the utilization factor of link.In addition, increased the reservation position in the order, made order that more expansion can be arranged.
According to embodiments of the invention, a kind of equipment with quick peripheral component interconnect standard interface is provided, Fig. 6 is the structural representation of the equipment of the quick peripheral component interconnect standard of having of embodiment of the invention interface, as shown in Figure 6, the equipment according to the quick peripheral component interconnect standard of having of embodiment of the invention interface comprises: receiver module 60, acquisition module 62, first processing module 64.Below, in conjunction with the accompanying drawings, the equipment of the embodiment of the invention is elaborated.
Receiver module 60 is used to receive the order that main frame issues by TLP;
Acquisition module 62 is used for obtaining the base address that carry in the space, high address in TLP packet header, and wherein, this base address is allocated in advance by main frame, and is used for the action type of marking command;
Particularly, this base address is the start address that sends the address field of order, and equipment can that is to say by self configuration space to the main frame application, and main frame is by being that the address space of start address sends this order with the base address.In embodiments of the present invention, this base address also is used for the action type of marking command;
Alternatively, the action type of order can comprise: read operation and write operation.Need to prove that in embodiments of the present invention, the action type of order can also comprise multiple action types such as query manipulation, still, in the description below the embodiment of the invention, is that example describes with read operation and write operation only.
Particularly, before the order that receiver module 60 reception main frames issue by TLP, the application module in the equipment can at first be passed through the configuration space of equipment to the described base address of main frame application.As shown in Figure 2, in the configuration space 00-15 of this equipment, comprise preserve first base address (Base Address 0) to the 6th base address the address space of (Base Address 5), the application module can be by this six sector addresses space to main frame (or system) application base address, the application base address quantity can be provided with according to actual needs, in the present embodiment to apply for that two base address are that example describes.Above-mentioned two base address are respectively applied for sign read operation and write operation.Above-mentioned two start addresses that the base address is the address space of host assignment, the shared bit number of this address space can be adjusted according to actual conditions.Need to prove that owing to only comprise six sector address spaces in the configuration space, therefore, equipment at most can only be by six base address of configuration space to the main frame application.Subsequently, main frame can corresponding distribute two address fields to give equipment, and the base address of two sector addresses is write address space in the configuration space, need to prove, the particular location of base address in TLP packet header can be understood with reference to Fig. 3, Fig. 4, do not repeat them here.
When main frame issues the read write command of data, the base address of distributing to this equipment mark read operation is carried in the space, high address in TLP packet header, this high address is used to route to the equipment that receives this order, and wherein, the base address participates in route as start address.Acquisition module 62 can be determined the action type that receives orders by resolving the base address in the space, high address, TLP packet header.
First processing module 64, be used for according to base address sign the action type of order operate accordingly.
Need to prove, the described equipment of the embodiment of the invention is the equipment with quick peripheral component interconnect standard interface, more specifically, the described equipment of the embodiment of the invention is solid state hard disc (the Solid State Disk with quick peripheral component interconnect standard interface; Hereinafter to be referred as: SSD).That is to say that the embodiment of the invention not only can be used among the SSD with PCIE interface, can also be used for all by the communication between two equipment of PCIE bus interconnection.
By above-mentioned processing, equipment passes through to main frame application base address, and the base address of carrying in the parsing TLP packet header, just can determine the action type of ordering, can reduce simultaneously the length of order itself, and reduced the number of times of carrying out the memory write operation that read write command carries out owing to frequent, thereby utilization factor and the system treatable maximum I/O frequency and the streamability in the unit interval of link have been improved.
According to embodiments of the invention, a kind of main process equipment is provided, Fig. 7 is the structural representation of the main process equipment of the embodiment of the invention, as shown in Figure 7, main process equipment according to the embodiment of the invention comprises: second processing module 70, sending module 72, below, in conjunction with the accompanying drawings, the main process equipment of the embodiment of the invention is described in detail.
Second processing module 70 is used for carrying the base address in the space, high address of processing layer packet, and this base address is used for the action type of marking command.
Particularly, the action type of order can comprise: read operation and write operation.Need to prove that in embodiments of the present invention, the action type of order can also comprise multiple action types such as query manipulation, still, in the description below the embodiment of the invention, is that example describes with read operation and write operation only.
At first, equipment need pass through the configuration space of self to main frame application base address, the configuration space of equipment can be understood with reference to Fig. 2, in addition, in the above embodiments, equipment is had been described in detail by the process of configuration space to main frame application base address, particular content can be understood with reference to the corresponding contents in the foregoing description, does not repeat them here.
Main frame can correspondingly distribute two address fields to give equipment after the address field application of the equipment of receiving, and a sector address is used to identify read operation, and other end address is used to identify write operation.Subsequently, main frame will distribute to equipment two address fields the base address (promptly, the start address of address field) writes in the corresponding address space in equipment disposition space, as shown in Figure 2, in an embodiment of the present invention, main frame will represent that the base address of the address field of read operation has write in the space, first base address of configuration space, all read commands that are handed down to this equipment all issue by this base address, main frame will represent that the base address of the address field of write operation has write in the space, second base address of configuration space (Base Address 2), and all write orders that are handed down to this equipment all issue by this base address.
The particular location of base address in TLP packet header can be understood with reference to Fig. 3, Fig. 4, do not repeat them here.
Sending module 72 is used for by the processing layer packet wherein, carrying the base address in the space, high address of processing layer packet to the equipment transmitting order to lower levels, and this base address is used for the action type of marking command.
Sending module 72 by TLP behind the equipment transmitting order to lower levels, the high address in the packet header is used to route to the equipment that receives this order, this base address of carrying in the space, high address participates in route as start address.Make the action type that can determine order according to the base address in the TLP packet header that receives this order, and operate accordingly according to the action type of order.
By above-mentioned processing, main process equipment comes the marking command type by the mode of carrying the base address in TLP packet header, reduce the order length of main frame when the read write command of equipment sending data, thereby reduced the number of times that carries out the memory read write operation, and then improved the utilization factor of link.In addition, also increased the reservation position in the read write command, made order that more expansion can be arranged.
According to embodiments of the invention, a kind of command treatment system also is provided, comprise equipment and main process equipment in the foregoing description with quick peripheral component interconnect standard interface, in the above-described embodiments, equipment and the main process equipment with quick peripheral component interconnect standard interface had been described in detail, do not repeat them here.
The command treatment system of the embodiment of the invention has reduced the number of times that carries out the memory read write operation, and then improves the utilization factor of link.
Device embodiment described above only is schematic, wherein said unit as the separating component explanation can or can not be physically to separate also, the parts that show as the unit can be or can not be physical locations also, promptly can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select wherein some or all of module to realize the purpose of present embodiment scheme according to the actual needs.Those of ordinary skills promptly can understand and implement under the situation of not paying performing creative labour.
Through the above description of the embodiments, those skilled in the art can be well understood to each embodiment and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware.Based on such understanding, the part that technique scheme contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in the computer-readable recording medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be a personal computer, server, perhaps network equipment etc.) carry out the described method of some part of each embodiment or embodiment.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.