rx_process for isoc

Duncan Sands duncan.sands at math.u-psud.fr
Fri Nov 18 10:18:59 EST 2005


> Hi all, hi Duncan

Hi Staszek,

> I wonder what for you make so complicated usbatm_rx_process 
> for isoc frames. For me any benefit for such code is calling 
> usbatm_extract_cells only one when all frames have 
> actual_length == packet_size. Is that correct?
> Why something like this is not enough?

that would work too, but in the case when data is coming in fast,
so all iso packets are full, you have to do a partial copy to
cell_buf for *every* iso packet (at least with the speedtouch)
because the packet length is not divisible by the stride (for
the speedtouch, the stride is 53, and the packet size is 640
or 960).  Maybe it should be profiled.

> if (usb_pipeisoc(urb->pipe)) {
> 	int i;
> 
> 	for (i = 0; i < urb->number_of_packets; i++) {
> 		if (!urb->iso_frame_desc[i].status) {
> 			unsigned int len = urb->iso_frame_desc[i].actual_length;
> 			u8 *buf = urb->transfer_buffer + urb->iso_frame_desc[i].offset;
> 
> 			usbatm_extract_cells(instance, buf, len);
> 		} else {
> 			atm_rldbg(instance, "%s: status %d in frame %d!\n", __func__, urb->isoc_frame_desc[i].status, i);
> 			instance->buf_usage = 0;
> 		}
> 	}
> } else
> 
> 
> __
> Regards
> Staszek Gruszka

Best wishes,

Duncan.



More information about the Usbatm mailing list