summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_stereg.h
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-04-02 23:36:49 +0000
committerru <ru@FreeBSD.org>2004-04-02 23:36:49 +0000
commit84002c9d9a7ac76390bb87f995b3c55a23042235 (patch)
tree54051769301e063357b0ecbfb440e8afc699893e /sys/pci/if_stereg.h
parent0a58f658fe814a5f8d328c8b40fb24f0300a6878 (diff)
downloadFreeBSD-src-84002c9d9a7ac76390bb87f995b3c55a23042235.zip
FreeBSD-src-84002c9d9a7ac76390bb87f995b3c55a23042235.tar.gz
Performance tuning.
Moved the RX ring resyncing code to ste_rxeoc(), and only run it if we were asked to POLL_AND_CHECK_STATUS, under DEVICE_POLLING. (This significantly reduces the CPU load.) Improved the RX ring resyncing code by re-checking if the head is still empty before doing resyncing. This mostly affects the DEVICE_POLLING mode, where we run this code periodically. We could start checking with an empty head (well, an empty ring even), and after doing a few iterations, the chip might write a few entries, including the head, and we would bogusly consider this case as requiring resyncing. On a test box, this reduced the number of resyncs done by a factor of 10. In ste_txeof(sc), only reset the watchdog timer to zero when the TX list is completely empty. Converted ste_tx_prev_idx to a pointer -- faster. Removed some bitrot.
Diffstat (limited to 'sys/pci/if_stereg.h')
-rw-r--r--sys/pci/if_stereg.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/pci/if_stereg.h b/sys/pci/if_stereg.h
index 0de4f78d..90350b4 100644
--- a/sys/pci/if_stereg.h
+++ b/sys/pci/if_stereg.h
@@ -479,14 +479,12 @@ struct ste_type {
struct ste_list_data {
struct ste_desc_onefrag ste_rx_list[STE_RX_LIST_CNT];
struct ste_desc ste_tx_list[STE_TX_LIST_CNT];
- u_int8_t ste_pad[STE_MIN_FRAMELEN];
};
struct ste_chain {
struct ste_desc *ste_ptr;
struct mbuf *ste_mbuf;
struct ste_chain *ste_next;
- struct ste_chain *ste_prev;
u_int32_t ste_phys;
};
@@ -520,7 +518,7 @@ struct ste_softc {
int ste_tx_thresh;
u_int8_t ste_link;
int ste_if_flags;
- int ste_tx_prev_idx;
+ struct ste_chain *ste_tx_prev;
struct ste_list_data *ste_ldata;
struct ste_chain_data ste_cdata;
struct callout_handle ste_stat_ch;
OpenPOWER on IntegriCloud