FreeBSD/sys/dev/cxgbe/common/t4_hw.c
/**
 *	t4_get_fcoe_stats - read TP's FCoE MIB counters for a port
 *	@adap: the adapter
 *	@idx: the port index
 *	@st: holds the counter values
 *
 *	Returns the values of TP's FCoE counters for the selected port.
 */
read TP's FCoE MIB counters for a port
@adap: the adapter
@idx: the port index
@st: holds the counter values

Returns the values of TP's FCoE counters for the selected port.
read TP ' s FCoE MIB counters for a port @adap : the adapter @idx : the port index @st : holds the counter values Returns the values of TP ' s FCoE counters for the selected port .
void t4_get_fcoe_stats(struct adapter *adap, unsigned int idx,
		       struct tp_fcoe_stats *st)
{
	u32 val[2];
	t4_read_indirect(adap, A_TP_MIB_INDEX, A_TP_MIB_DATA, &st->frames_ddp,
			 1, A_TP_MIB_FCOE_DDP_0 + idx);
	t4_read_indirect(adap, A_TP_MIB_INDEX, A_TP_MIB_DATA, &st->frames_drop,
			 1, A_TP_MIB_FCOE_DROP_0 + idx);
	t4_read_indirect(adap, A_TP_MIB_INDEX, A_TP_MIB_DATA, val,
			 2, A_TP_MIB_FCOE_BYTE_0_HI + 2 * idx);
	st->octets_ddp = ((u64)val[0] << 32) | val[1];
}
void t4_get_fcoe_stats ( struct adapter * adap , unsigned int idx , struct tp_fcoe_stats * st ) { u32 val [ 2 ] ; t4_read_indirect ( adap , A_TP_MIB_INDEX , A_TP_MIB_DATA , & st -> frames_ddp , 1 , A_TP_MIB_FCOE_DDP_0 + idx ) ; t4_read_indirect ( adap , A_TP_MIB_INDEX , A_TP_MIB_DATA , & st -> frames_drop , 1 , A_TP_MIB_FCOE_DROP_0 + idx ) ; t4_read_indirect ( adap , A_TP_MIB_INDEX , A_TP_MIB_DATA , val , 2 , A_TP_MIB_FCOE_BYTE_0_HI + 2 * idx ) ; st -> octets_ddp = ( ( u64 ) val [ 0 ] << 32 ) | val [ 1 ] ; }
t4_get_fcoe_stats - read TP's FCoE MIB counters for a port
      @adap: the adapter
      @idx: the port index
      @st: holds the counter values
t4_get_fcoe_stats - read TP ' s FCoE MIB counters for a port @adap : the adapter @idx : the port index @st : holds the counter values