From owner-svn-src-stable-10@freebsd.org Thu Sep 1 08:01:14 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 517ADBCB841; Thu, 1 Sep 2016 08:01:14 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E9D7B8F; Thu, 1 Sep 2016 08:01:14 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8181DXZ056626; Thu, 1 Sep 2016 08:01:13 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8181D3l056625; Thu, 1 Sep 2016 08:01:13 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201609010801.u8181D3l056625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 1 Sep 2016 08:01:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r305189 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2016 08:01:14 -0000 Author: sephe Date: Thu Sep 1 08:01:13 2016 New Revision: 305189 URL: https://svnweb.freebsd.org/changeset/base/305189 Log: MFC 304202 tcp/lro: Make # of LRO entries tunable Reviewed by: hps, gallatin Obtained from: rrs, gallatin Sponsored by: Netflix (rrs, gallatin), Microsoft (sephe) Differential Revision: https://reviews.freebsd.org/D7499 Modified: stable/10/sys/netinet/tcp_lro.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_lro.c ============================================================================== --- stable/10/sys/netinet/tcp_lro.c Thu Sep 1 07:53:59 2016 (r305188) +++ stable/10/sys/netinet/tcp_lro.c Thu Sep 1 08:01:13 2016 (r305189) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -53,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -67,6 +69,14 @@ __FBSDID("$FreeBSD$"); #define TCP_LRO_INVALID_CSUM 0x0000 #endif +SYSCTL_NODE(_net_inet_tcp, OID_AUTO, lro, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "TCP LRO"); + +static unsigned tcp_lro_entries = LRO_ENTRIES; +SYSCTL_UINT(_net_inet_tcp_lro, OID_AUTO, entries, + CTLFLAG_RDTUN | CTLFLAG_MPSAFE, &tcp_lro_entries, 0, + "default number of LRO entries"); + int tcp_lro_init(struct lro_ctrl *lc) { @@ -81,7 +91,7 @@ tcp_lro_init(struct lro_ctrl *lc) SLIST_INIT(&lc->lro_active); error = 0; - for (i = 0; i < LRO_ENTRIES; i++) { + for (i = 0; i < tcp_lro_entries; i++) { le = (struct lro_entry *)malloc(sizeof(*le), M_DEVBUF, M_NOWAIT | M_ZERO); if (le == NULL) {