From owner-freebsd-net@freebsd.org Thu Feb 4 15:57:30 2016 Return-Path: Delivered-To: freebsd-net@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 C87A5A9BE14 for ; Thu, 4 Feb 2016 15:57:30 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from phabric-backend.rbsd.freebsd.org (unknown [IPv6:2607:fc50:2000:101::1bb:73]) by mx1.freebsd.org (Postfix) with ESMTP id B3AA31F16 for ; Thu, 4 Feb 2016 15:57:30 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by phabric-backend.rbsd.freebsd.org (Postfix, from userid 1346) id B19BF1070E6; Thu, 4 Feb 2016 15:57:30 +0000 (UTC) Date: Thu, 4 Feb 2016 15:57:30 +0000 To: freebsd-net@freebsd.org From: "gallatin (Andrew Gallatin)" Reply-to: D5185+325+ec92cccb639ec0fa@reviews.freebsd.org Subject: [Differential] [Updated] D5185: tcp/lro: Allow network drivers to set the limit for TCP ACK/data segment aggregation limit Message-ID: <92af95e80a60b52489dfd5ff53883ea1@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , Thread-Topic: D5185: tcp/lro: Allow network drivers to set the limit for TCP ACK/data segment aggregation limit X-Herald-Rules: <64> X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: Precedence: bulk In-Reply-To: References: Thread-Index: NTU0NmM0Mjk2NjdmNzVhNmM3MzlkMWQyNTdmIFazdOo= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2016 15:57:30 -0000 gallatin added a comment. It might be nice to make these general tunables that could be done centrally and apply to all drivers, but that's probably outside the scope of the review. INLINE COMMENTS sys/netinet/tcp_lro.c:655 Can you just initialize ack_append_limit to the max value for whatever type it is and eliminate the check for a 0 ack_append_limit? That would eliminate one clause from this conditional. sys/netinet/tcp_lro.c:684 Rather than adding more clauses to this condition, how would to feel about setting an append limit in bytes, and replacing the hard-coded 65535 with this new limit? The default lro init would initialize the new limit to 65535. And hn(4) would initialize it in terms of multiples of its MTU. REVISION DETAIL https://reviews.freebsd.org/D5185 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: sepherosa_gmail.com, network, adrian, delphij, royger, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, hselasky, np, transport, gallatin Cc: freebsd-virtualization-list, freebsd-net-list