diff options
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_dcb_lib.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c index de1e33db761a..51f90696de56 100644 --- a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c | |||
@@ -360,6 +360,44 @@ dcb_init_err: | |||
360 | } | 360 | } |
361 | 361 | ||
362 | /** | 362 | /** |
363 | * ice_update_dcb_stats - Update DCB stats counters | ||
364 | * @pf: PF whose stats needs to be updated | ||
365 | */ | ||
366 | void ice_update_dcb_stats(struct ice_pf *pf) | ||
367 | { | ||
368 | struct ice_hw_port_stats *prev_ps, *cur_ps; | ||
369 | struct ice_hw *hw = &pf->hw; | ||
370 | u8 pf_id = hw->pf_id; | ||
371 | int i; | ||
372 | |||
373 | prev_ps = &pf->stats_prev; | ||
374 | cur_ps = &pf->stats; | ||
375 | |||
376 | for (i = 0; i < 8; i++) { | ||
377 | ice_stat_update32(hw, GLPRT_PXOFFRXC(pf_id, i), | ||
378 | pf->stat_prev_loaded, | ||
379 | &prev_ps->priority_xoff_rx[i], | ||
380 | &cur_ps->priority_xoff_rx[i]); | ||
381 | ice_stat_update32(hw, GLPRT_PXONRXC(pf_id, i), | ||
382 | pf->stat_prev_loaded, | ||
383 | &prev_ps->priority_xon_rx[i], | ||
384 | &cur_ps->priority_xon_rx[i]); | ||
385 | ice_stat_update32(hw, GLPRT_PXONTXC(pf_id, i), | ||
386 | pf->stat_prev_loaded, | ||
387 | &prev_ps->priority_xon_tx[i], | ||
388 | &cur_ps->priority_xon_tx[i]); | ||
389 | ice_stat_update32(hw, GLPRT_PXOFFTXC(pf_id, i), | ||
390 | pf->stat_prev_loaded, | ||
391 | &prev_ps->priority_xoff_tx[i], | ||
392 | &cur_ps->priority_xoff_tx[i]); | ||
393 | ice_stat_update32(hw, GLPRT_RXON2OFFCNT(pf_id, i), | ||
394 | pf->stat_prev_loaded, | ||
395 | &prev_ps->priority_xon_2_xoff[i], | ||
396 | &cur_ps->priority_xon_2_xoff[i]); | ||
397 | } | ||
398 | } | ||
399 | |||
400 | /** | ||
363 | * ice_tx_prepare_vlan_flags_dcb - prepare VLAN tagging for DCB | 401 | * ice_tx_prepare_vlan_flags_dcb - prepare VLAN tagging for DCB |
364 | * @tx_ring: ring to send buffer on | 402 | * @tx_ring: ring to send buffer on |
365 | * @first: pointer to struct ice_tx_buf | 403 | * @first: pointer to struct ice_tx_buf |