From owner-freebsd-arch@FreeBSD.ORG Mon May 31 10:24:35 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D765A16A4CE; Mon, 31 May 2004 10:24:35 -0700 (PDT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CF5A43D5E; Mon, 31 May 2004 10:24:35 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i4VHKWHX097296; Mon, 31 May 2004 11:20:35 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 31 May 2004 11:20:57 -0600 (MDT) Message-Id: <20040531.112057.52958848.imp@bsdimp.com> To: green@freebsd.org From: "M. Warner Losh" In-Reply-To: <20040531164514.GA7776@green.homeunix.org> References: <20040531164514.GA7776@green.homeunix.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: naddy@mips.inka.de 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 17:24:36 -0000 In message: <20040531164514.GA7776@green.homeunix.org> Brian Feldman writes: : 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 :) I think so too. I had something like this on my list after I found a very badly implemented big endian crc routine whose provenance was in question. So this is excellent timing. : 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. I'd say that it is, since style(9) says we're moving towards that as well. Warner