/*
* CDDL HEADER START
*
* Copyright(c) 2007-2009 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 usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* 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 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright 2014 Pluribus Networks Inc.
*/
#include "igb_sw.h"
/*
* Update driver private statistics.
*/
static int
{
#ifdef IGB_DEBUG
int i;
#endif
if (rw == KSTAT_WRITE)
return (EACCES);
/*
* Basic information.
*/
#ifdef IGB_DEBUG
for (i = 0; i < igb->num_rx_rings; i++) {
}
for (i = 0; i < igb->num_tx_rings; i++) {
}
/*
* Hardware calculated statistics.
*/
/*
* The 64-bit register will reset whenever the upper
* 32 bits are read. So we need to read the lower
* 32 bits first, then read the upper 32 bits.
*/
#endif
return (EIO);
}
return (0);
}
/*
* Create and initialize the driver private statistics.
*/
int
{
/*
* Create and init kstat
*/
sizeof (igb_stat_t) / sizeof (kstat_named_t), 0);
"Could not create kernel statistics");
return (IGB_FAILURE);
}
/*
* Initialize all the statistics.
*/
#ifdef IGB_DEBUG
#endif
/*
* Function to provide kernel stat update on demand
*/
/*
* Add kstat to systems kstat chain
*/
return (IGB_SUCCESS);
}
/*
* Retrieve a value for one of the statistics for a particular rx ring
*/
int
{
switch (stat) {
case MAC_STAT_RBYTES:
break;
case MAC_STAT_IPACKETS:
break;
default:
*val = 0;
return (ENOTSUP);
}
return (0);
}
/*
* Retrieve a value for one of the statistics for a particular tx ring
*/
int
{
switch (stat) {
case MAC_STAT_OBYTES:
break;
case MAC_STAT_OPACKETS:
break;
default:
*val = 0;
return (ENOTSUP);
}
return (0);
}