summaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon/octeon-ethernet.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/octeon-ethernet.h
parent86568dc41e8c7edcf6d014a64d143536d24b6a5d (diff)
downloadop-kernel-dev-4898c560103fb8075c10a8e9d70e0ca26873075e.zip
op-kernel-dev-4898c560103fb8075c10a8e9d70e0ca26873075e.tar.gz
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/octeon-ethernet.h')
-rw-r--r--drivers/staging/octeon/octeon-ethernet.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/octeon/octeon-ethernet.h b/drivers/staging/octeon/octeon-ethernet.h
index 8d09210..db2a3cc 100644
--- a/drivers/staging/octeon/octeon-ethernet.h
+++ b/drivers/staging/octeon/octeon-ethernet.h
@@ -4,7 +4,7 @@
* Contact: support@caviumnetworks.com
* This file is part of the OCTEON SDK
*
- * Copyright (c) 2003-2007 Cavium Networks
+ * Copyright (c) 2003-2010 Cavium Networks
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, Version 2, as
@@ -31,8 +31,6 @@
#ifndef OCTEON_ETHERNET_H
#define OCTEON_ETHERNET_H
-#include <linux/hrtimer.h>
-
/**
* This is the definition of the Ethernet driver's private
* driver state stored in netdev_priv(dev).
@@ -59,9 +57,7 @@ struct octeon_ethernet {
uint64_t link_info;
/* Called periodically to check link status */
void (*poll) (struct net_device *dev);
- struct hrtimer tx_restart_timer;
- ktime_t tx_restart_interval;
- struct delayed_work tx_clean_work;
+ struct delayed_work port_periodic_work;
struct work_struct port_work; /* may be unused. */
};
@@ -101,6 +97,7 @@ extern char pow_send_list[];
extern struct net_device *cvm_oct_device[];
extern struct workqueue_struct *cvm_oct_poll_queue;
extern atomic_t cvm_oct_poll_queue_stopping;
+extern u64 cvm_oct_tx_poll_interval;
extern int max_rx_cpus;
extern int rx_napi_weight;
OpenPOWER on IntegriCloud