how to measure delay
jkmaline at cc.hut.fi
Sat Apr 22 14:25:18 EDT 2006
On Sat, Apr 22, 2006 at 01:12:41PM -0400, borgit wrote:
> We are trying to do some measurements with the hostAP driver code.
> Specifically we are interested to measure the delay that it takes from the
> time the frame is scheduled for transmission in the driver and to the time
> that the ACK for it comes back. Now, it is easy to start a timer at the
> point when the packet is queued for transmission, but how can we know when
> the ACK is received? Is there some kind of an interrupt generated when the
> 802.11 ACK is received?
TX event could be used for this (prism2_tx_ev() is a handler for this
event). By default, this event is not used for all frames to save some
resources, but prism2_tx_80211() could be modified to set
HFA384X_TX_CTRL_TX_OK flag for all frames.
> Also, another problem is how to time this to a high
> degree of precision. We were thinking of using the jiffies value for this,
> but that value only has precision of 10 to the power of -2. We would be
> interested in something that has precision in the microseconds, like in
> tcpdump. What could we use to get such a precision?
I would consider using a CPU-specific cycle counter. get_cycles() in
asm/timex.h provides this for some CPUs.
Jouni Malinen PGP id EFC895FA
More information about the HostAP