From owner-freebsd-hackers Thu Feb 27 20:45:47 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DEE9637B401; Thu, 27 Feb 2003 20:45:45 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 477D743FAF; Thu, 27 Feb 2003 20:45:45 -0800 (PST) (envelope-from njl@FreeBSD.org) Received: from freefall.freebsd.org (njl@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h1S4jjNS099793; Thu, 27 Feb 2003 20:45:45 -0800 (PST) (envelope-from njl@freefall.freebsd.org) Received: (from njl@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h1S4jifs099792; Thu, 27 Feb 2003 20:45:44 -0800 (PST) Date: Thu, 27 Feb 2003 20:45:44 -0800 (PST) From: Nate Lawson Message-Id: <200302280445.h1S4jifs099792@freefall.freebsd.org> To: marcel@xcllnt.net, mike@FreeBSD.ORG Subject: Re: 64 bit endian routines Cc: current@FreeBSD.ORG, hackers@FreeBSD.ORG, njl@FreeBSD.ORG In-Reply-To: <20030228041849.GB813@athlon.pn.xcllnt.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Date: Thu, 27 Feb 2003 20:18:49 -0800 From: Marcel Moolenaar To: Mike Barcroft Cc: Nate Lawson , current@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: 64 bit endian routines References: <200302280324.h1S3OndV078007@freefall.freebsd.org> <20030227223058.G93968@espresso.bsdmike.org> On Thu, Feb 27, 2003 at 10:30:58PM -0500, Mike Barcroft wrote: > Most of these could probably be implemented in terms of the __bswap*() > functions in , except for vendor sources like > openssl, and htonl and ntohl which already are. I'm not sure if there > would be an advantage to moving the geom byte ordering functions to > (I guess phk didn't either). The geom functions serve a primary purpose of dealing with random alignment of fields. The endianness has been added later, so they now serve a dual function. Do not unify them with byte-order only functions. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net Both scsi and geom implement unaligned access functions that perform byte ordering. I never intended to supplant them with __bswap*(). What I want is for machine/endian.h to have functions that provide 16-64 bit endian conversions in both aligned and unaligned access forms. After these functions are there, I'd like us to unify use of them and remove driver-private versions. Is this more clear now? -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message