dc7dc87c0dd12ce98c862c7e9ecb45c474f59c99Lubos Kosco/******************************************************************************
dc7dc87c0dd12ce98c862c7e9ecb45c474f59c99Lubos Kosco Copyright (c) 2001-2015, Intel Corporation
dc7dc87c0dd12ce98c862c7e9ecb45c474f59c99Lubos Kosco All rights reserved.
dc7dc87c0dd12ce98c862c7e9ecb45c474f59c99Lubos Kosco Redistribution and use in source and binary forms, with or without
dc7dc87c0dd12ce98c862c7e9ecb45c474f59c99Lubos Kosco modification, are permitted provided that the following conditions are met:
dc7dc87c0dd12ce98c862c7e9ecb45c474f59c99Lubos Kosco 1. Redistributions of source code must retain the above copyright notice,
dc7dc87c0dd12ce98c862c7e9ecb45c474f59c99Lubos Kosco this list of conditions and the following disclaimer.
dc7dc87c0dd12ce98c862c7e9ecb45c474f59c99Lubos Kosco 2. Redistributions in binary form must reproduce the above copyright
dc7dc87c0dd12ce98c862c7e9ecb45c474f59c99Lubos Kosco notice, this list of conditions and the following disclaimer in the
dc7dc87c0dd12ce98c862c7e9ecb45c474f59c99Lubos Kosco documentation and/or other materials provided with the distribution.
dc7dc87c0dd12ce98c862c7e9ecb45c474f59c99Lubos Kosco 3. Neither the name of the Intel Corporation nor the names of its
dc7dc87c0dd12ce98c862c7e9ecb45c474f59c99Lubos Kosco contributors may be used to endorse or promote products derived from
dc7dc87c0dd12ce98c862c7e9ecb45c474f59c99Lubos Kosco this software without specific prior written permission.
f9fd2b96d1c5ea62664f74da0e34a04b6511a8ffLubos Kosco THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
a39bcfe2e58183496eab6572675e2896e5045fa7Knut Anders Hatlen AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
f9fd2b96d1c5ea62664f74da0e34a04b6511a8ffLubos Kosco IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3155e2f2ec2ffa6e5e98f61f2deb990078ac9881Chris Eldredge ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
3155e2f2ec2ffa6e5e98f61f2deb990078ac9881Chris Eldredge LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
a39bcfe2e58183496eab6572675e2896e5045fa7Knut Anders Hatlen CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3155e2f2ec2ffa6e5e98f61f2deb990078ac9881Chris Eldredge SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
3155e2f2ec2ffa6e5e98f61f2deb990078ac9881Chris Eldredge INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3155e2f2ec2ffa6e5e98f61f2deb990078ac9881Chris Eldredge CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ceff76208c0e42569aaf7308a501ad38ea2f62a1Knut Anders Hatlen ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3155e2f2ec2ffa6e5e98f61f2deb990078ac9881Chris Eldredge POSSIBILITY OF SUCH DAMAGE.
3155e2f2ec2ffa6e5e98f61f2deb990078ac9881Chris Eldredge******************************************************************************/
f9fd2b96d1c5ea62664f74da0e34a04b6511a8ffLubos Kosco/*$FreeBSD$*/
a39bcfe2e58183496eab6572675e2896e5045fa7Knut Anders Hatlen * ixgbe_dcb_get_tc_stats_82599 - Returns status for each traffic class
3733e9d930124c0050f9d5f27ee7a2f1b1b0bb2eKnut Anders Hatlen * @hw: pointer to hardware structure
3733e9d930124c0050f9d5f27ee7a2f1b1b0bb2eKnut Anders Hatlen * @stats: pointer to statistics structure
3733e9d930124c0050f9d5f27ee7a2f1b1b0bb2eKnut Anders Hatlen * @tc_count: Number of elements in bwg_array.
3733e9d930124c0050f9d5f27ee7a2f1b1b0bb2eKnut Anders Hatlen * This function returns the status data for each of the Traffic Classes in use.
3155e2f2ec2ffa6e5e98f61f2deb990078ac9881Chris Eldredges32 ixgbe_dcb_get_tc_stats_82599(struct ixgbe_hw *hw,
14ed5f84701aa067da5676f1bfcae4156eb07f29Knut Anders Hatlen if (tc_count > IXGBE_DCB_MAX_TRAFFIC_CLASS)
14ed5f84701aa067da5676f1bfcae4156eb07f29Knut Anders Hatlen /* Statistics pertaining to each traffic class */
3733e9d930124c0050f9d5f27ee7a2f1b1b0bb2eKnut Anders Hatlen /* Transmitted Packets */
3733e9d930124c0050f9d5f27ee7a2f1b1b0bb2eKnut Anders Hatlen stats->qptc[tc] += IXGBE_READ_REG(hw, IXGBE_QPTC(tc));
3733e9d930124c0050f9d5f27ee7a2f1b1b0bb2eKnut Anders Hatlen /* Transmitted Bytes (read low first to prevent missed carry) */
3733e9d930124c0050f9d5f27ee7a2f1b1b0bb2eKnut Anders Hatlen stats->qbtc[tc] += IXGBE_READ_REG(hw, IXGBE_QBTC_L(tc));
a39bcfe2e58183496eab6572675e2896e5045fa7Knut Anders Hatlen (((u64)(IXGBE_READ_REG(hw, IXGBE_QBTC_H(tc)))) << 32);
3155e2f2ec2ffa6e5e98f61f2deb990078ac9881Chris Eldredge /* Received Packets */
3155e2f2ec2ffa6e5e98f61f2deb990078ac9881Chris Eldredge stats->qprc[tc] += IXGBE_READ_REG(hw, IXGBE_QPRC(tc));
return IXGBE_SUCCESS;
return IXGBE_ERR_PARAM;
return IXGBE_SUCCESS;
u8 i = 0;
reg = 0;
for (i = 0; i < IXGBE_DCB_MAX_USER_PRIORITY; i++)
for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) {
return IXGBE_SUCCESS;
u8 i;
for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) {
return IXGBE_SUCCESS;
u8 i;
reg = 0;
for (i = 0; i < IXGBE_DCB_MAX_USER_PRIORITY; i++)
for (i = 0; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) {
return IXGBE_SUCCESS;
if (pfc_en)
for (i = 0; i < IXGBE_DCB_MAX_USER_PRIORITY; i++) {
for (i = 0; i <= max_tc; i++) {
for (j = 0; j < IXGBE_DCB_MAX_USER_PRIORITY; j++) {
if (enabled) {
for (; i < IXGBE_DCB_MAX_TRAFFIC_CLASS; i++) {
return IXGBE_SUCCESS;
u8 i = 0;
return IXGBE_ERR_PARAM;
return IXGBE_SUCCESS;
u32 q;
case IXGBE_MRQC_RT4TCEN:
case IXGBE_MRQC_RSSEN:
case IXGBE_MRQC_RTRSS4TCEN:
ASSERT(0);
return IXGBE_SUCCESS;
map);
tsa);
return IXGBE_SUCCESS;