please use netdev@vger.kernel.org

On Tue, 19 Jul 2005, [EMAIL PROTECTED] wrote:
> I'm confused about the drop count reporting in e1000
> nics (and elsewhere). On e1000 nics the on nic rx buffer
> drop counts are maintained in "mpc" and the in kernel buffer drops
> are maintained in "rnbc".

Actually i think you may have misunderstood the rnbc (receive no buffer count) counter. It indicates the hardware had nowhere to dma the packet to due to no dma descriptors available, and that the packet was left in the fifo. This _does not_ indicate a drop in and of itself, as the packet can still be dma'd if the fifo does its job and stores the packet until a descriptor can be made available by software. Hence its removal from the "dropped" counters as the packet was often dma'd and not dropped.

mpc (missed packet count)

We implemented the new way under the assumption (ass-u-me we may be making of ourselves, as I don't know of any documentation that says what each counter should hold) you may be looking for a counter like TPR, which includes "all packets received, regardless of their length, whether they have errors, or whether they are flow control packets." However, when I look to a packets received counter in the kernel, I am looking for packets that are received correctly, which gprc (good packets receieved counter) covers.


> Note also the e1000 nic does not count mpc in its
> rx_packets count (gprc).

you are demonstrating a different expectation than we had of the "received packets" counter. I think we need some documentation of the expecations of what drivers should provide in these statistics (and i just looked some but found nothing in Documentation/networking) although there is some code documentation but not enuf in include/linux/netdevice.h

> In kernel 2.6.11 and before these were mapped to the
> kernel statistics like:
>
> packets = gprc
> dropped = rnbc
> fifo = mpc
> missed = mpc
>
> In 2.6.12 this changed to:
>
> packets = gprc
> dropped = mpc
> fifo = mpc
> missed = mpc
>
> Both are wrong I think and
> I think it should do (see attached patch):
>

<snip>

packets = gprc + mpc
dropped = rnbc
fifo = 0
missed = mpc


packets: I think the way we are doing it now is correct. Unless someone like DaveM tells us otherwise, I think that we should not include missed packets in our receive packet count, and if we did change (or if you want to in your local source) then TPR would be all inclusive.

dropped: rnbc does not mean dropped, see above.  mpc means dropped.

fifo: mpc means the fifo overflowed, and the packet was dropped (the only time we drop).

missed: this should also be mpc because it shows we missed the packet.

now, its debatable if we should be reporting the same stat 3 times, but i still think it is correct, and its how our hardware maps stats and the best we can overlay onto linux's definitions as we interpret them.

What's rx_fifo_errors supposed to account for?

I think rx_fifo_errors is a leftover from the ISA days when overruns happened due to io-driven copying of data from the adapter. now we have DMA, so the only real interesting stats are mpc and rnbc. rnbc can be used to tell if your bus is not fast enough, and/or you don't have enough receive descriptors, and mpc says the situation got so bad (so many rnbc) that you had a full fifo and packets were thrown on the ground.

Hope this helped...

Jesse
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to