Patent ID: 7404058

Claim:
A method of avoiding collisions while enqueuing and dequeuing packets in a memory, comprising: maintaining a packet memory for queuing packets belonging to one or more communication connections; operating an enqueue process configured to enqueue packets in the packet memory; operating a dequeue process configured to dequeue packets from the packet memory; receiving a first packet via a first communication link; identifying a first communication connection to which the packet belongs; prior to enqueuing the first packet in the packet memory, exchanging information between the enqueue process and the dequeue process to determine if said enqueuing would collide with a dequeuing of a previously enqueued packet belonging to the first communication connection; if said enqueuing would collide with said dequeuing of a previously enqueued packet, pausing said enqueuing; and prior to dequeuing the first packet from the packet memory, exchanging information between the dequeue process and the enqueue process to determine if said dequeuing would collide with an enqueuing of a second packet belonging to the first communication connection.