From 2f12bfb53bf6e3f5bcca552f363c6b8e040a3d84 Mon Sep 17 00:00:00 2001 From: mav Date: Mon, 4 Jun 2007 13:50:09 +0000 Subject: No need to update link queue stats when round-robin algorithm enabled. Approved by: glebius (mentor) --- sys/netgraph/ng_ppp.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'sys/netgraph/ng_ppp.c') 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); -- cgit v1.1