summaryrefslogtreecommitdiffstats
path: root/sys/dev/em/if_em.h
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>2003-08-01 17:33:59 +0000
committerjdp <jdp@FreeBSD.org>2003-08-01 17:33:59 +0000
commita8a8a6510a1ac447b83ccfaf699d87d95be84c96 (patch)
treef7af9d535127fd55adae86b8ebd86b68ce5be709 /sys/dev/em/if_em.h
parent25665981dd793b68604567181e50d307831c96f1 (diff)
downloadFreeBSD-src-a8a8a6510a1ac447b83ccfaf699d87d95be84c96.zip
FreeBSD-src-a8a8a6510a1ac447b83ccfaf699d87d95be84c96.tar.gz
Add facilities for tuning the "em" driver's interrupt delays without
recompiling the driver. See the comments near the top of "if_em.h" for descriptions of these delays. Four new loader tunables control the system-wide default values: hw.em.tx_int_delay hw.em.rx_int_delay hw.em.tx_abs_int_delay hw.em.rx_abs_int_delay The tunables are specified in microseconds. The valid range is 0-67108 usec., and 0 means that the timer is disabled. There are also four new sysctls (actually, a set of four for each "em" device in the system) to query and change the interrupt delays after the system is up: hw.em0.tx_int_delay hw.em0.rx_int_delay hw.em0.tx_abs_int_delay (not present for 82542/3/4 adapters) hw.em0.rx_abs_int_delay (not present for 82542/3/4 adapters) It seems to be OK to change these values even while the adapter is passing traffic. Approved by: Prafulla Deuskar <pdeuskar@FreeBSD.ORG> MFC after: 4 weeks
Diffstat (limited to 'sys/dev/em/if_em.h')
-rw-r--r--sys/dev/em/if_em.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/em/if_em.h b/sys/dev/em/if_em.h
index 2532740..ca85fbb 100644
--- a/sys/dev/em/if_em.h
+++ b/sys/dev/em/if_em.h
@@ -294,6 +294,13 @@ typedef enum _XSUM_CONTEXT_T {
OFFLOAD_UDP_IP
} XSUM_CONTEXT_T;
+struct adapter;
+struct em_int_delay_info {
+ struct adapter *adapter; /* Back-pointer to the adapter struct */
+ int offset; /* Register offset to read/write */
+ int value; /* Current value in usecs */
+};
+
/* Our adapter structure */
struct adapter {
struct arpcom interface_data;
@@ -320,10 +327,10 @@ struct adapter {
u_int16_t link_speed;
u_int16_t link_duplex;
u_int32_t smartspeed;
- u_int32_t tx_int_delay;
- u_int32_t tx_abs_int_delay;
- u_int32_t rx_int_delay;
- u_int32_t rx_abs_int_delay;
+ struct em_int_delay_info tx_int_delay;
+ struct em_int_delay_info tx_abs_int_delay;
+ struct em_int_delay_info rx_int_delay;
+ struct em_int_delay_info rx_abs_int_delay;
XSUM_CONTEXT_T active_checksum_context;
OpenPOWER on IntegriCloud