Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 2003 16:19:04 -0700 (PDT)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 38449 for review
Message-ID:  <200309222319.h8MNJ4ko055406@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=38449

Change 38449 by sam@sam_ebb on 2003/09/22 16:18:27

	strip out Giant stuff; think this through more carefully

Affected files ...

.. //depot/projects/netperf/sys/net/pfil.c#3 edit
.. //depot/projects/netperf/sys/net/pfil.h#3 edit
.. //depot/projects/netperf/sys/netinet/ip_input.c#6 edit

Differences ...

==== //depot/projects/netperf/sys/net/pfil.c#3 (text+ko) ====

@@ -117,17 +117,11 @@
 {
 	struct packet_filter_hook *pfh;
 	struct mbuf *m = *mp;
-	int rv = 0, lockgiant;
+	int rv = 0;
 
 	if (ph->ph_busy_count == -1 || ph->ph_want_write)
 		return (0);
 
-	lockgiant = dir & PFIL_GIANT;
-	if (lockgiant) {
-		mtx_lock(&Giant);
-		dir &= ~PFIL_GIANT;
-	}
-	
 	PFIL_RLOCK(ph);
 	for (pfh = pfil_hook_get(dir, ph); pfh != NULL;
 	     pfh = TAILQ_NEXT(pfh, pfil_link)) {
@@ -138,9 +132,6 @@
 		}
 	}
 	PFIL_RUNLOCK(ph);
-
-	if (lockgiant)
-		mtx_unlock(&Giant);
 	
 	*mp = m;
 	return (rv);

==== //depot/projects/netperf/sys/net/pfil.h#3 (text+ko) ====

@@ -55,8 +55,6 @@
 #define PFIL_IN		0x00000001
 #define PFIL_OUT	0x00000002
 #define PFIL_WAITOK	0x00000004
-/* XXX temporary until Giant gets removed */
-#define	PFIL_GIANT	0x00000008	/* lock Giant around calls */
 #define PFIL_ALL	(PFIL_IN|PFIL_OUT)
 
 typedef	TAILQ_HEAD(pfil_list, packet_filter_hook) pfil_list_t;

==== //depot/projects/netperf/sys/netinet/ip_input.c#6 (text+ko) ====

@@ -472,7 +472,7 @@
 	 * Run through list of hooks for input packets.
 	 */
 	if (pfil_run_hooks(&inet_pfil_hook, &m, m->m_pkthdr.rcvif,
-	    PFIL_IN | PFIL_GIANT) != 0)
+	    PFIL_IN) != 0)
 		return;
 	if (m == NULL)			/* consumed by filter */
 		return;



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