From owner-svn-src-head@FreeBSD.ORG Tue Apr 14 09:22:28 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D521F106564A; Tue, 14 Apr 2009 09:22:28 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AF5458FC1C; Tue, 14 Apr 2009 09:22:28 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 5034B46B45; Tue, 14 Apr 2009 05:22:28 -0400 (EDT) Date: Tue, 14 Apr 2009 10:22:28 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Kip Macy In-Reply-To: <200904140317.n3E3HigF092519@svn.freebsd.org> Message-ID: References: <200904140317.n3E3HigF092519@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r191037 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 09:22:29 -0000 On Tue, 14 Apr 2009, Kip Macy wrote: > call default if_qflush on ifq if default method isn't used by the driver > ... > Modified: head/sys/net/if.c > ============================================================================== > --- head/sys/net/if.c Tue Apr 14 03:13:05 2009 (r191036) > +++ head/sys/net/if.c Tue Apr 14 03:17:44 2009 (r191037) > @@ -1509,6 +1509,8 @@ if_unroute(struct ifnet *ifp, int flag, > if (fam == PF_UNSPEC || (fam == ifa->ifa_addr->sa_family)) > pfctlinput(PRC_IFDOWN, ifa->ifa_addr); > ifp->if_qflush(ifp); > + if (ifp->if_snd.ifq_head != NULL) > + if_qflush(ifp); The commit message should perhaps read: Call default if_qflush on ifq if there are still packets left in the default queue after calling the driver's flush method. However, this seems a bit odd: what if the driver uses if_snd as its queue but implements other differences in the transmit routine? In that case, we might impose default queue properties on if_snd even though the driver doesn't use them. Could you talk a bit about the circumstances under which the driver provides an if_qflush that doesn't drain its queues properly? Robert N M Watson Computer Laboratory University of Cambridge