Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jun 2010 21:17:58 +0000 (UTC)
From:      "George V. Neville-Neil" <gnn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r209512 - head/sys/dev/e1000
Message-ID:  <201006242117.o5OLHwfI003355@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gnn
Date: Thu Jun 24 21:17:58 2010
New Revision: 209512
URL: http://svn.freebsd.org/changeset/base/209512

Log:
  Make sure that all the exposed counters and variables are actually
  being updated.
  
  Pointed out by:	jfv

Modified:
  head/sys/dev/e1000/if_igb.c

Modified: head/sys/dev/e1000/if_igb.c
==============================================================================
--- head/sys/dev/e1000/if_igb.c	Thu Jun 24 17:53:25 2010	(r209511)
+++ head/sys/dev/e1000/if_igb.c	Thu Jun 24 21:17:58 2010	(r209512)
@@ -4814,6 +4814,18 @@ igb_update_stats_counters(struct adapter
 	/* Tx Errors */
 	ifp->if_oerrors = adapter->stats.ecol +
 	    adapter->stats.latecol + adapter->watchdog_events;
+
+	/* Driver specific counters */
+	adapter->device_control = E1000_READ_REG(&adapter->hw, E1000_CTRL);
+	adapter->rx_control = E1000_READ_REG(&adapter->hw, E1000_RCTL);
+	adapter->int_mask = E1000_READ_REG(&adapter->hw, E1000_IMS);
+	adapter->eint_mask = E1000_READ_REG(&adapter->hw, E1000_EIMS);
+	adapter->packet_buf_alloc_tx = ((E1000_READ_REG(&adapter->hw, E1000_PBA)
+					& 0xffff0000) >> 16);
+
+	adapter->packet_buf_alloc_rx = (E1000_READ_REG(&adapter->hw, E1000_PBA) 
+					& 0xffff);
+
 }
 
 
@@ -4897,6 +4909,11 @@ igb_add_hw_stats(struct adapter *adapter
 	}
 
 	for (int i = 0; i < adapter->num_queues; i++, rxr++) {
+		snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i);
+		queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf, 
+					    CTLFLAG_RD, NULL, "Queue Name");
+		queue_list = SYSCTL_CHILDREN(queue_node);
+
 		struct lro_ctrl *lro = &rxr->lro;
 
 		snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006242117.o5OLHwfI003355>