From owner-freebsd-net@FreeBSD.ORG  Fri Oct 12 21:06:31 2012
Return-Path: <owner-freebsd-net@FreeBSD.ORG>
Delivered-To: net@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
 by hub.freebsd.org (Postfix) with ESMTP id 5E28F12F;
 Fri, 12 Oct 2012 21:06:31 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com
 [209.85.160.54])
 by mx1.freebsd.org (Postfix) with ESMTP id 2878F8FC12;
 Fri, 12 Oct 2012 21:06:30 +0000 (UTC)
Received: by mail-pb0-f54.google.com with SMTP id rp8so3543433pbb.13
 for <multiple recipients>; Fri, 12 Oct 2012 14:06:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date
 :x-google-sender-auth:message-id:subject:from:to:cc:content-type;
 bh=0UzXZe+e4AUF/goNW4ZmJ9ES2UTyJHt8SK6c1aRQGPA=;
 b=SQlCWPJloHspz5n1BIrCb3cNs4K6R+/8I4gpGU+ZM22Utz6eeooBv5UqtuEL1q7VfD
 tLzjL9ArJgJ/vOKMnN7j6BEmQQRP06iiXFVMHqSR9MZVNHFYWF4F7JZc0mAMr1QH4s8w
 pjFaqTdwWB+IUgIoevKGf6rePb7dCr1imrokL46ukDU42ln1Nsz/CdYItQURa7huA9Fn
 cZ42lxI7kJKZZvOetWxxDqf6GKn5tSv7YW0UN+hPa+QJwkTNIxAr/xLzqTB2w9dfVIxg
 Kw++y8NQf79Jcz60BJgZZjsH0dkSbD7J1IzopyMLwUK5/QdS4zWhB6kBQYM7CQ7uhQct
 cbYA==
MIME-Version: 1.0
Received: by 10.68.197.9 with SMTP id iq9mr16576685pbc.130.1350075989826; Fri,
 12 Oct 2012 14:06:29 -0700 (PDT)
Sender: adrian.chadd@gmail.com
Received: by 10.68.146.233 with HTTP; Fri, 12 Oct 2012 14:06:29 -0700 (PDT)
In-Reply-To: <20121012124709.GX89655@FreeBSD.org>
References: <20121009154128.GU34622@FreeBSD.org>
 <20121012124640.GW89655@FreeBSD.org>
 <20121012124709.GX89655@FreeBSD.org>
Date: Fri, 12 Oct 2012 17:06:29 -0400
X-Google-Sender-Auth: sVMmEDD8lUneuBnFNo1XqM0hOdg
Message-ID: <CAJ-VmomVRH6gAA5busSVAgCa0As7v=HF41XQSL_BUx=NXRj04w@mail.gmail.com>
Subject: Re: [CFT/Review] net byte order for AF_INET
From: Adrian Chadd <adrian@freebsd.org>
To: Gleb Smirnoff <glebius@freebsd.org>
Content-Type: text/plain; charset=ISO-8859-1
Cc: net@freebsd.org
X-BeenThere: freebsd-net@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-net>,
 <mailto:freebsd-net-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-net>
List-Post: <mailto:freebsd-net@freebsd.org>
List-Help: <mailto:freebsd-net-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-net>,
 <mailto:freebsd-net-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Oct 2012 21:06:31 -0000

On 12 October 2012 08:47, Gleb Smirnoff <glebius@freebsd.org> wrote:
> On Fri, Oct 12, 2012 at 04:46:40PM +0400, Gleb Smirnoff wrote:
> T>   Latest version of patch for further review and testing
> T> Changelog:
> T>  - Fixed TCP checksums
> T>  - Added comment about raw sockets byte ordering.
> T>  - More explicit htons(0), when assigning ip_off field.

I've just eyeballed the patch again:

* You've patched SCTP and IGMP - have you done any SCTP and IGMP testing at all?
* This kind of stuff almost begs for some kind of automated test suite
for testing IPv4, IPv6, TCP/UDP/ICMP, IGMP, SCTP, all the tunneling
stuff - is there anything out there like this? I know of the IPv6 test
suites that exist; what about being able to regression test the other
stuff?

Also whilst I'm nitpicking - do you think there's any performance
issues that may creep up? Remember that "performance issues" to me
don't necessarily mean "on a current generation intel", but mean "all
those cache starved ARM/MIPS/PPC/Atom boards out there that aren't
natively in network byte order." Making everything use network byte
order throughout the stack is nice for read-only packet work and nice
for cache-happy i386s, but what about the rest of the world?

(Don't get me wrong, I think this tidy-up is very nice and maybe quite
needed, I just wonder what other unknown magic is hiding behind the
existing code..)



Adrian