Re: [E1000-devel] Transmission limit
From: Martin Josefsson <hidden>
Date: 2004-12-10 16:24:12
Attachments
- signature.asc [application/pgp-signature] 189 bytes
From: Martin Josefsson <hidden>
Date: 2004-12-10 16:24:12
On Thu, 2004-12-02 at 19:23, Robert Olsson wrote:
Hello! Below is little patch to clean skb at xmit. It's old jungle trick Jamal and I used w. tulip. Note we can now even decrease the size of TX ring.
Just a small unimportant note.
--- drivers/net/e1000/e1000_main.c.orig 2004-12-01 13:59:36.000000000 +0100 +++ drivers/net/e1000/e1000_main.c 2004-12-02 20:37:40.000000000 +0100@@ -1820,6 +1820,10 @@ return NETDEV_TX_LOCKED; } + + if( adapter->tx_ring.next_to_use - adapter->tx_ring.next_to_clean > 80 ) + e1000_clean_tx_ring(adapter); + /* need: count + 2 desc gap to keep tail from touching * head, otherwise try next time */ if(E1000_DESC_UNUSED(&adapter->tx_ring) < count + 2) {
This patch is pretty broken, I doubt you want to call e1000_clean_tx_ring(), I think you want some variant of e1000_clean_tx_irq() :) e1000_clean_tx_irq() takes adapter->tx_lock which e1000_xmit_frame() also does so it will need some modification. And it should use E1000_DESC_UNUSED as Scott pointed out. -- /Martin