A method and apparatus for buffering data units in a communication switch
that allows for configurable monitoring of the buffer contents is
presented. Such an apparatus includes a context table that stores a
plurality of independent group identifiers for each connection. Although
the group identifiers may include a partition group identifier and a loss
group identifier that is dependent on the partition group identifier,
additional group identifiers are included in the context table for each
connection that are independent of other group identifiers in the context
table. Such a context table may be dynamically reconfigured in order to
group connections for buffer monitoring operations related to congestion
detection, traffic shaping, and data admission with respect to buffering.
When a data unit is received corresponding to a particular connection,
the context table is referenced to retrieve the set of group identifiers
corresponding to that connection. As a cell is stored in the buffer,
count values corresponding to at least some of the group identifiers
included in the set of group identifiers for that connection are
incremented. Similarly, when data is dequeued from the buffer for
forwarding, the set of group identifiers for that particular data unit is
determined and the counters corresponding to at least some of those
groups are decremented. As such, the count value corresponding to each of
the groups can be referenced to determine the number of data units
corresponding to that group that are currently stored within the buffer.