Skip to content

Commit

Permalink
net/iavf: fix port stats clearing
Browse files Browse the repository at this point in the history
[ upstream commit 57fc68cf11cf3ec49526d8a8eca98956d5b77989 ]

After VF reset, kernel driver may reuse the original VSI without reset its
stats. Call 'iavf_dev_stats_reset' during the initialization of the VF in
order to clear any statistics that may exist from the last use of the VF
and to avoid statistics errors.

Fixes: 22b123a ("net/avf: initialize PMD")

Signed-off-by: Kuan Xu <kuanx.xu@intel.com>
Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
  • Loading branch information
yiding-zhou authored and bluca committed Oct 18, 2023
1 parent 56d2082 commit e2ee086
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/iavf/iavf_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2076,6 +2076,8 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
return ret;
}

iavf_dev_stats_reset(eth_dev);

return 0;
}

Expand Down

0 comments on commit e2ee086

Please sign in to comment.