Mercurial > illumos > illumos-gate
changeset 11608:14e65d822f26
6904297 poor hash function causes all packets to go out on a single Tx ring
author | Rao Shoaib <Rao.Shoaib@Sun.COM> |
---|---|
date | Mon, 01 Feb 2010 09:35:33 -0800 |
parents | 8efcb308cfc3 |
children | 3b5da7ebb54d |
files | usr/src/uts/common/io/mac/mac_sched.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/mac/mac_sched.c Mon Feb 01 03:20:56 2010 -0800 +++ b/usr/src/uts/common/io/mac/mac_sched.c Mon Feb 01 09:35:33 2010 -0800 @@ -448,7 +448,9 @@ * 'hint' is fanout_hint (type of uint64_t) which is given by the TCP/IP stack, * and it is used on the TX path. */ -#define HASH_HINT(hint) (((hint) << 17) | ((hint) >> 16)) +#define HASH_HINT(hint) \ + ((hint) ^ ((hint) >> 24) ^ ((hint) >> 16) ^ ((hint) >> 8)) + /* * hash based on the src address and the port information.