Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Sep 1999 06:21:58 +0800 (CST)
From:      freedom@csie.nctu.edu.tw
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/13740: wrong IP statistics
Message-ID:  <199909132221.GAA12704@liberty.dorm11.nctu.edu.tw>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909132221.GAA12704>