Skip to content

Commit

Permalink
net/hns3: fix double decrement of secondary count
Browse files Browse the repository at this point in the history
[ upstream commit c687877 ]

The "secondary_cnt" indicates the number of secondary processes on an
Ethernet device. But the variable is double subtracted when detach the
device in secondary processes.

Fixes: ff6dc76 ("net/hns3: refactor multi-process initialization")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
  • Loading branch information
LiHuiSong1 authored and kevintraynor committed Feb 21, 2022
1 parent 10342b2 commit 2b7587e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/hns3/hns3_ethdev_vf.c
Expand Up @@ -2472,7 +2472,6 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
PMD_INIT_FUNC_TRACE();

if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
__atomic_fetch_sub(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
hns3_mp_uninit(eth_dev);
return 0;
}
Expand Down

0 comments on commit 2b7587e

Please sign in to comment.