summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2001-10-27 00:59:17 +0000
committerluigi <luigi@FreeBSD.org>2001-10-27 00:59:17 +0000
commit8972891811456ffcfe6a96c0a9797ae64f8129ab (patch)
tree6db691be501b22b362b4e637cc9e7620c4b7b732 /sys
parenteb0ad6222d1267073df7b5ea3413ec5cd9477ce2 (diff)
downloadFreeBSD-src-8972891811456ffcfe6a96c0a9797ae64f8129ab.zip
FreeBSD-src-8972891811456ffcfe6a96c0a9797ae64f8129ab.tar.gz
Enable round-robin arbitration between transmit and receive unit
in the 21143, instead of giving priority to the receive unit. This gives a 10-15% performance improvement in the forwarding rate under heavy load. Reviewed-by: Bill Paul
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/dc/if_dc.c5
-rw-r--r--sys/pci/if_dc.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index 0d22729..d887464 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -3057,6 +3057,11 @@ static void dc_init(xsc)
CSR_WRITE_4(sc, DC_BUSCTL, 0);
else
CSR_WRITE_4(sc, DC_BUSCTL, DC_BUSCTL_MRME|DC_BUSCTL_MRLE);
+ /*
+ * Evenly share the bus between receive and transmit process.
+ */
+ if (DC_IS_INTEL(sc))
+ DC_SETBIT(sc, DC_BUSCTL, DC_BUSCTL_ARBITRATION);
if (DC_IS_DAVICOM(sc) || DC_IS_INTEL(sc)) {
DC_SETBIT(sc, DC_BUSCTL, DC_BURSTLEN_USECA);
} else {
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c
index 0d22729..d887464 100644
--- a/sys/pci/if_dc.c
+++ b/sys/pci/if_dc.c
@@ -3057,6 +3057,11 @@ static void dc_init(xsc)
CSR_WRITE_4(sc, DC_BUSCTL, 0);
else
CSR_WRITE_4(sc, DC_BUSCTL, DC_BUSCTL_MRME|DC_BUSCTL_MRLE);
+ /*
+ * Evenly share the bus between receive and transmit process.
+ */
+ if (DC_IS_INTEL(sc))
+ DC_SETBIT(sc, DC_BUSCTL, DC_BUSCTL_ARBITRATION);
if (DC_IS_DAVICOM(sc) || DC_IS_INTEL(sc)) {
DC_SETBIT(sc, DC_BUSCTL, DC_BURSTLEN_USECA);
} else {
OpenPOWER on IntegriCloud