No need to update link queue stats when round-robin algorithm enabled.

Approved by:	glebius (mentor)
This commit is contained in:
Alexander Motin 2007-06-04 13:50:09 +00:00
parent 039e8df3cf
commit c35e19c430

View file

@ -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);