摘要 |
In general, in one aspect, the invention features a method, apparatus, and computer-readable media for sending a frame of data from a first channel to a second channel using at least one of m memory buffers for storing a frame, m being at least 2, in which n of the m buffers have an available status and p of the m buffers have an unavailable status, wherein m=n+p. It comprises reserving q of the n buffers having the available status to the first channel; reserving r of the n buffers having the available status to the second channel, wherein q+r<=n; when a frame is received from the first channel, storing the frame in i of the q buffers, wherein 1<=i<=q, and changing status of the i buffers to unavailable; selectively assigning the frame to the second channel based on a number s of the q buffers, wherein s<=q; and wherein if the frame is assigned to the second channel, the frame is sent to the second channel from the i buffers and the status of the i buffers is changed to available; and if the frame is not assigned to the second channel, the frame is discarded and the status of the i buffers is changed to available.
|