From: David Gwynne Subject: ix(4): fix rss hashing on big endian archs To: tech@openbsd.org Date: Wed, 22 Apr 2026 13:08:54 +1000 i noticed that packets seem to be hashed differently by ix(4) and the network stack on sparc64. the diff below seems to fix it, and it still works as expected on arm64. ok? Index: if_ix.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_ix.c,v diff -u -p -r1.223 if_ix.c --- if_ix.c 26 Feb 2026 23:38:10 -0000 1.223 +++ if_ix.c 22 Apr 2026 03:04:16 -0000 @@ -3061,8 +3059,13 @@ ixgbe_initialize_rss_mapping(struct ix_s } /* Now fill our hash function seeds */ - for (i = 0; i < 10; i++) - IXGBE_WRITE_REG(hw, IXGBE_RSSRK(i), rss_key[i]); + for (i = 0; i < nitems(rss_key); i++) { + /* + * twist the words so the rss key will be handled + * as bytes regardless of the hosts endianness. + */ + IXGBE_WRITE_REG(hw, IXGBE_RSSRK(i), htole32(rss_key[i])); + } /* * Disable UDP - IP fragments aren't currently being handled