Re: CDC NCM missing Zero Length Packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 22, 2011 at 4:32 PM, Matthias Benesch <twoofseven@xxxxxxxxxx> wrote:
> Hello,
>
> I am testing the USB-CDC NCM host driver. One issue that was found by one
> USB device stack provider, is that the current implementation is not sending
> ZLP or short packets if the dwNtbOutMaxSize reported by the device is
> greater than CDC_NCM_NTB_MAX_SIZE_TX (=16383 bytes).
>

I'd like to point out, that NCM is not a Mass Storage and increasing max
buffer size in the device will lead to reduced throughput at the end. By 
increasing max buffer size, you are also increasing overall latency, which
will hit hard streaming and other services.

NCM specification was written with approach that device is less capable than
the host. The issue you mentioned, is not addressed properly in the specification,
but might be fixed in the next version of NCM spec.

16K buffer size in the current driver was chosen as a result of testing and
as a tradeoff between latency and throughput and should be suitable for LTE
speeds. Devices using 21 Mbit HSPA radio could function happily with 8K buffers.

By using bigger buffer in the device your USB device stack provider forces
host driver constantly send short packets, which will significantly reduce
benefits provided by DMA controller. While having maximum data traffic your
device interrupt load would be twice as high as the load when device buffer
size is equal or less than host driver buffer size.

As a conclusion: 
- yes, current driver version has a bug (no short packet sent) and I will
submit a patch for it after testing. 
- Patch provided a few days ago is not a proper solution and can be considered as
a workaround only.
- I also suggest you to talk to your usb device stack vendor, because your product
might work much better if issues mentioned above are taking into consideration.

Regards,
Alexey

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux