QoS for Multiplex Network Reception Queue

A hierarchical policer with two-level counters and three packet types ensures fair queuing in the producer-consumer model by prioritizing Type-1 packets, adding Type-2 packets if Type-1 is unavailable, and dropping Type-3 packets, addressing equity issues and memory growth challenges.

DE102024201633A1Pending Publication Date: 2024-08-29MELLANOX TECHNOLOGIES LTD(IL)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE102024201633
Authority / Receiving Office
DE · DE
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-23
Filing Date
2024-02-22
Publication Date
2024-08-29

AI Technical Summary

Technical Problem

In the producer-consumer software model, shared queues lead to equity issues where strong producers exclude weak producers, and memory requirements grow linearly with the number of consumers, necessitating a solution for fair queuing.

Method used

A hierarchical policer system with two levels of counters and three packet labeling types (Type-1, Type-2, Type-3) ensures queuing fairness by allocating minimal access to a multiplex network receive queue, where Type-1 packets are prioritized, Type-2 packets are added if Type-1 is unavailable, and Type-3 packets are dropped.

Benefits of technology

The system provides equitable access to network flows, ensuring minimal queue access for all, reallocating capacity to active flows, and preventing starvation, while maintaining fairness even when some flows are less active.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

In one embodiment, a network device comprising a network interface for receiving packets over a packet data network, and a hierarchical policer for providing queue fairness for a multitude of network flows competing for access to a multiplexed network receive queue, comprising a level-one counter for labeling the received packets, a level-two counter for receiving at least some of the labeled packets and relabeling the at least some of the labeled packets, and queue logic for adding the packets labeled with a first label type to the multiplexed network receive queue and dropping the packets labeled with a third label type.
Need to check novelty before this filing date? Find Prior Art

Description

FIELD OF THE INVENTION

[0001] The present invention relates to computer systems and in particular, but not exclusively, to providing of queue fairness. BACKGROUND

[0002] In the producer-consumer software model, there are two entities, a producer and a consumer. Producer produces objects, e.g., elements in a queue, and the consumer consumes the objects, e.g., the Elements from the queue. Providing a separate queue for each producer-consumer pair provides a fair solution. However, the memory requirements of the queues grow linearly with the number of Consumers.

[0003] One solution to the above problem is to provide a queue that is used by a number of It is shared between producers and consumers, thereby reducing storage requirements. However, the used queue leads to a fairness issue, where consumers are disadvantaged in their use of the Queues compete, while strong producers exclude weak producers from joining. Add to queue based on the high volume of objects being processed by one or more of the Producers will be provided with the necessary information. SUMMARY

[0004] The invention is defined by the claims. To illustrate the invention, aspects and Embodiments that fall within the scope of the claims, or that may not, are described herein.

[0005] According to one embodiment of the present disclosure, a network device is provided, including a network interface to receive packets over a packet data network, and a hierarchical Policer, to ensure queue fairness for a variety of network flows seeking access to a multiplexed network Network receiving queues compete to provide, and include level one counters to track the received To label packages, a level two counter to receive at least some of the labeled packages, and the to relabel at least some labeled packages, and a queue logic to process those with a first Label type labeled packages to be added to the multiplex network receiving queue and the one with a third Label type: drop labeled packages.

[0006] According to another embodiment of the present disclosure, a network device is also provided, including a network interface to receive packets over a packet data network, and a Packet processing circuit to manage a multiplexed network receiving queue, and including a hierarchical police to ensure queue fairness for a variety of network flows converging on access to the Multiplex network receiving queues compete to provide, with the hierarchical policer handling a variety of Level-one counters to identify received packets with corresponding labels, consisting of labels of three label types. are selected to be labelled, with a first level-one counter of the level-one counter being intended to identify packages of a to selectively label the first network flow with the three label types, with a second level-one counter of the level- The one-counter is designed to selectively label packets of a second network flow with the three label types, a level two counter to count at least some of the labeled packages that have been dispensed by the level one counters to be received and to relabel at least some of the labeled packages, and a queue logic, to route the packages labelled with a first label type or a second label type to the multiplex network Add to the receiving queue and drop off packages labeled with a third label type, contains.

[0007] Furthermore, according to one embodiment of the present disclosure, the hierarchical police officer is to intended to provide queue justice for network flows, so that each of the network flows that to compete for access to the multiplex network receiving queue, at least minimal access to the A multiplex network receiving queue is provided.

[0008] Furthermore, according to one embodiment of the present disclosure, the level-one counters are The received packages are intended to be labelled with the three label types based on available level one counters. Credit for labeling the first label type and the second label type, and the level two counter is for this purpose. It is planned to process some of the labeled packages based on a current labeling of the labeled packages and of To relabel available Level Two counter balances for the first label type and the second label type.

[0009] In addition, according to one embodiment of the present disclosure, the packet processing circuit is designed to The plan is to combine the available Level One counter balances and the available Level Two counter balances with a to consume bandwidth of the packets.

[0010] Furthermore, according to one embodiment of the present disclosure, the packet processing circuit intended to periodically replenish the available Level One counter balances and the available Level Two counter balances to refill.

[0011] Furthermore, according to one embodiment of the present disclosure, the packet processing circuit is designed to The plan is to combine the available Level One counter balances and the available Level Two counter balances with a number to consume the packages.

[0012] Furthermore, according to one embodiment of the present disclosure, the packet processing circuit is designed to provided, consumed the Level One Counter Credit and the Level Two Counter Credit in response to respective of the packets consumed by the multiplexed network receive queue.

[0013] In addition, according to an embodiment of the present disclosure, the packet processing circuit intended to represent a number of available Level One Counter credits and available Level Two Counter Configure credits so that the packets labeled by the level one counter with the first label type retain the first label type after relabeling by the level two counter.

[0014] Furthermore, according to an embodiment of the present disclosure, the hierarchical policer is configured to intended to provide queue justice for network flows, so that each of the network flows that compete for access to the multiplexed network receive queue, at least a minimal access to the Multiplex network receive queue is provided on the basis that the packets passed through the level- One counters were labeled with the first label type, the first label type after relabeling by the Keep the level two counter.

[0015] Further according to an embodiment of the present disclosure, the packet processing circuit is configured to intended to increase the available Level One Counter balances and the available Level Two Counter balances configure so that some of the packets labeled by the level one counters with the second label type be relabeled with the third label type by the level two counter.

[0016] According to yet another embodiment of the present disclosure, a network method provided, including receiving packets over a packet data network, managing a multiplex Network receive queue, providing queue justice for a variety of Network flows competing for access to the multiplexed network receive queue using a hierarchical policer, labeling the received packets with corresponding labels consisting of labels from three label types are selected, by a plurality of level one counters, including a first level one counter and a second level one counter, selectively labeling packets of a first network flow with the three Label types by the first level-one counter, a selective labeling of packets of a second network flow with the three label types by the second level one counter, receiving at least some of the labeled Packets output by the level one counters, relabeling of at least some of the labeled Packages and selectively adding the packages labelled with a first label type or a second label type Packets to the multiplexed network receive queue and dropping the ones with a third label type labeled packages.

[0017] Still further according to an embodiment of the present disclosure, providing a Providing queue fairness to the network flows so that each of the network flows requesting access compete for the multiplex network receive queue, at least minimal access to the multiplex network A reception queue will be provided.

[0018] In addition, according to one embodiment of the present disclosure, the labelling includes a Labeling received packages with the three label types based on available Level One counter credits. for the first label type and the second label type, and relabeling involves relabeling some of the Labeled packages based on current labeling of the labeled packages and available Level Two- Counter balance for the first label type and the second label type.

[0019] Furthermore, according to one embodiment of the present disclosure, the method includes a Consuming the available levels One-counter credits and available level two-counter credits with a range of packages.

[0020] Further according to an embodiment of the present disclosure, the method includes a periodic Replenishment of available level one counter balances and available level two counter balances.

[0021] Still further according to an embodiment of the present disclosure, the method includes consuming the available level one counter credits and the available level two counter credits with a number of packages.

[0022] In addition, according to an embodiment of the present disclosure, the method includes a Adding used Level One Counter Credits and returning Level Two Counter Credits in response that each of the packets is consumed by the multiplexed network receive queue.

[0023] Furthermore, according to an embodiment of the present disclosure, the method includes a Configuring a number of available level one counter credits and available level two counter credits, so that the packets labeled with the first label type by the level one counters have the first label type retained after relabeling by the level two counter.

[0024] Furthermore, according to an embodiment of the present disclosure, providing includes providing the queueing justice for the network flows, so that each of the network flows vying for access to the Multiplex network receive queue compete, at least a minimal access to the multiplex network Receive queue is provided on the basis that the packets counted by the level one counters with the The first label type was labelled, the first label type after relabelling by the level two counter retained.

[0025] Furthermore, according to one embodiment of the present disclosure, the configuration includes a Configure the available Level One counter balances and the available Level Two counter balances so that some of the packages that were labelled with the second label type by the level one counter, by the level two counter They will be relabelled with the third label type.

[0026] In one embodiment, a network device comprising a network interface for transmitting packets over a to receive packet data network, and a hierarchical policer to ensure queue fairness for a variety of to provide network flows that compete for access to a multiplexed network receive queue, and including level-one counters to label the received packets, a level-two counter to count at least some of the labeled packets and relabel at least some of the labeled packets, and a Queue logic to forward the packets labeled with a first label type to the multiplex network receive queue and drop packets labeled with a third label type.

[0027] Any feature of one aspect or embodiment may be applied to other aspects or Embodiments may be applied in any appropriate combination. In particular, any Feature of a method aspect or method embodiment may refer to a device aspect or a device embodiment and vice versa. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The present invention will be understood from the following detailed description, in connection taken with the drawings in which: Fig. 1 is a block diagram view of a computer system according to an embodiment of the present Invention constructed and functional; Fig. 2 is a flow diagram including steps in a method of operating a Level 1 counter of Fig. 1; Fig. 3 is a flow diagram including steps in a method of operating a Level 2 counter of Fig. 1; Fig. 4 is a flowchart including steps in a method for setting credit levels in the system of Fig. 1; Fig. 5 is a flowchart including steps in a method for replenishing funds in the System of Fig. 1; Figure 6 is a flowchart including steps in an alternative procedure for refilling Credit in the system of Fig. 1; Figures 7-9 are block diagram views of a hierarchical police officer in the system of Figure 1, which are a show exemplary labeling; and Figures 10-11 are block diagram views of an alternative hierarchical policer in the system of Figure 1. which show an example labeling. DESCRIPTION OF EXEMPLARY EMBODIMENTS OVERVIEW

[0029] As mentioned above, implementing a shared queue in a producer- The consumer software model can lead to a fairness problem for consumers. For example, if several If virtual machines (VMs) share the same network queue, there is a possibility that one of the VMs- Connections that can starve other VMs. In that example, network connections or the VM are used as producer and the network queue is considered the consumer. One solution is to determine when a producer is allowed to insert an object into a queue or not. In software, This can be done using an 'If' statement, for example. In the case of receiving packets However, hardware places the packets in a receive queue. In hardware, it is more difficult to provide queue fairness, and the decision whether a producer should be restricted must before a package is consumed by a consumer, e.g., before a package is placed on the receive queue. In many cases, queue fairness is achieved using Congestion control algorithms are not provided because there may be no congestion on the network. For example, a queue can hold 1 GB / s, whereas a link that serves that queue can have a bandwidth of more than 100 GB / s. Consequently, in such a case, there can be no requirement to control the network connection, but there may be a requirement to control access to the queue exist.

[0030] In addition, while justice is applied, the different burdens on the Queue should be considered. For example, if three producers add to the queue, the capacity of the queue is divided among the three producers. However, if only one producer is the queue, the majority of the queue capacity should be allocated to that single producer become.

[0031] Embodiments of the present invention provide queue fairness for network flows that are Access to a multiplexed network receive queue is contention using a hierarchical policer The hierarchical policer contains two levels of counters. The first level contains a counter for each Network flow and each counter labels incoming packets according to available credits, so that some packets with type- 1 (e.g. green) according to available Type 1 credit, some packages with Type 2 (e.g. yellow) according to available Type 2 credits (when Type 1 credits are not available) and some packages with Type 3 (e.g. B. red) if Type 1 credit and Type 2 credit are not available. The Type 3 packages (e.g. red) are dropped and the type 1 (e.g. green) and type 2 (e.g. yellow) packets are used as input to a counter in provided to the second level of the hierarchical policer.

[0032] The second level counter relabels the packets according to the following logic. If the packet is already tagged with type- 1 (e.g. green), that packet is tagged by the second level counter with type 1 (e.g. green) according to available Type 1 credits are relabelled. In this context, the term ´´relabel´´ may refer to an actual Relabeling the package with a new label or validating the previous labeling of the package. The second level counter credits are usually configured so that type 1 packets (e.g. green) sent to the counter of the second level, type 1 packets (e.g., green) remain. In some embodiments, however, according to the Logic of the second-level counter if, for any reason, there are no type 1 balances in the second-level counter are available, a type 1 packet (e.g. green) is distinguished by the counter of the second level as a type 2 packet (e.g. yellow) or even as a Type 3 package if no Type 2 credits are available, they will be relabeled.

[0033] If the package arriving at the second-level counter is already labelled with type 2 (e.g., yellow), that package is relabeled by the second level counter with type 2 (e.g. yellow) according to available type 2 credits. If no Type 2 credits are available in the second-level counter, the Type 2 package (e.g., yellow) could be replaced by The second-level counter will be relabeled as a Type 3 packet. Packets identified by the second-level counter as Type- Items labelled as Type 1 (e.g., green) or Type 2 (e.g., yellow) are added to the queue, whereas those labelled as Type 3 labeled packages are dropped.

[0034] The initial level of type 1 credits allocated to the second level counter is configured, to the sum of the Type 1 balances allocated to the counters of the first level sen are to be, so that all of the packages labelled as type 1 (e.g. green) are, according to the counter of the second level type 1 (e.g., (green), thus guaranteeing a minimum access to the queue by each network flow. Otherwise In other words, all packets labeled as type 1 (e.g., green) by the first-level counters are included in the Generally, they are finally added to the queue and some of the packets labeled as Type 2 (e.g. yellow) are added to the queue while some are dropped.

[0035] Using two levels of counters and three types of packet labeling allows providing Queue fairness when all network flows are active. It also allows unused Queue capacity is reallocated to one or more active network flows when one or more other network flows are less active or not active at all. For example, if all network flows are active, more of the Type-2 labeled packets are relabeled as Type-3 by the second level counter and fall However, if one or more of the network flows are less active or inactive, fewer of the type- 2 labeled packets of the more active flows are relabeled by the second level counter, resulting in more of the type 2 Packets are added to the queue.

[0036] In some embodiments, the hierarchical policer may be configured as a hierarchical bandwidth policer where the credits are bandwidth credits. For one of the meters, the Type 1 credits can, for example, initially set to equal to X GB (gigabytes) and Type 2 credits can initially be set to equal to Y GB The credits can be used against the size of the packages. For example, if a package has a size A and that package is labeled according to a Type 1 label, the Type 1 credits are reduced by A. The Credits are replenished on a periodic basis, for example by adding X GB per second back to Type 1 credits and Y GB per second to Type 2 credits.

[0037] In some embodiments, the hierarchical policer may be configured as a hierarchical token policer, where the credits are equal to a number of packages or a number of places in the queue. For one of the For example, the Type 1 credits can initially be set to equal to X packages and Type 2 credits can initially be set to Y packages. The credits can be used against the number of packages For example, if a parcel is labelled according to a Type 1 label, the Type 1 credits will be increased by 1 reduced. Credits are replenished based on the packages consumed by the queue, as described in disclosed embodiments. SYSTEM DESCRIPTION

[0038] Reference is now made to Fig. 1, which is a block diagram view of a computer system 10 according to a embodiment of the present invention. The system 10 includes a host Device 12 and a network interface controller 14. In some embodiments, the Network interface controller 14 may be replaced by any suitable network device. The host device 12 includes a processor 16 and a host memory 18. The processor 16 may be configured to execute virtual machines (VM), including a VM 20 and a VM 22. The host memory 18 may be a multiplexed network Receive queue 24, described in more detail below.

[0039] The network interface controller 14 includes a network interface 26 and a Packet processing circuit 28. The network interface 26 and the packet processing circuit 28 can be found under The use of one or more application-specific integrated circuits may be implemented. Network interface 26 is configured to send packets 30 over a packet data network 32 from remote nodes, such as a to receive packets 30 from remote node 34 and remote node 36. The packets originating from remote node 34 The packets received represent a network flow, and the packets 30 received from the remote node 36 These will represent a different network flow. A "network flow" is typically defined by the values ​​of a specified set of header fields, such as the IP and TCP / UDP-5 tuple of source and destination addresses, source and destination- Ports and protocol, or any suitable flow information, such as Layer 2, 3, 4 or tunnel data, which can be transmitted across all of the Packets in the flow are identified as uniform.

[0040] The packet processing circuit 28 is configured to process the packets 30 received from the remote nodes and manage the multiplex network receive queue 24. The Packet processing circuit 28 may include a physical layer unit (PHY layer unit), a MAC unit and a hierarchical policer 38 to ensure queue fairness for the network flows that compete for access to the Multiplex network receive queue 24 compete to provide.

[0041] The hierarchical policer 38 is configured to provide queue fairness for the network flows, so that each of the network flows competing for access to the multiplex network receive queue 24, at least minimal access to the multiplex network receive queue 24 is provided. The hierarchical policer 38 includes a plurality of level one counters 40 to count the received packets 30 with corresponding labels selected from labels of three label types (Type-1, Type-2, Type-3). The labeling of the packets 30 can be done by adding or updating flags or other data elements in the headers of the packets 30. Each of the level one counters 40 labels packets of a network flow and each of the Packets are labeled with one of the label types. Figure 1 shows an example of two level one counters 40, one level One counter 42 and a level one counter 44. The hierarchical policer 38 can have any suitable number of level One-counters include 40.

[0042] The level one counter 42 is configured to selectively count packets 30 (from the remote node 34) of a network flow according to the three label types. The level one counter 44 is configured to count packets 30 (from the remote Node 36) of another network flow according to the three label types. Each of the packets 30 is labeled with one of the label types.

[0043] The hierarchical policer 38 includes a level two counter 46 configured to count at least some of the To receive packets that are output and labeled by the level one counter 40. It should be noted that packets labeled as Type 3 by the Level One counter 40 before reaching the Level Two counter 46 can be dropped. The level two counter 46 is configured to recount the packets 30 it receives. The term ´´Relabel´´, as used in the specification and claims, in all grammatical forms, relabeling (i.e. changing a label) of a package with a different label type or relabeling the package with the same label type (ie overwriting the existing label with the same label or validate the existing label of the package by leaving the existing label in place and position without overwriting the existing label).

[0044] The hierarchical policer 38 includes a queue logic 48 to queue the messages with a type 1 label or a Add 30 Type 2 labeled packages to the multiplex network receiving queue 24 and assign them a Drop packages labelled with Type 3 labels.

[0045] In practice, some or all of the functions of the packet processing circuit 28 can be implemented in a single physical components can be combined or, alternatively, using several physical components Components are implemented. These physical components can be hardwired or programmable. Devices or a combination of the two may be included. In some embodiments, at least some of the Functions of the packet processing circuit 28 of a programmable processor under the control of suitable Software can be executed. This software can be installed on a device in electronic form, for example via a network. Alternatively or additionally, the software may be stored in tangible, non-volatile computer-readable storage media, such as optical, magnetic or electronic storage.

[0046] Reference is now made to Fig. 2, which is a flowchart 200 including steps in a method for Operation of one of the Level 1 meters 40 in the system 10 of Fig. 1. Reference is also made to Fig. 1. In Generally, the level one counters 40 are configured to count the received packets 30 according to the three label types (Type 1, Type 2 and Type 3) based on available Level One counter credits for the first label type and the second label type. Each level one counter 40 has its own assignment of level one counter Credit for both Type 1 and Type 2 balances.

[0047] The operation of the level one counter 40 will now be described in more detail below. One of the packets 30 is received and it is passed through the network interface 26 to one of the level one counters 40 according to the network flow, in which contains the received packet 30.

[0048] The level one counter 40 is configured to receive the packet 30 (block 202). In a decision block 204, the level one counter 40 determines whether there are enough available type 1 funds to cover a given amount of the available Type 1 credit to the received package 30. For example, if the credit are bandwidth-based, the level one counter 40 compares the size of the packet 30 with the value of the available type 1 Credit. If the value of the available Type 1 credits is greater than the size of the package 30, there are enough available Type 1 credit to allocate a given amount of available Type 1 credit to the received package 30 If the credit tokens corresponding to packets or places in the multiplex network receive queue 24, there are enough available Type 1 credit to allocate 1 credit to the received package 30 if the value of the available Type 1 Balance is greater than zero.

[0049] If there are enough available Type 1 balances to cover a given amount of available Type 1 balances to the received packet 30, the level one counter 40 is configured to count the packet 30 with a type 1 label (Block 206), the number of available Type 1 credits corresponding to the given amount of the available Type 1 credits allocated to the received package 30 (block 208) and the forward the labeled packet 30 to the level two counter 46 (block 210), with reference to Fig. 3 in more detail described.

[0050] If there are not enough available Type 1 balances to cover a given amount of the available Type 1 To allocate credit to the received packet 30, the level one counter 40 determines in a decision block 212 whether there are enough available Type 2 funds to allocate a given amount of the available Type 2 funds to the received package 30. If there are enough available Type 2 credits to cover a given amount of available Type 2 credit to the received package 30, the level one counter 40 is configured to To label package 30 with a Type 2 label (Block 214), the number of available Type 2 credits accordingly by the given amount of available Type 2 credits allocated to the received package 30 reduce (Block 216) and forward the labeled packet 30 to the level two counter 46 (Block 210), under Described in more detail with reference to Fig. 3.

[0051] If there are not enough available Type 2 balances to cover a given amount of the available Type 2 To allocate credit to the received packet 30, the level one counter 40 is configured to count the packet with a type 3 label (block 218) and drop the package 30 (block 220). In some embodiments, the Type-3 labeled packet 30 through the queue logic 48 to this point in the packet flow (ie, after the level- One counters 40, but before the level two counter 46) or the package can be dropped later by the Queue logic 48 after passing through the level-two counter 46, which simply displays the type-3 labeled package ignored, dropped.

[0052] Now, reference is made to Fig. 3, which is a flowchart 300, containing steps in a process for Operation of the level two counter 46 in the system 10 of Fig. 1.

[0053] In general, the level-two counter 46 is configured to count the labeled packages 30 (from the level-one- (counters 40 received) based on a current labeling of the labeled packages 30 and of available level- Two-counter credits for label type 1 and label type 2 to be relabeled. The level two counter 46 has its own Allocation of Level One counter balances for both Type 1 and Type 2 balances, regardless of the balances that All of the packets 30 that are assigned to the level one counters 40 are processed by the level one counters 40. (with the possible exception of packages labelled with a Type 3 label), are generally considered input into the Level two counter 46 provided.

[0054] The operation of the level-two counter 46 will now be described below with respect to one of the packets 30, which are transmitted by one of the Level One counter 40 processes the data and provides it to Level Two counter 46, as described in more detail below.

[0055] The level-two counter 46 is configured to receive the labeled packet 30 (block 302). In a Decision block 304 is configured with level-two counter 46 to determine whether the labeled package 30 with is labelled with a Type 1 label. If the labelled package 30 is labelled with a Type 1 label, the level determines Two-counter 46 in a decision block 306, whether enough available type 1 credits are available to cover a given To allocate the amount of available Type 1 credits to the labeled package 30. For example, if the credits are bandwidth-based, the level two counter 46 compares the size of packet 30 with the value of the available type 1 Credit. If the value of the available Type 1 credits is greater than the size of the package 30, there are enough available Type 1 credit to allocate a given amount of available Type 1 credit to package 30. If the Credit tokens are those that correspond to packets or places in the multiplex network receive queue 24. enough available Type 1 credit to allocate 1 credit to package 30 if the value of the available Type 1 Balance is greater than zero.

[0056] If enough Type 1 credits are available to cover a given amount of the available Type 1 credits To assign packet 30, the level two counter 46 is configured to reassign packet 30 with a type 1 label. label (block 308) and increase the number of available Type 1 credits accordingly by the given amount of the available Type 1 credits that are part of the package 30 were assigned, to reduce (block 310), and queue logic 48 is configured to handle the relabeled Add packet 30 to the multiplex network receive queue 24 (block 312).

[0057] If there are not enough available Type 1 credits to cover a given amount of the available Type 1- Assigning credit to package 30 (which should not happen if the type 1 credits are correctly allocated, as (described in more detail with reference to Fig. 4), the level-two counter 46 determines in a Decision block 314, whether there are enough available Type 2 balances to cover a given amount of available Type 2 To allocate 2 credits to the labeled package 30. If enough available Type 2 credits are available to fill a To allocate the given amount of available Type 2 credits to the labeled package 30, the Level Two counter is 46. configured to relabel package 30 with a Type 2 label (block 316), the number of available Type 2 Balance adjusted accordingly by the given amount of available Type 2 credits allocated to package 30 were reduced (block 318), and the queue logic 48 is configured to process the relabeled packet 30. to add to the multiplex network receive queue 24 (block 312).

[0058] If there are not enough available Type 2 credits to cover a given amount of the available Type 2- To allocate credit to the received packet 30, the level-two counter 46 is configured to assign the packet a type- Relabel 3 (block 322) and drop package 30 (block 324). In some embodiments, The package 30, relabeled with type 3, will be dropped by queue logic 48.

[0059] If the level-two counter 46 in the decision block 304 determines that the labeled package 30 does not contain a If the package is labelled with a type 1 label, the level two counter 46 in a decision block 326 determines whether the labelled package 30 is labelled with a Type 2 label. If the labelled package 30 is labelled with a Type 2 label, it determines the Level Two Counter 46 in decision block 314, whether there are enough available Type 2 credits to cover a given Amount of available Type 2 credit to be allocated to the labeled package 30. If enough available Type 2 credit to allocate a given amount of available Type 2 credit to the labelled package 30, the Level two counter 46 is configured to relabel the packet 30 with a Type 2 label (block 316), the number of available Type 2 credits by the given amount of available Type 2 credits allocated to the package 30 assigned to the queue (block 318), and the queue logic 48 is configured to accept the newly labeled Add packet 30 to the multiplex network receive queue 24 (block 312). If not enough available Type 2 credits are available to allocate a given amount of available Type 2 credits to the received package 30 the level two counter 46 is configured to label the packet with a type 3 label (block 322) and drop the packet 30 (block 324). In some embodiments, the Type-3 tagged packet 30 may be the queue logic 48 should be dropped.

[0060] If the level two counter 46 determines in decision block 326 that the tagged packet 30 is not associated with a Type 2 label, the Level Two Counter 46 is configured to re-label the package with a Type 3 label. label (Block 322) or ignore the packet and drop packet 30 (Block 324). In some In embodiments, the package 30 labelled with type 3 can be dropped by the queue logic 48.

[0061] Now, reference is made to Fig. 4, which is a flowchart 400, containing steps in a process to set credit levels in system 10 of Fig. 1. As mentioned previously, each of the level one counters is assigned 40 are assigned a number of Type 1 balances and a number of Type 2 balances. Similarly, the Level Two- Counter 46 is assigned a number of Type 1 credits and a number of Type 2 credits. In some embodiments The balances are replenished periodically, as described in more detail with reference to Figure 5. In other In some implementations, the balances are replenished when packets are received from the multiplexed network. Receive queue 24 is consumed, for example by VM 20 or VM 22, as described in reference to Fig. 6 describes in more detail.

[0062] For example, the multiplex network receive queue 24 has a capacity of Z, where Z is a Bandwidth limit of or a number of packets or places in the multiplex network receive queue 24 It could be. If there are N Level One counters, 40 in total, each Level One counter could have 40 X Type 1 credits and Y Type 2 credits. Credits are assigned where X plus Y equals Z. The credits for the level two counter 46 can be calculated as follows: to be assigned. Type 1 balances can be set to N times X, and Type 2 balances can be set to The value of Z minus (N times X) is set. In this way, each network flow from the remote nodes is assigned a value. Minimum access to the multiplex network receiving queue 24 is guaranteed, which is limited by the credit limit of X. defined The packages labelled with Type 1 by the Level One counter 40 are usually labelled with the Type 1 label after the processing (i.e., relabeling) by the level two counter 46 is retained, while some of the type-2 Packages labelled by the level two counter 46 are relabelled as type 3 and dropped.

[0063] Consequently, in some embodiments, the packet processing circuit 28 is configured to determine the number of to configure available Type 1 Level One meter credits (40 for each Level One meter) (i.e. initially to set and then maintain by refilling), to ensure minimum access to the multiplex Network receive queue 24 for each of the network flows within the boundaries of the multiplex network Receive queue 24 (block 402). Packet processing circuitry 28 is also configured to: (1) Configure (i.e. initially set and then maintain by refilling) the number of available Type 1 balances for the Level Two Counter 46 to the sum of the Type 1 Level One Counter balances (2) Configure (i.e. initially set and then maintain by refilling) the Number of available Type 2 balances for the Level Two counter 46, to be less than the Type 2 balances that assigned to each of the level one counters 40 (block 404).

[0064] Consequently, in some embodiments, the packet processing circuit 28 is configured to process a number of available Level One counter balances and the available Level Two counter balances (i.e. initially to set and then maintain by refilling), so that the packages 30, which are processed by the level one- Counter 40 were labelled with a Type 1 label; the Type 1 label was removed after relabelling by the Level Two Counter 46 is retained. As a result of the above, the packet processing circuit 18 is configured to use the available level- To configure the one-meter balance and the available level two-meter balances (i.e., to initially set and (subsequently maintained by refilling), so that some of the packages that pass through the level one counter 40 with labelled with a type 2 label, the level two counter 46 will be relabelled with a type 3 label.

[0065] In this way, the hierarchical policer 38 is configured to ensure queue fairness for the network flows. to provide so that every network flow seeking access to the multiplex network receiving queue 24 competes, at least a minimal access to the multiplex network receive queue 24 based on this It is ensured that the packages labelled with a Type 1 label by the Level One counter 40 are the Type 1- Retain label after relabeling by level two counter 46.

[0066] Now, reference is made to Fig. 5, which is a flowchart 500, containing steps in a process for Replenishment of credit in system 10 of Fig. 1. In some embodiments, the hierarchical policyholder 38 configured as a bandwidth police, with the packets 30 with the different label types according to Bandwidth limits are labelled. The packet processing circuit 28 is configured to identify the available levels. One-counter credits and the available Level Two-counter credits according to a range of packages to For example, if a packet has a size of A and is classified as Type-1 by one of the level-one counters 40 is labeled, the available Type 1 credits for that Level One counter 40 are reduced by A.

[0067] The packet processing circuit 28 is configured to set the Type 1 and Type 2 label credit limits for to set each of the level one counters 40 and the level two counter 46. Once the hierarchical policer 38 is operating, the packet processing circuit 28 is configured to calculate the available level one counter credits (Type 1 and Type 2) and to periodically replenish the available Level Two counter balances (Type 1 and Type 2). Packet processing circuit 28 is configured to use a period equal to the refill period (e.g., 1 second). is to wait and the balances (Type 1 and Type 2) of each of the Level One counters 40 and the Level Two counter 46 are restored. to fill (Block 504).

[0068] For example, one of the level-one counters 40 can receive the packets at a rate of X GB / s as type-1 and at a rate of Y GB / s as type-2 based on an estimate that the packets 30 in the multiplex network receive queue 24 are processed at a rate of Z GB / s (where Z = X + Y), labeled. In such a case, X Type 1- Credits and Y Type 2 credits per second are assigned to that Level One counter 40 (for example), so that the The above labeling rates between Type 1 and Type 2 can be achieved by that Level 1 counter 40. The same can be applied to the other level one counters 40. In a similar way, but with different limits The credits can be assigned to the Level Two counter 46. For example, N times X Type 1 credits per second and Z minus (N times X) Type 2 credits per second can be allocated.

[0069] Reference is now made to Fig. 6, which is a flowchart 600 including steps in an alternative Method for replenishing funds in the system 10 of Fig. 1. In some embodiments, the Packet processing circuit 28 is configured to calculate the available level one counter credits and the available level Two-counter credit according to a number of packets or places in the multiplex network receive queue 24 For example, if a packet is received and one of the level one counters 40 is identified as type 1 is labeled, the available Type 1 credits for that Level One counter 40 are reduced by 1. If a package is received and is labeled as Type 2 by one of the Level One counters 40, the available Type 2 Credit for that level one counter 40 is reduced by 1. When a packet is received and the level two counter 46 is relabelled with a Type 1 or Type 2 label, the available Type 1 or Type 2 credits are reduced by 1.

[0070] The balances are generally not replenished periodically. The balances are generally replenished when the packets 20 are consumed by the multiplex network receive queue 24, e.g. through one of the VMs (block 602). When a packet is consumed, processor 16 commands the packet processing circuit. 18, a credit back to the level two counter 46 and the level one counter 40 from which the package originated, to add. The level one counter 40, from which the packet originated, can be determined based on the network flow to which the The packet is determined based on data in the packet header. The packet processing circuit 28 Attempts to add credit back to the Type 1 balance for Level Two counter 46. If the Type 1- When the balance of the level two counter is full (i.e., at its initial value), the packet processing circuit adds 28 a credit back to the type 2 credits for the level two counter 46. Similarly, the Packet processing circuit 28, a credit back to the type 1 credits for the level one counter 40, from which the package originated. If the Type 1 balances of the Level One Counter 40 from which the package originated are full (i.e. i.e., at its initial value), the packet processing circuit 28 adds a credit back to the Type 2 credits for the level one counter 40 from which the packet originated.

[0071] Consequently, the packet processing circuit 28 is configured to count consumed level one counter credits and level Two-counter credit in response to adding back that respective packages 30 from the multiplex network Receive queue 24 is consumed (block 604), e.g., by the respective VM.

[0072] Reference is now made to Figs. 7-9, which are block diagram views of the hierarchical policer 38 in the System of Fig. 1, which shows an example labeling.

[0073] Figures 7-9 show the same credit levels and replenishment rates used, but with different Bandwidth network flows entering the level one counters 40. In the example of Fig. 7-9, the multiplex network Receive queue 24 has a bandwidth limit of 1 GB / s. Consequently, the credit limits for the level one Counter 40 and the Level Two Counter 46 are set accordingly as follows. Each of the Level One Counters 40 has a Type 1 Label credit limit of 0.1 GB / s, so 0.1 GB of credit per second is added to each level one counter 40 for type 1 labels. Each of the 40 level-one counters has a Type 2 label credit limit of 0.9 GB / s, thus 0.9 GB of credit per second is allocated to each level one counter 40 for Type 2 labels.

[0074] The level two counter 46 has a type 1 label credit limit of 0.2 GB / s, thus 0.2 GB of credit is per second is assigned to the level two counter 46 for type 1 labels. The level two counter 46 has a type 2 label- The credit limit is 0.8 GB / s, thus 0.8 GB of credit per second is allocated to the Level Two counter 46 for Type 2- Labels assigned.

[0075] Fig. 7 shows that the bandwidth of a network flow 50 entering a level one counter 42 is 1.2 GB / s The bandwidth of a network flow 52 entering a level-one counter 44 is 1.4 GB / s. Fig. 7 shows that of the network flow 50 entering the level one counter 42, 0.1 GB packets per second are classified as type 1. 0.9 GB per second will be labelled as Type 2 (line 54), 0.9 GB per second will be labelled as Type 2 (line 56), and the remaining 0.2 GB per second are labeled as Type 3 (line 58). The packets that are labeled as Type 1 and Type 2 by the level one counter 42 are forwarded to the level two counter 46, while the packets labeled as type 3 fall be left.

[0076] Similarly, Fig. 7 shows that of the network flow 52 entering the level one counter 44, 0.1 GB packets per second are labeled as Type-1 (line 60), 0.9 GB per second are labeled as Type-2 (line 62) and the The remaining 0.4 GB per second are labeled as Type 3 (line 64). The packets that are labeled as Type 44 by the level one counter 1 and Type 2 are sent to the Level- Two-counter 46 forwarded, while packets labeled as Type 3 are dropped.

[0077] Fig. 7 shows that of the packets entering the level two counter 46, 0.2 GB of the packets labeled as Type 1 Packets per second are relabeled as Type 1 (i.e. retained) (line 66) (0.1 GB / s of the packets from Level One- Counter 42 and 0.1 GB / s of the packets from the level one counter 44). Of the 1.8 GB labeled as type 2 packets that were in Entering the level two counter at 46, 0.8 GB of these packets are relabeled as type 2 per second (i.e. retained) (line 68), while 1 GB of these packets per second are relabeled as Type 3 (line 70). The Type 1- and type 2 packets exiting the level two counter 46 are multiplexed by the queue logic 48. Network receive queue 24 added while type 3 packets are dropped.

[0078] Fig. 8 shows that the bandwidth of a network flow 50 entering a level one counter 42 is 1.2 GB / s The bandwidth of a network flow 52 entering a level-one counter 44 is 0.2 GB / s. Fig. 8 shows that of the network flow 50 entering the level one counter 42, 0.1 GB packets per second are classified as type 1. 0.9 GB per second will be labelled as Type 2 (line 54), 0.9 GB per second will be labelled as Type 2 (line 56), and the remaining 0.2 GB per second are labeled as Type 3 (line 58). The packets that are labeled as Type 1 and Type 2 by the level one counter 42 are forwarded to the level two counter 46, while the packets labeled as type 3 fall be left.

[0079] Similarly, Fig. 8 shows that of the network flow 52 entering the level-one counter 44, 0.1 GB packets per 0.1 GB per second will be labelled as Type 1 (line 60) and 0.1 GB per second as Type 2 (line 62). The packets, Those labelled as type 1 and type 2 by the level one counter 44 are sent to the level two counter 46. forwarded.

[0080] Fig. 8 shows that of the packets entering the level-two counter 46, 0.2 GB are labelled as type-1 Packets per second are relabeled as Type 1 (i.e. retained) (line 66) (0.1 GB / s of the packets from Level One- Counter 42 and 0.1 GB / s of the packets from the level one counter 44). Of the 1 GB packets labeled as type 2, which per As the packets enter the level two counter at 46 seconds, 0.8 GB of these packets per second are relabeled as type 2 (i.e. retained) (line 68), while 0.2 GB of these packets per second are relabeled as Type 3 (line 70). The Type 1- and type 2 packets exiting the level two counter 46 are multiplexed by the queue logic 48. Added network receive queue 24 while dropping type 3 packets.

[0081] Figure 9 shows that the bandwidth of a network flow 50 entering a level one counter 42 is 1.2 GB / s and the bandwidth of a network flow 52 entering a level one counter 44 is 0 GB / s (ie no packets). Figure 9 shows that of the network flow 50 entering the level one counter 42, 0.1 GB packets per second be labelled as Type 1 (line 54), 0.9 GB per second be labelled as Type 2 (line 56) and the remaining 0.2 GB per second are labeled as Type 3 (line 58). The packets that are labeled as Type 1 and Type 2 by the level one counter 42 are forwarded to the level two counter 46, while the packets labeled as type 3 fall be left.

[0082] Fig. 9 shows that of the packets entering the level two counter 46, 0.1 GB of the packets per second are counted as Type-1 relabeled (ie retained) (line 66). Of the 0.9 GB of Type-2 labeled packets sent per second enter the level two counter 46, 0.8 GB of these packets per second are relabeled as type 2 (i.e., retained) (line 68), while 0.1 GB of these packets per second are relabeled as Type 3 (line 70). The Type 1 and Type 2 Packets exiting the level two counter 46 are routed by the queue logic 48 to the multiplexed network Receive queue 24 added while dropping Type 3 packets.

[0083] Reference is now made to Figs. 10-11, which are block diagram views of the hierarchical policer 38 in the System of Fig. 1, showing an example labeling, where credit is given per package or per place in the Multiplex network receive queue 24 are consumed.

[0084] Figures 10-11 show the same credit levels, but with different loads of the network flows entering the level- One counter 40. In the examples of Fig. 10-11, the multiplex network receive queue 24 has a Capacity for 100 packages. Consequently, the credit limits for the Level One counters will be 40 and the Level Two counter 46 is set accordingly as follows. Each of the level one counters 40 has 10 Type 1 label credits and 90 Type 2 label Credits. Level Two Counter 46 has 20 Type 1 label credits and 80 Type 2 label credits.

[0085] Fig. 10 shows that the network flow 50 enters the level one counter 42 and the network flow 52 enters the level One-counter 44 enters. Fig. 10 shows that of the network flow 50, which enters the Level one counter 42 enters, 10 packages are labelled as type 1 by level one counter 42 (line 54), 90 packages as The packages will be labelled as Type 2 (line 56) and the rest as Type 3 (line 58). The packages that pass through the Level one counter 42, labelled as type 1 and type 2, are forwarded to the level two counter 46, while the packages labelled as Type 3 are dropped.

[0086] Similarly, Fig. 10 shows that of the network flow 52 entering the level-one counter 44, 10 packets are passed through The level one counter 44 will be labelled as type 1 (line 60), 90 packages will be labelled as type 2 (line 62), and the The remaining packages are labelled as Type 3 (line 64). The packages identified by the level-one counter 44 as Type 1 and Type 2 are forwarded to the level two counter 46, while the packets labeled as type 3 fall be left.

[0087] Fig. 10 shows that of the packets entering the level two counter 46, 20 packets pass through the level two Counter 46 is relabeled (ie retained) as Type-1 (lines 66) (10 packets from Level-One Counter 42 and 10 Packets from the level one counter 44). Of the 180 packets labeled as Type 2 that enter the level two counter 46, 80 packets are relabeled (ie retained) as Type 2 by the Level Two Counter 46 (lines 68), while the The remaining 100 packets are relabeled as Type 3 by the Level Two counter 46 (lines 70). The Type 1 and Type 2 Packets exiting the level two counter 46 are routed by the queue logic 48 to the multiplexed network Receive queue 24 added while type 3 packets are dropped.

[0088] Fig. 11 shows that the network flow 50 enters the level-one counter 42, but there is no network flow which entering the level one counter 44. Fig. 10 shows that of the network flow 50 entering the level one counter 42, 10 packages will be labelled as type 1 by the level one counter 42 (line 54), 90 packages will be labelled as type 2 (Line 56) and the rest of the packages are labelled as Type 3 (Line 58). The packages identified by the Level One counter 42 as Type 1 and Type 2 labeled items are forwarded to Level Two counter 46, while those labeled as Type 3... Packages are dropped.

[0089] Fig. 11 shows that of the packets entering the level-two counter 46, 10 packets per second are new type-1 labeled (ie, retained) (line 66). Of the 90 packets labeled as Type 2 that are included in the Level Two counter, 46 occur, 80 packets are relabeled (ie retained) as Type 2 by the Level Two Counter 46 (line 68), while The remaining 10 packets are relabeled as Type 3 by the Level Two counter 46 (line 70). The Type 1 and Type 2 Packets exiting the level two counter 46 are routed by the queue logic 48 to the multiplexed network Receive queue 24 added while dropping Type 3 packets.

[0090] Various features of the invention, which for clarity are shown in the contexts of separate Embodiments described may also be provided in combination in a single embodiment. Conversely, various features of the invention, which for the sake of brevity are described in the context of a single embodiment described may also be provided separately or in any suitable partial combination.

[0091] The above-described embodiments are cited as examples and the present invention is not limited to as particularly shown and described hereinabove. Rather, the scope of the invention includes both combinations and partial combinations of the various features described above and Variations and modifications thereof which will become apparent to those skilled in the art upon reading the foregoing description and which are not disclosed in the prior art.

[0092] It will be understood that aspects and embodiments described above are merely exemplary and that detailed modifications can be made within the scope of the claims.

[0093] Any device, method and feature described in the description and (if applicable) the claims and the The drawings disclosed can be provided independently or in any adequate combination.

[0094] Reference numerals appearing in the claims are only exemplary and are not intended to have any limiting effect on the scope of the claims.

Claims

1. A network device comprising: a network interface for receiving packets over a packet data network; and a hierarchical policer to ensure queue fairness for a large number of network flows vying for access to a multiplexed network receive queue competing, providing, and including: Level one counter to label the received packets; a level two counter to receive at least some of the labeled packets and to count at least some relabel labeled packages; and a queuing logic to forward the packets labeled with a first label type to the multiplex network receive queue and drop packets labeled with a third label type.

2. A network device comprising: a network interface for receiving packets over a packet data network; and a packet processing circuit to manage a multiplexed network receive queue, and including a hierarchical policer to ensure queue fairness for a large number of network flows vying for access to the multiplexed network receive queue, where the hierarchical policer includes: a plurality of level-one counters to assign the received packets with corresponding labels consisting of labels of three label types are selected, with a first level one counter being provided to is to label packets of a first network flow selectively according to the three label types, with a second level One counter the level one counter is intended to selectively count packets of a second network flow according to the three label types; a level-two counter to detect at least some of the labeled packets output by the level-one counters receive and relabel at least some of the labeled packets; and a queue logic to selectively: the one with a first label type or a second label type of the three Label types to add the packets labeled with a label type to the multiplexed network receive queue and third label type of the three label types to drop the packages labeled.

3. Apparatus according to claim 1, wherein the hierarchical policer is arranged to ensure the queue fairness for to provide the network flows so that each of the network flows requesting access to the multiplexed network receive queue compete, at least a minimal access to the multiplex network receive queue is provided.

4. Device according to claim 1 or 3, wherein: The level one counters are designed to count the received packets according to the three label types based on available Level One counter credits for the first label type and the second label type; and The level two counter is intended to count some of the labeled packets based on a current labeling of the labeled packages and available Level Two counter credits for the first label type and the second Label type to relabel.

5. Apparatus according to claim 4, wherein the packet processing circuit is arranged to process the available level one Meter credits and available Level Two meter credits according to a range of packages.

6. Apparatus according to claim 5, wherein the packet processing circuit is arranged to select the available level one Meter credits and available Level Two meter credits must be periodically refilled.

7. Apparatus according to claim 4, wherein the packet processing circuit is arranged to process the available level one Meter credits and available Level Two meter credits according to the number of packages.

8. The apparatus of claim 7, wherein the packet processing circuit is arranged to consume the level one Counter credit and the Level Two Counter credit in response to respective packets being sent from the multiplex Network receive queue consumed, add back.

9. Apparatus according to claim 4, wherein the packet processing circuit is arranged to select a number of the available Level One Counter Credits and the available Level Two Counter Credits so that the packages that by the level one counters with the first label type, the first label type after the Relabeling maintained by the level two counter.

10. The apparatus of claim 9, wherein the hierarchical policer is arranged to determine the queue fairness for to provide the network flows so that each of the network flows requesting access to the multiplexed network receive queue compete, at least a minimal access to the multiplex network receive queue provided on the basis that the packets detected by the level one counters with the first label type labeled retain the first label type after relabeling by the level two counter.

11. The apparatus of claim 9, wherein the packet processing circuit is arranged to process the available level one Meter credit and to configure the available Level Two counter credits so that some of the packages covered by the Level One counter labeled with the second label type are relabeled with the third label type by the level two counter become.

12. Network method, comprising: Receiving packets over a packet data network; Managing a multiplexed network receive queue, Providing queue fairness for a variety of network flows vying for access to the multiplex Network receive queue contention using a hierarchical policer; Labeling the received packets with appropriate labels selected from three label types are, by a plurality of level-one counters, including a first level-one counter and a second level-one Counter; selective labeling of packets of a first network flow according to the three label types by the first level One-counter; selective labeling of packets of a second network flow according to the three label types by the second level One-counter; Receiving at least some of the labeled packets output by the level one counters; Relabeling at least some of the labeled packages and selectively adding the labels with a first label type or a second label type of the three label types labeled packets to the multiplexed network receive queue and dropping those with a third label type packages labeled with the three label types.

13. The method of claim 12, wherein providing comprises providing queue fairness for the Network flows, so that each of the network flows requesting access to the multiplexed network receive queue compete, at least minimal access to the multiplexed network receive queue is provided.

14. The method according to claim 12 or 13, wherein: Labeling is the process of labeling the received packets according to the three label types based on available Level One counter credits for the first label type and the second label type; and Relabeling means relabeling some of the labeled packages based on a current labeling of the labeled packages and available Level Two counter credits for the first label type and the second Label type includes.

15. The method of claim 14, further comprising consuming the available level one counter credits and of available Level Two counter credits according to a range of packages.

16. The method of claim 15, further comprising periodically refilling the available level one counters. balance and available level two counter balance.

17. The method of claim 14, further comprising consuming the available level one counter credits and of available Level Two counter credits according to a number of packages.

18. The method of claim 17, further comprising adding used level one counter credits and the level two counter credit back in response to the respective packets being received by the multiplex network receive queue.

19. The method of claim 14, further comprising configuring a number of available level one counters Credit and the available Level Two counter credit, so that the packages covered by the Level One counter with the first label type, the first label type after relabeling by the level two counter retained.

20. The method of claim 19, wherein providing comprises providing queue fairness for the Network flows, so that each of the network flows requesting access to the multiplexed network receive queue compete, at least a minimal access to the multiplex network receive queue based on provided that the packets labeled by the level one counters with the first label type will retain the first label type after relabeling by the level two counter.

21. The method of claim 19 or 20, wherein the configuring comprises configuring the available level one counters. Credit and the available Level Two Counter Credit, so that some of the packages covered by the Level One Counter with labeled with the second label type are relabeled with the third label type by the level two counter be included.