summaryrefslogtreecommitdiffstats
path: root/sys/dev/ixgbe
diff options
context:
space:
mode:
authorjfv <jfv@FreeBSD.org>2014-12-02 23:02:57 +0000
committerjfv <jfv@FreeBSD.org>2014-12-02 23:02:57 +0000
commitd24ff3fdf2f10c9b05c568b96812b7560b5c652a (patch)
tree3b9c6cbc6399b212aea7fc7892d1171426c51c82 /sys/dev/ixgbe
parent4117e1b259288db9747f75a75711bb2c63e72012 (diff)
downloadFreeBSD-src-d24ff3fdf2f10c9b05c568b96812b7560b5c652a.zip
FreeBSD-src-d24ff3fdf2f10c9b05c568b96812b7560b5c652a.tar.gz
Revert r275136, it was not approved, it was sloppy, if a feature
like this is needed please resubmit for Intel's approval.
Diffstat (limited to 'sys/dev/ixgbe')
-rw-r--r--sys/dev/ixgbe/ixgbe.c45
1 files changed, 7 insertions, 38 deletions
diff --git a/sys/dev/ixgbe/ixgbe.c b/sys/dev/ixgbe/ixgbe.c
index 2fd126c..bd9407e 100644
--- a/sys/dev/ixgbe/ixgbe.c
+++ b/sys/dev/ixgbe/ixgbe.c
@@ -103,7 +103,6 @@ static char *ixgbe_strings[] = {
/*********************************************************************
* Function prototypes
*********************************************************************/
-static int ixgbe_per_unit_num_queues(SYSCTL_HANDLER_ARGS);
static int ixgbe_probe(device_t);
static int ixgbe_attach(device_t);
static int ixgbe_detach(device_t);
@@ -476,11 +475,6 @@ ixgbe_attach(device_t dev)
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
- OID_AUTO, "num_queues", CTLTYPE_INT | CTLFLAG_RD,
- adapter, 0, ixgbe_per_unit_num_queues, "I", "Number of Queues");
-
- SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
- SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
OID_AUTO, "ts", CTLTYPE_INT | CTLFLAG_RW, adapter,
0, ixgbe_set_thermal_test, "I", "Thermal Test");
@@ -2522,7 +2516,6 @@ ixgbe_setup_msix(struct adapter *adapter)
{
device_t dev = adapter->dev;
int rid, want, queues, msgs;
- int n_queues;
/* Override by tuneable */
if (ixgbe_enable_msix == 0)
@@ -2549,34 +2542,19 @@ ixgbe_setup_msix(struct adapter *adapter)
/* Figure out a reasonable auto config value */
queues = (mp_ncpus > (msgs-1)) ? (msgs-1) : mp_ncpus;
+
+ /* Override based on tuneable */
+ if (ixgbe_num_queues != 0)
+ queues = ixgbe_num_queues;
+
#ifdef RSS
/* If we're doing RSS, clamp at the number of RSS buckets */
if (queues > rss_getnumbuckets())
queues = rss_getnumbuckets();
#endif
- /* try more specific tunable, then global, then finally default to boot time tunable if set. */
- if (device_getenv_int(dev, "num_queues", &n_queues) != 0) {
- device_printf(dev, "using specific tunable numqueues=%d", n_queues);
- } else if (TUNABLE_INT_FETCH("hw.ix.num_queues", &n_queues) != 0) {
- if (ixgbe_num_queues != n_queues) {
- device_printf(dev, "using global tunable num_queues=%d", n_queues);
- ixgbe_num_queues = n_queues;
- }
- } else {
- n_queues = ixgbe_num_queues;
- }
-
- if (n_queues < 0) {
- device_printf(dev, "tunable < 0, resetting to default");
- n_queues = 0;
- }
-
- if (n_queues != 0)
- queues = n_queues;
- /* Set max queues to 8 when autoconfiguring */
- 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
@@ -5964,15 +5942,6 @@ ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS)
return error;
}
-static int
-ixgbe_per_unit_num_queues(SYSCTL_HANDLER_ARGS)
-{
- struct adapter *adapter;
-
- adapter = (struct adapter *) arg1;
-
- return sysctl_handle_int(oidp, &adapter->num_queues, 0, req);
-}
/*
** Control link advertise speed:
OpenPOWER on IntegriCloud