Receive Side Scaling
BCM5718 Programmer’s Guide
Broadcom
®
January 29, 2016 • 5718-PG108-R
Page 103
Indirection Table
The table of CPU numbers used for balancing the receive traffic across multiple processors. The Indirection
Table registers 0–15 at offset 0x630–0x66F are implemented for the required 128 entries of the Indirection
Table. The devices support only four Receive Return Rings so each entry of Indirection Table is implemented
as 2 bits.
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 Initialization
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 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 re-balance 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.