DragonFly commits List (threaded) for 2006-11
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
cvs commit: src/sys/dev/netif/ral rt2661.c rt2661var.h
sephe 2006/11/20 07:03:26 PST
DragonFly src repository
Modified files:
sys/dev/netif/ral rt2661.c rt2661var.h
Log:
Rework rt2661 TX interrupts processing
The Clues: [1]
"TX DMA Done Interrupt":
A frame has been DMAed to ASIC, probably stored in an ASIC internal
TX FIFO. The TX descriptor and the resource in host memory are useless
to ASIC
"TX Done Interrupt":
The transfering of a frame, which probably is from ASIC internal TX
FIFO, is done by ASIC, and the information concerning this transfering
is available
The Problems:
- The original driver reduces TX ring occupation counter on "TX Done
Interrupt", though TX descriptors and related resources are already
reaped on "TX DMA Done Interrupt"
- For some (maybe all ;-) ASIC, "TX Done Interrupt" comes less frequent
than "TX DMA Done Interrupt", probably due to the "ASIC internal TX
FIFO", or just because it is not intended to be used in the original
driver's way ;-)
So useless TX descriptors slowly occupy TX ring and result in an almost
full TX ring at the most of the time if new frames keep coming at high
rate (e.g. during a long time scp(1))
The Fixes:
- Move rate control context out of rt2661_tx_data, so it is not 1:1 mapping
with TX descriptor. This degenerates rt2661_tx_data to rt2661_rx_data,
so merge them and rename the new structure rt2661_data
- Add a rate control context queue, which temporarily holds rate control
contexts for each data transfering
- Allocate the rate control context on fly during rt2661_tx_data(). Since
this context is allocated using M_NOWAIT, it is possible that the
alloctation fails. if this happens, later rate control information will
not be gathered (I think this is acceptable :-) and the reference to the
ieee80211_node is freed immediately at the end of rt2661_tx_data().
After above three changes reaping of TX descriptors and related resources no
longer needs to be synchronized with rate control information gathering.
- Change the meaning of rt2661_tx_desc.qid, it now indicates whether rate
control information needs to be gathered (it is not necessary at all for
control/management frames)
- On "TX DMA Done Interrupt" instead of on "TX Done Interrupt", if some TX
descriptors and related resources are reaped, reduce TX ring occupation
counter, and kick ifnet.if_start
As of this commit, my Edimax EW-7608PG can tranfer data stably [2] without
being choked half way.
#
# [1] These clues are infered from a comment concering TX descriptor
# structure in Linux RT61 driver
# [2] Though data tranfering is quite stable, its performance is still
# far from expectation. In infrastructured mode, 3 meters away from
# the AP, I only got 6Mbits/s - 7Mbits/s, but under the same conditions
# receiving performance is quite OK (~20Mbits/s)
#
Revision Changes Path
1.8 +107 -81 src/sys/dev/netif/ral/rt2661.c
1.3 +11 -11 src/sys/dev/netif/ral/rt2661var.h
http://www.dragonflybsd.org/cvsweb/src/sys/dev/netif/ral/rt2661.c.diff?r1=1.7&r2=1.8&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/dev/netif/ral/rt2661var.h.diff?r1=1.2&r2=1.3&f=u
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]