Date: Mon, 8 Jun 2009 09:19:25 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r193698 - user/kmacy/releng_7_2_fcs/sys/netinet Message-ID: <200906080919.n589JPGJ022028@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kmacy Date: Mon Jun 8 09:19:25 2009 New Revision: 193698 URL: http://svn.freebsd.org/changeset/base/193698 Log: skip idiv if queue is empty Modified: user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c Modified: user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c Mon Jun 8 09:13:16 2009 (r193697) +++ user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c Mon Jun 8 09:19:25 2009 (r193698) @@ -447,12 +447,14 @@ again: * interface in which case packetdrop should be done by queueing. */ #ifdef ALTQ - if ((!ALTQ_IS_ENABLED(&ifp->if_snd)) && + if (ifp->if_snd.ifq_len && + (!ALTQ_IS_ENABLED(&ifp->if_snd)) && ((ifp->if_snd.ifq_len + ip->ip_len / mtu + 1) >= ifp->if_snd.ifq_maxlen)) #else - if ((ifp->if_snd.ifq_len + ip->ip_len / mtu + 1) >= - ifp->if_snd.ifq_maxlen) + if (ifp->if_snd.ifq_len && + ((ifp->if_snd.ifq_len + ip->ip_len / mtu + 1) >= + ifp->if_snd.ifq_maxlen)) #endif /* ALTQ */ { error = ENOBUFS;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906080919.n589JPGJ022028>