From nobody@FreeBSD.ORG  Sat Jan 22 00:42:28 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id E65EE15558; Sat, 22 Jan 2000 00:42:27 -0800 (PST)
Message-Id: <20000122084227.E65EE15558@hub.freebsd.org>
Date: Sat, 22 Jan 2000 00:42:27 -0800 (PST)
From: hide@koie.org
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: performance problem of divert socket
X-Send-Pr-Version: www-1.0

>Number:         16292
>Category:       kern
>Synopsis:       performance problem of divert socket
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 22 00:50:01 PST 2000
>Closed-Date:    Tue Jan 15 20:09:54 PST 2002
>Last-Modified:  Tue Jan 15 20:10:34 PST 2002
>Originator:     KOIE Hidetaka
>Release:        FreeBSD 3.3-RELEASE
>Organization:
>Environment:
FreeBSD skipjack.koie.org 3.3-RELEASE FreeBSD 3.3-RELEASE #0: Wed Dec  8 09:16:43 JST 1999     koie@skipjack.koie.org:/usr/src/sys/compile/TP  i386

>Description:
In sys/netinet/ip_output.c,
ip_output() checks that ifnet::if_snd has room enough to
enqueue entire packet.
This verifying code is commited at revision 1.3.
But, using divert socket and IPFW,
on fire hose syndrome router,
user-land program (ipfw add divert N ... out xmit IFACE)
can not receive all packets.

        /*
         * 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;
        }

>How-To-Repeat:

>Fix:
IMHO, this verifing code should be moved to
the immediately following `pass:'.


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: iedowse 
State-Changed-When: Mon Aug 27 13:37:51 PDT 2001 
State-Changed-Why:  

Does this problem still exist in newer releases? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=16292 
State-Changed-From-To: feedback->closed 
State-Changed-By: keramida 
State-Changed-When: Tue Jan 15 20:09:54 PST 2002 
State-Changed-Why:  
Feedback timeout after more than 4 months. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=16292 
>Unformatted:
