@@ 110,7 110,8 @@ etherrloop(Ether *ctlr, Etherpkt *pkt, long len, int tome)
ep = &ctlr->f[Ntypes];
for(fp = ctlr->f; fp < ep; fp++){
if((f = *fp) && ((tome && f->type==type) || f->type < 0))
- qproduce(f->in, pkt->d, len);
+ if(qproduce(f->in, pkt->d, len) < 0)
+ ctlr->soverflows++;
}
}
@@ 159,7 159,7 @@ netifread(Netif *nif, Chan *c, void *a, long n, ulong offset)
{
int i, j;
Netfile *f;
- char buf[512];
+ char buf[1024];
if(c->qid.path&CHDIR)
return devdirread(c, a, n, (Dirtab*)nif, 0, netifgen);
@@ 175,6 175,7 @@ netifread(Netif *nif, Chan *c, void *a, long n, ulong offset)
j += sprint(buf+j, "out: %d\n", nif->outpackets);
j += sprint(buf+j, "crc errs: %d\n", nif->crcs);
j += sprint(buf+j, "overflows: %d\n", nif->overflows);
+ j += sprint(buf+j, "soft overflows: %d\n", nif->soverflows);
j += sprint(buf+j, "framing errs: %d\n", nif->frames);
j += sprint(buf+j, "buffer errs: %d\n", nif->buffs);
j += sprint(buf+j, "output errs: %d\n", nif->oerrs);
@@ 69,6 69,7 @@ struct Netif
int frames; /* framing errors */
int overflows; /* packet overflows */
int buffs; /* buffering errors */
+ int soverflows; /* software overflow */
/* routines for touching the hardware */
void *arg;