[Top] [All Lists]

CVS: cvs.openbsd.org: src

Subject: CVS: cvs.openbsd.org: src
From: David Gwynne
Date: Thu, 21 Jun 2007 01:14:57 UTC
Newsgroups: fa.openbsd.source-changes

CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]     2007/06/20 19:11:50

Modified files:
        sys/dev/pci    : if_bge.c 

Log message:
rework how the IFF_PROMISC and IFF_ALLMULTI flags are dealt with, and how
the multicast filter is programmed.

IFF_ALLMULTI is for use by the driver and only the driver, meaning that we
have to clear it when its not needed anymore.

now that the ethernet layer counts the number of multicast address ranges
we can check that early to determine if ALLMULTI is needed, rather than
doing the stupid goto allmulti dance as we iterate over the multicast
address list.

the imperfect multicast filter is a 16 byte wide bitfield, so we can use
the "setbit" macro to build it in memory, and then write it to the hardware
as a bus_space region. this simplifies the code a lot and avoids confusing
bitshifts on u_int32_ts to get the bits in the right place.

tested by krw on amd64, naddy on alpha, deraadt on sparc64, and beck on
various bits.
ok beck

<Prev in Thread] Current Thread [Next in Thread>