src/dpdk/drivers/net/ixgbe/base/ixgbe_dcb_82599.c
s32 ixgbe_dcb_get_tc_stats_82599(struct ixgbe_hw *hw,
				 struct ixgbe_hw_stats *stats,
				 u8 tc_count)
{
	int tc;

	DEBUGFUNC("dcb_get_tc_stats");

	if (tc_count > IXGBE_DCB_MAX_TRAFFIC_CLASS)
		return IXGBE_ERR_PARAM;

	/* Statistics pertaining to each traffic class */
	for (tc = 0; tc < tc_count; tc++) {
		/* Transmitted Packets */
		stats->qptc[tc] += IXGBE_READ_REG(hw, IXGBE_QPTC(tc));
		/* Transmitted Bytes (read low first to prevent missed carry) */
		stats->qbtc[tc] += IXGBE_READ_REG(hw, IXGBE_QBTC_L(tc));
		stats->qbtc[tc] +=
			(((u64)(IXGBE_READ_REG(hw, IXGBE_QBTC_H(tc)))) << 32);
		/* Received Packets */
		stats->qprc[tc] += IXGBE_READ_REG(hw, IXGBE_QPRC(tc));
		/* Received Bytes (read low first to prevent missed carry) */
		stats->qbrc[tc] += IXGBE_READ_REG(hw, IXGBE_QBRC_L(tc));
		stats->qbrc[tc] +=
			(((u64)(IXGBE_READ_REG(hw, IXGBE_QBRC_H(tc)))) << 32);

		/* Received Dropped Packet */
		stats->qprdc[tc] += IXGBE_READ_REG(hw, IXGBE_QPRDC(tc));
	}

	return IXGBE_SUCCESS;
}
/**
 * ixgbe_dcb_get_tc_stats_82599 - Returns status for each traffic class
 * @hw: pointer to hardware structure
 * @stats: pointer to statistics structure
 * @tc_count:  Number of elements in bwg_array.
 *
 * This function returns the status data for each of the Traffic Classes in use.
 */
Returns status for each traffic class
@hw: pointer to hardware structure
@stats: pointer to statistics structure
@tc_count:  Number of elements in bwg_array.

This function returns the status data for each of the Traffic Classes in use.
Returns status for each traffic class @hw : pointer to hardware structure @stats : pointer to statistics structure @tc_count : Number of elements in bwg_array . This function returns the status data for each of the Traffic Classes in use .
s32 ixgbe_dcb_get_tc_stats_82599(struct ixgbe_hw *hw,
				 struct ixgbe_hw_stats *stats,
				 u8 tc_count)
{
	int tc;
	DEBUGFUNC("dcb_get_tc_stats");
	if (tc_count > IXGBE_DCB_MAX_TRAFFIC_CLASS)
		return IXGBE_ERR_PARAM;
	for (tc = 0; tc < tc_count; tc++) {
		stats->qptc[tc] += IXGBE_READ_REG(hw, IXGBE_QPTC(tc));
		stats->qbtc[tc] += IXGBE_READ_REG(hw, IXGBE_QBTC_L(tc));
		stats->qbtc[tc] +=
			(((u64)(IXGBE_READ_REG(hw, IXGBE_QBTC_H(tc)))) << 32);
		stats->qprc[tc] += IXGBE_READ_REG(hw, IXGBE_QPRC(tc));
		stats->qbrc[tc] += IXGBE_READ_REG(hw, IXGBE_QBRC_L(tc));
		stats->qbrc[tc] +=
			(((u64)(IXGBE_READ_REG(hw, IXGBE_QBRC_H(tc)))) << 32);
		stats->qprdc[tc] += IXGBE_READ_REG(hw, IXGBE_QPRDC(tc));
	}
	return IXGBE_SUCCESS;
}
s32 ixgbe_dcb_get_tc_stats_82599 ( struct ixgbe_hw * hw , struct ixgbe_hw_stats * stats , u8 tc_count ) { int tc ; DEBUGFUNC ( " " ) ; if ( tc_count > IXGBE_DCB_MAX_TRAFFIC_CLASS ) return IXGBE_ERR_PARAM ; for ( tc = 0 ; tc < tc_count ; tc ++ ) { stats -> qptc [ tc ] += IXGBE_READ_REG ( hw , IXGBE_QPTC ( tc ) ) ; stats -> qbtc [ tc ] += IXGBE_READ_REG ( hw , IXGBE_QBTC_L ( tc ) ) ; stats -> qbtc [ tc ] += ( ( ( u64 ) ( IXGBE_READ_REG ( hw , IXGBE_QBTC_H ( tc ) ) ) ) << 32 ) ; stats -> qprc [ tc ] += IXGBE_READ_REG ( hw , IXGBE_QPRC ( tc ) ) ; stats -> qbrc [ tc ] += IXGBE_READ_REG ( hw , IXGBE_QBRC_L ( tc ) ) ; stats -> qbrc [ tc ] += ( ( ( u64 ) ( IXGBE_READ_REG ( hw , IXGBE_QBRC_H ( tc ) ) ) ) << 32 ) ; stats -> qprdc [ tc ] += IXGBE_READ_REG ( hw , IXGBE_QPRDC ( tc ) ) ; } return IXGBE_SUCCESS ; }
ixgbe_dcb_get_tc_stats_82599 - Returns status for each traffic class
 @hw: pointer to hardware structure
 @stats: pointer to statistics structure
 @tc_count:  Number of elements in bwg_array.
ixgbe_dcb_get_tc_stats_82599 - Returns status for each traffic class @hw : pointer to hardware structure @stats : pointer to statistics structure @tc_count : Number of elements in bwg_array .
/* Statistics pertaining to each traffic class */ /* Transmitted Packets */ /* Transmitted Bytes (read low first to prevent missed carry) */ /* Received Packets */ /* Received Bytes (read low first to prevent missed carry) */ /* Received Dropped Packet */