From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 06:26:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 40EFD52F; Thu, 29 Aug 2013 06:26:23 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 151C82545; Thu, 29 Aug 2013 06:26:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7T6QMwH004419; Thu, 29 Aug 2013 06:26:22 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7T6QMfD004393; Thu, 29 Aug 2013 06:26:22 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308290626.r7T6QMfD004393@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 29 Aug 2013 06:26:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255015 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 06:26:23 -0000 Author: np Date: Thu Aug 29 06:26:22 2013 New Revision: 255015 URL: http://svnweb.freebsd.org/changeset/base/255015 Log: Merge r254386 from user/np/cxl_tuning. Add an INET|INET6 check missing in said revision. r254386: Flush inactive LRO entries periodically. Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Directory Properties: head/sys/ (props changed) Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Thu Aug 29 00:38:24 2013 (r255014) +++ head/sys/dev/cxgbe/adapter.h Thu Aug 29 06:26:22 2013 (r255015) @@ -559,6 +559,7 @@ struct adapter { bus_dma_tag_t dmat; /* Parent DMA tag */ struct sge sge; + int lro_timeout; struct taskqueue *tq[NCHAN]; /* taskqueues that flush data out */ struct port_info *port[MAX_NPORTS]; Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Aug 29 00:38:24 2013 (r255014) +++ head/sys/dev/cxgbe/t4_main.c Thu Aug 29 06:26:22 2013 (r255015) @@ -4229,6 +4229,10 @@ t4_sysctls(struct adapter *sc) t4_sge_sysctls(sc, ctx, children); + sc->lro_timeout = 100; + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "lro_timeout", CTLFLAG_RW, + &sc->lro_timeout, 0, "lro inactive-flush timeout (in us)"); + #ifdef SBUF_DRAIN /* * dev.t4nex.X.misc. Marked CTLFLAG_SKIP to avoid information overload. Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu Aug 29 00:38:24 2013 (r255014) +++ head/sys/dev/cxgbe/t4_sge.c Thu Aug 29 06:26:22 2013 (r255015) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1006,6 +1007,9 @@ service_iq(struct sge_iq *iq, int budget uint32_t lq; struct mbuf *m0; STAILQ_HEAD(, sge_iq) iql = STAILQ_HEAD_INITIALIZER(iql); +#if defined(INET) || defined(INET6) + const struct timeval lro_timeout = {0, sc->lro_timeout}; +#endif limit = budget ? budget : iq->qsize / 8; @@ -1111,6 +1115,14 @@ service_iq(struct sge_iq *iq, int budget V_SEINTARM(V_QINTR_TIMER_IDX(X_TIMERREG_UPDATE_CIDX))); ndescs = 0; +#if defined(INET) || defined(INET6) + if (iq->flags & IQ_LRO_ENABLED && + sc->lro_timeout != 0) { + tcp_lro_flush_inactive(&rxq->lro, + &lro_timeout); + } +#endif + if (fl_bufs_used > 0) { FL_LOCK(fl); fl->needed += fl_bufs_used;