Re: [PATCH] ucc_geth: Rework the TX logic.
From: Joakim Tjernlund <hidden>
Date: 2009-03-27 11:40:01
Also in:
netdev
pku.leo@gmail.com wrote on 27/03/2009 11:39:07:
On Fri, Mar 27, 2009 at 6:23 PM, Joakim Tjernlundquoted
quoted
quoted
- /* We freed a buffer, so now we can restarttransmission */quoted
quoted
- if (netif_queue_stopped(dev)) - netif_wake_queue(dev); + dev_kfree_skb(ugeth->tx_skbuff[txQ][tx_ind]); + ugeth->tx_skbuff[txQ][tx_ind] = NULL; + out_be32(bd2buf(bd), 0); /* Mark it free */Now I see why you depend on the buffer to judge if the BD ring is full. If you want to do this, make sure it's well documented in
code,
quoted
quoted
or others will be confused. And as Anton already commented, in/out access is slow. I think the original way can be fixed if you think it's broken, and will have better performance.The code could use a better comment, but I really think this method is superior and more robust. The problem is that in/out functions is much slower than it has to be for QE IO memory. The original way is broken and I tired to fix it but it always broke as soon one applied some load.The only difference I see between your method and the original code is that you update the cleanup progress on every BD. The original code updates progress only after all sent BDs are processed. You can try move ugeth->confBd[txQ] = bd; into the loop then it will be the same as your proposed code.
Already tried that+lots of other combinatios. Doesn't work