summaryrefslogtreecommitdiffstats
path: root/sys/dev/de
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1996-05-21 19:05:31 +0000
committerwollman <wollman@FreeBSD.org>1996-05-21 19:05:31 +0000
commit8cff178a4c62b4756e7e669a3a7c7ac4992bd309 (patch)
tree1821593ac5bd2ecdd10496423aa0bb38be0d8b4b /sys/dev/de
parente917af9def4f0bef0e795cac47b61d65d141fcd6 (diff)
downloadFreeBSD-src-8cff178a4c62b4756e7e669a3a7c7ac4992bd309.zip
FreeBSD-src-8cff178a4c62b4756e7e669a3a7c7ac4992bd309.tar.gz
Let the user know what errors are experienced on received packets.
I spent the better part of a day trying to figure out why my experiment didn't work the way I expected, only to find out that the router was dropping huge numbers of packets because of PCI bus priblems. This does not fix the bug that errors are counted as input packets because my patch doesn't apply cleanly.
Diffstat (limited to 'sys/dev/de')
-rw-r--r--sys/dev/de/if_de.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c
index 274647c..5dee4f0 100644
--- a/sys/dev/de/if_de.c
+++ b/sys/dev/de/if_de.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_de.c,v 1.45 1996/05/02 14:20:44 phk Exp $
+ * $Id: if_de.c,v 1.46 1996/05/03 21:01:34 phk Exp $
*
*/
@@ -1092,7 +1092,18 @@ tulip_rx_intr(
accept = 1;
total_len -= sizeof(struct ether_header);
} else {
- ifp->if_ierrors++;
+#define RXERR(which, what) \
+ if (eop->d_status & which) \
+ printf("de%d: receiver: %s\n", ifp->if_unit, what)
+
+ RXERR(TULIP_DSTS_RxBADLENGTH, "packet length error");
+ RXERR(TULIP_DSTS_RxRUNT, "runt frame");
+ RXERR(TULIP_DSTS_RxTOOLONG, "frame too long");
+ RXERR(TULIP_DSTS_RxCOLLSEEN, "late collision");
+ RXERR(TULIP_DSTS_RxBADCRC, "CRC error");
+ RXERR(TULIP_DSTS_RxOVERFLOW, "FIFO overflow");
+#undef RXERR
+ ifp->if_ierrors++;
}
next:
ifp->if_ipackets++;
OpenPOWER on IntegriCloud