[PATCH] [10/10] pasemi_mac: Clean TX ring in poll
From: Olof Johansson <hidden>
Date: 2007-08-22 15:08:45
Also in:
netdev
Unfortunately there's no timeout for how long a packet can sit on the TX ring after completion before an interrupt is generated, and we want to have a threshold that's larger than one packet per interrupt. So we have to have a timer that occasionally cleans the TX ring even though there hasn't been an interrupt. Instead of setting up a dedicated timer for this, just clean it in the NAPI poll routine instead. Signed-off-by: Olof Johansson <redacted> --- I know I got this rejected last time it was submitted, but no answers with suggestions on how to handle it better. I'm all ears if there's a better way. (I noticed that Intel's new ixgbe driver does the same thing). Index: mainline/drivers/net/pasemi_mac.c ===================================================================
--- mainline.orig/drivers/net/pasemi_mac.c
+++ mainline/drivers/net/pasemi_mac.c@@ -1086,6 +1086,7 @@ static int pasemi_mac_poll(struct net_de int pkts, limit = min(*budget, dev->quota); struct pasemi_mac *mac = netdev_priv(dev); + pasemi_mac_clean_tx(mac); pkts = pasemi_mac_clean_rx(mac, limit); dev->quota -= pkts; --