I'm interested in evaluate the time needed to send a unicast packet.
Using a timestamp into the tx_tasklet function (as suggested by Amy)
or into the ath_intr() function (as suggested by Georg), I'm able to
the driver receive the ACK for the packet sent.
However, I also need to konw when the hardware starts to send the packet.
The problem is that the hardware have a transmission queue, and a timestamp
in the ath_tx_txqaddbuf() function can't help me.
From: Georg Lukas [mailto:georg@...]
Sent: Wednesday, March 19, 2008 11:32 AM
Subject: Re: [Madwifi-devel] Is there any way to know "tx tstamp"?
* Amy Lu <meihsual@...> [2008-03-20 20:50]:
> I am actually doing something thing like Gorge's proposal: generating
> timestamp (using ath_get_tsf32() though) in tx_tasklet. Certainly, I've
> configured each tx desc so that the card will interrupt me for every tx
> frame. This is the closest I can reach by far. However, if I do this in
> tx_tasklet (or even more, in interrupt handler), interrupt latency is an
> issue. I can't get the exact time that a bit goes out of the card...
Unfortunately, you can't. You can achieve pretty good values when adding
the timestamp code into ath_intr(), my experiments have shown a jitter
of <20?s for most of the packets. The only problem I could not yet solve
is concurrent interrupts - maybe a real time kernel can help out here.
Is the TSF clock source precise enough for usage? At least in ad-hoc
mode it jumps and jitters around due to its distributed nature.
Could you send me your code and results off-list please? I'm very
interested in the achievable precision.
|| http://op-co.de ++ GCS/CM d? s: a-- C+++ UL+++ !P L+++ E--- W++ ++
|| gpg: 0x962FD2DE || N++ o? K- w---() O M V? PS+ PE-- Y+ PGP++ t* ||
|| Ge0rG: euIRCnet || 5 X+ R tv b+(+++) DI+(+++) D+ G e* h! r* !y+ ||
++ IRCnet OFTC OPN ||________________________________________________||
Pervasive Computing & Networking Lab. (PerLab)
Institute for Informatics and Telematics (IIT)
National Research Council (CNR)
Via G. Moruzzi, 1 || voice: +39 050 315 2437
56124 Pisa, Italy || fax: +39 050 315 2113
|| mobile: +39 328 2963760
* Emilio Ancillotti <emilio.ancillotti@...> [2008-03-27 13:41]:
> I'm interested in evaluate the time needed to send a unicast packet.
> Using a timestamp into the tx_tasklet function (as suggested by Amy)
> or into the ath_intr() function (as suggested by Georg), I'm able to
> find when
> the driver receive the ACK for the packet sent.
> However, I also need to konw when the hardware starts to send the packet.
> The problem is that the hardware have a transmission queue, and a timestamp
> in the ath_tx_txqaddbuf() function can't help me.
There are several possibilities:
1. you can use another card in monitor mode to receive the transmission
and the ACK frame. This should give the best results.
2. you can calculate the required time from the tx status report: the
used data rate, IFS times and number of retransmissions allows to do so,
you can find estimation examples in ath_rate_sample source code.
3. use the tx_tstamp field from the status register, which has
millisecond granularity ;)
Real-Time Systems and Communication
Department of Distributed Systems (IVS)
Tel: +49 391 6712788
PGP: 962FD2DE (georg@...)