From: Thomas Lange <thomas@corelatus.com>
To: linuxppc-embedded@lists.linuxppc.org
Subject: 8xx enet collision counter
Date: Wed, 23 Oct 2002 15:12:49 +0200 [thread overview]
Message-ID: <3DB6A051.7A526641@corelatus.com> (raw)
Collisions in 8xx scc ethernet are not reported
correctly IMHO.
>From enet.c :
/* Deferred means some collisions occurred during transmit,
* but we eventually sent the packet OK.
*/
if (bdp->cbd_sc & BD_ENET_TX_DEF)
cep->stats.collisions++;
>From Table 28-8 in 860 UM:
------
6 DEF Defer indication. The frame was deferred before being sent
successfully,
that is, the transmitter had to wait for carrier sense before sending
because the line was busy.
This is not a collision indication; collisions are indicated in RC.
------
10-13 RC Retry count. Indicates the number of retries required before
the frame was sent successfully. If RC = 0, the frame was sent correctly
the first time. If RC = 15 and RET_LIM = 15 in the parameter RAM, 15
retries were required. Because the counter saturates at 15, if RC = 15
and RET_LIM > 15, then 15 or more retries were required. The controller
writes this field after it successfully sends the buffer.
------
The correct way to do it would be to use the RC value,
something like this:
/* Check retry counter, i.e. collision counter */
if (bdp->cbd_sc & BD_ENET_TX_RCMASK){
/* Note that counter cannot go higher than 15 */
cep->stats.collisions+=(bdp->cbd_sc & BD_ENET_TX_RCMASK)>>2;
}
I have tried this and it looks much better. That is, when
tranceiver led signals collision, the collision counter actually
moves ;-)
/Thomas
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
reply other threads:[~2002-10-23 13:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DB6A051.7A526641@corelatus.com \
--to=thomas@corelatus.com \
--cc=linuxppc-embedded@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.