From owner-svn-src-user@FreeBSD.ORG Thu Nov 6 06:14:25 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF70E1065679; Thu, 6 Nov 2008 06:14:25 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE8C98FC18; Thu, 6 Nov 2008 06:14:25 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA66EP1c047158; Thu, 6 Nov 2008 06:14:25 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA66EPBD047157; Thu, 6 Nov 2008 06:14:25 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200811060614.mA66EPBD047157@svn.freebsd.org> From: Kip Macy Date: Thu, 6 Nov 2008 06:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184707 - user/kmacy/HEAD_multi_tx/sys/net X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2008 06:14:26 -0000 Author: kmacy Date: Thu Nov 6 06:14:25 2008 New Revision: 184707 URL: http://svn.freebsd.org/changeset/base/184707 Log: up replacement timeout, check critical section Modified: user/kmacy/HEAD_multi_tx/sys/net/flowtable.c Modified: user/kmacy/HEAD_multi_tx/sys/net/flowtable.c ============================================================================== --- user/kmacy/HEAD_multi_tx/sys/net/flowtable.c Thu Nov 6 04:53:02 2008 (r184706) +++ user/kmacy/HEAD_multi_tx/sys/net/flowtable.c Thu Nov 6 06:14:25 2008 (r184707) @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -417,12 +418,18 @@ flowtable_entry(struct flowtable *ft, ui { struct flentry *fle; int index = (hash % ft->ft_size); - + + if ((ft->ft_flags & FL_IPV6) == 0) { - if (ft->ft_flags & FL_PCPU) + if (ft->ft_flags & FL_PCPU) { + if (curthread->td_critnest == 0) { + panic("not protected by critical section in lookup"); + } + + fle = (struct flentry *) &ft->ft_table.v4_pcpu[curcpu][index]; - else + } else fle = (struct flentry *)&ft->ft_table.v4[index]; } else { if (ft->ft_flags & FL_PCPU) @@ -759,7 +766,7 @@ flowtable_alloc(int nentry, int flags) ft->ft_tcp_idle = TCP_IDLE; } else { ft->ft_udp_idle = ft->ft_fin_wait_idle = - ft->ft_syn_idle = ft->ft_tcp_idle = 5; + ft->ft_syn_idle = ft->ft_tcp_idle = 30; }