On Tue, Apr 14, 2009 at 2:22 AM, Robert Watson <rwat...@freebsd.org> wrote: > 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?
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 _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"