From c7a07214050e325cbf850ffba5bef789b63a6fe8 Mon Sep 17 00:00:00 2001 From: glebius Date: Mon, 12 Jan 2015 18:06:22 +0000 Subject: [PATCH] Do not go one layer down to check ifqueue length. First, not all drivers use ifqueue at all. Second, there is no point in this lockless check. Either positive or negative result of the check could be incorrect after a tick. Reviewed by: tuexen Sponsored by: Nginx, Inc. --- sys/netinet/sctp_output.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 59e4343e1b85..86aa3afdeab5 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -7958,22 +7958,6 @@ again_one_more_time: } else { skip_data_for_this_net = 0; } - if ((net->ro.ro_rt) && (net->ro.ro_rt->rt_ifp)) { - /* - * if we have a route and an ifp check to see if we - * have room to send to this guy - */ - struct ifnet *ifp; - - ifp = net->ro.ro_rt->rt_ifp; - if ((ifp->if_snd.ifq_len + 2) >= ifp->if_snd.ifq_maxlen) { - SCTP_STAT_INCR(sctps_ifnomemqueued); - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_MAXBURST_ENABLE) { - sctp_log_maxburst(stcb, net, ifp->if_snd.ifq_len, ifp->if_snd.ifq_maxlen, SCTP_MAX_IFP_APPLIED); - } - continue; - } - } switch (((struct sockaddr *)&net->ro._l_addr)->sa_family) { #ifdef INET case AF_INET: