From owner-svn-src-stable@FreeBSD.ORG Thu Jun 11 22:00:54 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81D13106566C; Thu, 11 Jun 2009 22:00:54 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EC298FC30; Thu, 11 Jun 2009 22:00:54 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BM0s0a061355; Thu, 11 Jun 2009 22:00:54 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BM0seQ061353; Thu, 11 Jun 2009 22:00:54 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200906112200.n5BM0seQ061353@svn.freebsd.org> From: "George V. Neville-Neil" Date: Thu, 11 Jun 2009 22:00:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194042 - stable/7/sys/dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2009 22:00:55 -0000 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);