FreeBSD/sys/dev/ixl/ixlvc.c
/*
** Updates driver's stats counters with VSI stats returned from PF.
*/
Updates driver's stats counters with VSI stats returned from PF.
Updates driver ' s stats counters with VSI stats returned from PF .
void
ixlv_update_stats_counters(struct ixlv_sc *sc, struct i40e_eth_stats *es)
{
	struct ixl_vsi *vsi = &sc->vsi;
	uint64_t tx_discards;
	tx_discards = es->tx_discards;
	for (int i = 0; i < vsi->num_queues; i++)
		tx_discards += sc->vsi.queues[i].txr.br->br_drops;
	IXL_SET_IPACKETS(vsi, es->rx_unicast +
	                   es->rx_multicast +
			   es->rx_broadcast);
	IXL_SET_OPACKETS(vsi, es->tx_unicast +
	                   es->tx_multicast +
			   es->tx_broadcast);
	IXL_SET_IBYTES(vsi, es->rx_bytes);
	IXL_SET_OBYTES(vsi, es->tx_bytes);
	IXL_SET_IMCASTS(vsi, es->rx_multicast);
	IXL_SET_OMCASTS(vsi, es->tx_multicast);
	IXL_SET_OERRORS(vsi, es->tx_errors);
	IXL_SET_IQDROPS(vsi, es->rx_discards);
	IXL_SET_OQDROPS(vsi, tx_discards);
	IXL_SET_NOPROTO(vsi, es->rx_unknown_protocol);
	IXL_SET_COLLISIONS(vsi, 0);
	vsi->eth_stats = *es;
}
void ixlv_update_stats_counters ( struct ixlv_sc * sc , struct i40e_eth_stats * es ) { struct ixl_vsi * vsi = & sc -> vsi ; uint64_t tx_discards ; tx_discards = es -> tx_discards ; for ( int i = 0 ; i < vsi -> num_queues ; i ++ ) tx_discards += sc -> vsi . queues [ i ] . txr . br -> br_drops ; IXL_SET_IPACKETS ( vsi , es -> rx_unicast + es -> rx_multicast + es -> rx_broadcast ) ; IXL_SET_OPACKETS ( vsi , es -> tx_unicast + es -> tx_multicast + es -> tx_broadcast ) ; IXL_SET_IBYTES ( vsi , es -> rx_bytes ) ; IXL_SET_OBYTES ( vsi , es -> tx_bytes ) ; IXL_SET_IMCASTS ( vsi , es -> rx_multicast ) ; IXL_SET_OMCASTS ( vsi , es -> tx_multicast ) ; IXL_SET_OERRORS ( vsi , es -> tx_errors ) ; IXL_SET_IQDROPS ( vsi , es -> rx_discards ) ; IXL_SET_OQDROPS ( vsi , tx_discards ) ; IXL_SET_NOPROTO ( vsi , es -> rx_unknown_protocol ) ; IXL_SET_COLLISIONS ( vsi , 0 ) ; vsi -> eth_stats = * es ; }
Updates driver's stats counters with VSI stats returned from PF.
Updates driver ' s stats counters with VSI stats returned from PF .
/* Update ifnet stats */