I'm writing a simple small IP hash table on an FPGA for an ARP cache. On the FPGA I need to ensure I can very efficiently calculate the hash due the critical path of the circuit.
I have a 32-bit input that I need to reduce to between 2- and 12-bit hash (Compile time configurable). I'm leaning on simply Xoring the bits together as needed. But when I look in the wild I see sometimes people are using more advanced algorithms such as truncated CRC32 for this. In fact I'm even considering just using the bottom n-bits of the IP as the hash.
I'm definitely not an expert so maybe I am wrong but I really don't see the advantage of using CRC32 for the hash function. Since the Hash is not sensitive I think Xor or even just truncating the IP itself should perform similar.
So my question is: Is doing truncation or xor hash for such a use case considered OK and why?