svn commit: r234833 - in head: share/man/man4 sys/dev/cxgbe
Navdeep Parhar
np at FreeBSD.org
Mon Apr 30 09:46:06 UTC 2012
Author: np
Date: Mon Apr 30 09:46:05 2012
New Revision: 234833
URL: http://svn.freebsd.org/changeset/base/234833
Log:
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
Modified:
head/share/man/man4/cxgbe.4
head/sys/dev/cxgbe/t4_main.c
head/sys/dev/cxgbe/t4_sge.c
Modified: head/share/man/man4/cxgbe.4
==============================================================================
--- head/share/man/man4/cxgbe.4 Mon Apr 30 08:44:21 2012 (r234832)
+++ head/share/man/man4/cxgbe.4 Mon Apr 30 09:46:05 2012 (r234833)
@@ -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
Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c Mon Apr 30 08:44:21 2012 (r234832)
+++ head/sys/dev/cxgbe/t4_main.c Mon Apr 30 09:46:05 2012 (r234833)
@@ -174,7 +174,7 @@ TUNABLE_INT("hw.cxgbe.nofldrxq1g", &t4_n
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_1
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);
Modified: head/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- head/sys/dev/cxgbe/t4_sge.c Mon Apr 30 08:44:21 2012 (r234832)
+++ head/sys/dev/cxgbe/t4_sge.c Mon Apr 30 09:46:05 2012 (r234833)
@@ -1420,9 +1420,12 @@ init_iq(struct sge_iq *iq, struct adapte
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));
More information about the svn-src-head
mailing list