USB: u_ether: Align TX buffers to improve DL throughput
USB2 controller's DMA performance degrades when request buffers are not aligned to 4 bytes. Driver is already taking care of RX buffers. Add changes to align TX skb if skb data is not starting at aligned address. Though it adds penalty of memcpy but still improves performance by overcoming USB DMA bottleneck. Buffers are currently already aligned if RNDIS aggregation is used. Issue is seen only with ECM or RNDIS with aggregation disabled. RNDIS DL aggregation can be disabled using: -> echo 0 > /sys/module/g_android/parameters/rndis_dl_max_pkt_per_xfer While at it, also double DL buffers to 20 from 10, as USB interrupt is enabled for every 5th buffer. This often causes under runs if USB controller also uses interrupt latency >= 1msec with data transfer >= 120Mbps and packet size = 1500 bytes. Change-Id: Idfd960dff73359fda8c9bc66f7056bafe2dc3265 Signed-off-by:Manu Gautam <mgautam@codeaurora.org> Signed-off-by:
Sivasri Kumar Vanka <sivasri@codeaurora.org>
Loading
Please register or sign in to comment