From owner-freebsd-current@FreeBSD.ORG Thu Nov 4 15:07:07 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23C9B16A4CE for ; Thu, 4 Nov 2004 15:07:07 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE61D43D1D for ; Thu, 4 Nov 2004 15:07:06 +0000 (GMT) (envelope-from peadar.edwards@gmail.com) Received: by rproxy.gmail.com with SMTP id a41so263435rng for ; Thu, 04 Nov 2004 07:07:06 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:mime-version:content-type:content-transfer-encoding; b=HPWvqv8Tzbq96B5qZba1hQ8i5B/8VU6EC1cww1j5In58ggkSUFDQEJbFCTt+I39UxEHExzgshcw/HLu3o70kMp5lL+yfgKb8qaJ2IGwHFxr2EA63d9M5GwhQhoCYCXm8PM8aCNRCGYPJz24InUtg02NnUPPeyy1d8a5WItfns1g= Received: by 10.38.161.53 with SMTP id j53mr85924rne; Thu, 04 Nov 2004 07:07:06 -0800 (PST) Received: by 10.38.149.43 with HTTP; Thu, 4 Nov 2004 07:07:06 -0800 (PST) Message-ID: <34cb7c8404110407071cbf3378@mail.gmail.com> Date: Thu, 4 Nov 2004 15:07:06 +0000 From: Peter Edwards To: "Bjoern A. Zeeb" , rwatson@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: current@freebsd.org Subject: if_sk and IFF_OACTIVE in general. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Peter Edwards List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Nov 2004 15:07:07 -0000 (Sorry for starting yet another if_sk thread, but this is a more general issue with mpsafenet networking) I have a general problem with the IF_OACTIVE flag handling that I think might be related to some of the MP issues with if_sk. ether_output_frame() queues an mbuf to the interface via IFQ_HANDOFF->IFQ_HANDOFF_ADJ (in net/if_var.h) This calls IF_ENQUEUE to actually queue the mbuf onto the if_snd queue, and then calls "if_start()" if the interface is not IFF_OACTIVE. I think the setting/clearing of the IFF_OACTIVE should probably be protected: What's to stop the driver interrupt clearing this flag between the test in IFQ_HANDOFF_ADJ and the call to if_start(), leading to mbufs getting queued to the interface, but the interface remaining idle. Similar things can happen on a txeof interrupt: it probably needs to protect the clearing of IFF_OACTIVE, and invoke the driver's start routine if something gets queued to the driver when it isn't looking.