[realtek] Optimising the rtl8139 driver for low latency!

korahs@vsnl.com korahs@vsnl.com
Thu, 28 Jun 2001 16:18:03 +0530 (IST)


Hi,

I've been studying the realtek driver (v. 1.07) to try and optimize it for low latency operation. I have a few doubts about the code and the working of the chip which I hope someone can clarify. I am listing them out below.

1. What is the minimum value to which TX_FIFO_THRESH and RX_FIFO_THRESH can be set. I want transmission to start as soon as bytes are transfered to the chip.

2. Which line starts transmission in rtl8129_start_xmit(). Is it 
	outl (virt_to_bus(tp->tx_buf[entry],...)
  or
	outl (tp->tx_flag | (skb->len....).

3. Is there a maximum value that RX_BUF_LEN can be set to and what is it?

4. How exactly does the rtl8129_rx work. How does the chip know where in rx_ring the next packet is to be copied (is it RxBufPtr)? Could somebody explain the updating of the cur_rx pointer below..
              cur_rx = (cur_rx + rx_size + 4 + 3)& ~3;
              outw (cur_rx - 16, ioaddr + RxBufPtr);

Also how does the single linear ring architecture compare with the descriptor based arch of most other drivers. It seems that we can't have a window with a dirty_rx and cur_rx pointer? Doesn't that mean that packets have to be processed immediately?

5. How do I discard/pop the top packet in the rx_ring. 

I understand that there are a lot of questions. But from reading the archives, this seems like the best place to ask. Thanks in advance.

Thommen

PS. I see that people have had several problems with the 1.07 driver, but seem happier with 1.08. Is there a lot of difference between the two and where can I obtain the 1.08 driver? Thanks again.