Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/hns3: fix crash with multi-process
[ upstream commit 6b978ea ] In current version, procedure of saving eth_dev in hns3 PMD init will be called more than twice, one for primary, the other for secondary. That will cause segmentation fault in Multi-process as eth_dev will be changed in secondary process, which is different from one in primary process. The initial problem was access to 'rte_eth_devices' global variable, which is wrong. But current approach can cause problem for the secondaries, moving 'eth_dev' to process private can work but before making things more complex. This patch deserted the procedure of saving eth_dev in hns3 PMD init. Instead, it creates an internal function that gets "struct hns3_hw" as parameter and it can be called internally without knowing 'eth_dev'and the .dev_ops can be wrapper to this. Fixes: 2390bf2 ("net/hns3: fix FEC state query") Signed-off-by: Min Hu (Connor) <humin29@huawei.com> Signed-off-by: Lijun Ou <oulijun@huawei.com>
- Loading branch information