Broadcom BCM5722 Programmer's Manual page 158

Host programmer interface specification for the netxtreme and netlink family of highly integrated media access controllers
Table of Contents

Advertisement

BCM5722
// The most significant 7 bits of the CRC32 (no inversion),
// are used to index into one of the possible 128 bit positions.
Bitpos = ~Crc32 & 0x7f;
// Hash register index.
RegIndex = (Bitpos & 0x60) >> 5;
// Bit to turn on within a hash register.
Bitpos &= 0x1f;
// Enable the multicast bit.
HashReg[RegIndex] |= (1 << Bitpos);
}
The following C routine computes the Ethernet CRC32 value from a given byte stream. The routine is called from the above
code fragment.
// Routine for generating CRC32.
unsigned long
ComputeCrc32(
unsigned char *pBuffer, // Buffer containing the byte stream.
unsigned long BufferSize) // Size of the buffer.
{
unsigned long Reg;
unsigned long Tmp;
unsigned long j, k;
Reg = 0xffffffff;
for(j = 0; j < BufferSize; j++)
{
Reg ^= pBuffer[j];
for(k = 0; k < 8; k++)
{
Tmp = Reg & 0x01;
Reg >>= 1;
if(Tmp)
{
Reg ^= 0xedb88320;
}
}
}
return ~Reg;
}
P
M
ROMISCUOUS
ODE
The host software may enable promiscuous mode by setting the Promiscous_Mode bit (bit 8) of the Receive_MAC_Mode
register (offset 0x468). The Promiscous_Mode bit defaults to disabled after reset, and host software must explicitly set this
bit for promiscuous mode. In promiscuous mode of operation, the BCM5722 Ethernet controller accepts all incoming frames
that are not filtered by the active receive rules regardless of the destination MAC address. In other words, the BCM5722
Ethernet controller operating in promiscuous mode ignores multicast and MAC address filtering
Setup/Configuration" on page 97
Page 99
Packet Filtering
S
/C
ETUP
ONFIGURATION
and
"MAC Address Setup/Configuration" on page
Bro adco m C orp or atio n
Programmer's Guide
("Multicast Hash Table
96) but applies Receive Rules.
Document 5722-PG101-R
10/15/07

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BCM5722 and is the answer not in the manual?

This manual is also suitable for:

Bcm5722kfb1g

Table of Contents