Re: [PATCH 1/2] bonding: Doesn't support IPv6
From: Eric Dumazet <hidden>
Date: 2011-10-29 09:00:21
Le samedi 29 octobre 2011 à 10:49 +0200, Eric Dumazet a écrit :
Le samedi 29 octobre 2011 à 09:55 +0200, Michał Mirosław a écrit :quoted
2011/10/29 John [off-list ref]:quoted
--- a/drivers/net/bonding/bond_main.c 2011-04-19 11:18:48.000000000 -0700 +++ b/drivers/net/bonding/bond_main.c 2011-10-27 11:26:20.000000000 -0700[...]quoted
+ v6hash = (v6hash >> 16) ^ (v6hash >> 8) ^ v6hash;This XORs in only 3 of 4 bytes, and assuming count > 256 (its unlikely you have more than 256 slaves in bond) the most significant byte is wasted. It should be: v6hash ^= v6hash >> 16; v6hash ^= v6hash >> 8; Same for IPv4 part. OTOH, if that was your intention, then the description in your mail was wrong.Same end result :)
Oh well, not exactly, there was a reason for using two different C instructions ;) ALso the modulo is expensive...