BCM5722
Secret Hash Key
The hash key that will be used for RSS hash. For the Toeplitz hash, the hash key size is 40 bytes for IPv6 and 16 bytes for
IPv4. The host software should program the hash key in hash key registers at offset 0x670 to 0x697.
RSS I
NITIALIZATION
The host protocol stack should configure the above RSS parameters before enabling the RSS engine. The RSS can be
enabled by setting the bit-23 of the Receive MAC Mode register at offset 0x468. Normally the RSS parameters except the
Indirection Table are static and will be initialized only during device driver initialization. Though extremely rare, the protocol
stack may change the RSS parameters any time. The BCM5755 and BCM5755M devices require a reset to change any of
the hash type, hash mask, and hash key parameters.
If the hash type flags in Receive MAC Mode register (offset 0x468) enable only one type of hash, then any received packet
that does not match the enabled hash type is not hashed. If multiple flags are set, such as If the TCP/IPv4 and IPv4 hash
types (bits 17 and 16 of Receive MAC Mode register at offset 0x468) are enabled, then if the packet is not a TCP/IPv4 packet
but is an IPv4 packet, the hash is performed on just the IPv4 2-tuple. Further, for this setting of the hash type flags, if the
incoming packet is not an IPv4 packet, then no hash is performed. Because a variety of hash types can be applied on a per-
packet basis (including no hash), the hash type is indicated to the host protocol stack on a per-packet basis. If no hash was
performed, then none of the hash type flags in the receive BD will be set.
Once RSS is initialized and enabled, data transfer can begin. Over a period of time, the host protocol stack may modify the
indirection table to rebalance the processing load. When the indirection table is changed, it is possible for a short period of
time (while the current receive descriptor queues are being processed) for packets to be processed on the wrong CPU. This
is a normal transient condition and should not be a problem.
RSS R
P
F
X
ACKET
LOW
Each CPU or CPU core in multi processor systems is assigned one receive return ring. Only a single interrupt is initiated at
a time.
1. As packets arrive, the device parses each packet, calculates the RSS Hash, and derives the CPU number (i.e., receive
return ring number) from Indirection Table using the Masked Hash Result as the Indirection Table Index.
2. The packet data is DMAed to the host memory at the location specified by the receive buffer descriptor (RBD) of the
receive producer ring.
3. Based on the derived CPU number, the device DMAs the used RBDs into appropriate receive return rings in host
memory.
4. The device fires the interrupt via MSI, which causes the device driver ISR to run.
5. The ISR disables further interrupts from the device, determines which CPUs have receive packets to be handled and
uses inter processor communication mechanisms to start packet receive handlers on CPUs whose return rings have new
RBDs.
6. Each CPU processes the new RBDs in it's receive return ring when its packet handler routine is started by main ISR.
7. Once the main ISR determines that all new RBDs have been processed by the CPUs, it enables the interrupts from the
device and exits.
Page 73
Receive Side Scaling (BCM5755 and BCM5755M Only)
Bro adco m C orp or atio n
Programmer's Guide
10/15/07
Document 5722-PG101-R
Need help?
Do you have a question about the BCM5722 and is the answer not in the manual?