Re: [PATCH] Optimize loopback stats
From: Nivedita Singhvi <hidden>
Date: 2005-03-16 00:09:43
Chuck Ebbert wrote:
On 15-Mar-05 Nivedita Singhvi wrote:quoted
Chuck Ebbert wrote:quoted
This patch optimizes the loopback driver's statistics by using a single counter for rx and tx stats instead of one for rx and one for tx. It also adds unlikely() to the test for TSO since it's no longer supported by default. (Maybe the TSO code should be bracketed by "#if 0" ?)Hmm, some of us want those counters separate - if this is really needed, could it be a configurable option, please?But they _are_ separately reported -- get_stats() takes care of that. Everything looks exactly the same to userspace after this patch. -- Chuck
Hmm, I see the following in your patch: + stats->rx_bytes += lb_stats->rx_tx_bytes; + stats->tx_bytes = stats->rx_bytes; Doesn't that mean RX is now twice what it should be and so is TX? They are separately reported, but if so, their real value should be half of rx_tx_bytes each, correct? thanks, Nivedita