A method performed: at a network switch including a buffer having buffer space to store network packets linked to queues (Q1-QP) that feed the packets to output ports (P1-PN) of the switch associated with the queues (Q1-QP), the buffer space being shared dynamically among multiple traffic pools, wherein a pool is a set of resources allocated to a corresponding network traffic class, the method being characterized in that the network switch further includes a store of packet descriptors, PDs, that are used to link the network packets into queues that feed the packets to output ports of the switch, the method comprising: determining per-pool dynamic thresholds defining upper limits for per-pool occupancy each based on an amount of unused buffer space; determining per-queue dynamic thresholds defining upper limits for per-queue occupancy based on amounts of unused buffer space available in the pools with which the queues are associated; determining a pool dynamic threshold for PDs so as to define a maximum number of PDs available to the given pool that is based on a number of unused PDs; determining, for each queue (Q1-QP), a queue dynamic threshold for PDs so as to define a maximum number of PDs available to the queue that is based on a number of unused PDs available to the given pool, wherein the queue dynamic threshold for PDs is determined based on an average fanout of packets in the given pool, the average fanout being a ratio of (a) a number of PDs used by the given pool, and (b) a pool occupancy for the given pool; and receiving packets, and for each received packet: admitting the packet to the pool with which the packet is associated and the queue for which the packet is destined under the condition that i) occupancy of the associated pool is less than the corresponding per-pool dynamic threshold, ii) occupancy of the queue for which the packet is destined is less than the corresponding per-queue dynamic threshold, iii) there are unused PDs available to the associated pool based on the pool dynamic threshold for PDs, and iv) there are unused PDs available for the queue for which the packet is destined based on the queue dynamic threshold for PDs for that queue; and dropping the packet under the condition that at least one of the conditions i) to iv) is not met. determining per-pool dynamic thresholds defining upper limits for per-pool occupancy each based on an amount of unused buffer space; determining per-queue dynamic thresholds defining upper limits for per-queue occupancy based on amounts of unused buffer space available in the pools with which the queues are associated; determining a pool dynamic threshold for PDs so as to define a maximum number of PDs available to the given pool that is based on a number of unused PDs; determining, for each queue (Q1-QP), a queue dynamic threshold for PDs so as to define a maximum number of PDs available to the queue that is based on a number of unused PDs available to the given pool, wherein the queue dynamic threshold for PDs is determined based on an average fanout of packets in the given pool, the average fanout being a ratio of (a) a number of PDs used by the given pool, and (b) a pool occupancy for the given pool; and receiving packets, and for each received packet: admitting the packet to the pool with which the packet is associated and the queue for which the packet is destined under the condition that i) occupancy of the associated pool is less than the corresponding per-pool dynamic threshold, ii) occupancy of the queue for which the packet is destined is less than the corresponding per-queue dynamic threshold, iii) there are unused PDs available to the associated pool based on the pool dynamic threshold for PDs, and iv) there are unused PDs available for the queue for which the packet is destined based on the queue dynamic threshold for PDs for that queue; and dropping the packet under the condition that at least one of the conditions i) to iv) is not met. i) occupancy of the associated pool is less than the corresponding per-pool dynamic threshold, ii) occupancy of the queue for which the packet is destined is less than the corresponding per-queue dynamic threshold, iii) there are unused PDs available to the associated pool based on the pool dynamic threshold for PDs, and iv) there are unused PDs available for the queue for which the packet is destined based on the queue dynamic threshold for PDs for that queue; and