Skip to content

Commit

Permalink
net/hns3: fix ordering in secondary process initialization
Browse files Browse the repository at this point in the history
[ upstream commit ac8962e ]

The memory barrier is used to ensure that the response is returned
only after the Tx/Rx function is set, it should place after the Rx/Tx
function is set.

Fixes: 23d4b61 ("net/hns3: support multiple process")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
  • Loading branch information
fengchengwen authored and cpaelzer committed Jun 10, 2021
1 parent cb46f4c commit 69d1916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/hns3/hns3_mp.c
Expand Up @@ -88,8 +88,8 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
case HNS3_MP_REQ_START_RXTX:
PMD_INIT_LOG(INFO, "port %u starting datapath",
dev->data->port_id);
rte_mb();
hns3_set_rxtx_function(dev);
rte_mb();
mp_init_msg(dev, &mp_res, param->type);
res->result = 0;
ret = rte_mp_reply(&mp_res, peer);
Expand Down

0 comments on commit 69d1916

Please sign in to comment.