From owner-p4-projects@FreeBSD.ORG Mon Sep 22 16:19:05 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 90F3516A4C0; Mon, 22 Sep 2003 16:19:05 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6CC9A16A4B3 for ; Mon, 22 Sep 2003 16:19:05 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E310F43FD7 for ; Mon, 22 Sep 2003 16:19:04 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h8MNJ4XJ055409 for ; Mon, 22 Sep 2003 16:19:04 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h8MNJ4ko055406 for perforce@freebsd.org; Mon, 22 Sep 2003 16:19:04 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Mon, 22 Sep 2003 16:19:04 -0700 (PDT) Message-Id: <200309222319.h8MNJ4ko055406@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 38449 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 23:19:06 -0000 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;