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 kevintraynor committed Oct 31, 2023
1 parent 28ddcaf commit 1b0d948
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,7 @@ Krzysztof Galazka <krzysztof.galazka@intel.com>
Krzysztof Kanas <kkanas@marvell.com> <krzysztof.kanas@caviumnetworks.com>
Krzysztof Karas <krzysztof.karas@intel.com>
Krzysztof Witek <krzysztof.witek@6wind.com>
Kuan Xu <kuanx.xu@intel.com>
Kuba Kozak <kubax.kozak@intel.com>
Kumar Amber <kumar.amber@intel.com>
Kumara Parameshwaran <kumaraparamesh92@gmail.com> <kparameshwar@vmware.com>
Expand Down
1 change: 1 addition & 0 deletions drivers/net/iavf/iavf_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2625,6 +2625,7 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)

iavf_default_rss_disable(adapter);

iavf_dev_stats_reset(eth_dev);

/* Start device watchdog */
iavf_dev_watchdog_enable(adapter);
Expand Down

0 comments on commit 1b0d948

Please sign in to comment.