From owner-svn-src-all@FreeBSD.ORG Tue Feb 18 14:21:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 279B3B33; Tue, 18 Feb 2014 14:21:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 139251A07; Tue, 18 Feb 2014 14:21:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1IELQxn071292; Tue, 18 Feb 2014 14:21:26 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1IELQl5071291; Tue, 18 Feb 2014 14:21:26 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201402181421.s1IELQl5071291@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 18 Feb 2014 14:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r262162 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Feb 2014 14:21:27 -0000 Author: glebius Date: Tue Feb 18 14:21:26 2014 New Revision: 262162 URL: http://svnweb.freebsd.org/changeset/base/262162 Log: Fix incorrect assertions. Modified: head/sys/net/flowtable.c Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Tue Feb 18 14:11:19 2014 (r262161) +++ head/sys/net/flowtable.c Tue Feb 18 14:21:26 2014 (r262162) @@ -634,7 +634,8 @@ flowtable_insert(struct flowtable *ft, u * preempted by another thread handling this flow */ SLIST_FOREACH(iter, flist, f_next) { - KASSERT(iter->f_hash == hash, ("%s: wrong hash", __func__)); + KASSERT(iter->f_hash % ft->ft_size == hash % ft->ft_size, + ("%s: wrong hash", __func__)); if (flow_matches(iter, key, keylen, fibnum)) { /* * We probably migrated to an other CPU after @@ -714,7 +715,8 @@ flowtable_lookup_common(struct flowtable critical_enter(); flist = flowtable_list(ft, hash); SLIST_FOREACH(fle, flist, f_next) { - KASSERT(fle->f_hash == hash, ("%s: wrong hash", __func__)); + KASSERT(fle->f_hash % ft->ft_size == hash % ft->ft_size, + ("%s: wrong hash", __func__)); if (flow_matches(fle, key, keylen, fibnum)) { fle->f_uptime = time_uptime; #ifdef FLOWTABLE_HASH_ALL