ixgbe_stat.c revision f27d3025d908422c3f6e682964b4f1e2b4834e4a
/*
* CDDL HEADER START
*
* Copyright(c) 2007-2008 Intel Corporation. All rights reserved.
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at:
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When using or redistributing this file, you may do so under the
* License only. No other modification of this header is permitted.
*
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms of the CDDL.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ixgbe_sw.h"
/*
* Update driver private statistics.
*/
static int
{
int i;
if (rw == KSTAT_WRITE)
return (EACCES);
/*
* Basic information
*/
#ifdef IXGBE_DEBUG
for (i = 0; i < ixgbe->num_rx_rings; i++) {
}
for (i = 0; i < ixgbe->num_tx_rings; i++) {
}
/*
* Hardware calculated statistics.
*/
for (i = 0; i < 16; i++) {
}
/*
* This is a Workaround:
* Currently h/w GORCH, GOTCH, TORH registers are not
* correctly implemented. We found that the values in
* these registers are same as those in corresponding
* *L registers (i.e. GORCL, GOTCL, and TORL). Here the
* gor and got stat data will not be retrieved through
* GORC{H/L} and GOTC{H/L} registers but be obtained by
* stat data will not be accurate.
*/
#endif
for (i = 0; i < 8; i++)
return (0);
}
/*
* Create and initialize the driver private statistics.
*/
int
{
/*
* Create and init kstat
*/
sizeof (ixgbe_stat_t) / sizeof (kstat_named_t), 0);
"Could not create kernel statistics");
return (IXGBE_FAILURE);
}
/*
* Initialize all the statistics.
*/
#ifdef IXGBE_DEBUG
#endif
/*
* Function to provide kernel stat update on demand
*/
/*
* Add kstat to systems kstat chain
*/
return (IXGBE_SUCCESS);
}