FreeBSD/sys/dev/ixl/ixl_pf_main.c
/**
 * Update VSI-specific ethernet statistics counters.
 **/
Update VSI-specific ethernet statistics counters.
Update VSI - specific ethernet statistics counters .
void
ixl_update_eth_stats(struct ixl_vsi *vsi)
{
	struct ixl_pf *pf = (struct ixl_pf *)vsi->back;
	struct i40e_hw *hw = &pf->hw;
	struct i40e_eth_stats *es;
	struct i40e_eth_stats *oes;
	struct i40e_hw_port_stats *nsd;
	u16 stat_idx = vsi->info.stat_counter_idx;
	es = &vsi->eth_stats;
	oes = &vsi->eth_stats_offsets;
	nsd = &pf->stats;
	ixl_stat_update32(hw, I40E_GLV_TEPC(stat_idx),
			   vsi->stat_offsets_loaded,
			   &oes->tx_errors, &es->tx_errors);
	ixl_stat_update32(hw, I40E_GLV_RDPC(stat_idx),
			   vsi->stat_offsets_loaded,
			   &oes->rx_discards, &es->rx_discards);
	ixl_stat_update48(hw, I40E_GLV_GORCH(stat_idx),
			   I40E_GLV_GORCL(stat_idx),
			   vsi->stat_offsets_loaded,
			   &oes->rx_bytes, &es->rx_bytes);
	ixl_stat_update48(hw, I40E_GLV_UPRCH(stat_idx),
			   I40E_GLV_UPRCL(stat_idx),
			   vsi->stat_offsets_loaded,
			   &oes->rx_unicast, &es->rx_unicast);
	ixl_stat_update48(hw, I40E_GLV_MPRCH(stat_idx),
			   I40E_GLV_MPRCL(stat_idx),
			   vsi->stat_offsets_loaded,
			   &oes->rx_multicast, &es->rx_multicast);
	ixl_stat_update48(hw, I40E_GLV_BPRCH(stat_idx),
			   I40E_GLV_BPRCL(stat_idx),
			   vsi->stat_offsets_loaded,
			   &oes->rx_broadcast, &es->rx_broadcast);
	ixl_stat_update48(hw, I40E_GLV_GOTCH(stat_idx),
			   I40E_GLV_GOTCL(stat_idx),
			   vsi->stat_offsets_loaded,
			   &oes->tx_bytes, &es->tx_bytes);
	ixl_stat_update48(hw, I40E_GLV_UPTCH(stat_idx),
			   I40E_GLV_UPTCL(stat_idx),
			   vsi->stat_offsets_loaded,
			   &oes->tx_unicast, &es->tx_unicast);
	ixl_stat_update48(hw, I40E_GLV_MPTCH(stat_idx),
			   I40E_GLV_MPTCL(stat_idx),
			   vsi->stat_offsets_loaded,
			   &oes->tx_multicast, &es->tx_multicast);
	ixl_stat_update48(hw, I40E_GLV_BPTCH(stat_idx),
			   I40E_GLV_BPTCL(stat_idx),
			   vsi->stat_offsets_loaded,
			   &oes->tx_broadcast, &es->tx_broadcast);
	vsi->stat_offsets_loaded = true;
}
void ixl_update_eth_stats ( struct ixl_vsi * vsi ) { struct ixl_pf * pf = ( struct ixl_pf * ) vsi -> back ; struct i40e_hw * hw = & pf -> hw ; struct i40e_eth_stats * es ; struct i40e_eth_stats * oes ; struct i40e_hw_port_stats * nsd ; u16 stat_idx = vsi -> info . stat_counter_idx ; es = & vsi -> eth_stats ; oes = & vsi -> eth_stats_offsets ; nsd = & pf -> stats ; ixl_stat_update32 ( hw , I40E_GLV_TEPC ( stat_idx ) , vsi -> stat_offsets_loaded , & oes -> tx_errors , & es -> tx_errors ) ; ixl_stat_update32 ( hw , I40E_GLV_RDPC ( stat_idx ) , vsi -> stat_offsets_loaded , & oes -> rx_discards , & es -> rx_discards ) ; ixl_stat_update48 ( hw , I40E_GLV_GORCH ( stat_idx ) , I40E_GLV_GORCL ( stat_idx ) , vsi -> stat_offsets_loaded , & oes -> rx_bytes , & es -> rx_bytes ) ; ixl_stat_update48 ( hw , I40E_GLV_UPRCH ( stat_idx ) , I40E_GLV_UPRCL ( stat_idx ) , vsi -> stat_offsets_loaded , & oes -> rx_unicast , & es -> rx_unicast ) ; ixl_stat_update48 ( hw , I40E_GLV_MPRCH ( stat_idx ) , I40E_GLV_MPRCL ( stat_idx ) , vsi -> stat_offsets_loaded , & oes -> rx_multicast , & es -> rx_multicast ) ; ixl_stat_update48 ( hw , I40E_GLV_BPRCH ( stat_idx ) , I40E_GLV_BPRCL ( stat_idx ) , vsi -> stat_offsets_loaded , & oes -> rx_broadcast , & es -> rx_broadcast ) ; ixl_stat_update48 ( hw , I40E_GLV_GOTCH ( stat_idx ) , I40E_GLV_GOTCL ( stat_idx ) , vsi -> stat_offsets_loaded , & oes -> tx_bytes , & es -> tx_bytes ) ; ixl_stat_update48 ( hw , I40E_GLV_UPTCH ( stat_idx ) , I40E_GLV_UPTCL ( stat_idx ) , vsi -> stat_offsets_loaded , & oes -> tx_unicast , & es -> tx_unicast ) ; ixl_stat_update48 ( hw , I40E_GLV_MPTCH ( stat_idx ) , I40E_GLV_MPTCL ( stat_idx ) , vsi -> stat_offsets_loaded , & oes -> tx_multicast , & es -> tx_multicast ) ; ixl_stat_update48 ( hw , I40E_GLV_BPTCH ( stat_idx ) , I40E_GLV_BPTCL ( stat_idx ) , vsi -> stat_offsets_loaded , & oes -> tx_broadcast , & es -> tx_broadcast ) ; vsi -> stat_offsets_loaded = true ; }
Update VSI-specific ethernet statistics counters.
Update VSI - specific ethernet statistics counters .
/* Gather up the stats that the hw collects */