[realtek] Optimising the rtl8139 driver for low latency!
Sat, 30 Jun 2001 16:14:22 +0530 (IST)
Thanks a lot for that. A lot of my doubts have been cleared up and I feel
more confident now. But there are still a few grey areas which I am sure you
> > How do I discard/pop the top packet in the rx_ring.
> Move the ring-write-block pointer "RxBufPtr".
I am not sure I follow this. What does RxBufPtr point to? Assuming that it
points to the beginning of the just received packet, would this macro work
pop off that packet.
#define discard_pkt() \
/* Pop top Rx packet. */\
ring_offset = tp->cur_rx % RX_RING_SIZE;\
status = le32_to_cpu(*(u32*)(tp->rx_ring + ring_offset));\
tp->cur_rx += (((status >> 16) + 4 + 3) & ~3);\
2. How do I disable the Tx IRQ? Is it ok to do this? What I basically want
is to copy the int handling part to the rlt8129_xmit to eliminate the
overhead of Tx interrupt. Thus the xmit routine can become "blocking until
3. Will the following two statements suspend and resume the operation of the
/*Disable interrupts by clearing the interrupt mask.*/
outw(0x0000, ioaddr + IntrMask);
/* Enable interrupts by setting the interrupt mask.*/
K,ioaddr + IntrMask);
4. I have written a macro to enque a packet for transmission. Could you
check if this is right.
#define tx_enq_pkt(pkt_ptr,pkt_size) \
unsigned long entry;\
entry = tp->cur_tx % TX_RING_SIZE;\
outl(virt_to_bus(tp->tx_buf[entry]), ioaddr + TxAddr0 + entry * 4);\
outl(tp->tx_flag | (pkt_size >= ETH_ZLEN ? pkt_size : ETH_ZLEN), ioaddr +
TxStatus0 + entry * 4);\
In case you are wondering, I am trying to get the realtek driver to work
with GAMMA for a cluster we are setting up in our department. These are
early days, but we hope we can show some performance improvement for
Once again, thanks in advance.