Bug 16292

Summary: performance problem of divert socket
Product: Base System Reporter: KOIE Hidetaka <hide>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.3-RELEASE   
Hardware: Any   
OS: Any   

Description KOIE Hidetaka 2000-01-22 08:50:01 UTC
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;
        }

Fix: 

IMHO, this verifing code should be moved to
the immediately following `pass:'.
Comment 1 iedowse freebsd_committer freebsd_triage 2001-08-27 21:37:51 UTC
State Changed
From-To: open->feedback


Does this problem still exist in newer releases?
Comment 2 Giorgos Keramidas freebsd_committer freebsd_triage 2002-01-16 04:09:54 UTC
State Changed
From-To: feedback->closed

Feedback timeout after more than 4 months.