From owner-freebsd-bugs Mon Sep 13 15:30: 3 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 201C415604 for ; Mon, 13 Sep 1999 15:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id PAA65234; Mon, 13 Sep 1999 15:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from liberty.dorm11.nctu.edu.tw (liberty.Dorm11.NCTU.edu.tw [140.113.191.85]) by hub.freebsd.org (Postfix) with ESMTP id 899C0155E4 for ; Mon, 13 Sep 1999 15:22:40 -0700 (PDT) (envelope-from freedom@liberty.dorm11.nctu.edu.tw) Received: (from freedom@localhost) by liberty.dorm11.nctu.edu.tw (8.9.3/8.8.8) id GAA12704; Tue, 14 Sep 1999 06:21:58 +0800 (CST) (envelope-from freedom) Message-Id: <199909132221.GAA12704@liberty.dorm11.nctu.edu.tw> Date: Tue, 14 Sep 1999 06:21:58 +0800 (CST) From: freedom@csie.nctu.edu.tw Reply-To: freedom@csie.nctu.edu.tw To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/13740: wrong IP statistics Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 13740 >Category: kern >Synopsis: wrong IP statistics >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 13 15:30:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Tan Koan-Sin >Release: FreeBSD 4.0-CURRENT i386 >Organization: NCTU, Taiwan >Environment: While doing some network experiment, we found that we always see 0 output packets dropped due to no bufs, etc. from the output of "netstat -s". It's unbelievable, because we generated heavy traffic. >Description: The following code fragment is buggy. (line 362-370 of $Id: ip_output.c,v 1.90 1999/05/04 16:20:33 luigi Exp$) /* * Verify that we have any chance at all of being able to queue * the packet or packet fragments */ if ((ifp->if_snd.ifq_len + ip->ip_len / ifp->if_mtu + 1) >= ifp->if_snd.ifq_maxlen) { error = ENOBUFS; goto bad; } 1. I don't think we should check queue length here. Because even the condition is true. The output queue could have enough space when the packet is in if_output(). 2. Even 1. is wrong, there should be IF_DROP(&ifp->if_snd); before error = ENOBUFS; >How-To-Repeat: Just let some heavy UDP traffic compete for the same output queue. >Fix: Please remove the code fragment, or add IF_DROP. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message