Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit dbb51c9c authored by Manu Gautam's avatar Manu Gautam Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarManu Gautam <mgautam@codeaurora.org>
Signed-off-by: default avatarSivasri Kumar Vanka <sivasri@codeaurora.org>
parent 71da58f1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment