From owner-cvs-all Thu Sep 7 4:21: 7 2000 Delivered-To: cvs-all@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id C355237B422; Thu, 7 Sep 2000 04:21:00 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.9.3/1.13) id OAA61753; Thu, 7 Sep 2000 14:20:19 +0300 (EEST) Date: Thu, 7 Sep 2000 14:20:18 +0300 From: Ruslan Ermilov To: Luigi Rizzo Cc: Garrett Wollman , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet ip_divert.c ip_icmp.c ip_input.c ip_mroute.c ip_output.c raw_ip.c udp_usrreq.c Message-ID: <20000907142018.H46475@sunbay.com> References: <20000907092610.A46475@sunbay.com> <200009070728.JAA27581@info.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200009070728.JAA27581@info.iet.unipi.it>; from luigi@info.iet.unipi.it on Thu, Sep 07, 2000 at 09:28:48AM +0200 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Sep 07, 2000 at 09:28:48AM +0200, Luigi Rizzo wrote: > > > According to Mike Karels (in a message to me dated 2 June 1997), > > > BSD/OS leaves the ip_id field in network order all the time, but swaps > > > in the raw IP code to preserve the old interface. There is never any > > > arithmetic performed on the IP ID, only comparisons for equality, so > > > leaving out the swap should save a cycle or three. > > > > > The same does NetBSD, but I feel more logical is to have all these fields > > in host byte order right after ip_input() processing. > > The problem with swapping is that such fields can be part of an mbuf cluster, > which is potentially shared by other flows of control and thus not > expected to be modified. > Yes, my patch has fixed in particular PR 16240 which is exactly this problem. Again, I think it is logical to have all three fields (ip_len, ip_off and ip_id) in the ``same'' (host or network) byte order throughout the code, rather than handle `ip_id' differently (did you look over the changes?) -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message