Re: ether_crc32_[bl]e()
From: Poul-Henning Kamp (phk_at_phk.freebsd.dk)
Date: 05/30/04
- Previous message: Christian Weisgerber: "ether_crc32_[bl]e()"
- In reply to: Christian Weisgerber: "ether_crc32_[bl]e()"
- Next in thread: Brian Feldman: "Re: ether_crc32_[bl]e()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: naddy@mips.inka.de (Christian Weisgerber) Date: Sun, 30 May 2004 21:56:18 +0200
In message <c9d9u3$o6k$1@kemoauc.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)
>ether_crc32_be(const u_int8_t *buf, size_t len)
>
>that will calculate an ethernet CRC-32 in little endian/big endian
>fashion.
>
>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 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?
In general for stuff like this, if you save more than a handful of
lines in more than a handful of drivers you can assume that we want it.
-- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. _______________________________________________ freebsd-arch@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arch To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Christian Weisgerber: "ether_crc32_[bl]e()"
- In reply to: Christian Weisgerber: "ether_crc32_[bl]e()"
- Next in thread: Brian Feldman: "Re: ether_crc32_[bl]e()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: if_tap unaligned access problem
... >> network stack to be compiled with unaligned accesses (for those platforms
... If you would look at the netbsd url ( ... 2- This code only triggers
when the protocol header is unaligned. ... mbuf juggling in certain drivers. ...
(freebsd-net) - Re: OSD - Image size... your thoughts?
... The main reason I've left network drivers ... in the image because it won't
download the network drivers during post ... With OSD you can also use download
and execute scenarios ... and take use of SMS Client caching techniques to preload the
wim-file ... (microsoft.public.sms.tools) - Re: Not able to connect to internet
... Do you connect directly to the cable modem, or do you have a router/firewall ...
It would be possible to get network drivers if you knew which network ... the web site
should have the latest XP drivers for it. ... (microsoft.public.windows.mediacenter) - Re: Upgraded to unstable - lost network connectivity
... Running modprobe to force the network drivers to be ... I had thought perhaps
your dist-upgrade had replaced your modutils with ... Unless things have changed, modutils
is for modules ... (Debian-User) - HEADSUP: MPSAFE network drivers
... I'm committing changes to mark various network drivers' interrupt handlers ...
are setup to run their ISR w/o Giant. ... from the loader when booting and the MPSAFE
bit will automatically be removed. ... (freebsd-current)