summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_tlreg.h
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-09-19 22:39:24 +0000
committerwpaul <wpaul@FreeBSD.org>1999-09-19 22:39:24 +0000
commit31ec4c12facbc61ce32b4ffa14d7491fd8c48f02 (patch)
tree37cfb1728c13b14ba04d57407ae9514c1ff308fd /sys/pci/if_tlreg.h
parent17bce01dd1c351fc9000992083745fa44ff322d2 (diff)
downloadFreeBSD-src-31ec4c12facbc61ce32b4ffa14d7491fd8c48f02.zip
FreeBSD-src-31ec4c12facbc61ce32b4ffa14d7491fd8c48f02.tar.gz
Make some small performance tweaks to the tl driver. This should hopefully
close PR #13757, however I'm waiting on user feedback before declaring the PR officially closed. Among other things, this improves UDP transmit performance, and tx underruns are now detected and the TX start threshold adjusted accordingly.
Diffstat (limited to 'sys/pci/if_tlreg.h')
-rw-r--r--sys/pci/if_tlreg.h33
1 files changed, 30 insertions, 3 deletions
diff --git a/sys/pci/if_tlreg.h b/sys/pci/if_tlreg.h
index b06f5e9..29c7e62 100644
--- a/sys/pci/if_tlreg.h
+++ b/sys/pci/if_tlreg.h
@@ -49,8 +49,8 @@ struct tl_type {
*/
#define TL_MAXFRAGS 10
-#define TL_RX_LIST_CNT 20
-#define TL_TX_LIST_CNT 20
+#define TL_RX_LIST_CNT 64
+#define TL_TX_LIST_CNT 128
#define TL_MIN_FRAMELEN 64
struct tl_frag {
@@ -120,7 +120,6 @@ struct tl_softc {
struct tl_type *tl_dinfo; /* ThunderLAN adapter info */
u_int8_t tl_unit; /* interface number */
u_int8_t tl_eeaddr;
- caddr_t tl_ldata_ptr;
struct tl_list_data *tl_ldata; /* TX/RX lists and mbufs */
struct tl_chain_data tl_cdata;
u_int8_t tl_txeoc;
@@ -458,6 +457,34 @@ struct tl_stats {
#define TL_AC_MTXD2 0x04 /* loopback disable */
#define TL_AC_MTXD3 0x08 /* full duplex disable */
+#define TL_AC_TXTHRESH 0xF0
+#define TL_AC_TXTHRESH_16LONG 0x00
+#define TL_AC_TXTHRESH_32LONG 0x10
+#define TL_AC_TXTHRESH_64LONG 0x20
+#define TL_AC_TXTHRESH_128LONG 0x30
+#define TL_AC_TXTHRESH_256LONG 0x40
+#define TL_AC_TXTHRESH_WHOLEPKT 0x50
+
+/*
+ * PCI burst size register (TL_BSIZEREG).
+ */
+#define TL_RXBURST 0x0F
+#define TL_TXBURST 0xF0
+
+#define TL_RXBURST_4LONG 0x00
+#define TL_RXBURST_8LONG 0x01
+#define TL_RXBURST_16LONG 0x02
+#define TL_RXBURST_32LONG 0x03
+#define TL_RXBURST_64LONG 0x04
+#define TL_RXBURST_128LONG 0x05
+
+#define TL_TXBURST_4LONG 0x00
+#define TL_TXBURST_8LONG 0x10
+#define TL_TXBURST_16LONG 0x20
+#define TL_TXBURST_32LONG 0x30
+#define TL_TXBURST_64LONG 0x40
+#define TL_TXBURST_128LONG 0x50
+
/*
* register space access macros
*/
OpenPOWER on IntegriCloud