Date: Mon, 10 Dec 2001 21:10:01 -0800 (PST) From: Lars Eggert <larse@ISI.EDU> To: freebsd-bugs@FreeBSD.org Subject: Re: i386/12088: Enhancement to ed driver for Linksys 10/100 or DLink DFE650 Message-ID: <200112110510.fBB5A1f15642@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/12088; it has been noted by GNATS. From: Lars Eggert <larse@ISI.EDU> To: info@netarmor.net Cc: freebsd-gnats-submit@FreeBSD.org, pete@altadena.net Subject: Re: i386/12088: Enhancement to ed driver for Linksys 10/100 or DLink DFE650 Date: Mon, 10 Dec 2001 21:07:16 -0800 This is a multi-part message in MIME format. --------------090209000908070001020708 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit info@netarmor.net wrote: > As far as I can determine this problem still exists in FreeBSD 4.4. Thanks for confirming this. Here's a patch that I had posted to the mailing list before, but I forgot to add it to the PR. (It's a hack, but fixes the problem - a real fix would be better, see the comments in the patch.) Lars -- Lars Eggert <larse@isi.edu> Information Sciences Institute http://www.isi.edu/larse/ University of Southern California --------------090209000908070001020708 Content-Type: text/html; name="if_ed.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="if_ed.c.patch" [This is from a -stable email from 11/30/00 titled "Re: Linksys PCMPC100 problem"] 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 <a href="http://www.FreeBSD.org/cgi/query-pr.cgi?pr=12088">http://www.FreeBSD.org/cgi/query-pr.cgi?pr=12088</a> looks promising, but doesn't apply cleanly due to bitrot. Index: if_ed.c =================================================================== RCS <a href="file:">file:</a> /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 + * <a href="http://www.FreeBSD.org/cgi/query-pr.cgi?pr=12088">http://www.FreeBSD.org/cgi/query-pr.cgi?pr=12088</a> 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); } --------------090209000908070001020708-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112110510.fBB5A1f15642>