Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Aug 2004 16:48:06 -0400
From:      Coleman <cokane@cokane.org>
To:        Yar Tikhiy <yar@comp.chem.msu.su>
Cc:        Alex Lyashkov <shadow@psoft.net>
Subject:   Re: Network interface RUNNING and UP flags
Message-ID:  <1092084486.65806.12.camel@schemer>
In-Reply-To: <20040807092347.GB39835@comp.chem.msu.su>
References:  <346a8022040806145018a5e18@mail.gmail.com> <1091862376.7840.3.camel@berloga.shadowland> <20040807092347.GB39835@comp.chem.msu.su>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-NcuASJXk0RQjgaZBLv5j
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Here, I pushed that section of code up before the prior
mtx_unlock(&tp->tap_mtx) above it, then removed the splimp/splx calls.
Is this what you were referring to (attached)? Also, I noticed splx and
splimp are called in a number of other places in this driver, even under
-CURRENT. You want those out too? The patch is a patch on the original
-CURRENT version of the driver and not a patch to the previous patch I
received.

--
coleman kane 

On Sat, 2004-08-07 at 05:23, Yar Tikhiy wrote:
> On Sat, Aug 07, 2004 at 10:06:17AM +0300, Alex Lyashkov wrote:
> >
> > not better move this under tp->tap_mtx mutex without using splX
> > functions?
> 
> ...especially taking into account that splX do nothing
> in CURRENT anyway.  Mutex locking framework adopted by
> the interface driver should be used of course.

--=-NcuASJXk0RQjgaZBLv5j
Content-Description: 
Content-Disposition: attachment; filename=if_tap.c.diff
Content-Type: text/x-patch; charset=ASCII
Content-Transfer-Encoding: 7bit

--- if_tap.c.orig	Thu Jun 24 13:16:35 2004
+++ if_tap.c	Mon Aug  9 16:42:40 2004
@@ -368,6 +368,12 @@
 	bcopy(tp->arpcom.ac_enaddr, tp->ether_addr, sizeof(tp->ether_addr));
 	tp->tap_pid = td->td_proc->p_pid;
 	tp->tap_flags |= TAP_OPEN;
+
+        /* Set the interface to RUNNING state while the device is
+           opened
+         */
+	tp->tap_if.if_flags |= IFF_RUNNING;
+	tp->tap_if.if_flags &= ~IFF_OACTIVE;
 	mtx_unlock(&tp->tap_mtx);
 
 	TAPDEBUG("%s is open. minor = %#x\n", 

--=-NcuASJXk0RQjgaZBLv5j--



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