From owner-freebsd-arch@FreeBSD.ORG Mon May 31 09:45:16 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2686916A4CE; Mon, 31 May 2004 09:45:16 -0700 (PDT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i4VGjFe4013978; Mon, 31 May 2004 12:45:15 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.12.11/8.12.11/Submit) id i4VGjEVN013974; Mon, 31 May 2004 12:45:14 -0400 (EDT) (envelope-from green) Date: Mon, 31 May 2004 12:45:14 -0400 From: Brian Feldman To: Christian Weisgerber Message-ID: <20040531164514.GA7776@green.homeunix.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: freebsd-arch@freebsd.org Subject: Re: ether_crc32_[bl]e() X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 May 2004 16:45:16 -0000 On Sun, May 30, 2004 at 06:42:11PM +0000, Christian Weisgerber wrote: > NetBSD and OpenBSD have two helper functions in if_ethersubr.c > > ether_crc32_le(const u_int8_t *buf, size_t len) > ether_crc32_be(const u_int8_t *buf, size_t len) > [...] > The patch below adds the functions to if_ethersubr.c and, as an > example, switches re(4) to make use of this. > > 1. Do we want this? Yeah :) > 2. If yes, there are probably stylistic issues I could use some > help with. Here are what looks like style bugs to me: The header changes aren't using tabs to line up the function names and return values with the ones in the rest of the prototypes, and should be sorted in lexically, besides. Inside the functions, size_t may or may not be larger than uint32_t, but should never be smaller on FreeBSD, so it should come sorted before them. I'm not sure if it is a style bug to perpetuate BSD u_intsize_t when uintsize_t is standardized and available as well. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\