| Summary: | performance problem of divert socket | ||
|---|---|---|---|
| Product: | Base System | Reporter: | KOIE Hidetaka <hide> |
| Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 3.3-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->feedback Does this problem still exist in newer releases? State Changed From-To: feedback->closed Feedback timeout after more than 4 months. |
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:'.