Another piece to the puzzle of bad network performance of the Linksys cards
is that they're only supported as generic NE2000 cards with 8K of memory by
the ed driver. 1.5K are used for the send buffer, 6.5K remain for the
receive buffer. This is a shortcoming of the ed driver, since the Linksys
cards have 32K of memory.
If a sender sends large packets to a Linksys cards (NFS over UDP), the IP
fragments arrive too fast and overrun the buffer. The last fragment(s) are
lost and the wohle packet is dropped.
The patch below fixes a small bug in the ed driver that causes only 8K
instead of 16K (as normal for 16bit cards) to be used. However, full
support for the Linksys cards should really be added to the ed driver. The
code in http://www.FreeBSD.org/cgi/query-pr.cgi?pr=12088 looks promising,
but doesn't apply cleanly due to bitrot.
Index: if_ed.c
===================================================================
RCS file: /home/larse/CVSROOT/RELENG_4/sys/dev/ed/if_ed.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 if_ed.c
--- if_ed.c 2000/10/25 01:15:38 1.1.1.1
+++ if_ed.c 2000/11/30 22:16:13
@@ -1046,6 +1046,18 @@
}
+ /*
+ * Hack:
+ * Reprobe Linksys. This sets sc->isa16bit, which causes 16K
+ * of the card memory to be used instead of only 8K. However,
+ * the Linksys cards (at least my PCMPC100) have 32K memory.
+ * This driver should really be changed to fully support the
+ * Linksys cards. The patch in
+ * http://www.FreeBSD.org/cgi/query-pr.cgi?pr=12088 looks
+ * promising, but doesn't apply cleanly due to bitrot.
+ */
+ ed_get_Linksys(sc);
+
/* 8k of memory plus an additional 8k if 16bit */
memsize = 8192 + sc->isa16bit * 8192;
@@ -1690,6 +1702,13 @@
printf("%s\n", (((sc->vendor == ED_VENDOR_3COM) ||
(sc->vendor == ED_VENDOR_HP)) &&
(ifp->if_flags & IFF_ALTPHYS)) ? " tranceiver disabled" :
"");
+#if ED_DEBUG
+ printf("%s%d: %u/%u/%u bytes tx/rx/total card memory\n",
+ ifp->if_name, ifp->if_unit,
+ sc->txb_cnt * ED_PAGE_SIZE * ED_TXBUF_SIZE,
+ (sc->rec_page_stop - sc->rec_page_start) * ED_PAGE_SIZE,
+ sc->mem_size);
+#endif
return (0);
}
--
Lars Eggert <[EMAIL PROTECTED]> Information Sciences Institute
http://www.isi.edu/larse/ University of Southern California
S/MIME Cryptographic Signature