From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ams-iport-4.cisco.com (ams-iport-4.cisco.com [144.254.224.147]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "ams-iport-4.cisco.com", Issuer "Cisco SSCA2" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id B06AF2005F8 for ; Sun, 13 Nov 2011 18:41:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=fred@cisco.com; l=311; q=dns/txt; s=iport; t=1321238509; x=1322448109; h=subject:mime-version:from:in-reply-to:date:cc:message-id: references:to:content-transfer-encoding; bh=c45d86n4V3x/A5Mk9Hq1jpFHtU3KB9n4gHkPqGRxgV0=; b=hATpk6xv6x77mFBldnDOi04DQ7hVxs1EwVrtS9RBRBuui7KpitYfLvAN rrEyV3O63okS+p8VOne0QCOHgNZu2zQkTx4vrumKs3a3Fe6iCUkLRagXb oSGf1/lKJfAqMEhuLeS4PZOJHNrdH7EmrD/n7TVHhMRhfh+KW8FIKr4DQ k=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAGx/wE5Io8UQ/2dsb2JhbABCqXyBBYFyAQEBAwESASc/BQsLRlcGNYdgmXYBnTuJHGMEiA6MIIU7jEs X-IronPort-AV: E=Sophos;i="4.69,504,1315180800"; d="scan'208";a="2978765" Received: from bgl-core-1.cisco.com ([72.163.197.16]) by ams-iport-4.cisco.com with ESMTP; 14 Nov 2011 02:41:46 +0000 Received: from dhcp-4466.meeting.ietf.org (hkidc-vpn-client-233-220.cisco.com [10.75.233.220]) by bgl-core-1.cisco.com (8.14.3/8.14.3) with ESMTP id pAE2fjFs013358; Mon, 14 Nov 2011 02:41:45 GMT Received: from [127.0.0.1] by dhcp-4466.meeting.ietf.org (PGP Universal service); Mon, 14 Nov 2011 10:41:45 +0800 X-PGP-Universal: processed; by dhcp-4466.meeting.ietf.org on Mon, 14 Nov 2011 10:41:45 +0800 Subject: Re: A tiny almost sorta kinda nearly minimal perfect hash for a mac classifier? Mime-Version: 1.0 (Apple Message framework v1084) From: Fred Baker In-Reply-To: <20111114022209.GA5769@brevard.conman.org> Date: Mon, 14 Nov 2011 10:41:08 +0800 Message-Id: References: <20111114022209.GA5769@brevard.conman.org> To: Sean Conner X-Mailer: Apple Mail (2.1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: bloat-devel@lists.bufferbloat.net X-BeenThere: bloat-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Developers working on AQM, device drivers, and networking stacks" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2011 02:41:50 -0000 On Nov 14, 2011, at 10:22 AM, Sean Conner wrote: > Why not just use the lower N bits as the hash function? or unsigned macHash (unsigned long long macAddressClone) { return 0xFFF & (macAddressClone ^ (macAddressClone >> 12)); } That allows you to keep different OUIs separated somewhat.