Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933689Ab0BYUoj (ORCPT ); Thu, 25 Feb 2010 15:44:39 -0500 Received: from mail-iw0-f177.google.com ([209.85.223.177]:60026 "EHLO mail-iw0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933629Ab0BYUog (ORCPT ); Thu, 25 Feb 2010 15:44:36 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=Jk+TX/ROu1QgX5c38HG8dI+uNUJwB22X1/7SBCJwYed7UWwD+sNTXi8dBnvuTlqzIW MLyoilLT/hkNPqHzTzFeSeEmS1W3OFLroamxE182dUTZQpzqPtDRaUUew148SaX3avGS LqAWFrH0HN1PAWDIY3lHgqomUjVZs0YvGR9lo= Message-ID: <4B86E129.1040506@gmail.com> Date: Thu, 25 Feb 2010 15:44:25 -0500 From: William Allen Simpson User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Linus Torvalds , Andrew Morton CC: Linux Kernel Developers , Linux Kernel Network Developers , David Miller , Andi Kleen Subject: [PATCH v5 3/7] tcp: harmonize tcp_vx_rcv header length assumptions References: <4B86DDCB.50608@gmail.com> In-Reply-To: <4B86DDCB.50608@gmail.com> Content-Type: multipart/mixed; boundary="------------040505010600070500050101" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 12397 Lines: 188 This is a multi-part message in MIME format. --------------040505010600070500050101 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Harmonize tcp_v4_rcv() and tcp_v6_rcv() -- better document tcp doff and header length assumptions, and carefully compare implementations. Reduces multiply/shifts, marginally improving speed. Removes redundant tcp header length checks before checksumming. Instead, assumes (and documents) that any backlog processing and transform policies will carefully preserve the header, and will ensure the socket buffer length remains >= the header size. Stand-alone patch, originally developed for TCPCT. Signed-off-by: William.Allen.Simpson@gmail.com Reviewed-by: Andi Kleen --- include/net/xfrm.h | 7 ++++++ net/ipv4/tcp_ipv4.c | 45 +++++++++++++++++++++----------------- net/ipv6/tcp_ipv6.c | 59 ++++++++++++++++++++++++++++---------------------- 3 files changed, 65 insertions(+), 46 deletions(-) --------------040505010600070500050101 Content-Type: text/plain; x-mac-type="54455854"; x-mac-creator="0"; name="len_th+2c5+2.6.33.patch" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="len_th+2c5+2.6.33.patch" ZGlmZiAtLWdpdCBhL2luY2x1ZGUvbmV0L3hmcm0uaCBiL2luY2x1ZGUvbmV0L3hmcm0uaApp bmRleCA2MGMyNzcwLi44MTQ5MmExIDEwMDY0NAotLS0gYS9pbmNsdWRlL25ldC94ZnJtLmgK KysrIGIvaW5jbHVkZS9uZXQveGZybS5oCkBAIC05NzUsNiArOTc1LDEzIEBAIHhmcm1fc3Rh dGVfYWRkcl9jbXAoc3RydWN0IHhmcm1fdG1wbCAqdG1wbCwgc3RydWN0IHhmcm1fc3RhdGUg KngsIHVuc2lnbmVkIHNob3J0CiB9CiAKICNpZmRlZiBDT05GSUdfWEZSTQorLyoKKyAqIEZv ciB0cmFuc3BvcnQsIHRoZSBwb2xpY3kgaXMgY2hlY2tlZCBiZWZvcmUgdGhlIHByZXN1bWVk IG1vcmUgZXhwZW5zaXZlCisgKiBjaGVja3N1bS4gVGhlIHRyYW5zcG9ydCBoZWFkZXIgaGFz IGFscmVhZHkgYmVlbiBjaGVja2VkIGZvciBzaXplLCBhbmQgaXMKKyAqIGd1YXJhbnRlZWQg dG8gYmUgY29udGlndW91cy4gVGhlc2UgcG9saWNpZXMgbXVzdCBub3QgYWx0ZXIgdGhlIGhl YWRlciBvcgorICogaXRzIHBvc2l0aW9uIGluIHRoZSBidWZmZXIsIGFuZCBzaG91bGQgbm90 IHNob3J0ZW4gdGhlIGJ1ZmZlciBsZW5ndGgKKyAqIHdpdGhvdXQgZ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kJCQkgaW5ldDZfaWlmKHNrYikpOwogCQlpZiAoc2syICE9IE5VTEwpIHsK LQkJCXN0cnVjdCBpbmV0X3RpbWV3YWl0X3NvY2sgKnR3ID0gaW5ldF90d3NrKHNrKTsKLQkJ CWluZXRfdHdza19kZXNjaGVkdWxlKHR3LCAmdGNwX2RlYXRoX3Jvdyk7Ci0JCQlpbmV0X3R3 c2tfcHV0KHR3KTsKKwkJCWluZXRfdHdza19kZXNjaGVkdWxlKGluZXRfdHdzayhzayksICZ0 Y3BfZGVhdGhfcm93KTsKKwkJCWluZXRfdHdza19wdXQoaW5ldF90d3NrKHNrKSk7CiAJCQlz ayA9IHNrMjsKIAkJCWdvdG8gcHJvY2VzczsKIAkJfQotLSAKMS42LjMuMwoK --------------040505010600070500050101-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/