]> git.droids-corp.org - dpdk.git/commit
net/hns3: fix crash from secondary process
authorHuisong Li <lihuisong@huawei.com>
Wed, 1 Jun 2022 03:52:50 +0000 (11:52 +0800)
committerAndrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Thu, 9 Jun 2022 08:58:22 +0000 (10:58 +0200)
commit8ba42ce98dd45958354817c340796f3ce6496410
tree05a211ce19731a2c463ef857ba4fa7bbd9219b01
parent5bddaf383b4e0438a96a32eed4143957a55c0751
net/hns3: fix crash from secondary process

If a hns3 device in the secondary process is attached to do probing
operation, 'rx_queues' and 'tx_queues' in dev->data are null in
eth_dev_fp_ops_setup when calling rte_eth_dev_probing_finish. The primary
process calls dev_start to re-setup their fp_ops. But the secondary process
can't call dev_start and has no chance to do it. If the application sends
and receives packets at this time, a segfault will occur. So this patch
uses the MP communication of the PMD to update the fp_ops of the device in
the secondary process.

Fixes: 96c33cfb06cf ("net/hns3: fix Rx/Tx functions update")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
drivers/net/hns3/hns3_rxtx.c