From: don-cs3@isis.cs3-inc.com (Don Cohen) Subject: hashing answers Date: Sun, 7 Jul 2002 01:26:40 -0700 Sender: netfilter-devel-admin@lists.samba.org Message-ID: <15655.64320.272481.341687@isis.cs3-inc.com> References: <200207022303.g62N3No03454@baskerville.CS.Arizona.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: To: netfilter-devel@lists.samba.org In-Reply-To: <200207022303.g62N3No03454@baskerville.CS.Arizona.EDU> Errors-To: netfilter-devel-admin@lists.samba.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org I see why table sizes that are powers of two don't work well in the ABCD(EF) algorithm and how to fix it. Similarly why multiples of 2 in A-F cause trouble. Suppose your modulus is 2^i. [Sorry, I mix c notation with normal math: ^ means expt, << means shift] In the term A*srcip only the bottom i bits of srcip and A matter. Consider A = Ahigh<