On Wed, 28 Dec 2005 17:48:15 -0700 Dale Farnsworth wrote:

> On Wed, Dec 28, 2005 at 11:04:06PM +0000, Randy.Dunlap wrote:
> > Just FMI (for my info), what are the semantics of the Special
> > Multicast Table?  Is this done in conformance with some RFC or
> > other "standard"?  Thanks.
> 
> The table is indexed by a hash of each packet's MAC address.  There
> is one bit in each entry which indicates whether the packet is
> accepted or not.  In the revised patch below, I added a brief comment
> to that effect.

Yes, that's fairly common multicast hashing of MAC addresses and
multicast table management in a NIC.

That doesn't quite answer my question of what the
  "Special Multicast Table for MAC addresses of the form 0x01-00-5E-00-00-XX"
means (below).  Do you (or anyone else) have any info on this?

Thanks.


> --- linux-2.6-mv643xx_enet.orig/drivers/net/mv643xx_eth.c
> +++ linux-2.6-mv643xx_enet/drivers/net/mv643xx_eth.c
> @@ -2043,6 +2046,196 @@ static int eth_port_uc_addr(unsigned int
>  
> +/*
> + * eth_port_mc_addr - Multicast address settings.
> + *
> + * The MV device supports multicast using two tables:
> + * 1) Special Multicast Table for MAC addresses of the form
> + *    0x01-00-5E-00-00-XX (where XX is between 0x00 and 0x_FF).
> + *    The MAC DA[7:0] bits are used as a pointer to the Special Multicast
> + *    Table entries in the DA-Filter table.
> + * 2) Other Multicast Table for multicast of another type. A CRC-8bit
> + *    is used as an index to the Other Multicast Table entries in the
> + *    DA-Filter table.  This function calculates the CRC-8bit value.
> + * In either case, eth_port_set_filter_table_entry() is then called
> + * to set to set the actual table entry.
> + */
> +static void eth_port_mc_addr(unsigned int eth_port_num, unsigned char 
> *p_addr)
> +{
> +     unsigned int mac_h;
> +     unsigned int mac_l;
> +     unsigned char crc_result = 0;
> +     int table;
> +     int mac_array[48];
> +     int crc[8];
> +     int i;
> +
> +     if ((p_addr[0] == 0x01) && (p_addr[1] == 0x00) &&
> +         (p_addr[2] == 0x5E) && (p_addr[3] == 0x00) && (p_addr[4] == 0x00)) {
> +             table = MV643XX_ETH_DA_FILTER_SPECIAL_MULTICAST_TABLE_BASE
> +                                     (eth_port_num);
> +             eth_port_set_filter_table_entry(table, p_addr[5]);
> +             return;
> +     }


---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to