Skip to content

Commit

Permalink
net/ice: fix statistics
Browse files Browse the repository at this point in the history
[ upstream commit a47ef8640a677a3973de48b8075f1fcd6a0ee68e ]

When the stats_get api is called for the first time in pmd, the offset
of the stats register is not recorded. That results in all the obtained
count values being 0.

This patch adds reset statistics before dev_init returning. That avoids
some noise being counted.

Fixes: 1244338 ("net/ice: support flex Rx descriptor RxDID22")

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
  • Loading branch information
yemj-odc authored and kevintraynor committed Jul 11, 2023
1 parent 0a060a3 commit 4408ee1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ice/ice_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2316,6 +2316,9 @@ ice_dev_init(struct rte_eth_dev *dev)

pf->supported_rxdid = ice_get_supported_rxdid(hw);

/* reset all stats of the device, including pf and main vsi */
ice_stats_reset(dev);

return 0;

err_flow_init:
Expand Down

0 comments on commit 4408ee1

Please sign in to comment.