Altera_Forum
Honored Contributor
13 years agoTSE Multicast Hash table issue
I have read & re-read the TSE hardware documentation describing the multicast address hash table and how it is supposed to work.
I have written a function to process an Ethernet multicast address per that documentation. What I find is that the calculated hash value as specified by the document does not result in a hash bucket entry that when set to 1, actually allows the reception of that ucast address. For example: The multicast address is 01-00-5E-7F-FF-FA (a standard mapping of IP address 239.255.255.250). The hash calculation on all 6 octets of address results in: 0b101100 (0x2C) if I understand what XOR means across the bit groups defined in the document. addr[07:00] = 0xFA the XOR of which is 0 addr[15:08] = 0xFF the XOR of which is 0 addr[23:16] = 0x7F the XOR of which is 1 addr[31:24] = 0x5E the XOR of which is 1 addr[39:32] = 0x00 the XOR of which is 0 addr[47:40] = 0x01 the XOR of which is 1 Now I note with some curiosity that the Linux code calculates this bit-reversed from my value and comes up with 0x001101 (0x0D). None the less, the apparently required value is actually 0x37 or 0b110111 as the hash index. I discovered this by binary searching the 64 possible values until I found the actual hash bucket that allowed a match on the multicast address. At this point I have zero clue. The documentation is pretty clear save for possible ambiguity on bit ordering but since the hash is based on octet partity it is really the address octet ordering that matters. And my code and the Linux code seem to have arrived at opposite ordering but both are wrong in so far as neither produce the value that works so I don't feel like a complete idiot. Has anyone actually made this work? Can someone confirm that multicast in Linux on the TSE actually works? Thanks.