home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / bsd / 4607 < prev    next >
Encoding:
Text File  |  1992-08-23  |  5.5 KB  |  175 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!ames!ictv!barry
  3. From: barry@ictv.com (Barry Lustig)
  4. Subject: Re: slow ethernet performance
  5. Message-ID: <1992Aug23.232848.20755@ictv.com>
  6. Sender: usenet@ictv.com
  7. Organization: ICTV, Santa Clara, CA (408) 562-9200
  8. References: <oudcs3g@sgi.sgi.com>
  9. Date: Sun, 23 Aug 1992 23:28:48 GMT
  10. Lines: 163
  11.  
  12. Here are some ttcp numbers for a 486 33Mhz clone with 64Kb cache and a
  13. WD8013 Elite 16 ethernet card.  I modified the if_we driver to support
  14. 16bit transfers into and out-of the boards shared memory (for the
  15. 8013).  The changes to the driver are included at the end of this
  16. message.
  17.  
  18. The driver mods increased performance by a factor of 2.
  19.  
  20. barry
  21.  
  22. NeXT
  23. ttcp-t: socket
  24. ttcp-t: connect
  25. ttcp-t: buflen=8192, nbuf=2048, align=16384/+0, port=5001  tcp  -> nefarious
  26. ttcp-t: 16777216 bytes in 24.13 real seconds = 679.07 KB/sec +++
  27. ttcp-t: 16777216 bytes in 11.58 CPU seconds = 1414.54 KB/cpu sec
  28. ttcp-t: 2048 I/O calls, msec/call = 12.06, calls/sec = 84.88
  29. ttcp-t: 0.0user 11.5sys 0:24real 48% 0i+0d 0maxrss 0+0pf 1157+1387csw
  30. ttcp-t: buffer address 0x1c000
  31.  
  32. PC:
  33. ttcp-r: buflen=8192, nbuf=2048, align=16384/+0, port=5001  tcp
  34. ttcp-r: 16777216 bytes in 24.17 real seconds = 677.87 KB/sec +++
  35. ttcp-r: 16777216 bytes in 22.38 CPU seconds = 732.08 KB/cpu sec
  36. ttcp-r: 2667 I/O calls, msec/call = 9.28, calls/sec = 110.34
  37. ttcp-r: 0.0user 22.3sys 0:24real 92% 0i+0d 0maxrss 0+0pf 598+225csw
  38. ttcp-r: buffer address 0xc000
  39.  
  40. PC:
  41. ttcp-t: socket
  42. ttcp-t: connect
  43. ttcp-t: buflen=8192, nbuf=2048, align=16384/+0, port=5001  tcp  -> sinister
  44. ttcp-t: 16777216 bytes in 31.62 real seconds = 518.15 KB/sec +++
  45. ttcp-t: 16777216 bytes in 31.38 CPU seconds = 522.12 KB/cpu sec
  46. ttcp-t: 2048 I/O calls, msec/call = 15.81, calls/sec = 64.77
  47. ttcp-t: 0.0user 31.3sys 0:31real 99% 0i+0d 0maxrss 0+0pf 16+336csw
  48. ttcp-t: buffer address 0x10000
  49.  
  50. NeXT:
  51. ttcp-r: socket
  52. ttcp-r: accept from 128.229.210.253
  53. ttcp-r: buflen=8192, nbuf=2048, align=16384/+0, port=5001  tcp
  54. ttcp-r: 16777216 bytes in 31.63 real seconds = 517.96 KB/sec +++
  55. ttcp-r: 16777216 bytes in 14.82 CPU seconds = 1105.33 KB/cpu sec
  56. ttcp-r: 16300 I/O calls, msec/call = 1.99, calls/sec = 515.31
  57. ttcp-r: 0.3user 14.4sys 0:31real 46% 0i+0d 0maxrss 0+0pf 15907+488csw
  58. ttcp-r: buffer address 0x1c000
  59.  
  60.     
  61. ===================================================================
  62. Note:  I haven't modified the transmit side of the driver to use
  63. multiple transmit buffers.  That will have to wait until a rainy day!
  64.  
  65. RCS file: RCS/if_we.c,v
  66. retrieving revision 1.1
  67. diff -c -r1.1 if_we.c
  68. *** /tmp/,RCSt1001696    Sun Aug 23 16:54:02 1992
  69. --- if_we.c    Sun Aug 23 16:53:25 1992
  70. ***************
  71. *** 136,141 ****
  72. --- 136,142 ----
  73.       register int i;
  74.       register struct we_softc *sc = &we_softc[is->id_unit];
  75.       union we_mem_sel wem;
  76. +     union we_laar laar;
  77.       u_char sum;
  78.    
  79.       /* reset card to force it into a known state. */
  80. ***************
  81. *** 145,150 ****
  82. --- 146,159 ----
  83.       /* wait in the case this card is reading it's EEROM */
  84.       DELAY(5000);
  85.   
  86. + #if defined(WD8013)
  87. +     /* allow the NIC to access the shared RAM 16 bits at a time */
  88. +     laar.addr_l19 = 1;
  89. +     laar.lan_16_en = 1;
  90. +     laar.mem_16_en = 1;
  91. +     outb(is->id_iobase+5, laar.laar_byte);    /* Write a 0xc1 */
  92. + #endif
  93.       /*
  94.        * Here we check the card ROM, if the checksum passes, and the
  95.        * type code and ethernet address check out, then we know we have
  96. ***************
  97. *** 164,169 ****
  98. --- 173,179 ----
  99.               return (0);
  100.   #endif
  101.   /*printf("type %x ", sc->we_type);*/
  102.       if (sc->we_type & WD_SOFTCONFIG) {
  103.           int iv = inb(is->id_iobase + 1) & 4 |
  104.               ((inb(is->id_iobase+4) & 0x60) >> 5);
  105. ***************
  106. *** 173,178 ****
  107. --- 183,189 ----
  108.           outb(is->id_iobase+4, inb(is->id_iobase+4) | 0x80);
  109.       }
  110.   
  111.       /*
  112.        * Setup card RAM area and i/o addresses
  113.        * Kernel Virtual to segment C0000-DFFFF?????
  114. ***************
  115. *** 326,332 ****
  116. --- 337,348 ----
  117.       wecmd.cs_sta = 0;
  118.       wecmd.cs_ps = 0;
  119.       outb(sc->we_io_nic_addr + WD_P0_COMMAND, wecmd.cs_byte);
  120. + #if defined(WD8013)
  121. +     /* enable 16 bit access if 8013 card */
  122. +     outb(sc->we_io_nic_addr + WD_P0_DCR, WD_D_CONFIG16);
  123. + #else
  124.       outb(sc->we_io_nic_addr + WD_P0_DCR, WD_D_CONFIG);
  125. + #endif
  126.       outb(sc->we_io_nic_addr + WD_P0_RBCR0, 0);
  127.       outb(sc->we_io_nic_addr + WD_P0_RBCR1, 0);
  128.       outb(sc->we_io_nic_addr + WD_P0_RCR, WD_R_MON);
  129. ===================================================================
  130. RCS file: RCS/if_wereg.h,v
  131. retrieving revision 1.1
  132. diff -c -r1.1 if_wereg.h
  133. *** /tmp/,RCSt1001696    Sun Aug 23 16:54:03 1992
  134. --- if_wereg.h    Sun Aug 23 16:53:30 1992
  135. ***************
  136. *** 56,61 ****
  137. --- 56,78 ----
  138.   };
  139.   
  140.   /*
  141. +  * LA Address Register (LAAR)
  142. +  */
  143. + union we_laar {
  144. +     struct lan_addr_reg {
  145. +         u_char addr_l19_b:1,    /* Address Line 19 for enabling    */
  146. +                 /* 16 bit NIC access to shared RAM */
  147. +     unused_b:5,        /* unused (or unknown) bits        */
  148. +     lan_16_en_b:1,        /* Enables 16bit shrd RAM for LAN  */
  149. +     mem_16_en_b:1;        /* Enables 16bit shrd RAM for host */
  150. +     } laar_decode;
  151. + #define addr_l19    laar_decode.addr_l19_b
  152. + #define lan_16_en    laar_decode.lan_16_en_b
  153. + #define mem_16_en    laar_decode.mem_16_en_b
  154. +     u_char laar_byte;        /* entire byte            */
  155. + };
  156. + /*
  157.    * receive ring discriptor
  158.    *
  159.    * The National Semiconductor DS8390 Network interface controller uses
  160. ***************
  161. *** 235,240 ****
  162. --- 252,258 ----
  163.   #define WD_D_FT1    0x40        /* Fifo Threshold Select    */
  164.   #define WD_D_RES    0x80        /* reserved...            */
  165.   #define    WD_D_CONFIG    (WD_D_FT1|WD_D_BMS)
  166. + #define    WD_D_CONFIG16    (WD_D_FT1|WD_D_BMS|WD_D_LAS|WD_D_WTS)
  167.   
  168.   /*
  169.    * Configuration constants (interrupt mask register)
  170. -- 
  171.