aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ixgbe
diff options
context:
space:
mode:
authorHiren Panchasara <hiren@FreeBSD.org>2013-10-05 19:17:56 +0000
committerHiren Panchasara <hiren@FreeBSD.org>2013-10-05 19:17:56 +0000
commit5b9d734b08304416a4f340b9a436360fb6e08745 (patch)
treef99f8f5e035b7d06e9e5dd6bdc9159684a96360c /sys/dev/ixgbe
parent61083fcc613a287c350c6f4e8da11eff19a53fa0 (diff)
downloadsrc-5b9d734b08304416a4f340b9a436360fb6e08745.tar.gz
src-5b9d734b08304416a4f340b9a436360fb6e08745.zip
Expose system level ixgbe sysctls.
Device level sysctls are already exposed as dev.ix.<device> Fixing the case where number of queues for igb is auto-tuned and hw.igb.num_queues does not return current/updated value. Reviewed by: jfv Approved by: re (delphij) MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=256069
Diffstat (limited to 'sys/dev/ixgbe')
-rw-r--r--sys/dev/ixgbe/ixgbe.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/dev/ixgbe/ixgbe.c b/sys/dev/ixgbe/ixgbe.c
index b65df7221b78..3434125fc488 100644
--- a/sys/dev/ixgbe/ixgbe.c
+++ b/sys/dev/ixgbe/ixgbe.c
@@ -234,6 +234,9 @@ MODULE_DEPEND(ixgbe, ether, 1, 1, 1);
** TUNEABLE PARAMETERS:
*/
+static SYSCTL_NODE(_hw, OID_AUTO, ix, CTLFLAG_RD, 0,
+ "IXGBE driver parameters");
+
/*
** AIM: Adaptive Interrupt Moderation
** which means that the interrupt rate
@@ -242,17 +245,29 @@ MODULE_DEPEND(ixgbe, ether, 1, 1, 1);
*/
static int ixgbe_enable_aim = TRUE;
TUNABLE_INT("hw.ixgbe.enable_aim", &ixgbe_enable_aim);
+SYSCTL_INT(_hw_ix, OID_AUTO, enable_aim, CTLFLAG_RW, &ixgbe_enable_aim, 0,
+ "Enable adaptive interrupt moderation");
static int ixgbe_max_interrupt_rate = (4000000 / IXGBE_LOW_LATENCY);
TUNABLE_INT("hw.ixgbe.max_interrupt_rate", &ixgbe_max_interrupt_rate);
+SYSCTL_INT(_hw_ix, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN,
+ &ixgbe_max_interrupt_rate, 0, "Maximum interrupts per second");
/* How many packets rxeof tries to clean at a time */
static int ixgbe_rx_process_limit = 256;
TUNABLE_INT("hw.ixgbe.rx_process_limit", &ixgbe_rx_process_limit);
+SYSCTL_INT(_hw_ix, OID_AUTO, rx_process_limit, CTLFLAG_RDTUN,
+ &ixgbe_rx_process_limit, 0,
+ "Maximum number of received packets to process at a time,"
+ "-1 means unlimited");
/* How many packets txeof tries to clean at a time */
static int ixgbe_tx_process_limit = 256;
TUNABLE_INT("hw.ixgbe.tx_process_limit", &ixgbe_tx_process_limit);
+SYSCTL_INT(_hw_ix, OID_AUTO, tx_process_limit, CTLFLAG_RDTUN,
+ &ixgbe_tx_process_limit, 0,
+ "Maximum number of sent packets to process at a time,"
+ "-1 means unlimited");
/*
** Smart speed setting, default to on
@@ -269,6 +284,8 @@ static int ixgbe_smart_speed = ixgbe_smart_speed_on;
*/
static int ixgbe_enable_msix = 1;
TUNABLE_INT("hw.ixgbe.enable_msix", &ixgbe_enable_msix);
+SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &ixgbe_enable_msix, 0,
+ "Enable MSI-X interrupts");
/*
* Number of Queues, can be set to 0,
@@ -278,6 +295,8 @@ TUNABLE_INT("hw.ixgbe.enable_msix", &ixgbe_enable_msix);
*/
static int ixgbe_num_queues = 0;
TUNABLE_INT("hw.ixgbe.num_queues", &ixgbe_num_queues);
+SYSCTL_INT(_hw_ix, OID_AUTO, num_queues, CTLFLAG_RDTUN, &ixgbe_num_queues, 0,
+ "Number of queues to configure, 0 indicates autoconfigure");
/*
** Number of TX descriptors per ring,
@@ -286,10 +305,14 @@ TUNABLE_INT("hw.ixgbe.num_queues", &ixgbe_num_queues);
*/
static int ixgbe_txd = PERFORM_TXD;
TUNABLE_INT("hw.ixgbe.txd", &ixgbe_txd);
+SYSCTL_INT(_hw_ix, OID_AUTO, txd, CTLFLAG_RDTUN, &ixgbe_txd, 0,
+ "Number of receive descriptors per queue");
/* Number of RX descriptors per ring */
static int ixgbe_rxd = PERFORM_RXD;
TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd);
+SYSCTL_INT(_hw_ix, OID_AUTO, rxd, CTLFLAG_RDTUN, &ixgbe_rxd, 0,
+ "Number of receive descriptors per queue");
/*
** Defining this on will allow the use
@@ -2442,6 +2465,9 @@ ixgbe_setup_msix(struct adapter *adapter)
else if ((ixgbe_num_queues == 0) && (queues > 8))
queues = 8;
+ /* reflect correct sysctl value */
+ ixgbe_num_queues = queues;
+
/*
** Want one vector (RX/TX pair) per queue
** plus an additional for Link.