# US 2021/0344610 A1 · Method and system for enhanced queue management in a switch

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0344610 A1
- Document ID: US20210344610A1
- Status: Published application
- Kind: A1
- Application number: 16/863,904
- Filed: 2020-04-30
- Published: 2021-11-04
- Earliest claimed: 2020-04-30
- Assignees: Hewlett Packard Enterprise Development LP
- Applicants: Hewlett Packard Enterprise Development LP
- Inventors: Gregg B. Lesartre; Jason Jung; Norell Estella Menhusen; Christopher Michael Brueggen
- Web page: https://patentgrep.com/patent/US20210344610A1

## CPC

- H04L 47/621: {Individual queue per connection or flow, e.g. per VC}
- H04L 47/32: by discarding or delaying data units, e.g. packets or frames
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

One embodiment of the present invention provides a switch. During operation, the switch maintains a first counter to indicate a first number of packets in a queue of the switch. The switch then determines whether a clock of the switch has reached a threshold value. If the clock reaches the threshold value, the switch starts maintaining a second counter to indicate a second number of packets in the queue that have been received after the clock has reached the threshold value. The switch continues to decrement the first counter in response to a packet leaving the queue until the first counter reaches a value of zero. When the clock reaches a maximum value supported by the clock, the switch drops a third number of packets from the queue indicated by the first counter.

## Claims

### Claim 1

A method, comprising:
maintaining a first counter to indicate a first number of packets in a queue of a switch;
determining whether a clock of the switch has reached a threshold value;
in response to determining that the clock has reached the threshold value:
maintaining a second counter to indicate a second number of packets in the queue that have been received after the clock has reached the threshold value; and
decrementing the first counter in response to a packet leaving the queue until the first counter reaches a value of zero; and
in response to determining that the clock has reached a maximum deadline value associated with the clock, dropping a third number of packets from the queue indicated by the first counter.

### Claim 2 (depends on 1)

The method of claim 1, wherein maintaining the first counter further comprises incrementing the first counter in response to receiving a packet in the queue prior to the clock reaching the threshold value.

### Claim 3 (depends on 1)

The method of claim 1, wherein maintaining the second counter further comprises:
incrementing the second counter in response to receiving a packet in the queue after the clock has reached the threshold value; and
decrementing the second counter in response to a packet leaving the queue and the first counter having a value of zero.

### Claim 4 (depends on 1)

The method of claim 1, further comprising, in response to determining that the clock has reached the maximum value, switching the respective roles of the first and second counters.

### Claim 5 (depends on 4)

The method of claim 4, wherein switching the respective roles comprises dropping a fourth number of packets from the queue indicated by the second counter in response to the clock rolling over and reaching the maximum value for a subsequent time.

### Claim 6 (depends on 1)

The method of claim 1, wherein the threshold value is half of the maximum value, a ceiling of the half of the maximum value, or a floor of the half of the maximum value.

### Claim 7 (depends on 1)

The method of claim 1, wherein dropping the third number of packets from the queue comprises removing a packet from the queue and decrementing the first counter until the first counter reaching a value of zero, wherein the third number indicates a positive value.

### Claim 8 (depends on 1)

The method of claim 1, wherein the switch supports a plurality of virtual channels (VCs), wherein the queue corresponds to a VC of the plurality of VCs, and wherein a queue of a respective VC is associated with a pair of counters.

### Claim 9 (depends on 1)

The method of claim 1, wherein the switch is a Gen-Z component and a respective packet is a Gen-Z transaction.

### Claim 10 (depends on 1)

The method of claim 1, wherein the clock is one or more of:
a non-negative integer that is incremented at a predefined interval; and
a hardware clock of the switch.

### Claim 11

A computer system, comprising:
a processor; and
a non-transitory computer-readable storage medium storing instructions, which when executed by the processor causes the processor to perform a method, the method comprising:
maintaining a first counter to indicate a first number of packets in a queue of the computer system;
determining whether a clock of the computer system has reached a threshold value;
in response to determining that the clock has reached the threshold value:
maintaining a second counter to indicate a second number of packets in the queue that have been received after the clock has reached the threshold value; and
decrementing the first counter in response to a packet leaving the queue until the first counter reaches a value of zero; and
in response to determining that the clock has reached a maximum deadline value associated with the clock, dropping a third number of packets from the queue indicated by the first counter.

### Claim 12 (depends on 11)

The computer system of claim 11, wherein maintaining the first counter further comprises incrementing the first counter in response to receiving a packet in the queue prior to the clock reaching the threshold value.

### Claim 13 (depends on 11)

The computer system of claim 11, wherein maintaining the second counter further comprises:
incrementing the second counter in response to receiving a packet in the queue after the clock has reached the threshold value; and
decrementing the second counter in response to a packet leaving the queue and the first counter having a value of zero.

### Claim 14 (depends on 11)

The computer system of claim 11, wherein the method further comprises, in response to determining that the clock has reached the maximum value, switching the respective roles of the first and second counters.

### Claim 15 (depends on 14)

The computer system of claim 14, wherein switching the respective roles comprises dropping a fourth number of packets from the queue indicated by the second counter in response to the clock rolling over and reaching the maximum value for a subsequent time.

### Claim 16 (depends on 11)

The computer system of claim 11, wherein the threshold value is half of the maximum value, a ceiling of the half of the maximum value, or a floor of the half of the maximum value.

### Claim 17 (depends on 11)

The computer system of claim 11, wherein dropping the third number of packets from the queue comprises removing a packet from the queue and decrementing the first counter until the first counter reaching a value of zero, wherein the third number indicates a positive value.

### Claim 18 (depends on 11)

The computer system of claim 11, wherein the computer system supports a plurality of virtual channels (VCs), wherein the queue corresponds to a VC of the plurality of VCs, and wherein a queue of a respective VC is associated with a pair of counters.

### Claim 19 (depends on 11)

The computer system of claim 11, wherein the computer system is a Gen-Z component and a respective packet is a Gen-Z transaction.

### Claim 20 (depends on 11)

The computer system of claim 11, wherein the clock is one or more of:
a non-negative integer that is incremented at a predefined interval; and
a hardware clock of the computer system.
