svn commit: r194042 - stable/7/sys/dev/cxgb
George V. Neville-Neil
gnn at FreeBSD.org
Thu Jun 11 22:00:55 UTC 2009
Author: gnn
Date: Thu Jun 11 22:00:54 2009
New Revision: 194042
URL: http://svn.freebsd.org/changeset/base/194042
Log:
MFC of 194039 and part of 190330
Re-add the send queue tunable for people who do not use buffering.
Modified:
stable/7/sys/dev/cxgb/cxgb_main.c
stable/7/sys/dev/cxgb/cxgb_offload.c
Modified: stable/7/sys/dev/cxgb/cxgb_main.c
==============================================================================
--- stable/7/sys/dev/cxgb/cxgb_main.c Thu Jun 11 21:41:51 2009 (r194041)
+++ stable/7/sys/dev/cxgb/cxgb_main.c Thu Jun 11 22:00:54 2009 (r194042)
@@ -228,6 +228,15 @@ TUNABLE_INT("hw.cxgb.use_16k_clusters",
SYSCTL_UINT(_hw_cxgb, OID_AUTO, use_16k_clusters, CTLFLAG_RDTUN,
&cxgb_use_16k_clusters, 0, "use 16kB clusters for the jumbo queue ");
+/*
+ * Tune the size of the output queue.
+ */
+int cxgb_snd_queue_len = IFQ_MAXLEN;
+TUNABLE_INT("hw.cxgb.snd_queue_len", &cxgb_snd_queue_len);
+SYSCTL_UINT(_hw_cxgb, OID_AUTO, snd_queue_len, CTLFLAG_RDTUN,
+ &cxgb_snd_queue_len, 0, "send queue size ");
+
+
enum {
MAX_TXQ_ENTRIES = 16384,
MAX_CTRL_TXQ_ENTRIES = 1024,
@@ -1029,7 +1038,7 @@ cxgb_port_attach(device_t dev)
ifp->if_timer = 0; /* Disable ifnet watchdog */
ifp->if_watchdog = NULL;
- ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN;
+ ifp->if_snd.ifq_drv_maxlen = cxgb_snd_queue_len;
IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen);
IFQ_SET_READY(&ifp->if_snd);
Modified: stable/7/sys/dev/cxgb/cxgb_offload.c
==============================================================================
--- stable/7/sys/dev/cxgb/cxgb_offload.c Thu Jun 11 21:41:51 2009 (r194041)
+++ stable/7/sys/dev/cxgb/cxgb_offload.c Thu Jun 11 22:00:54 2009 (r194042)
@@ -98,6 +98,9 @@ register_tdev(struct t3cdev *tdev)
static inline void
unregister_tdev(struct t3cdev *tdev)
{
+ if (!inited)
+ return;
+
mtx_lock(&cxgb_db_lock);
TAILQ_REMOVE(&ofld_dev_list, tdev, entry);
mtx_unlock(&cxgb_db_lock);
More information about the svn-src-stable-7
mailing list