summaryrefslogtreecommitdiff
path: root/drivers/staging/octeon/ethernet-defines.h
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2010-02-15 15:06:47 -0800
committerRalf Baechle <ralf@linux-mips.org>2010-02-27 12:53:30 +0100
commit4898c560103fb8075c10a8e9d70e0ca26873075e (patch)
tree9d2122e65326bef1b8bde2ce089c4e47e9e5c2ae /drivers/staging/octeon/ethernet-defines.h
parent86568dc41e8c7edcf6d014a64d143536d24b6a5d (diff)
Staging: Octeon: Free transmit SKBs in a timely manner
If we wait for the once-per-second cleanup to free transmit SKBs, sockets with small transmit buffer sizes might spend most of their time blocked waiting for the cleanup. Normally we do a cleanup for each transmitted packet. We add a watchdog type timer so that we also schedule a timeout for 150uS after a packet is transmitted. The watchdog is reset for each transmitted packet, so for high packet rates, it never expires. At these high rates, the cleanups are done for each packet so the extra watchdog initiated cleanups are neither needed nor triggered. Signed-off-by: David Daney <ddaney@caviumnetworks.com> To: linux-mips@linux-mips.org To: netdev@vger.kernel.org To: gregkh@suse.de Cc: Eric Dumazet <eric.dumazet@gmail.com> Patchwork: http://patchwork.linux-mips.org/patch/968/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> This version has spelling and comment changes based on feedback from Eric Dumazet.
Diffstat (limited to 'drivers/staging/octeon/ethernet-defines.h')
-rw-r--r--drivers/staging/octeon/ethernet-defines.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/octeon/ethernet-defines.h b/drivers/staging/octeon/ethernet-defines.h
index 00a8561726ba..6a2cd50a17df 100644
--- a/drivers/staging/octeon/ethernet-defines.h
+++ b/drivers/staging/octeon/ethernet-defines.h
@@ -95,10 +95,11 @@
/*#define DONT_WRITEBACK(x) 0 */
/* Maximum number of SKBs to try to free per xmit packet. */
-#define MAX_SKB_TO_FREE 10
#define MAX_OUT_QUEUE_DEPTH 1000
-#define FAU_NUM_PACKET_BUFFERS_TO_FREE (CVMX_FAU_REG_END - sizeof(uint32_t))
+#define FAU_TOTAL_TX_TO_CLEAN (CVMX_FAU_REG_END - sizeof(uint32_t))
+#define FAU_NUM_PACKET_BUFFERS_TO_FREE (FAU_TOTAL_TX_TO_CLEAN - sizeof(uint32_t))
+
#define TOTAL_NUMBER_OF_PORTS (CVMX_PIP_NUM_INPUT_PORTS+1)