Circuit within switch and method for managing memory within switch
AssigneeRealtek Semiconductor Corp.
InventorsYung-Chang Lin, Kuo-Cheng Lu
Life of this patent
Estimating the term…
Abstract
The present invention provides a circuit within a switch, wherein the circuit includes a memory and a control circuit. The memory includes at least a first area and a second area, the first area is used to provide a minimum guaranteed storage space for each of a plurality of egress queues, the second area is used to provide a shared space of the plurality of egress queues. The control circuit is coupled to the memory, and when an input port of the switch receives an input packet and stores the input packet into the memory, the control circuit dynamically determines a size of the second area according to a number of the egress queues that the input packet is forwarded to.
Claims18
A circuit within a switch, comprising:
- a memory, wherein the memory comprises at least a first area and a second area, the first area is used to provide a minimum guaranteed storage space for each of a plurality of egress queues, the second area is used to provide a shared space of the plurality of egress queues;
- wherein a packet corresponding to one egress queue is always stored into the minimum guaranteed storage space for the one egress queue when packets stored in the one egress queue does not exceed its minimum guaranteed storage space, and the packet is stored in the shared space of the plurality of egress queues if the packets stored in the one egress queue reach its minimum guaranteed storage space;
- and
- a control circuit, coupled to the memory, wherein when an input port of the switch receives an input packet and stores the input packet into the memory, the control circuit dynamically determines a size of the second area according to a number of the egress queues that the input packet is forwarded to;
- wherein when the input packet is forwarded to multiple egress queues, and the minimum guaranteed storage spaces corresponding to the multiple egress queues in the first area have not been filled, the control circuit increases the size of shared space in the second area.
A circuit within a switch, comprising:
- a memory, wherein the memory comprises at least a first area and a second area, the first area is used to provide a minimum guaranteed storage space for each of a plurality of egress queues, the second area is used to provide a shared space of the plurality of egress queues;
- wherein a packet corresponding to one egress queue is always stored into the minimum guaranteed storage space for the one egress queue when packets stored in the one egress queue does not exceed its minimum guaranteed storage space, and the packet is stored in the shared space of the plurality of egress queues if the packets stored in the one egress queue reach its minimum guaranteed storage space;
- and
- a control circuit, coupled to the memory, wherein when an input port of the switch receives an input packet and stores the input packet into the memory, the control circuit dynamically determines a size of the second area according to a number of the egress queues that the input packet is forwarded to;
- wherein when multiple egress queues corresponding to the input packet stored in the memory are sent out from a plurality of output ports of the switch, the control circuit dynamically determines the size of the second area according to a number of the multiple egress queues;
- wherein when the multiple egress queues corresponding to the input packet stored in the memory are sent out from the plurality of output ports of the switch, if a number of the multiple egress queues which its memory usage is not over the corresponding minimum guaranteed space is greater than one, the control circuit decreases the size of the second area.
A method for managing a memory within a switch, wherein the memory comprises at least a first area and a second area, the first area is used to provide a minimum guaranteed storage space for each of a plurality of egress queues, the second area is used to provide a shared space of the plurality of egress queues;
- wherein a packet corresponding to one egress queue is always stored into the minimum guaranteed storage space for the one egress queue when packets stored in the one egress queue does not exceed its minimum guaranteed storage space, and the packet is stored in the shared space of the plurality of egress queues if the packets stored in the one egress queue reach its minimum guaranteed storage space;
- and the method comprises:
- when an input port of the switch receives an input packet and stores the input packet into the memory, dynamically determining a size of the second area according to a number of the egress queues that the input packet is forwarded to;
- wherein the step of dynamically determining the size of the second area according to the number of the egress queues that the input packet is forwarded to comprises:
- when the input packet is forwarded to multiple egress queues, and the minimum guaranteed storage spaces corresponding to the multiple egress queues in the first area have not been filled, increasing the size of shared space in the second area.
Dependencies are inferred from the claim text.