svn commit: r256759 - in stable/9/sys/dev: e1000 ixgbe

Hiren Panchasara hiren at FreeBSD.org
Sat Oct 19 06:30:22 UTC 2013


Author: hiren
Date: Sat Oct 19 06:30:20 2013
New Revision: 256759
URL: http://svnweb.freebsd.org/changeset/base/256759

Log:
  MFC: r256069
  
  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.

Modified:
  stable/9/sys/dev/e1000/if_igb.c
  stable/9/sys/dev/ixgbe/ixgbe.c

Modified: stable/9/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/9/sys/dev/e1000/if_igb.c	Fri Oct 18 23:19:27 2013	(r256758)
+++ stable/9/sys/dev/e1000/if_igb.c	Sat Oct 19 06:30:20 2013	(r256759)
@@ -2883,6 +2883,9 @@ igb_setup_msix(struct adapter *adapter)
 	if (queues > maxqueues)
 		queues = maxqueues;
 
+	/* reflect correct sysctl value */
+	igb_num_queues = queues;
+
 	/*
 	** One vector (RX/TX pair) per queue
 	** plus an additional for Link interrupt

Modified: stable/9/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- stable/9/sys/dev/ixgbe/ixgbe.c	Fri Oct 18 23:19:27 2013	(r256758)
+++ stable/9/sys/dev/ixgbe/ixgbe.c	Sat Oct 19 06:30:20 2013	(r256759)
@@ -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_sma
  */
 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", &ixg
  */
 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", &ixgb
 */
 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.


More information about the svn-src-stable-9 mailing list