linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: 8139_tx_interrupt - Tx time
@ 2003-10-10 18:56 Zwane Mwaikambo
  0 siblings, 0 replies; 2+ messages in thread
From: Zwane Mwaikambo @ 2003-10-10 18:56 UTC (permalink / raw)
  To: Adam Flizikowski; +Cc: Linux Kernel

On Fri, 10 Oct 2003, Adam Flizikowski wrote:

> Hi,
> 
> I am trying to find out how long it takes to push packet off the NIC in
> 8139_tx_interrupt(){} (kernel 2.4.20)
> 
> but i don't know how to identify packet in this loop - i know that "entry"
> stands for the packet but in the loop underneath:
> /* code snippet for 8139_tx_interrupt(){}*/
> 
> 1726         while (tx_left > 0) {
> 1727                 int entry = dirty_tx % NUM_TX_DESC;
> 1728                 int txstatus;
> 
> ...
> 
> 1762
> 1763                 dirty_tx++;
> 1764                 tx_left--;    // <- is single packet sent just
> here??????
> 1765         }
> 
> what "tx_left" and "dirty_tx" variables stand for? Is single iteration
> through the loop (lines 1726-1765) related to SINGLE packet transmission?

No, that simply checks tx status, the transmission is done elsewhere.

> I wanted to put some probes inside tx_interrupt but not sure where it should
> start/stop measuring to show single packet transmission time.

tx_interrupt is normally triggered on transmission completion, you 
probably want to sample from;

rtl8139_start_xmit {
...
	RTL_W32_F (TxStatus0 + (entry * sizeof (u32)),
		   tp->tx_flag | max(len, (unsigned int)ETH_ZLEN));
...
}

That is when the packet hits the hardware, you could keep per tx 
descriptor start/end timestamps with end being in tx_interrupt.

Hope that gets you somewhere.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* 8139_tx_interrupt - Tx time
@ 2003-10-10 12:52 Adam Flizikowski
  0 siblings, 0 replies; 2+ messages in thread
From: Adam Flizikowski @ 2003-10-10 12:52 UTC (permalink / raw)
  To: linux-kernel

Hi,

I am trying to find out how long it takes to push packet off the NIC in
8139_tx_interrupt(){} (kernel 2.4.20)

but i don't know how to identify packet in this loop - i know that "entry"
stands for the packet but in the loop underneath:
/* code snippet for 8139_tx_interrupt(){}*/

1726         while (tx_left > 0) {
1727                 int entry = dirty_tx % NUM_TX_DESC;
1728                 int txstatus;

...

1762
1763                 dirty_tx++;
1764                 tx_left--;    // <- is single packet sent just
here??????
1765         }

what "tx_left" and "dirty_tx" variables stand for? Is single iteration
through the loop (lines 1726-1765) related to SINGLE packet transmission?

I wanted to put some probes inside tx_interrupt but not sure where it should
start/stop measuring to show single packet transmission time.


regards

adam


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-10 18:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-10 18:56 8139_tx_interrupt - Tx time Zwane Mwaikambo
  -- strict thread matches above, loose matches on Subject: below --
2003-10-10 12:52 Adam Flizikowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).