Re: [PATCH] Optimize loopback stats

3 messages, 2 authors, 2005-03-16 · open the first message on its own page

Re: [PATCH] Optimize loopback stats

From: Chuck Ebbert <hidden>
Date: 2005-03-15 23:15:59

On 15-Mar-05 Nivedita Singhvi wrote:
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

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

Re: [PATCH] Optimize loopback stats

From: Nivedita Singhvi <hidden>
Date: 2005-03-16 00:18:42

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?
Ah, just beat me silly with a cluestick.
I see what you're doing now..it's fine.

thanks,
Nivedita
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help