Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 May 2004 11:29:17 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        naddy@mips.inka.de
Cc:        freebsd-arch@freebsd.org
Subject:   Re: ether_crc32_[bl]e()
Message-ID:  <20040531.112917.111988212.imp@bsdimp.com>
In-Reply-To: <c9d9u3$o6k$1@kemoauc.mips.inka.de>
References:  <c9d9u3$o6k$1@kemoauc.mips.inka.de>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <c9d9u3$o6k$1@kemoauc.mips.inka.de>
            naddy@mips.inka.de (Christian Weisgerber) writes:
: NetBSD and OpenBSD have two helper functions in if_ethersubr.c
: 
: ether_crc32_le(const u_int8_t *buf, size_t len)
------------------------^^^^^^^^ uint8_t
: ether_crc32_be(const u_int8_t *buf, size_t len)
------------------------^^^^^^^^ uint8_t

: These CRCs are used all over our network drivers, e.g. for setting
: up multicast hash filters.  Functions to calculate them are duplicated
: all over.  These could be factored out of some thirty drivers.
: NetBSD has done so, btw.
...

The other comment that I have about this stuff is to make sure that if
you are directly copying these routines form somewhere, you make sure
that you give proper credit in the if_ethersubr.c file.

: +ether_crc32_be(const u_int8_t *buf, size_t len)
------------------------^^^^^^^^ uint8_t

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040531.112917.111988212.imp>