Hashing for packets