FreeBSD/sys/dev/bxe/ecore_sp.c
/**
 * ecore_mcast_refresh_registry_e2 - recalculate the actual number of set bins
 *
 * @sc:		device handle
 * @o:
 *
 * Recalculate the actual number of set bins in the registry using Brian
 * Kernighan's algorithm: it's execution complexity is as a number of set bins.
 *
 * returns 0 for the compliance with ecore_mcast_refresh_registry_e1().
 */
recalculate the actual number of set bins
@sc:         device handle
@o.

Recalculate the actual number of set bins in the registry using Brian
Kernighan's algorithm: it's execution complexity is as a number of set bins.

returns 0 for the compliance with ecore_mcast_refresh_registry_e1().
recalculate the actual number of set bins @sc : device handle @o . Recalculate the actual number of set bins in the registry using Brian Kernighan ' s algorithm : it ' s execution complexity is as a number of set bins . returns 0 for the compliance with ecore_mcast_refresh_registry_e1 () .
static inline int ecore_mcast_refresh_registry_e2(struct bxe_softc *sc,
						  struct ecore_mcast_obj *o)
{
	int i, cnt = 0;
	uint64_t elem;
	for (i = 0; i < ECORE_MCAST_VEC_SZ; i++) {
		elem = o->registry.aprox_match.vec[i];
		for (; elem; cnt++)
			elem &= elem - 1;
	}
	o->set_registry_size(o, cnt);
	return ECORE_SUCCESS;
}
static inline int ecore_mcast_refresh_registry_e2 ( struct bxe_softc * sc , struct ecore_mcast_obj * o ) { int i , cnt = 0 ; uint64_t elem ; for ( i = 0 ; i < ECORE_MCAST_VEC_SZ ; i ++ ) { elem = o -> registry . aprox_match . vec [ i ] ; for ( ; elem ; cnt ++ ) elem &= elem - 1 ; } o -> set_registry_size ( o , cnt ) ; return ECORE_SUCCESS ; }
ecore_mcast_refresh_registry_e2 - recalculate the actual number of set bins
 @sc:         device handle
 @o:
ecore_mcast_refresh_registry_e2 - recalculate the actual number of set bins @sc : device handle @o :