Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Nov 2008 06:14:25 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r184707 - user/kmacy/HEAD_multi_tx/sys/net
Message-ID:  <200811060614.mA66EPBD047157@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <sys/callout.h>
 #include <sys/malloc.h>
 #include <sys/mbuf.h>
+#include <sys/proc.h>
 #include <sys/smp.h>
 #include <sys/socket.h>
 #include <sys/syslog.h>
@@ -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;
 		
 	}
 	



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811060614.mA66EPBD047157>