Date: Tue, 14 Apr 2009 15:45:08 -0700 From: Kip Macy <kmacy@freebsd.org> To: Robert Watson <rwatson@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r191037 - head/sys/net Message-ID: <3c1674c90904141545tc2aa075l512cb76c1f334069@mail.gmail.com> In-Reply-To: <alpine.BSF.2.00.0904141018530.19879@fledge.watson.org> References: <200904140317.n3E3HigF092519@svn.freebsd.org> <alpine.BSF.2.00.0904141018530.19879@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 14, 2009 at 2:22 AM, Robert Watson <rwatson@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3c1674c90904141545tc2aa075l512cb76c1f334069>