Search Linux Wireless

Re: [PATCH 3/3] adm8211: Adapt to filter configuration API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2007-09-18 at 17:42 -0400, Michael Wu wrote:

> +	} else if ((*total_flags & FIF_ALLMULTI) || (mc_count > 32)) {

Why the > 32 btw? The other branch below:

> +	} else {
> +		priv->nar &= ~(ADM8211_NAR_MM | ADM8211_NAR_PR);
> +		mc_filter[1] = mc_filter[0] = 0;
> +		for (i = 0; i < mc_count; i++) {
> +			if (!mclist)
> +				break;
> +			bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;
> +
> +			bit_nr &= 0x3F;
> +			mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
> +			mclist = mclist->next;
> +		}

looks like it's a simple hashing algorithm to filter for the multicast
address, so any number of addresses should be ok as far as I can tell,
you just see all multicast frames in a given class of the 64 classes you
have. And if many of the >32 addresses hash to the same value, it might
still be advantageous to use the filter.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux