From owner-svn-src-head@FreeBSD.ORG Tue Apr 14 23:12:01 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 E1B541065670; Tue, 14 Apr 2009 23:12:01 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by mx1.freebsd.org (Postfix) with ESMTP id 6F3BF8FC15; Tue, 14 Apr 2009 23:12:01 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by yw-out-2324.google.com with SMTP id 5so1680164ywh.13 for ; Tue, 14 Apr 2009 16:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=S3/ozca8hsOAjXuCbZXZ0krnfPCXYla2IK1hZcSQWjE=; b=tABr/YLpuBGvdhO0Ta1Dbb3GQIVAZZfdThsFYnvy9vwIx/jBrAzOFh5AhPPjoYJLFw cvJFZoSy4DuXmw9S4dUaTGzYUFxdyqyRiT+puG53jKIViXCSGG7vpg0ZP/gLpSFCi/vN gwLCpv6U6jVzFtAbA2meaRYkvSz1USXqnYxHo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=M9JnlPnBtXf4v2oxKe3r2jy64+w4dqTqugFMwDmyJ7/PMh5huXLk70vMgn6EWtUXSK pmfHSPbLj6vnGAI/0PI6lJ56iMqC2jY+xrf2n903LPaa4A/3zgxQRsOpgNXxP9KM6UDc GSHC983oltE1ul6ygKfqoQFgj8yUrtMi9/VYU= MIME-Version: 1.0 Sender: mat.macy@gmail.com Received: by 10.100.105.15 with SMTP id d15mr10978024anc.140.1239749108056; Tue, 14 Apr 2009 15:45:08 -0700 (PDT) In-Reply-To: References: <200904140317.n3E3HigF092519@svn.freebsd.org> Date: Tue, 14 Apr 2009 15:45:08 -0700 X-Google-Sender-Auth: 0a398aaf73c831e3 Message-ID: <3c1674c90904141545tc2aa075l512cb76c1f334069@mail.gmail.com> From: Kip Macy To: Robert Watson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 23:12:02 -0000 On Tue, Apr 14, 2009 at 2:22 AM, Robert Watson wrote: > On Tue, 14 Apr 2009, Kip Macy wrote: > >> =A0call default if_qflush on ifq if default method isn't used by the dri= ver >> > ... >> >> Modified: head/sys/net/if.c >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/net/if.c =A0 Tue Apr 14 03:13:05 2009 =A0 =A0 =A0 =A0(r1910= 36) >> +++ head/sys/net/if.c =A0 Tue Apr 14 03:17:44 2009 =A0 =A0 =A0 =A0(r1910= 37) >> @@ -1509,6 +1509,8 @@ if_unroute(struct ifnet *ifp, int flag, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (fam =3D=3D PF_UNSPEC || (fam =3D=3D i= fa->ifa_addr->sa_family)) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pfctlinput(PRC_IFDOWN, if= a->ifa_addr); >> =A0 =A0 =A0 =A0ifp->if_qflush(ifp); >> + =A0 =A0 =A0 if (ifp->if_snd.ifq_head !=3D NULL) >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if_qflush(ifp); > > The commit message should perhaps read: > > =A0Call default if_qflush on ifq if there are still packets left in the > default > =A0queue after calling the driver's flush method. > > However, this seems a bit odd: what if the driver uses if_snd as its queu= e > but implements other differences in the transmit routine? =A0In that case= , we > might impose default queue properties on if_snd even though the driver > doesn't use them. =A0Could you talk a bit about the circumstances under w= hich > the driver provides an if_qflush that doesn't drain its queues properly? I'm afraid I don't understand the question. If a driver only uses if_snd for its transmit routine then there is no reason for it to override the default if_qflush implementation. -Kip