svn commit: r271852 - head/sys/netinet
Gleb Smirnoff
glebius at FreeBSD.org
Fri Sep 19 05:23:48 UTC 2014
Author: glebius
Date: Fri Sep 19 05:23:47 2014
New Revision: 271852
URL: http://svnweb.freebsd.org/changeset/base/271852
Log:
Remove disabled code, that is very unlikely to be ever enabled again,
as well as the comment that explains why is it disabled.
Modified:
head/sys/netinet/ip_output.c
Modified: head/sys/netinet/ip_output.c
==============================================================================
--- head/sys/netinet/ip_output.c Fri Sep 19 05:03:11 2014 (r271851)
+++ head/sys/netinet/ip_output.c Fri Sep 19 05:23:47 2014 (r271852)
@@ -446,43 +446,6 @@ again:
}
/*
- * Both in the SMP world, pre-emption world if_transmit() world,
- * the following code doesn't really function as intended any further.
- *
- * + There can and will be multiple CPUs running this code path
- * in parallel, and we do no lock holding when checking the
- * queue depth;
- * + And since other threads can be running concurrently, even if
- * we do pass this check, another thread may queue some frames
- * before this thread does and it will end up partially or fully
- * failing to send anyway;
- * + if_transmit() based drivers don't necessarily set ifq_len
- * at all.
- *
- * This should be replaced with a method of pushing an entire list
- * of fragment frames to the driver and have the driver decide
- * whether it can queue or not queue the entire set.
- */
-#if 0
- /*
- * Verify that we have any chance at all of being able to queue the
- * packet or packet fragments, unless ALTQ is enabled on the given
- * interface in which case packetdrop should be done by queueing.
- */
- n = ip_len / mtu + 1; /* how many fragments ? */
- if (
-#ifdef ALTQ
- (!ALTQ_IS_ENABLED(&ifp->if_snd)) &&
-#endif /* ALTQ */
- (ifp->if_snd.ifq_len + n) >= ifp->if_snd.ifq_maxlen ) {
- error = ENOBUFS;
- IPSTAT_INC(ips_odropped);
- ifp->if_snd.ifq_drops += n;
- goto bad;
- }
-#endif
-
- /*
* Look for broadcast address and
* verify user is allowed to send
* such a packet.
More information about the svn-src-head
mailing list