Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Nov 2000 14:16:59 -0800
From:      Lars Eggert <larse@ISI.EDU>
To:        Warner Losh <imp@village.org>, freebsd-stable@FreeBSD.ORG
Subject:   Re: Linksys PCMPC100 problem
Message-ID:  <3A26D1DB.6C8A7701@isi.edu>
References:  <3A0C38FF.CE45632E@isi.edu> <200011102002.NAA51294@harmony.village.org> <3A0C5B53.2A304A80@isi.edu> <3A158BA6.711D0F04@isi.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a cryptographically signed message in MIME format.

--------------ms3DCA202289903FF2905EDD44
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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 <larse@isi.edu>                 Information Sciences Institute
http://www.isi.edu/larse/                University of Southern California
--------------ms3DCA202289903FF2905EDD44
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIIIIwYJKoZIhvcNAQcCoIIIFDCCCBACAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC
BfQwggLYMIICQaADAgECAgMDIwUwDQYJKoZIhvcNAQEEBQAwgZQxCzAJBgNVBAYTAlpBMRUw
EwYDVQQIEwxXZXN0ZXJuIENhcGUxFDASBgNVBAcTC0R1cmJhbnZpbGxlMQ8wDQYDVQQKEwZU
aGF3dGUxHTAbBgNVBAsTFENlcnRpZmljYXRlIFNlcnZpY2VzMSgwJgYDVQQDEx9QZXJzb25h
bCBGcmVlbWFpbCBSU0EgMTk5OS45LjE2MB4XDTAwMDgyNDIwMzAwOFoXDTAxMDgyNDIwMzAw
OFowVDEPMA0GA1UEBBMGRWdnZXJ0MQ0wCwYDVQQqEwRMYXJzMRQwEgYDVQQDEwtMYXJzIEVn
Z2VydDEcMBoGCSqGSIb3DQEJARYNbGFyc2VAaXNpLmVkdTCBnz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CCqGSIb3DQMCAgEoMA0G
CSqGSIb3DQEBAQUABIGAPm2ZcoJS56Fh+gqNwH/T44icLMPt92uqWKmg164RpYzEi54hnZW1
wlCgWlJ+LRCJaJzfzHsOU3huUNUDWXXy5+sBpJ3cTQ3Zzcy3RsjZ2xzOO/TMAtzbKrXQXoDA
EGGdBem3zjf3rnInh/HRHmsyctfB1uJrvfGAZaQsdDsPz94=
--------------ms3DCA202289903FF2905EDD44--



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A26D1DB.6C8A7701>