Credit Management When Resource Granularity is Larger than Credit Granularity
AssigneeApple Inc.
InventorsJames Wang, Zongjian Chen
Life of this patent
Estimating the term…
Abstract
In one embodiment, a receiver on a credit-based flow-controlled interface is configured to free one or more data credits early when a data payload is received that incurs fewer unused data credits within a buffer memory that is allocated at a coarser granularity than the data credits. In another embodiment, header credits and data credits are dynamically adjusted based on actual packet data payload sizes.
Claims21
An apparatus comprising:
- a receiver comprising a credit management unit configured to manage flow control credits for an interface to which the receiver is coupled during use, wherein each packet received on the interface comprises a packet header and optionally packet data, and wherein the packet data is measured in terms of data credits in the flow control credits dependent on a size of the packet data, wherein each data credit represents a fixed number of data bytes;
- and
- a buffer memory coupled to the receiver and configured to store packet headers and packet data corresponding to packets that are received on the interface by the receiver, wherein the buffer memory is allocable by the receiver in buffer units which are N times the size of the data credit, wherein N is an integer greater than one;
- and
- wherein a total number of data credits is equal to N times a number of buffer units in the buffer memory that are available to store packet data, and wherein the credit management unit is configured to reserve a plurality of the total data credits based on a maximum number of data credits that are unusable if packet data does not fill a buffer unit and further based on a number of packets that are permitted to be in flight concurrently, and wherein the credit management unit is configured to free one or more data credits in response to receiving packet data for a given packet that incurs fewer than the maximum number of unusable data credits, wherein the credit management unit is configured to free the one or more data credits prior to the given packet being consumed.
A method comprising:
- receiving a packet from an interface, wherein the packet comprises packet data that consumes one or more data credits at a transmitter on the interface based on a size of the packet data, wherein each data credit represents a fixed number of data bytes;
- storing the packet data in a buffer memory, wherein the buffer memory is allocable to store packet data in buffer units which are N times the size of the data credit, wherein N is an integer greater than one, and wherein up to N-1 data credits are unusable responsive to the packet data not filling a buffer unit allocated to store the packet data;
- and
- responsive to receiving the packet and prior to the packet being consumed, determining that the packet data incurs fewer than N-1 unusable data credits, and freeing one or more data credits that are useable responsive to the determining.
An apparatus comprising:
- a receiver comprising a credit management unit configured to manage flow control credits for an interface to which the receiver is coupled during use, wherein each packet received on the interface comprises a header and optionally data, and wherein the header is measured in terms of one or more header credits for flow control on the interface, and wherein data is measured in terms of one or more data credits for flow control on the interface, each data credit representing a fixed number of data bytes;
- and
- a buffer memory coupled to the receiver and configured to store packet headers and packet data corresponding to packets that are received on the interface by the receiver;
- and
- wherein the credit management unit is configured to dynamically adjust a first amount of the buffer memory used to store packet headers and a second amount of the buffer memory used to store the packet data responsive to a size of the packet data in one or more received packets, and wherein the credit management unit is configured to free data credits and header credits to a transmitter on the interface responsive to the dynamic adjustments.
A method, in a receiver configured to manage flow control credits for an interface to which the receiver is coupled during use, wherein each packet received on the interface comprises a header and optionally data, and wherein the header is measured in terms of a header credit for flow control on the interface, and wherein data is measured in terms of one or more data credits for flow control on the interface, each data credit representing a fixed number of data bytes, the method comprising:
- dynamically adjusting a first amount of the header credits and a second amount of the data credits, the dynamically adjusting responsive to a size of the packet data in one or more received packets;
- and
- freeing data credits and header credits to a transmitter on the interface responsive to the dynamic adjustments.
Dependencies are inferred from the claim text.