From owner-cvs-all Thu Sep 7 0:27:14 2000 Delivered-To: cvs-all@freebsd.org Received: from info.iet.unipi.it (info.iet.unipi.it [131.114.9.184]) by hub.freebsd.org (Postfix) with ESMTP id 1751837B423; Thu, 7 Sep 2000 00:27:10 -0700 (PDT) Received: (from luigi@localhost) by info.iet.unipi.it (8.9.3/8.9.3) id JAA27581; Thu, 7 Sep 2000 09:28:48 +0200 (CEST) (envelope-from luigi) From: Luigi Rizzo Message-Id: <200009070728.JAA27581@info.iet.unipi.it> 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 In-Reply-To: <20000907092610.A46475@sunbay.com> from Ruslan Ermilov at "Sep 7, 2000 09:26:10 am" To: Ruslan Ermilov Date: Thu, 7 Sep 2000 09:28:48 +0200 (CEST) Cc: Garrett Wollman , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 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. cheers luigi -----------------------------------+------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL/FAX: +39-050-568.533/522 . via Diotisalvi 2, 56126 PISA (Italy) Mobile +39-347-0373137 -----------------------------------+------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message