rx_process for isoc

Stanislaw Gruszka stf_xl at wp.pl
Fri Nov 18 17:42:34 EST 2005


> > AFIAK when all iso packets are full then urb->actual_length 
> > == packet_size*num_packets == rx_channel.buf_size. 
> 
> Yes, but the same situation arises partially whenever large network
> packets are coming in (large = bigger than the iso packet size).  For
> example, a standard maximum ethernet packet amounts to about 2 full
> iso packets followed by a partial packet (assuming an iso packet size
> of 640 bytes).  It seems a pity to do two pointless copies to cell_buf.
> I can't deny that it adds complexity.  I will try to do some profiling
> and see if it actually gains anything (probably not).  If not, then it
> is easy to go back to the original, simpler version.

53 bytes are copied for every 640 incoming bytes, 
so 8.28 % data is copied. If we assume connection speed 16Mbits/s
we make copy 169 kbytes per second (173 bytes per mili second). 
It's not so bad on one hand, and quite a lot on other hand. Have 
fun with profiling :).

BTW when I did some timing test a long ago I discaver function 
vcc->push(vcc, skb) takes the most time of loop (of course when is called) 

> > is true and actual_length == 0 when error occurs. 
> > USB guys should know this.
> 
> Yes - want to ask them?

Only if you plan to use condition usb->actual_length == rx_channel.buf_size, 
it could be make easiest usbatm_rx_process() as same condition can be used
to check errors for bulk pipe and isoc pipe with full filled frames.

__
Thanks
Staszek



More information about the Usbatm mailing list