diff options
author | np <np@FreeBSD.org> | 2012-04-30 09:46:05 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2012-04-30 09:46:05 +0000 |
commit | 45cd6b589c22e31ca23e6ee1ed1c77b36bf8f7d2 (patch) | |
tree | ba4150fc828a4416aaba0c1423b845e14c05e8b5 | |
parent | e42771f14b28a959f5c15165f5047db0314f9d98 (diff) | |
download | FreeBSD-src-45cd6b589c22e31ca23e6ee1ed1c77b36bf8f7d2.zip FreeBSD-src-45cd6b589c22e31ca23e6ee1ed1c77b36bf8f7d2.tar.gz |
Change the default to not use packet counters to generate rx interrupts.
Rely solely on the timer based mechanism.
Update man page to reflect this change.
MFC after: 1 week
-rw-r--r-- | share/man/man4/cxgbe.4 | 9 | ||||
-rw-r--r-- | sys/dev/cxgbe/t4_main.c | 4 | ||||
-rw-r--r-- | sys/dev/cxgbe/t4_sge.c | 9 |
3 files changed, 12 insertions, 10 deletions
diff --git a/share/man/man4/cxgbe.4 b/share/man/man4/cxgbe.4 index 88d42e3..a84ae55 100644 --- a/share/man/man4/cxgbe.4 +++ b/share/man/man4/cxgbe.4 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011, Chelsio Inc +.\" Copyright (c) 2011-2012, Chelsio Inc .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -145,10 +145,9 @@ dev.cxgbe.X.holdoff_tmr_idx sysctl. The packet-count index value to use to delay interrupts. The packet-count list has the values 1, 8, 16, and 32 by default and the index selects a value from this list. -The default value is 2 for both 10Gb and 1Gb ports, which means 16 -packets (or the holdoff timer going off) before an interrupt is -generated. --1 disables packet counting. +The default value is -1 for both 10Gb and 1Gb ports, which means packet +counting is disabled and interrupts are generated based solely on the +holdoff timer value. Different cxgbe interfaces can be assigned different values via the dev.cxgbe.X.holdoff_pktc_idx sysctl. This sysctl works only when the interface has never been marked up (as done by diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 7509a02..874a6ad 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -174,7 +174,7 @@ TUNABLE_INT("hw.cxgbe.nofldrxq1g", &t4_nofldrxq1g); static int t4_tmr_idx_10g = TMR_IDX_10G; TUNABLE_INT("hw.cxgbe.holdoff_timer_idx_10G", &t4_tmr_idx_10g); -#define PKTC_IDX_10G 2 +#define PKTC_IDX_10G (-1) static int t4_pktc_idx_10g = PKTC_IDX_10G; TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_10G", &t4_pktc_idx_10g); @@ -182,7 +182,7 @@ TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_10G", &t4_pktc_idx_10g); static int t4_tmr_idx_1g = TMR_IDX_1G; TUNABLE_INT("hw.cxgbe.holdoff_timer_idx_1G", &t4_tmr_idx_1g); -#define PKTC_IDX_1G 2 +#define PKTC_IDX_1G (-1) static int t4_pktc_idx_1g = PKTC_IDX_1G; TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_1G", &t4_pktc_idx_1g); diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 41630e4..8f39f10 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -1420,9 +1420,12 @@ init_iq(struct sge_iq *iq, struct adapter *sc, int tmr_idx, int pktc_idx, iq->flags = 0; iq->adapter = sc; - iq->intr_params = V_QINTR_TIMER_IDX(tmr_idx) | - V_QINTR_CNT_EN(pktc_idx >= 0); - iq->intr_pktc_idx = pktc_idx; + iq->intr_params = V_QINTR_TIMER_IDX(tmr_idx); + iq->intr_pktc_idx = SGE_NCOUNTERS - 1; + if (pktc_idx >= 0) { + iq->intr_params |= F_QINTR_CNT_EN; + iq->intr_pktc_idx = pktc_idx; + } iq->qsize = roundup(qsize, 16); /* See FW_IQ_CMD/iqsize */ iq->esize = max(esize, 16); /* See FW_IQ_CMD/iqesize */ strlcpy(iq->lockname, name, sizeof(iq->lockname)); |