Methods and apparatus are disclosed for using barrier phases to limit the
disorder of packets which may be used in a computer or communications system. In
one packet switching system, source nodes include an indication of their current
barrier state in sent packets. For each barrier state, a predetermined range of
sequence numbers may be used or a predetermined number of packets may be sent by
a source node. The source, destination, and switching nodes are systematically
switched between barrier phases, which is typically performed continuously in response
to the flow of barrier request and barrier acknowledgement packets or signals.
Each source node broadcasts to all forward connected nodes a barrier request to
change to a next barrier state. After a switching node has received a barrier request
on all incoming links, the switching node propagates the barrier request. Upon
receiving barrier requests over all links, each destination stage relays an acknowledgement
message to all connected source elements, which then send a barrier acknowledgement
in much the same way, and each source element changes its barrier state causing
the sequence number or counting space to be reset, and newly sent packets to indicate
the new barrier state. Upon receiving all its barrier acknowledgement messages,
each destination stage changes its barrier state, and then the destination can
manipulate (e.g., resequence, reassemble, send, place in an output queue, etc.)
packets marked with the previous barrier state as it knows that every packet from
the previous barrier state has been received. This transition of barrier phases
and limiting the number of packets sent per barrier phases may be used to limit
the range of the sequence number space and the size of outgoing, resequencing,
and reassembling buffers, as well providing a packet time-out mechanism which may
be especially useful when non-continuous sequence numbers or time-stamps are included
in packets for resequencing and/or reassembly purposes.