summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_ppp.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2007-06-04 13:50:09 +0000
committermav <mav@FreeBSD.org>2007-06-04 13:50:09 +0000
commit2f12bfb53bf6e3f5bcca552f363c6b8e040a3d84 (patch)
tree92932ca9fda668f29549378b9ea879d66183adc7 /sys/netgraph/ng_ppp.c
parent68cc2f890e531f8fbab96af900fa7fde9cd5ca07 (diff)
downloadFreeBSD-src-2f12bfb53bf6e3f5bcca552f363c6b8e040a3d84.zip
FreeBSD-src-2f12bfb53bf6e3f5bcca552f363c6b8e040a3d84.tar.gz
No need to update link queue stats when round-robin algorithm enabled.
Approved by: glebius (mentor)
Diffstat (limited to 'sys/netgraph/ng_ppp.c')
-rw-r--r--sys/netgraph/ng_ppp.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/netgraph/ng_ppp.c b/sys/netgraph/ng_ppp.c
index 5d447a0..282603c 100644
--- a/sys/netgraph/ng_ppp.c
+++ b/sys/netgraph/ng_ppp.c
@@ -1293,15 +1293,16 @@ ng_ppp_link_xmit(node_p node, item_p item, uint16_t proto, uint16_t linkNum)
link->stats.xmitOctets += len;
/* bytesInQueue and lastWrite required only for mp_strategy. */
- if (priv->conf.enableMultilink && !priv->allLinksEqual) {
- /* If queue was empty, then mark this time. */
- if (link->bytesInQueue == 0)
- getmicrouptime(&link->lastWrite);
- link->bytesInQueue += len + MP_AVERAGE_LINK_OVERHEAD;
- /* Limit max queue length to 50 pkts. BW can be defined
- incorrectly and link may not signal overload. */
- if (link->bytesInQueue > 50 * 1600)
- link->bytesInQueue = 50 * 1600;
+ if (priv->conf.enableMultilink && !priv->allLinksEqual &&
+ !priv->conf.enableRoundRobin) {
+ /* If queue was empty, then mark this time. */
+ if (link->bytesInQueue == 0)
+ getmicrouptime(&link->lastWrite);
+ link->bytesInQueue += len + MP_AVERAGE_LINK_OVERHEAD;
+ /* Limit max queue length to 50 pkts. BW can be defined
+ incorrectly and link may not signal overload. */
+ if (link->bytesInQueue > 50 * 1600)
+ link->bytesInQueue = 50 * 1600;
}
}
return (error);
OpenPOWER on IntegriCloud