WO2015021878A1 - 一种应用于pci-e的流量控制方法、设备及系统 - Google Patents

一种应用于pci-e的流量控制方法、设备及系统 Download PDF

Info

Publication number
WO2015021878A1
WO2015021878A1 PCT/CN2014/083871 CN2014083871W WO2015021878A1 WO 2015021878 A1 WO2015021878 A1 WO 2015021878A1 CN 2014083871 W CN2014083871 W CN 2014083871W WO 2015021878 A1 WO2015021878 A1 WO 2015021878A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
transport layer
cache
layer data
packet
Prior art date
Application number
PCT/CN2014/083871
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 华为技术有限公司
Publication of WO2015021878A1 publication Critical patent/WO2015021878A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport

Definitions

  • the present invention relates to the field of data transmission technologies, and in particular, to a flow control method, device and system applied to PCI-E.
  • PCI-E Peripheral Component Interconnect Express
  • Mac Peripheral Component Interconnect Express
  • the Credit-Based flow control mechanism is used on the PCI-E bus to coordinate the transmission and reception of packets between nodes:
  • a packet arrives in the buffer, it is decomposed into a header (header) and a data.
  • Data two parts, correspondingly, the cache includes two parts: a header buffer and a message data cache; the node of the level calculates the credit according to the local cache (Credit), and the quota is used to indicate the number of packets that can be stored in the local cache.
  • the level node reports the quota to the upper-level node, and the upper-level node sends a packet to the local node according to the quota, thereby improving the utilization of the data link.
  • the capacity of the packet header buffer and the packet data buffer is fixed, and the length of the packet header is also fixed, and the length of the packet data is not fixed, so the header buffer cannot be guaranteed.
  • the amount of the header is stored and the packet data is buffered to store the packet data. The same amount of credit, resulting in a waste of cache resources.
  • the embodiment of the present invention provides a flow control method, device, and system for PCI-E, which are used to solve the problem of waste of cache resources and improve the utilization of the cache space.
  • the first aspect of the present invention provides a flow control method, which is applied to a PCI-E system, where a node in the PCI-E system includes at least one global cache pool, where the flow control method includes:
  • the remaining metric space where the remaining buffer space includes: a remaining packet header buffer space for buffering the header of the transport layer data packet, and a remaining packet for buffering the packet data of the transport layer data packet.
  • the data buffer space, the packet header buffer metric is used to indicate that the remaining packet header buffer space can buffer the number of the packet headers, and the packet data buffer metric is used to indicate that the remaining packet data buffer space can cache the foregoing The number of message data;
  • the quota of the transport layer data packet Acquiring, according to the packet information of the transport layer data packet and the remaining buffer space of the global buffer pool, the quota of the transport layer data packet, where the quota is used to indicate the foregoing transport that can be stored in the global cache pool.
  • the number of packets of the layer data packet; the amount of the transport layer data packet is fed back to the upper node, so that the upper node transmits the transport layer data packet to the node within the number of packets indicated by the credit.
  • the foregoing packet information Including: packet header length and packet data length;
  • the packet header buffer metric and the packet data cache metric of the foregoing transport layer data packet are obtained, including:
  • the acquiring the data packet of the transport layer includes:
  • the transport layer data message After the amount of the transport layer data message, it also includes:
  • All the remaining buffer spaces of the global buffer pool are divided into the packet header buffer space and the packet data buffer of the transport layer data packet according to the packet information of the transport layer data packet and the quota of the transport layer data packet.
  • the foregoing transport layer data packet specifically includes any one of the following:
  • the Completion TLP is only essay.
  • the second aspect of the present invention provides a flow control device, which is applied to a PCI-E system, where the node in the PCI-E system includes at least one global cache pool, where the flow control device includes:
  • a first acquiring unit configured to acquire packet information of a transport layer data packet that the upper node of the node needs to transmit currently
  • a second acquiring unit configured to obtain the foregoing transport layer according to the packet information of the transport layer data packet acquired by the first acquiring unit, and the remaining buffer space of the global buffer pool for buffering the transport layer data packet
  • the packet header buffer metric and the packet data buffer metric of the data packet where the remaining buffer space includes: a remaining packet header buffer space for buffering the header of the transport layer data packet, and Cache the remaining message data buffer space of the packet data of the transport layer data packet, where the packet header buffer metric is used to indicate that the remaining header buffer space can buffer the number of the headers, and the packet data cache
  • the amount metric is used to indicate that the remaining message data buffer space can buffer the amount of the message data;
  • a determining unit configured to determine whether the packet header buffer metric and the packet data buffer metric of the transport layer data packet obtained by the second acquiring unit are equal;
  • a third obtaining unit configured to: when the determining result of the determining unit is YES, obtain the quota of the transport layer data packet according to the packet information of the transport layer data packet and all remaining buffer spaces of the global buffer pool, The quota is used to indicate the number of packets of the transport layer data packet that can be stored in the current global buffer pool.
  • a feedback unit configured to feed back, to the foregoing upper node, a quota of the foregoing transport layer data packet obtained by the third acquiring unit.
  • the packet information obtained by the first acquiring unit includes: a packet header length and a packet data length;
  • the second acquiring unit is configured to: divide the remaining packet header buffer space by the packet header length of the transport layer data packet, and obtain a packet header buffer amount metric of the transport layer data packet;
  • the text data buffer space is divided by the packet data length of the transport layer data packet to obtain the packet data cache amount metric of the transport layer data packet.
  • the third acquiring unit is specifically configured to: divide all remaining buffer spaces of the global buffer pool by the transport layer data.
  • the packet length of the packet is obtained by the packet length of the packet, and the packet length of the transport layer data packet is equal to the sum of the packet header length and the packet data length of the transport layer data packet.
  • the equipment also includes:
  • a cache dividing unit configured to: according to the packet information of the transport layer data packet obtained by the first acquiring unit, and the quota of the transport layer data packet obtained by the third acquiring unit, all remaining of the global buffer pool
  • the buffer space is divided into a packet header buffer space and a packet data buffer space of the transport layer data packet, where the packet header buffer space and the packet data buffer space of the transport layer data packet are respectively used to store the transport layer.
  • the header and packet data of the data packet is divided into a packet header buffer space and a packet data buffer space of the transport layer data packet, where the packet header buffer space and the packet data buffer space of the transport layer data packet are respectively used to store the transport layer.
  • the foregoing flow control device is a node in the foregoing fast peripheral interconnection standard system.
  • a third aspect of the present invention provides a flow control device, which is applied to a PCI-E system, where a node in the PCI-E system includes at least one global cache pool, where the flow control device includes: an input device and an output device. And a processor, wherein
  • the above processor is used to:
  • the data cache amount metric includes: a remaining packet header buffer space for buffering the header of the transport layer data packet. And a remaining message data buffer space for buffering the packet data of the transport layer data packet, where the packet header buffer metric is used to indicate that the remaining header buffer space can buffer the number of the headers, The data buffer amount metric is used to indicate that the remaining message data buffer space can buffer the number of the message data;
  • the method obtains: according to the packet information of the transport layer data packet and all remaining cache spaces of the global cache pool.
  • the amount of the transport layer data packet is fed back to the upper node by the output device, so that the upper node transmits the transport layer data packet to the node within the number of packets indicated by the credit.
  • the foregoing packet information includes: a packet header length and a packet data length;
  • the processor is specifically configured to: divide the remaining packet header buffer space by the packet header length of the transport layer data packet, and obtain a packet header buffer amount metric of the transport layer data packet; and the remaining packet data.
  • the buffer space is divided by the packet data length of the transport layer data packet to obtain the packet data cache amount metric of the transport layer data packet.
  • the foregoing processor is specifically configured to: divide all remaining buffer spaces of the global buffer pool by the transport layer data packet The length of the packet is obtained by the amount of the packet of the transport layer data packet, wherein the packet length of the transport layer data packet is equal to the sum of the packet header length of the transport layer data packet and the packet data length.
  • the foregoing processor is further configured to:
  • All the remaining buffer spaces of the global buffer pool are divided into the transport layer data packets according to the packet information of the transport layer data packet and the quota of the transport layer data packet.
  • the header buffer space and the packet data buffer space, wherein the packet header buffer space and the packet data buffer space of the transport layer data packet are used to store the header and the packet of the transport layer data packet, respectively. data.
  • the flow control device is a node in the fast peripheral interconnection standard system.
  • a fourth aspect of the present invention provides a flow control system for use in a PCI-E system, wherein the flow control system includes: a first node and a second node on a PCI-E bus;
  • the first node is a superior node of the second node, and the second node includes at least one global cache pool;
  • the first node is configured to send a transport layer data packet to the second node
  • the second node is configured to: obtain packet information of a transport layer data packet that is to be transmitted by the first node, and use the packet information of the transport layer data packet and the global buffer pool to cache the transport layer data.
  • the remaining buffer space of the packet, the packet header buffer metric and the packet data buffer metric of the transport layer data packet where the remaining buffer space includes: a packet header for buffering the transport layer data packet
  • the remaining header buffer space, and the remaining packet data buffer space for buffering the packet data of the transport layer data packet the packet header buffer metric is used to indicate that the remaining header buffer space can be cached.
  • the packet data buffer amount metric is used to indicate that the remaining packet data buffer space can buffer the number of the packet data; if the packet header buffer amount of the transport layer data packet is metric and the packet If the data cache amount metrics are not equal, then: according to the packet information of the transport layer data packet and the global buffer pool. All the remaining buffer spaces, the amount of the transport layer data packet is obtained, wherein the quota is used to indicate the number of packets of the transport layer data packet that can be stored in the current global buffer pool; and the foregoing node feeds back the transmission The amount of the layer data packet, so that the upper node transmits the transport layer data packet to the node within the number of packets indicated by the quota.
  • At least one global buffer pool is set in a node in the PCI-E system, and when a certain transport layer data packet needs to be transmitted, the remaining packet header buffer space in the global buffer pool is determined.
  • the number of packet headers that can store the data packets of the transport layer, and whether the number of packet data of the transport packet data packet can be equal to the remaining packet data buffer space in the global buffer pool, if the judgment result is no Then, the packet header buffer space and the packet data buffer space are re-allocated according to the algorithm, so that the number of packet headers that can be stored in the packet header buffer space is equal to the number of packet data that can be stored in the packet data buffer space, thereby solving the problem.
  • the problem of wasted cache resources increases the utilization of cache space.
  • FIG. 1 is a schematic diagram of a prior art PCI-E bus
  • FIG. 2 is a schematic flow chart of an embodiment of a flow control method provided by the present invention.
  • FIG. 3 is a schematic structural diagram of a global cache pool provided by the present invention.
  • FIG. 4 is a schematic flow chart of another embodiment of a flow control method according to the present invention.
  • FIG. 5 is a schematic structural diagram of an embodiment of a flow control device provided by the present invention.
  • FIG. 6 is a schematic structural view of another embodiment of a flow control device according to the present invention.
  • FIG. 7 is a schematic structural view of still another embodiment of a flow control device according to the present invention.
  • FIG. 8 is a schematic structural diagram of an embodiment of a flow control system provided by the present invention.
  • the embodiment of the invention is based on the PCI-E bus in the PCI-E system, and is applied to the message transmission between the upper node and the lower node of the PCI-E bus.
  • at least two nodes are included on the PCI-E bus: a first node 101 and a second node 102. If the first node 101 is regarded as the current node, the second node 102 is the lower node of the current node; if the second node 102 is regarded as the current node, the first node 101 is the upper node of the current node.
  • the transport layer data packet (TLP, Transfer Layer Packet) is transmitted according to the path of the superior node - the current node - the lower node.
  • the TLP packet includes two parts: the packet header and the packet data.
  • the packet header records the packet information of the packet, such as the packet type, the packet header length, and the packet data length.
  • the packet header In the header of the message, the form of the message header is fixed, so the length of the message header is also fixed; the message data is the actual data content of the message, and thus the message data length is usually variable.
  • the node on the PCI-E bus After receiving a TLP message, the node on the PCI-E bus needs to split the TLP message into two separate parts: the header and the packet data. .
  • a flow control method is described in detail in the first embodiment of the present invention.
  • the flow control method is applied to a PCI-E system.
  • the flow control method described in this embodiment includes:
  • the packet information of the TLP packet that the upper node of the node needs to transmit is obtained.
  • the node includes at least one global cache pool.
  • the foregoing packet information includes a packet header length and a packet data length.
  • the remaining buffer space includes: a remaining packet header buffer space for buffering the packet header of the TLP, and a remaining packet data buffer space for buffering the packet data of the TLP, and the packet header buffer amount metric Used to indicate that the remaining header buffer space can be Cache the number of the packet headers, where the packet data buffer amount metric is used to indicate that the remaining packet data buffer space can buffer the number of the packet data;
  • the node when the upper node of the node sends a TLP message to the node, the node receives the TLP message and needs to store the TLP message in the local global cache pool.
  • the TLP packet includes: a TLP packet, a Non-Posted TLP packet, and a Completion TLP packet.
  • the node allocates two buffer spaces for the TLP packet according to the type of the TLP packet: a packet header buffer space and a packet data buffer space.
  • the node calculates the quota of the TLP packet of the type according to the size of the packet header buffer, the size of the packet data buffer, the default packet header length, and the default packet data length.
  • the amount of the packet header is equal to the size of the packet header buffer divided by the default packet header length.
  • the packet data quota is equal to the packet data buffer space size divided by the default packet data length, and the packet header.
  • the amount is equal to the amount of message data.
  • the above node sends the quota of the packet header and the quota of the packet data when the system is initialized to the upper node of the node.
  • the superior node of the node sends a corresponding type of TLP ⁇ message to the node according to the two quotas. Each time a TLP ⁇ message of this type is sent, the superior node of the node decrements the two quotas until the quota is zero or the credit is refreshed, wherein the credit is refreshed to retrieve the feedback of the node.
  • the amount of the header of the TLP packet of this type and the quota of the packet data is equal to the amount of message data.
  • the upper node of the node sends the packet information of the TLP packet that needs to be transmitted to the node, and the node uses the packet information of the TLP packet and the global buffer pool to buffer the TLP packet.
  • the remaining buffer space is used to obtain the packet header buffer metric and the packet data amount metric of the TLP packet.
  • the packet information includes: a packet header length and a packet data length, where the packet header buffer metric of the TLP packet is equal to the remaining packet header buffer space divided by the TLP packet.
  • the length of the header data, the packet data buffer metric of the TLP packet is equal to the length of the remaining packet data buffer divided by the packet data length of the TLP packet. If the packet header buffer metric of the TLP packet is not equal to the packet data buffer metric, the process proceeds to steps 203 and 204.
  • the quota is used to indicate the number of the TLP packets that can be stored in the current global buffer pool.
  • the packet header buffer metric when the packet header buffer metric is not equal to the packet data buffer metric, the number of headers that can be stored in the remaining packet header buffer space and the remaining packet data cache can be stored.
  • the data of the text data is not equal. If the node keeps buffering the same length of the TLP packet, the packet header buffer space or the packet data buffer space becomes a short message of the packet buffering mechanism, resulting in waste of cache resources.
  • the remaining header buffer space and the remaining packet data of the TLP packet are buffered to the global buffer pool, and the buffer space is uniformly scheduled.
  • the scheduling target is to enable the TLP to be stored in the re-allocated header buffer space.
  • the number of packet headers of the packet is equal to the number of packet data of the TLP packet that can be stored in the re-allocated packet data buffer space, thereby reasonably utilizing the cache resource.
  • the amount of the TLP packet is obtained by dividing the total buffer space of the global buffer pool by the packet length of the TLP packet, and the amount of the TLP packet is obtained.
  • the packet length of the TLP packet is equal to the sum of the packet header length and the packet data length of the TLP packet.
  • the node After obtaining the quota of the TLP packet that the upper node of the node needs to transmit, the node feeds the priority of the TLP packet that needs to be transmitted to the upper node, so that the upper node is within the range of the number of packets indicated by the quota. The node transmits the above TLP message.
  • the amount of the TLP message fed back is recorded in a data link layer packet (DLLP, Data Link Layer Packet).
  • DLLP Data Link Layer Packet
  • the remaining buffer space of the global buffer pool is divided into the packet header buffer space and the packet data buffer space of the TLP packet, where the TLP packet is The header buffer space and the packet data buffer space are used to store the header and packet data of the TLP packet.
  • the packet header buffer space of the new TLP packet may be equal to the packet header length of the TLP packet multiplied by the amount of the TLP packet obtained in step 203, and the packet data buffer size of the new TLP packet.
  • the packet data length equal to the above TLP message is multiplied by the amount of the TLP message obtained in step 203.
  • At least one global buffer pool is set in a node in the PCI-E system, and when a certain transport layer data packet needs to be transmitted, the remaining packet header buffer space in the global buffer pool is determined.
  • the number of packet headers that can store the data packets of the transport layer, and whether the number of packet data of the transport packet data packet can be equal to the remaining packet data buffer space in the global buffer pool, if the judgment result is no Then, the packet header buffer space and the packet data buffer space are re-allocated according to the algorithm, so that the number of packet headers that can be stored in the packet header buffer space is equal to the number of packet data that can be stored in the packet data buffer space, thereby solving the problem.
  • the problem of wasted cache resources increases the utilization of cache space.
  • a complete transmission process on the PCI-E bus usually includes a plurality of messages. In these multiple TLP messages, there is a certain relationship between each TLP message, for example, a complete memory read operation is performed by the memory.
  • the read request TLP message and the memory read completion TLP message are composed.
  • TLP packets are classified into three categories: Posted TLP packets, Non-Posted TLP packets, and Completion TLP packets.
  • the packet header buffer includes a posted TLP header buffer (that is, a PH buffer), a Non-Posted TLP header buffer (that is, an NPH buffer), and a Completion TLP header buffer (that is, a CplH cache), and the packet data cache includes a Posted TLP.
  • Message data buffer ie PD cache
  • Non-Posted TLP message data buffer ie NPD cache
  • Completion TLP message data cache ie CplD cache
  • the cache is composed of multiple units, and the size of each unit is related to the type of the cache. For the specific relationship, see Table 1 below. Table 1
  • the information obtained in step 201 further includes a packet type.
  • the node needs to determine the type of the TLP packet according to the packet type in the packet information, if the TLP If the packet is a posted TLP packet, in step 202, the packet is obtained according to the packet information of the posted TLP packet obtained in step 201 and the remaining buffer space used for buffering the posted TLP packet in the global buffer pool to obtain the posted TLP packet.
  • the packet header buffer metric and the packet data amount metric are obtained.
  • step 203 the amount of the posted TLP packet is obtained according to the packet information of the posted TLP packet and the remaining buffer space of the global buffer pool;
  • the message is a Non-Posted TLP message
  • step 202 the message information of the Non-Posted TLP message obtained in step 201 and the remaining buffer space in the global buffer pool for buffering the Non-Posted TLP message are Obtaining a packet header buffer metric and a packet data metric of the Non-Posted TLP packet, and in step 203, according to the packet information of the Non-Posted TLP packet and all remaining caches of the global cache pool
  • the TLP message is a Completion TLP packet
  • step 202 the packet information of the Completion TLP packet obtained in step 201 and the global buffer pool are used for caching.
  • the remaining buffer space of the Completion TLP packet, and the packet header buffer metric and the packet data amount metric of the Completion TLP packet are obtained.
  • the amount of the Completion TLP packet is obtained according to the packet information of the Completion TLP packet and the remaining buffer space of the global buffer pool.
  • the embodiment of the present invention further provides a structure of a global buffer pool.
  • the original six cache types are posted TLP header buffer, Posted TLP packet data cache, and Non-Posted TLP report.
  • Header Cache, Non-Posted TLP Message Cache, Completion TLP Cache Header, and Completion TLP Cache Data Cache obtains cache resources from the global cache pool through multi-input and multi-out connection technologies to implement packet header caching. Unified and flexible scheduling of packet data buffers.
  • the global cache pool is designed with Multi-Bank technology, and the designed global cache pool includes 6 read 6 write ports.
  • the flow control method in the embodiment of the present invention includes:
  • the node can determine from the obtained message information that the TLP message is a Posted TLP message.
  • the node calculates the TLP packet header buffer metric and the Posted TLP packet data cache metric
  • the Posted TLP packet header buffer metric is equal to the remaining packet header buffer space of the Posted TLP packet in the global buffer pool divided by the packet header length of the Posted TLP packet.
  • the TLP packet data buffer metric is equal to the remaining packet data buffer space of the Posted TLP packet in the global buffer pool divided by the packet data length of the Posted TLP packet.
  • step 404 is performed. If they are not equal, step 405 is performed.
  • the node reclaims the remaining posted TLP packet header cache space and the remaining posted TLP packet data cache space to the global cache pool. Assume that the original capacity of the global buffer pool is S, and the remaining posted TLP header buffer space H and the remaining posted TLP packet data cache space D are recovered to the global cache pool. The capacity of the recovered global cache pool is: S+H +D.
  • the node allocates a new Posted TLP 4 header buffer space
  • the new Posted TLP header buffer space is equal to the length of the Posted TLP header multiplied by the amount of the above Posted TLP 4 text.
  • H_new hxs. 408.
  • the node allocates a new Posted TLP message data cache space.
  • the new Posted TLP message data buffer space is equal to the length of the Posted TLP message data multiplied by the amount of the above Posted TLP 4 text.
  • the embodiment of the present invention further provides a flow control device, which is applied to a PCI-E system, wherein a node in the PCI-E system includes at least one global cache pool, as shown in FIG. 5 .
  • the flow control device 500 in the embodiment of the present invention includes:
  • the first obtaining unit 501 is configured to obtain packet information of a transport layer data packet that the upper node of the node needs to transmit.
  • the second obtaining unit 502 is configured to obtain the report of the TLP packet according to the packet information of the TLP packet acquired by the first acquiring unit 501, and the remaining buffer space of the global buffer pool for buffering the TLP packet.
  • the header buffer metric and the packet data buffer metric wherein the remaining buffer space includes: a remaining packet header buffer space for buffering the header of the TLP packet, and a packet for buffering the TLP packet.
  • the remaining packet data buffer space of the text data, the packet header buffer metric is used to indicate that the remaining packet header buffer space can buffer the number of the headers, and the packet data buffer metric is used to indicate the remaining packets.
  • the data buffer space can buffer the amount of the above message data.
  • the determining unit 503 is configured to determine whether the packet header buffer metric and the packet data buffer metric of the TLP packet obtained by the second obtaining unit 502 are equal.
  • the third obtaining unit 504 is configured to: when the determining result of the determining unit 503 is YES, obtain the quota of the TLP packet according to the packet information of the TLP packet and the remaining buffer space of the global buffer pool, where The quota is used to indicate the number of packets of the TLP packet that can be stored in the current global buffer pool.
  • the feedback unit 505 is configured to feed back, to the foregoing upper node, the quota of the foregoing TLP ⁇ message obtained by the third obtaining unit 504.
  • the packet information obtained by the first obtaining unit 501 includes: a packet header length and a packet data length.
  • the second obtaining unit 502 is specifically configured to: divide the remaining packet header buffer space by the TLP packet.
  • the length of the packet header is obtained by obtaining the packet header buffer metric of the TLP packet, and the remaining packet data buffer space is divided by the packet data length of the TLP packet to obtain the packet data buffer quota of the TLP packet. the amount.
  • the third obtaining unit 504 is specifically configured to: The remaining buffer space is divided by the packet length of the TLP packet to obtain the quota of the TLP packet.
  • the packet length of the TLP packet is equal to the sum of the packet header length and the packet data length of the TLP packet.
  • the flow control device 600 further includes: a buffer dividing unit 506, configured to receive the packet of the TLP packet obtained by the first obtaining unit 501.
  • the information, and the amount of the TLP obtained by the third obtaining unit 504 the entire remaining buffer space of the global buffer pool is divided into a packet header buffer space and a packet data buffer space of the TLP packet, where the TLP packet is used.
  • the header buffer space and the packet data buffer space are used to store the header and packet data of the TLP packet.
  • the flow control device in the embodiment of the present invention may be a node on the PCI-E bus, or may be a node-independent device on the PCI-E bus, which is not limited herein.
  • flow control device 500 and the flow control device 600 in the embodiment of the present invention may be used to implement all the technical solutions in the foregoing method embodiments, and the functions of the respective functional modules may be specifically determined according to the method in the foregoing method embodiment.
  • the specific implementation process reference may be made to the related description in the foregoing method embodiments, and details are not described herein again.
  • At least one global buffer pool is set in a node in the PCI-E system, and when a certain transport layer data packet needs to be transmitted to the node, the flow control device determines the global cache of the node.
  • the remaining packet header buffer space in the pool can store the number of packet headers of the transport layer data packet
  • the remaining packet data buffer space in the global buffer pool can store the number of packet data of the transport layer data packet. If the result is negative, the packet header buffer space and the packet data buffer space are re-allocated according to the algorithm, so that the number of packet headers that can be stored in the packet header buffer space and the packet data buffer space can be stored.
  • the number of packet data is equal, which solves the problem of wasted cache resources and improves the utilization of cache space.
  • the embodiment of the present invention further provides another flow control device, which is applied to a PCI-E system, wherein the node in the PCI-E system includes at least one global cache pool, as shown in FIG. 7 .
  • the flow control device 700 in the embodiment of the present invention includes:
  • the input device 701, the output device 702, the memory 703, and the processor 704 (the number of the processors 704 of the flow control device may be one or more, and Fig. 7 takes a processor as an example).
  • the input device 701, the output device 702, the memory 703, and the processor 704 may be connected by a bus or other means, as shown in FIG. 8 by way of a bus connection.
  • the memory 703 is used to store data input from the input device 701, and may also store information such as necessary files processed by the processor 704; the input device 701 and the output device 702 may include ports through which the device 700 communicates with other devices, and Output devices external to the device 700, such as a display, a keyboard, a mouse, a printer, etc., may also be included.
  • the input device 701 may include a mouse and a keyboard, etc.
  • the output device 702 may include a display or the like, in the present embodiment, the input device 801 and the output.
  • the port in device 802 that is in communication with other devices may be an antenna.
  • the processor 704 in the embodiment of the present invention is used to:
  • the remaining buffer space includes: a remaining packet header buffer space for buffering the header of the TLP packet, and a remaining packet data buffer space for buffering the packet data of the TLP packet, the packet header
  • the buffer amount metric is used to indicate that the remaining packet header buffer space can buffer the number of the headers
  • the packet data buffer metric is used to indicate that the remaining packet data buffer space can buffer the number of the packet data.
  • the TLP packet is obtained according to the packet information of the TLP packet and all remaining buffer spaces of the global buffer pool. The amount of the number of the TLP packets that can be stored in the current global buffer pool; The amount of the TLP message is fed back to the upper node by the output device 702, so that the upper node transmits the TLP message to the node within the number of messages indicated by the quota.
  • the foregoing packet information includes: a packet header length and a packet data length.
  • the processor 704 is specifically configured to: divide the remaining packet header buffer space by the packet header length of the TLP packet, to obtain the TLP.
  • the packet header buffer metric of the packet is obtained by dividing the remaining packet data buffer space by the packet data length of the TLP packet to obtain the packet data buffer metric of the TLP packet.
  • the processor 704 is specifically configured to: divide the total remaining buffer space of the global buffer pool by the packet length of the TLP packet, and obtain the quota of the TLP packet, where the packet length of the TLP packet is It is equal to the sum of the packet header length and the packet data length of the above TLP message.
  • the processor 704 is further configured to: divide, according to the packet information of the TLP packet and the quota of the TLP packet, the remaining buffer space of the global buffer pool into the packet header buffer space of the TLP packet. And a packet data buffer space, where the packet header buffer space and the packet data buffer space of the TLP packet are used to store the packet header and the packet data of the TLP packet, respectively.
  • the flow control device in the embodiment of the present invention may be a node on the PCI-E bus, or may be a node-independent device on the PCI-E bus, which is not limited herein.
  • the flow control device 700 in the embodiment of the present invention may be used to implement all the technical solutions in the foregoing method embodiments, and the functions of the respective functional modules may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation thereof is implemented.
  • the process reference may be made to the related description in the foregoing method embodiments, and details are not described herein again.
  • At least one global buffer pool is set in a node in the PCI-E system, and when a certain transport layer data packet needs to be transmitted to the node, the flow control device determines the global cache of the node.
  • the remaining header buffer space in the pool can store the transmission Whether the number of packet headers of the layer data packet and the remaining packet data buffer space in the global buffer pool can store the number of packet data of the transport layer data packet, and if the result of the determination is no, according to the algorithm Re-allocating the packet header buffer space and the packet data buffer space, so that the number of packet headers that can be stored in the packet header buffer space is equal to the number of packet data that can be stored in the packet data buffer space, thereby solving the waste of cache resources.
  • the problem is to increase the utilization of the cache space.
  • a flow control system is described in the sixth embodiment of the present invention.
  • the flow control system is applied to a PCI-E system.
  • the flow control system in the embodiment of the present invention includes:
  • the first node 801 and the second node 802 on the PCI-E bus are connected.
  • the first node 801 is in communication with the second node 802.
  • the first node 801 is a superior node of the second node 802, and the first node 801 is configured to send a TLP ⁇ message to the second node 802.
  • a person skilled in the art can understand that all or part of the steps of implementing the above embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium, the above mentioned storage.
  • the medium can be a read only memory, magnetic Disk or disc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明实施例公开了一种应用于PCI-E的流量控制方法、设备及系统,其中,一种应用于PCI-E的流量控制方法包括:获取节点的上级节点当前需要传输的传输层数据报文的报文信息;根据上述报文信息以及全局缓存池中用于缓存上述传输层数据报文的剩余缓存空间,获取上述传输层数据报文的报文头缓存额度量和报文数据缓存额度量,若报文头缓存额度量与报文数据缓存额度量不相等,则:根据上述报文信息和上述全局缓存池的全部剩余缓存空间,获取上述传输层数据报文的额度,向上述上级节点反馈上述传输层数据报文的额度,以便上述上级节点在上述额度指示的报文数量范围内向节点传输上述传输层数据报文。本发明方案能够有效提高缓存空间的利用率。

Description

一种应用于 PCI-E的流量控制方法、 设备及系统 本申请要求于 2013 年 8 月 15 日提交中国专利局、 申请号为 201310356787.0、 发明名称为"一种应用于 PCI-E的流量控制方法、 设备及系 统"的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及数据传输技术领域, 尤其涉及一种应用于 PCI-E的流量 控制方法、 设备及系统。
背景技术
快捷夕卜设互联标准 ( PCI-E , Peripheral Component Interconnect Express ) 是计算机内部总线外设互联标准 (££1, Peripheral Component Interconnect )的一种。在 PCI-E总线上,数据以报文形式进行传输, PCI-E 的各级节点中设置緩存存放报文。 当緩存满载后, 本级节点将直接丟弃 上级节点后续发送的报文, 而上级节点则会择机重发被丟弃的报文, 直 到报文成功到达本级节点。这种重发机制大大降低了数据链路的利用率。
目前, PCI-E总线上使用基于额度( Credit-Based )的流量控制( Flow Control ) 机制协调节点间的报文收发: 报文到达緩存时被分解为报文头 ( Header ) 和^艮文数据 (Data ) 两部分, 对应地, 緩存包括 ^艮文头緩存 和报文数据緩存两部分; 本级节点根据本地緩存计算额度(Credit ) , 额 度用于指示本地緩存能够存放的报文数量, 本级节点将额度上报上级节 点, 上级节点根据该额度向本级节点发送报文, 从而提高数据链路的利 用率。
但是, 在上述技术方案中, 报文头緩存和报文数据緩存的容量是固 定的, 报文头的长度也是固定的, 而报文数据的长度并不是固定的, 因 此无法保证报文头緩存存放报文头的额度与报文数据緩存存放报文数据 的额度相同, 造成緩存资源的浪费。
发明内容
为了解决上述问题, 本发明实施例提供了一种应用于 PCI-E的流量 控制方法、 设备及系统, 用于解决緩存资源浪费的问题, 提高緩存空间 的利用率。
本发明第一方面提供了一种流量控制方法, 应用于 PCI-E系统中, 上述 PCI-E系统中的节点包含至少一个全局緩存池, 其中, 上述流量控 制方法, 包括:
获取上述节点的上级节点当前需要传输的传输层数据报文的报文信 息;
根据上述传输层数据报文的报文信息以及上述全局緩存池中用于緩 存上述传输层数据报文的剩余緩存空间, 获取上述传输层数据报文的报 文头緩存额度量和报文数据緩存额度量, 其中, 上述剩余緩存空间包括: 用于緩存上述传输层数据报文的报文头的剩余报文头緩存空间, 以及用 于緩存上述传输层数据报文的报文数据的剩余报文数据緩存空间, 上述 报文头緩存额度量用于指示上述剩余报文头緩存空间能够緩存上述报文 头的数量, 上述报文数据緩存额度量用于指示上述剩余报文数据緩存空 间能够緩存上述报文数据的数量;
若上述传输层数据报文的报文头緩存额度量与上述报文数据緩存额 度量不相等, 则:
根据上述传输层数据报文的报文信息和上述全局緩存池的全部剩余 緩存空间, 获取上述传输层数据报文的额度, 其中, 上述额度用于指示 当前上述全局緩存池中能够存放的上述传输层数据报文的报文数量; 向上述上级节点反馈上述传输层数据报文的额度, 以便上述上级节 点在上述额度指示的报文数量范围内向上述节点传输上述传输层数据报 文。
基于本发明第一方面, 在第一种可能的实现方式中, 上述报文信息 包括: 报文头长度和报文数据长度;
上述获取上述传输层数据报文的报文头緩存额度量和报文数据緩存 额度量, 包括:
将上述剩余报文头緩存空间除以上述传输层数据报文的报文头长 度, 获得上述传输层数据报文的报文头緩存额度量;
将上述剩余报文数据緩存空间除以上述传输层数据报文的报文数据 长度, 获得上述传输层数据报文的报文数据緩存额度量。
基于本发明第一方面的第一种可能的实现方式, 在第二种可能的实 现方式中, 上述获取上述传输层数据报文的额度, 包括:
将上述全局緩存池的全部剩余緩存空间除以上述传输层数据报文的 报文长度, 获得上述传输层数据报文的额度, 其中, 上述传输层数据报 文的报文长度等于上述传输层数据报文的报文头长度和报文数据长度之 和。
基于本发明第一方面, 或者本发明第一方面的第一种可能的实现方 式, 或者本发明第一方面的第二种可能的实现方式, 在第三种可能的实 现方式中, 上述获取上述传输层数据报文的额度之后, 还包括:
根据上述传输层数据报文的报文信息和上述传输层数据报文的额 度, 将上述全局緩存池的全部剩余緩存空间划分为上述传输层数据报文 的报文头緩存空间和报文数据緩存空间, 其中, 上述传输层数据报文的 报文头緩存空间和报文数据緩存空间分别用于存储上述传输层数据报文 的报文头和报文数据。
基于本发明第一方面, 或者本发明第一方面的第一种可能的实现方 式, 或者本发明第一方面的第二种可能的实现方式, 或者本发明第一方 面的第三种可能的实现方式, 在第四种可能的实现方式中, 上述传输层 数据报文具体包括如下任一种:
Posted TLP才艮文;
Non-Posted TLP报文;
Completion TLP才艮文。 本发明第二方面提供了一种流量控制设备, 应用于 PCI-E系统中, 上述 PCI-E系统中的节点包含至少一个全局緩存池, 其中, 上述流量控 制设备包括:
第一获取单元, 用于获取上述节点的上级节点当前需要传输的传输 层数据报文的报文信息;
第二获取单元, 用于根据上述第一获取单元获取的上述传输层数据 报文的报文信息, 以及上述全局緩存池中用于緩存上述传输层数据报文 的剩余緩存空间, 获取上述传输层数据报文的报文头緩存额度量和报文 数据緩存额度量, 其中, 上述剩余緩存空间包括: 用于緩存上述传输层 数据报文的报文头的剩余报文头緩存空间, 以及用于緩存上述传输层数 据报文的报文数据的剩余报文数据緩存空间, 上述报文头緩存额度量用 于指示上述剩余报文头緩存空间能够緩存上述报文头的数量, 上述报文 数据緩存额度量用于指示上述剩余报文数据緩存空间能够緩存上述报文 数据的数量;
判断单元, 用于判断第二获取单元获取的上述传输层数据报文的报 文头緩存额度量和报文数据緩存额度量是否相等;
第三获取单元, 用于当上述判断单元的判断结果为是时, 根据上述 传输层数据报文的报文信息和上述全局緩存池的全部剩余緩存空间, 获 取上述传输层数据报文的额度, 其中, 上述额度用于指示当前上述全局 緩存池中能够存放的上述传输层数据报文的报文数量;
反馈单元, 用于向上述上级节点反馈上述第三获取单元获取的上述 传输层数据报文的额度。
基于本发明第二方面, 在第一种可能的实现方式中, 上述第一获取 单元获得的报文信息包括: 报文头长度和报文数据长度;
上述第二获取单元具体用于: 将上述剩余报文头緩存空间除以上述 传输层数据报文的报文头长度, 获得上述传输层数据报文的报文头緩存 额度量; 将上述剩余报文数据緩存空间除以上述传输层数据报文的报文 数据长度, 获得上述传输层数据报文的报文数据緩存额度量。 基于本发明第二方面的第一种可能的实现方式, 在第二种可能的实 现方式中, 上述第三获取单元具体用于: 将上述全局緩存池的全部剩余 緩存空间除以上述传输层数据报文的报文长度, 获得上述传输层数据报 文的额度, 其中, 上述传输层数据报文的报文长度等于上述传输层数据 报文的报文头长度和报文数据长度之和。
基于本发明第二方面, 或者本发明第二方面的第一种可能的实现方 式, 或者本发明第二方面的第二种可能的实现方式, 在第三种可能的实 现方式中, 上述流量控制设备还包括:
緩存划分单元, 用于根据上述第一获取单元获得的上述传输层数据 报文的报文信息, 以及上述第三获取单元获得的上述传输层数据报文的 额度, 将上述全局緩存池的全部剩余緩存空间划分为上述传输层数据报 文的报文头緩存空间和报文数据緩存空间, 其中, 上述传输层数据报文 的报文头緩存空间和报文数据緩存空间分别用于存储上述传输层数据报 文的报文头和报文数据。
基于本发明第二方面, 或者本发明第二方面的第一种可能的实现方 式, 或者本发明第二方面的第二种可能的实现方式, 或者本发明第二方 面的第三种可能的实现方式, 在第四种可能的实现方式中, 上述流量控 制设备为上述快捷外设互联标准系统中的节点。
本发明第三方面提供了一种流量控制设备, 应用于 PCI-E系统中, 上述 PCI-E系统中的节点包含至少一个全局緩存池, 其中, 上述流量控 制设备, 包括: 输入装置、 输出装置和处理器, 其中,
上述处理器用于:
通过上述输入装置获取上述节点的上级节点当前需要传输的传输层 数据报文的报文信息;
根据获取的上述传输层数据报文的报文信息以及上述全局緩存池中 用于緩存上述传输层数据报文的剩余緩存空间, 获取上述传输层数据报 文的报文头緩存额度量和报文数据緩存额度量, 其中, 上述剩余緩存空 间包括:用于緩存上述传输层数据报文的报文头的剩余报文头緩存空间, 以及用于緩存上述传输层数据报文的报文数据的剩余报文数据緩存空 间, 上述报文头緩存额度量用于指示上述剩余报文头緩存空间能够緩存 上述报文头的数量, 上述报文数据緩存额度量用于指示上述剩余报文数 据緩存空间能够緩存上述报文数据的数量;
若上述传输层数据报文的报文头緩存额度量与上述报文数据緩存额 度量不相等, 则: 根据上述传输层数据报文的报文信息和上述全局緩存 池的全部剩余緩存空间, 获取上述传输层数据报文的额度, 其中, 上述 额度用于指示当前上述全局緩存池中能够存放的上述传输层数据报文的 报文数量;
通过上述输出装置向上述上级节点反馈上述传输层数据报文的额 度, 以便上述上级节点在上述额度指示的报文数量范围内向上述节点传 输上述传输层数据报文。
基于本发明第三方面, 在第一种可能的实现方式中,
上述报文信息包括: 报文头长度和报文数据长度;
上述处理器具体用于: 将上述剩余报文头緩存空间除以上述传输层 数据报文的报文头长度,获得上述传输层数据报文的报文头緩存额度量; 将上述剩余报文数据緩存空间除以上述传输层数据报文的报文数据长 度, 获得上述传输层数据报文的报文数据緩存额度量。
基于本发明第三方面的第一种可能的实现方式, 在第二种可能的实 现方式中, 上述处理器具体用于: 将上述全局緩存池的全部剩余緩存空 间除以上述传输层数据报文的报文长度, 获得上述传输层数据报文的额 度, 其中, 上述传输层数据报文的报文长度等于上述传输层数据报文的 报文头长度和报文数据长度之和。
基于本发明第三方面, 或者本发明第三方面的第一种可能的实现方 式, 或者本发明第三方面的第二种可能的实现方式, 在本发明第三方面 的第三种可能的实现方式中, 上述处理器还用于:
根据上述传输层数据报文的报文信息和上述传输层数据报文的额 度, 将上述全局緩存池的全部剩余緩存空间划分为上述传输层数据报文 的报文头緩存空间和报文数据緩存空间, 其中, 上述传输层数据报文的 报文头緩存空间和报文数据緩存空间分别用于存储上述传输层数据报文 的报文头和报文数据。
基于本发明第三方面, 或者本发明第三方面的第一种可能的实现方 式, 或者本发明第三方面的第二种可能的实现方式, 或者本发明第三方 面的第三种可能的实现方式, 在本发明第三方面的第四种可能的实现方 式中, 上述流量控制设备为上述快捷外设互联标准系统中的节点。
本发明第四方面提供了一种流量控制系统, 应用于 PCI-E系统中, 其特征在于, 上述流量控制系统包括: PCI-E 总线上的第一节点和第二 节点;
其中, 上述第一节点为上述第二节点的上级节点, 上述第二节点包 含至少一个全局緩存池;
上述第一节点用于向上述第二节点发送传输层数据报文;
上述第二节点用于: 获取上述第一节点当前需要传输的传输层数据 报文的报文信息; 根据上述传输层数据报文的报文信息以及上述全局緩 存池中用于緩存上述传输层数据报文的剩余緩存空间, 获取上述传输层 数据报文的报文头緩存额度量和报文数据緩存额度量, 其中, 上述剩余 緩存空间包括: 用于緩存上述传输层数据报文的报文头的剩余报文头緩 存空间, 以及用于緩存上述传输层数据报文的报文数据的剩余报文数据 緩存空间, 上述报文头緩存额度量用于指示上述剩余报文头緩存空间能 够緩存上述报文头的数量, 上述报文数据緩存额度量用于指示上述剩余 报文数据緩存空间能够緩存上述报文数据的数量; 若上述传输层数据报 文的报文头緩存额度量与上述报文数据緩存额度量不相等, 则: 根据上 述传输层数据报文的报文信息和上述全局緩存池的全部剩余緩存空间, 获取上述传输层数据报文的额度, 其中, 上述额度用于指示当前上述全 局緩存池中能够存放的上述传输层数据报文的报文数量; 向上述第一节 点反馈上述传输层数据报文的额度, 以便上述上级节点在上述额度指示 的报文数量范围内向上述节点传输上述传输层数据报文。 由上可见, 本发明实施例中在 PCI-E 系统中的节点中设置至少一个 全局緩存池, 当需要传输某一种传输层数据报文时, 判断全局緩存池中 的剩余报文头緩存空间能够存放该传输层数据报文的报文头的数量, 与 全局緩存池中的剩余报文数据緩存空间能够存放该传输层数据报文的报 文数据的数量是否相等, 若该判断结果为否, 则根据算法重新分配报文 头緩存空间和报文数据緩存空间, 使得报文头緩存空间能够存放的报文 头的数量与报文数据緩存空间能够存放的报文数据的数量相等, 从而解 决了緩存资源浪费的问题, 提高緩存空间的利用率。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将 对实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见 地, 下面描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技 术人员来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得 其他的附图。
图 1为现有技术的 PCI-E总线示意图;
图 2为本发明提供的流量控制方法一个实施例流程示意图;
图 3为本发明提供的一种全局緩存池结构示意图;
图 4为本发明提供的流量控制方法另一个实施例流程示意图; 图 5为本发明提供的流量控制设备一个实施例结构示意图;
图 6为本发明提供的流量控制设备另一个实施例结构示意图; 图 7为本发明提供的流量控制设备再一个实施例结构示意图; 图 8为本发明提供的流量控制系统一个实施例结构示意图。
具体实施方式
下面将结合本发明中的说明书附图,对发明中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不 是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有 做出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的 范围。
本发明实施例基于 PCI-E系统中的 PCI-E总线, 应用于 PCI-E总线 上级节点与下级节点之间的报文传输。 请参见图 1 , PCI-E总线上至少包 括两个节点: 第一节点 101和第二节点 102。 若将第一节点 101视为当 前节点, 则第二节点 102为当前节点的下级节点; 若将第二节点 102视 为当前节点, 则第一节点 101 为当前节点的上级节点。 传输层数据报文 ( TLP , Transfer Layer Packet )根据上级节点 -当前节点-下级节点的路径 传输。 TLP报文包括报文头和报文数据两部分, 报文头记录了该报文的 报文信息, 如报文类型、报文头长度、报文数据长度等, 对于某一种 TLP 报文的报文头来说, 报文头的形式固定, 因而其报文头长度也固定不变; 报文数据是报文实际有效的数据内容, 因而报文数据长度通常是可变的。
PCI-E总线上中的节点在接收到一个 TLP报文后, 为了系统管理需要将 一个 TLP报文拆分为报文头和报文数据两个部分分别存放于两个相互独 立的緩存区中。
本发明第一实施例将对一种流量控制方法进行详细说明, 该流量控 制方法应用于 PCI-E 系统中, 请参见图 2 , 本实施例上述的流量控制方 法包括:
201、 获取节点的上级节点当前需要传输的 TLP报文的报文信息; 在本发明实施例中, 上述节点包含至少一个全局緩存池。
可选地, 上述报文信息包括报文头长度和报文数据长度。
202、 根据上述 TLP报文的报文信息以及上述全局緩存池中用于緩 存上述 TLP报文的剩余緩存空间,获取上述 TLP的报文头緩存额度量和 报文数据额度量;
其中, 上述剩余緩存空间包括: 用于緩存上述 TLP的报文头的剩余 报文头緩存空间, 以及用于緩存上述 TLP的报文数据的剩余报文数据緩 存空间, 上述报文头緩存额度量用于指示上述剩余报文头緩存空间能够 緩存上述报文头的数量, 上述报文数据緩存额度量用于指示上述剩余报 文数据緩存空间能够緩存上述报文数据的数量;
在本发明实施例中, 当节点的上级节点向该节点发送一个 TLP ^艮文 时,该节点接收该 TLP报文并需要将该 TLP报文存放于本地全局緩存池 中。
在本发明实施例中, TLP报文包括: Posted TLP报文、 Non-Posted TLP 报文和 Completion TLP报文三种。 可选地, 在系统初始化时, 上述节点 根据 TLP报文所属的类型, 为该类型的 TLP报文分配两个緩存空间: 报 文头緩存空间和报文数据緩存空间。上述节点根据报文头緩存空间大小、 报文数据緩存空间大小、 缺省的报文头长度和缺省的报文数据长度计算 该类型的 TLP报文的额度。 其中, 报文头的额度等于报文头緩存空间大 小除以缺省的报文头长度, 报文数据的额度等于报文数据緩存空间大小 除以缺省的报文数据长度, 且报文头的额度等于报文数据的额度。 上述 节点将该系统初始化时的报文头的额度和报文数据的额度发送给该节点 的上级节点。 该节点的上级节点根据这两个额度向该节点发送相应类型 的 TLP ^艮文。 每一次发送一个该类型的 TLP ^艮文, 该节点的上级节点就 对这两个额度进行减一处理, 直到额度为零或额度被刷新, 其中, 额度 被刷新是指重新获得该节点反馈的该类型的 TLP报文的报文头的额度和 报文数据的额度。
在其它时刻, 该节点的上级节点向该节点发送当前需要传输的 TLP 报文的报文信息, 该节点根据上述 TLP报文的报文信息以及上述全局緩 存池中用于緩存上述 TLP报文的剩余緩存空间,获取上述 TLP报文的报 文头緩存额度量和报文数据额度量。 可选地, 上述报文信息包括: 报文 头长度和报文数据长度, 则, 上述 TLP报文的报文头緩存额度量等于上 述剩余报文头緩存空间除以上述 TLP报文的报文头长度,上述 TLP报文 的报文数据緩存额度量等于上述剩余报文数据緩存空间除以上述 TLP报 文的报文数据长度。 若上述 TLP 报文的报文头緩存额度量与报文数据緩存额度量不相 等, 则进入步骤 203和 204。
203、 根据上述 TLP报文的报文信息和上述全局緩存池的全部剩余 緩存空间, 获取上述 TLP报文的额度;
其中, 上述额度用于指示当前上述全局緩存池中能够存放的上述 TLP报文的报文数量。
本发明实施例中, 当报文头緩存额度量与报文数据緩存额度量不相 等, 说明剩余报文头緩存空间所能存放的报文头的数量与剩余报文数据 緩存所能存放的报文数据的数据不相等, 如果节点持续緩存相同长度的 这种 TLP报文, 其报文头緩存空间或报文数据緩存空间会成为报文緩存 机制的短板, 导致緩存资源的浪费, 因此, 回收用于緩存该 TLP报文的 剩余报文头緩存空间和剩余报文数据緩存至全局緩存池, 再统一调度緩 存空间, 调度目标是使得重新分配的报文头緩存空间所能存放的该 TLP 报文的报文头的数量与重新分配的报文数据緩存空间所能存放的该 TLP 报文的报文数据的数量相等, 从而合理利用緩存资源。
由于需要保证报文头的额度等于报文数据的额度, 因此, 可选地, 将上述全局緩存池的全部剩余緩存空间除以上述 TLP报文的报文长度, 获得上述 TLP报文的额度, 其中, 上述 TLP报文的报文长度等于上述 TLP报文的报文头长度和报文数据长度之和。
204、 向节点的上级节点反馈上述 TLP报文的额度;
在步骤 203 获取节点的上级节点当前需要传输的 TLP 报文的额度 后, 节点向其上级节点反馈上述当前需要传输的 TLP报文的额度, 以便 该上级节点在上述额度指示的报文数量范围内向该节点传输上述 TLP报 文。
可选地,反馈上述 TLP报文的额度记载于数据链路层信息包( DLLP, Data Link Layer Packet ) 才艮文中。
可选地, 在步骤 203获得上述 TLP报文的额度之后, 根据上述 TLP 报文的报文信息和上述 TLP报文的额度, 将上述全局緩存池的全部剩余 緩存空间划分为上述 TLP报文的报文头緩存空间和报文数据緩存空间, 其中, 上述 TLP报文的报文头緩存空间和报文数据緩存空间分别用于存 储上述 TLP报文的报文头和报文数据。
其中,新的上述 TLP报文的报文头緩存空间可以等于上述 TLP报文 的报文头长度乘以步骤 203获得的上述 TLP报文的额度, 新的上述 TLP 报文的报文数据緩存大小可以等于上述 TLP报文的报文数据长度乘以步 骤 203获得的上述 TLP报文的额度。
由上可见, 本发明实施例中在 PCI-E 系统中的节点中设置至少一个 全局緩存池, 当需要传输某一种传输层数据报文时, 判断全局緩存池中 的剩余报文头緩存空间能够存放该传输层数据报文的报文头的数量, 与 全局緩存池中的剩余报文数据緩存空间能够存放该传输层数据报文的报 文数据的数量是否相等, 若该判断结果为否, 则根据算法重新分配报文 头緩存空间和报文数据緩存空间, 使得报文头緩存空间能够存放的报文 头的数量与报文数据緩存空间能够存放的报文数据的数量相等, 从而解 决了緩存资源浪费的问题, 提高緩存空间的利用率。
PCI-E总线上一个完整的传输过程通常包括多个 ΊΧΡ ·^文, 在这多 个 TLP报文中, 每个 TLP报文之间存在一定的联系, 例如, 一个完整的 存储器读操作由存储器读请求 TLP报文和存储器读完成 TLP报文组成。 根据传输特性分类, TLP报文分为三类: Posted TLP报文、 Non-Posted TLP 报文和 Completion TLP报文。报文头緩存包括 Posted TLP报文头緩存(即 PH緩存)、 Non-Posted TLP报文头緩存(即 NPH緩存)和 Completion TLP 报文头緩存 (即 CplH緩存) , 报文数据緩存包括 Posted TLP报文数据 緩存 (即 PD緩存 ) 、 Non-Posted TLP报文数据緩存 (即 NPD緩存 ) 和 Completion TLP报文数据緩存 (即 CplD緩存 ) 。
这三类 TLP报文在进行传输时需要使用不同的緩存。 緩存由多个单 元组成, 每个单元的大小与緩存的类型相关, 具体关系请参见下表 1。 表 1
Figure imgf000014_0001
PCI-E总线规范将这些緩存使用的单元统称为 Flow Control Unit (即 FC Unit ) 。 因此, 在图 2所示实施例中, 步骤 201获取的 ^艮文信息还包 括报文类型, 在步骤 202之前, 节点需要根据报文信息中的报文类型确 定 TLP报文的类型, 若 TLP报文为 Posted TLP报文, 则在步骤 202中, 根据步骤 201获取的 Posted TLP报文的报文信息和上述全局緩存池中用 于緩存 Posted TLP报文的剩余緩存空间, 获取 Posted TLP报文的报文头 緩存额度量和报文数据额度量, 在步骤 203中, 根据 Posted TLP报文的 报文信息和上述全局緩存池的全部剩余緩存空间, 获取 Posted TLP报文 的额度; 若 TLP报文为 Non-Posted TLP报文, 则在步骤 202中, 根据步 骤 201获取的 Non-Posted TLP报文的报文信息和上述全局緩存池中用于 緩存 Non-Posted TLP报文的剩余緩存空间,获取 Non-Posted TLP报文的 报文头緩存额度量和报文数据额度量, 在步骤 203 中, 根据 Non-Posted TLP 报文的报文信息和上述全局緩存池的全部剩余緩存空间, 获取 Non-Posted TLP报文的额度; 若 TLP报文为 Completion TLP报文, 则在 步骤 202中, 根据步骤 201获取的 Completion TLP报文的报文信息和上 述全局緩存池中用于緩存 Completion TLP 报文的剩余緩存空间, 获取 Completion TLP报文的报文头緩存额度量和报文数据额度量,在步骤 203 中, 根据 Completion TLP报文的报文信息和上述全局緩存池的全部剩余 緩存空间, 获取 Completion TLP报文的额度。
本发明实施例还提供了一种全局緩存池的结构, 请参见图 3 , 在节 点中, 原有的六种緩存类型 Posted TLP报文头緩存、 Posted TLP报文数 据緩存、 Non-Posted TLP报文头緩存、 Non-Posted TLP报文数据緩存、 Completion TLP才艮文头緩存和 Completion TLP才艮文数据緩存通过多进多 出连接技术从全局緩存池中获取緩存资源, 从而实现报文头緩存和报文 数据緩存的统一、 灵活调度。 具体地, 全局緩存池釆用多分组 ( Multi-Bank ) 技术进行设计, 设计的全局緩存池包括 6读 6写端口。
下面以 Posted TLP报文为例, 对本发明实施例中的流量控制方法进 行描述, 请参见图 4 , 本发明实施例中的流量控制方法, 包括:
401、 获取节点的上级节点当前需要传输的 TLP报文的报文信息; 本发明实施例中, 假设节点的上级节点向该节点发送的 TLP报文为
Posted TLP报文, 该节点可从获取到的报文信息中确定出该 TLP报文为 Posted TLP才艮文。
402、 节点计算 Posted TLP报文头緩存额度量和 Posted TLP报文数 据緩存额度量;
其中, Posted TLP报文头緩存额度量等于全局緩存池中 Posted TLP 报文的剩余报文头緩存空间除以 Posted TLP报文的报文头长度。
Posted TLP报文数据緩存额度量等于全局緩存池中 Posted TLP报文 的剩余报文数据緩存空间除以 Posted TLP报文的报文数据长度。
403、 判断 Posted TLP报文头緩存额度量与 Posted TLP报文数据緩 存额度量是否相等。
若相等, 则执行步骤 404 , 若不相等, 则执行步骤 405。
404、 不进行任何操作。
405、 节点回收剩余的 Posted TLP报文头緩存空间和剩余的 Posted TLP报文数据緩存空间至全局緩存池。 假设全局緩存池的原来容量为 S , 则回收剩余的 Posted TLP报文头 緩存空间 H和剩余的 Posted TLP报文数据緩存空间 D至全局緩存池,回 收后的全局緩存池容量为: S+H+D。
406、 根据上述 Posted TLP报文的报文信息和上述全局緩存池的全 部剩余緩存空间, 获取上述 Posted TLP报文的额度;
殳设上述 Posted TLP才艮文的额度为 s , 则 s= ( S+H+D ) ÷ ( h+d ) , 其中, h为上述 Posted TLP报文的报文头长度, d为上述 Posted TLP报 文的报文数据长度。
407、 节点分配新的 Posted TLP 4艮文头緩存空间;
其中, 新的 Posted TLP报文头緩存空间等于 Posted TLP报文头长度 乘以上述 Posted TLP 4艮文的额度。
假设新的 Posted TLP报文头緩存空间为 H— new, 则 H— new=hxs。 408、 节点分配新的 Posted TLP报文数据緩存空间;
其中, 新的 Posted TLP报文数据緩存空间等于 Posted TLP报文数据 长度乘以上述 Posted TLP 4艮文的额度。
假设新的 Posted TLP报文数据緩存空间为 D— new, 则 D— new=dxs。 409、 向节点的上级节点反馈上述 Posted TLP报文的额度。
在本实施例中, 对于 Posted TLP报文, 判断 Posted TLP报文头緩存 能够存放 Posted TLP报文头的数量与 Posted TLP报文数据緩存能够存放 Posted TLP报文数据的数量是否相等, 若判断结果为否, 则根据算法重 新分配 Posted TLP报文头緩存空间和 Posted TLP报文数据緩存空间,使 得 Posted TLP 报文头緩存空间能够存放 Posted TLP 报文头的数量与 Posted TLP报文数据緩存空间能够存放 Posted TLP报文数据的数量相 等, 提高緩存资源的利用率。 本发明实施例还提供了一种流量控制设备, 应用于 PCI-E系统中, 其中, 上述 PCI-E系统中的节点包含至少一个全局緩存池, 请参见图 5 , 本发明实施例中的流量控制设备 500 , 包括:
第一获取单元 501、 第二获取单元 502、 判断单元 503、 第三获取单 元 504和反馈单元 505。
其中, 第一获取单元 501 , 用于获取节点的上级节点当前需要传输 的传输层数据报文的报文信息。
第二获取单元 502 , 用于根据第一获取单元 501获取的上述 TLP报 文的报文信息, 以及上述全局緩存池中用于緩存上述 TLP报文的剩余緩 存空间,获取上述 TLP报文的报文头緩存额度量和报文数据緩存额度量, 其中, 上述剩余緩存空间包括: 用于緩存上述 TLP报文的报文头的剩余 报文头緩存空间, 以及用于緩存上述 TLP报文的报文数据的剩余报文数 据緩存空间, 上述报文头緩存额度量用于指示上述剩余报文头緩存空间 能够緩存上述报文头的数量, 上述报文数据緩存额度量用于指示上述剩 余报文数据緩存空间能够緩存上述报文数据的数量。
判断单元 503 , 用于判断第二获取单元 502获取的上述 TLP报文的 报文头緩存额度量和报文数据緩存额度量是否相等。
第三获取单元 504 , 用于当判断单元 503 的判断结果为是时, 根据 上述 TLP报文的报文信息和上述全局緩存池的全部剩余緩存空间, 获取 上述 TLP报文的额度, 其中, 上述额度用于指示当前上述全局緩存池中 能够存放的上述 TLP报文的报文数量。
反馈单元 505 , 用于向上述上级节点反馈第三获取单元 504获取的 上述 TLP ^艮文的额度。
可选地, 第一获取单元 501 获得的报文信息包括: 报文头长度和报 文数据长度; 则第二获取单元 502具体用于: 将上述剩余报文头緩存空 间除以上述 TLP报文的报文头长度,获得上述 TLP报文的报文头緩存额 度量;将上述剩余报文数据緩存空间除以上述 TLP报文的报文数据长度, 获得上述 TLP报文的报文数据緩存额度量。
可选地, 第三获取单元 504具体用于: 将上述全局緩存池的全部剩 余緩存空间除以上述 TLP报文的报文长度, 获得上述 TLP报文的额度, 其中,上述 TLP报文的报文长度等于上述 TLP报文的报文头长度和报文 数据长度之和。
可选地, 在图 5所示实施例的基础上, 如图 6所示, 流量控制设备 600还包括: 緩存划分单元 506 , 用于根据第一获取单元 501获得的上述 TLP报文的报文信息, 以及第三获取单元 504获得的上述 TLP的额度, 将上述全局緩存池的全部剩余緩存空间划分为上述 TLP报文的报文头緩 存空间和报文数据緩存空间, 其中, 上述 TLP报文的报文头緩存空间和 报文数据緩存空间分别用于存储上述 TLP报文的报文头和报文数据。
需要说明的是, 本发明实施例中的流量控制设备可以为 PCI-E总线 上的一个节点, 或者, 也可以为 PCI-E总线上独立于节点的装置, 此处 不作限定。
需要说明的是, 本发明实施例中的流量控制设备 500和流量控制设 备 600可以用于实现上述方法实施例中的全部技术方案, 其各个功能模 块的功能可以根据上述方法实施例中的方法具体实现, 其具体实现过程 可参照上述方法实施例中的相关描述, 此处不再赘述。
由上可见, 本发明实施例中在 PCI-E 系统中的节点中设置至少一个 全局緩存池, 当需要向该节点传输某一种传输层数据报文时, 流量控制 设备判断该节点的全局緩存池中的剩余报文头緩存空间能够存放该传输 层数据报文的报文头的数量, 与全局緩存池中的剩余报文数据緩存空间 能够存放该传输层数据报文的报文数据的数量是否相等, 若该判断结果 为否, 则根据算法重新分配报文头緩存空间和报文数据緩存空间, 使得 报文头緩存空间能够存放的报文头的数量与报文数据緩存空间能够存放 的报文数据的数量相等, 从而解决了緩存资源浪费的问题, 提高緩存空 间的利用率。
本发明实施例还提供了另一种流量控制设备,应用于 PCI-E系统中, 其中, 上述 PCI-E系统中的节点包含至少一个全局緩存池, 请参见图 7 , 本发明实施例中的流量控制设备 700 , 包括:
输入装置 701、 输出装置 702、 存储器 703 以及处理器 704 (流量控 制设备的处理器 704的数量可以是一个或者多个, 图 7以一个处理器为 例) 。 在本发明的一些实施例中, 输入装置 701、 输出装置 702、 存储器 703 以及处理器 704 可以通过总线或其它方式连接, 如图 8所示以通过 总线连接为例。 其中, 存储器 703 中用来储存从输入装置 701输入的数 据,且还可以储存处理器 704处理数据的必要文件等信息; 输入装置 701 和输出装置 702可以包括设备 700与其他设备通信的端口, 且还可以包 括设备 700外接的输出设备比如显示器、 键盘、 鼠标和打印机等, 具体 地输入装置 701 可以包括鼠标和键盘等, 而输出装置 702可以包括显示 器等, 在本实施例中输入装置 801和输出装置 802中与其他设备通信的 端口可以为天线。
本发明实施例中的处理器 704用于:
通过输入装置 701 获取上述节点的上级节点当前需要传输的传输层 数据报文的报文信息;
根据获取的上述 TLP报文的报文信息以及上述全局緩存池中用于緩 存上述 TLP报文的剩余緩存空间,获取上述 TLP报文的报文头緩存额度 量和报文数据緩存额度量, 其中, 上述剩余緩存空间包括: 用于緩存上 述 TLP报文的报文头的剩余报文头緩存空间,以及用于緩存上述 TLP报 文的报文数据的剩余报文数据緩存空间, 上述报文头緩存额度量用于指 示上述剩余报文头緩存空间能够緩存上述报文头的数量, 上述报文数据 緩存额度量用于指示上述剩余报文数据緩存空间能够緩存上述报文数据 的数量;
若上述 TLP报文的报文头緩存额度量与上述报文数据緩存额度量不 相等, 则: 根据上述 TLP报文的报文信息和上述全局緩存池的全部剩余 緩存空间, 获取上述 TLP报文的额度, 其中, 上述额度用于指示当前上 述全局緩存池中能够存放的上述 TLP报文的报文数量; 通过输出装置 702向上述上级节点反馈上述 TLP报文的额度, 以便 上述上级节点在上述额度指示的报文数量范围内向上述节点传输上述 TLP才艮文。
可选地, 上述报文信息包括: 报文头长度和报文数据长度; 处理器 704具体用于: 将上述剩余报文头緩存空间除以上述 TLP报文的报文头 长度, 获得上述 TLP报文的报文头緩存额度量; 将上述剩余报文数据緩 存空间除以上述 TLP报文的报文数据长度,获得上述 TLP报文的报文数 据緩存额度量。
可选地, 处理器 704具体用于: 将上述全局緩存池的全部剩余緩存 空间除以上述 TLP报文的报文长度, 获得上述 TLP报文的额度, 其中, 上述 TLP报文的报文长度等于上述 TLP报文的报文头长度和报文数据长 度之和。
可选地, 处理器 704还用于: 根据上述 TLP报文的报文信息和上述 TLP 报文的额度, 将上述全局緩存池的全部剩余緩存空间划分为上述 TLP报文的报文头緩存空间和报文数据緩存空间, 其中, 上述 TLP报文 的报文头緩存空间和报文数据緩存空间分别用于存储上述 TLP报文的报 文头和报文数据。
需要说明的是, 本发明实施例中的流量控制设备可以为 PCI-E总线 上的一个节点, 或者, 也可以为 PCI-E总线上独立于节点的装置, 此处 不作限定。
需要说明的是, 本发明实施例中的流量控制设备 700可以用于实现 上述方法实施例中的全部技术方案, 其各个功能模块的功能可以根据上 述方法实施例中的方法具体实现, 其具体实现过程可参照上述方法实施 例中的相关描述, 此处不再赘述。
由上可见, 本发明实施例中在 PCI-E 系统中的节点中设置至少一个 全局緩存池, 当需要向该节点传输某一种传输层数据报文时, 流量控制 设备判断该节点的全局緩存池中的剩余报文头緩存空间能够存放该传输 层数据报文的报文头的数量, 与全局緩存池中的剩余报文数据緩存空间 能够存放该传输层数据报文的报文数据的数量是否相等, 若该判断结果 为否, 则根据算法重新分配报文头緩存空间和报文数据緩存空间, 使得 报文头緩存空间能够存放的报文头的数量与报文数据緩存空间能够存放 的报文数据的数量相等, 从而解决了緩存资源浪费的问题, 提高緩存空 间的利用率。
本发明第六实施例将对一种流量控制系统进行说明, 该流量控制系 统应用于 PCI-E系统中, 请参阅图 8 , 本发明实施例中的流量控制系统, 包括:
PCI-E总线上的第一节点 801和第二节点 802。
其中, 第一节点 801与第二节点 802通信连接。
第一节点 801为第二节点 802的上级节点, 第一节点 801用于向第 二节点 802发送 TLP ^艮文。
第二节点 802 为所实现的功能如同前面实施例上述的流量控制设 备, 具体地, 对第二节点 802的描述请参见前面实施例的相关记载, 此 处不再赘述。
需要说明的是, 对于前述的各方法实施例, 为了简便描述, 故将其 都表述为一系列的动作组合, 但是本领域技术人员应该知悉, 本发明并 不受所描述的动作顺序的限制, 因为依据本发明, 某些步骤可以釆用其 它顺序或者同时进行。 其次, 本领域技术人员也应该知悉, 说明书中所 描述的实施例均属于优选实施例, 所涉及的动作和模块并不一定都是本 发明所必须的。
在上述实施例中, 对各个实施例的描述都各有侧重, 某个实施例中 没有详述的部分, 可以参见其它实施例的相关描述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分 步骤是可以通过程序来指令相关的硬件完成, 所述的程序可以存储于一 种计算机可读存储介质中, 上述提到的存储介质可以是只读存储器, 磁 盘或光盘等。
以上对本发明所提供的一种应用于 PCI-E的流量控制方法、 设备及 系统进行了详细介绍, 对于本领域的一般技术人员, 依据本发明实施例 的思想, 在具体实施方式及应用范围上均会有改变之处, 综上所述, 本 说明书内容不应理解为对本发明的限制。

Claims

权 利 要求 书
1、 一种流量控制方法, 应用于快捷外设互联标准 PCI-E系统中, 其特征在 于, 所述 PCI-E 系统中的节点包含至少一个全局緩存池, 其中, 所述流量控制 方法, 包括:
获取所述节点的上级节点当前需要传输的传输层数据报文的报文信息; 根据所述传输层数据报文的报文信息以及所述全局緩存池中用于緩存所述 传输层数据报文的剩余緩存空间, 获取所述传输层数据报文的报文头緩存额度 量和报文数据緩存额度量, 其中, 所述剩余緩存空间包括: 用于緩存所述传输 层数据报文的报文头的剩余报文头緩存空间, 以及用于緩存所述传输层数据报 文的报文数据的剩余报文数据緩存空间, 所述报文头緩存额度量用于指示所述 剩余报文头緩存空间能够緩存所述报文头的数量, 所述报文数据緩存额度量用 于指示所述剩余报文数据緩存空间能够緩存所述报文数据的数量;
若所述传输层数据报文的报文头緩存额度量与所述报文数据緩存额度量不 相等, 则:
根据所述传输层数据报文的报文信息和所述全局緩存池的全部剩余緩存空 间, 获取所述传输层数据报文的额度, 其中, 所述额度用于指示当前所述全局 緩存池中能够存放的所述传输层数据报文的报文数量;
向所述上级节点反馈所述传输层数据报文的额度, 以便所述上级节点在所 述额度指示的报文数量范围内向所述节点传输所述传输层数据报文。
2、 根据权利要求 1所述的方法, 其特征在于,
所述报文信息包括: 报文头长度和报文数据长度;
所述获取所述传输层数据报文的报文头緩存额度量和报文数据緩存额度 量, 包括:
将所述剩余报文头緩存空间除以所述传输层数据报文的报文头长度, 获得 所述传输层数据报文的报文头緩存额度量;
将所述剩余报文数据緩存空间除以所述传输层数据报文的报文数据长度, 获得所述传输层数据报文的报文数据緩存额度量。
3、 根据权利要求 2所述的方法, 其特征在于,
所述获取所述传输层数据报文的额度, 包括:
将所述全局緩存池的全部剩余緩存空间除以所述传输层数据报文的报文长 度, 获得所述传输层数据报文的额度, 其中, 所述传输层数据报文的报文长度 等于所述传输层数据报文的报文头长度和报文数据长度之和。
4、 根据权利要求 1至 3任一项所述的方法, 其特征在于,
所述获取所述传输层数据报文的额度之后, 还包括:
根据所述传输层数据报文的报文信息和所述传输层数据报文的额度, 将所 述全局緩存池的全部剩余緩存空间划分为所述传输层数据报文的报文头緩存空 间和报文数据緩存空间, 其中, 所述传输层数据报文的报文头緩存空间和报文 数据緩存空间分别用于存储所述传输层数据报文的报文头和报文数据。
5、 根据权利要求 1至 4任一项所述的方法, 其特征在于,
所述传输层数据报文具体包括如下任一种:
Posted TLP才艮文;
Non-Posted TLP报文;
Completion TLP才艮文。
6、 一种流量控制设备, 应用于快捷外设互联标准 PCI-E系统中, 其特征在 于, 所述 PCI-E 系统中的节点包含至少一个全局緩存池, 其中, 所述流量控制 设备, 其特征在于, 包括:
第一获取单元, 用于获取所述节点的上级节点当前需要传输的传输层数据 报文的报文信息;
第二获取单元, 用于根据所述第一获取单元获取的所述传输层数据报文的 报文信息, 以及所述全局緩存池中用于緩存所述传输层数据报文的剩余緩存空 间, 获取所述传输层数据报文的报文头緩存额度量和报文数据緩存额度量, 其 中, 所述剩余緩存空间包括: 用于緩存所述传输层数据报文的报文头的剩余报 緩存空间, 所述报文头緩存额度量用于指示所述剩余报文头緩存空间能够緩存 所述报文头的数量, 所述报文数据緩存额度量用于指示所述剩余报文数据緩存 空间能够緩存所述报文数据的数量;
判断单元, 用于判断第二获取单元获取的所述传输层数据报文的报文头緩 存额度量和报文数据緩存额度量是否相等;
第三获取单元, 用于当所述判断单元的判断结果为是时, 根据所述传输层 数据报文的报文信息和所述全局緩存池的全部剩余緩存空间, 获取所述传输层 数据报文的额度, 其中, 所述额度用于指示当前所述全局緩存池中能够存放的 所述传输层数据报文的报文数量;
反馈单元, 用于向所述上级节点反馈所述第三获取单元获取的所述传输层 数据报文的额度。
7、 根据权利要求 6所述的流量控制设备, 其特征在于,
所述第一获取单元获得的报文信息包括: 报文头长度和报文数据长度; 所述第二获取单元具体用于: 将所述剩余报文头緩存空间除以所述传输层 数据报文的报文头长度, 获得所述传输层数据报文的报文头緩存额度量; 将所 述剩余报文数据緩存空间除以所述传输层数据报文的报文数据长度, 获得所述 传输层数据报文的报文数据緩存额度量。
8、 根据权利要求 7所述的流量控制设备, 其特征在于,
所述第三获取单元具体用于: 将所述全局緩存池的全部剩余緩存空间除以 所述传输层数据报文的报文长度, 获得所述传输层数据报文的额度, 其中, 所 述传输层数据报文的报文长度等于所述传输层数据报文的报文头长度和报文数 据长度之和。
9、 根据权利要求 6至 8任一项所述的流量控制设备, 其特征在于, 所述流量控制设备还包括:
緩存划分单元, 用于根据所述第一获取单元获得的所述传输层数据报文的 报文信息, 以及所述第三获取单元获得的所述传输层数据报文的额度, 将所述 全局緩存池的全部剩余緩存空间划分为所述传输层数据报文的报文头緩存空间 和报文数据緩存空间, 其中, 所述传输层数据报文的报文头緩存空间和报文数 据緩存空间分别用于存储所述传输层数据报文的报文头和报文数据。
10、 根据权利要求 6至 9任一项所述的流量控制设备, 其特征在于, 所述流量控制设备为所述快捷外设互联标准系统中的节点。
11、 一种流量控制设备, 应用于快捷外设互联标准 PCI-E 系统中, 其特征 在于, 所述 PCI-E 系统中的节点包含至少一个全局緩存池, 其中, 所述流量控 制设备, 包括: 输入装置、 输出装置和处理器, 其中,
所述处理器用于:
通过所述输入装置获取所述节点的上级节点当前需要传输的传输层数据报 文的报文信息; 根据获取的所述传输层数据报文的报文信息以及所述全局緩存池中用于緩 存所述传输层数据报文的剩余緩存空间, 获取所述传输层数据报文的报文头緩 存额度量和报文数据緩存额度量, 其中, 所述剩余緩存空间包括: 用于緩存所 述传输层数据报文的报文头的剩余报文头緩存空间, 以及用于緩存所述传输层 数据报文的报文数据的剩余报文数据緩存空间, 所述报文头緩存额度量用于指 示所述剩余报文头緩存空间能够緩存所述报文头的数量, 所述报文数据緩存额 度量用于指示所述剩余报文数据緩存空间能够緩存所述报文数据的数量;
若所述传输层数据报文的报文头緩存额度量与所述报文数据緩存额度量不 相等, 则: 根据所述传输层数据报文的报文信息和所述全局緩存池的全部剩余 緩存空间, 获取所述传输层数据报文的额度, 其中, 所述额度用于指示当前所 述全局緩存池中能够存放的所述传输层数据报文的报文数量;
通过所述输出装置向所述上级节点反馈所述传输层数据报文的额度, 以便 所述上级节点在所述额度指示的报文数量范围内向所述节点传输所述传输层数 据报文。
12、 根据权利要求 11所述的流量控制设备, 其特征在于,
所述报文信息包括: 报文头长度和报文数据长度;
所述处理器具体用于: 将所述剩余报文头緩存空间除以所述传输层数据报 文的报文头长度, 获得所述传输层数据报文的报文头緩存额度量; 将所述剩余 报文数据緩存空间除以所述传输层数据报文的报文数据长度, 获得所述传输层 数据报文的报文数据緩存额度量。
13、 根据权利要求 12所述的流量控制设备, 其特征在于,
所述处理器具体用于: 将所述全局緩存池的全部剩余緩存空间除以所述传 输层数据报文的报文长度, 获得所述传输层数据报文的额度, 其中, 所述传输 层数据报文的报文长度等于所述传输层数据报文的报文头长度和报文数据长度 之和。
14、 根据权利要求 11至 13任一项所述的流量控制设备, 其特征在于, 所述处理器还用于:
根据所述传输层数据报文的报文信息和所述传输层数据报文的额度, 将所 述全局緩存池的全部剩余緩存空间划分为所述传输层数据报文的报文头緩存空 间和报文数据緩存空间, 其中, 所述传输层数据报文的报文头緩存空间和报文 数据緩存空间分别用于存储所述传输层数据报文的报文头和报文数据。
15、 根据权利要求 11至 14任一项所述的流量控制设备, 其特征在于, 所述流量控制设备为所述快捷外设互联标准系统中的节点。
16、 一种流量控制系统, 应用于快捷外设互联标准 PCI-E 系统中, 其特征 在于, 所述流量控制系统包括: PCI-E总线上的第一节点和第二节点;
其中, 所述第一节点为所述第二节点的上级节点, 所述第二节点包含至少 一个全局緩存池;
所述第一节点用于向所述第二节点发送传输层数据报文;
所述第二节点用于: 获取所述第一节点当前需要传输的传输层数据报文的 报文信息; 根据所述传输层数据报文的报文信息以及所述全局緩存池中用于緩 存所述传输层数据报文的剩余緩存空间, 获取所述传输层数据报文的报文头緩 存额度量和报文数据緩存额度量, 其中, 所述剩余緩存空间包括: 用于緩存所 述传输层数据报文的报文头的剩余报文头緩存空间, 以及用于緩存所述传输层 数据报文的报文数据的剩余报文数据緩存空间, 所述报文头緩存额度量用于指 示所述剩余报文头緩存空间能够緩存所述报文头的数量, 所述报文数据緩存额 度量用于指示所述剩余报文数据緩存空间能够緩存所述报文数据的数量; 若所 述传输层数据报文的报文头緩存额度量与所述报文数据緩存额度量不相等, 则: 根据所述传输层数据报文的报文信息和所述全局緩存池的全部剩余緩存空间, 获取所述传输层数据报文的额度, 其中, 所述额度用于指示当前所述全局緩存 池中能够存放的所述传输层数据报文的报文数量; 向所述第一节点反馈所述传 输层数据报文的额度, 以便所述上级节点在所述额度指示的报文数量范围内向 所述节点传输所述传输层数据报文。
PCT/CN2014/083871 2013-08-15 2014-08-07 一种应用于pci-e的流量控制方法、设备及系统 WO2015021878A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310356787.0 2013-08-15
CN201310356787.0A CN104375967B (zh) 2013-08-15 2013-08-15 一种应用于pci‑e的流量控制方法、设备及系统

Publications (1)

Publication Number Publication Date
WO2015021878A1 true WO2015021878A1 (zh) 2015-02-19

Family

ID=52468036

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/083871 WO2015021878A1 (zh) 2013-08-15 2014-08-07 一种应用于pci-e的流量控制方法、设备及系统

Country Status (2)

Country Link
CN (1) CN104375967B (zh)
WO (1) WO2015021878A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726298B (zh) * 2019-03-19 2024-04-09 华为技术有限公司 一种额度请求方法和通信装置
CN110417812B (zh) * 2019-08-23 2021-11-23 极芯通讯技术(南京)有限公司 5g协议报文处理器架构及5g协议报文处理方法
WO2021142679A1 (zh) * 2020-01-15 2021-07-22 华为技术有限公司 一种数据流量控制方法、PCIe控制器及PCIe装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1700673A (zh) * 2004-05-20 2005-11-23 株式会社东芝 数据处理设备和流控制方法
CN101689171A (zh) * 2007-07-06 2010-03-31 惠普开发有限公司 网络中的端到端流控制
US20110219139A1 (en) * 2010-03-08 2011-09-08 International Business Machines Corporation Using end-to-end credit flow control to reduce number of virtual lanes implemented at link and switch layers

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7827325B2 (en) * 2007-10-31 2010-11-02 International Business Machines Corporation Device, system, and method of speculative packet transmission
US7869356B2 (en) * 2007-12-18 2011-01-11 Plx Technology, Inc. Dynamic buffer pool in PCIExpress switches

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1700673A (zh) * 2004-05-20 2005-11-23 株式会社东芝 数据处理设备和流控制方法
CN101689171A (zh) * 2007-07-06 2010-03-31 惠普开发有限公司 网络中的端到端流控制
US20110219139A1 (en) * 2010-03-08 2011-09-08 International Business Machines Corporation Using end-to-end credit flow control to reduce number of virtual lanes implemented at link and switch layers

Also Published As

Publication number Publication date
CN104375967B (zh) 2017-09-05
CN104375967A (zh) 2015-02-25

Similar Documents

Publication Publication Date Title
US11916781B2 (en) System and method for facilitating efficient utilization of an output buffer in a network interface controller (NIC)
US11023411B2 (en) Programmed input/output mode
US7908372B2 (en) Token based flow control for data communication
TWI430102B (zh) 網路卡資源配置方法、儲存媒體、及電腦
US9253287B2 (en) Speculation based approach for reliable message communications
CN105812287B (zh) 分组交换网络中的有效电路
US10757031B2 (en) Technologies for aligning network flows to processing resources
JP2019503123A (ja) マルチパス転送設計
US20190044879A1 (en) Technologies for reordering network packets on egress
TWI547870B (zh) 用於在多節點環境中對i/o 存取排序的方法和系統
TW201543218A (zh) 具有多節點連接的多核網路處理器互連之晶片元件與方法
US20190045028A1 (en) Technologies for end-to-end quality of service deadline-aware i/o scheduling
JP2016531372A (ja) メモリモジュールアクセス方法および装置
WO2015021878A1 (zh) 一种应用于pci-e的流量控制方法、设备及系统
CN104486442A (zh) 分布式存储系统的数据传输方法、装置
CN116868553A (zh) 用于管理端点资源和拥塞缓解的数据中心网络上的动态网络接收器驱动的数据调度
WO2014101502A1 (zh) 基于内存芯片互连的内存访问处理方法、内存芯片及系统
US10523741B2 (en) System and method for avoiding proxy connection latency
US20190044872A1 (en) Technologies for targeted flow control recovery
US20190050274A1 (en) Technologies for synchronizing triggered operations
JP6618330B2 (ja) 通信装置及びその方法、コンピュータプログラム
US9936003B1 (en) Method and system for transmitting information in a network
Luo et al. An efficient and reliable retransmission mechanism for on-chip network of many-core processor
JP2012205142A (ja) データ転送装置、データ転送方法および情報処理装置
CN117785762A (zh) 一种信息存储方法、装置、设备和存储介质

Legal Events

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

Ref document number: 14836053

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

Country of ref document: EP

Kind code of ref document: A1