/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
*/
-#include <stdbool.h>
-
#include <rte_eal.h>
-#include <rte_ethdev_driver.h>
+#include <ethdev_driver.h>
#include <rte_string_fns.h>
#include <rte_io.h>
if (!rte_eth_dev_is_valid_port(param->port_id)) {
rte_errno = ENODEV;
- PMD_INIT_LOG(ERR, "port %u invalid port ID", param->port_id);
+ PMD_INIT_LOG(ERR, "port %d invalid port ID", param->port_id);
return -rte_errno;
}
dev = &rte_eth_devices[param->port_id];
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);
int ret;
int i;
- if (!hw->secondary_cnt)
+ if (rte_eal_process_type() == RTE_PROC_SECONDARY || !hw->secondary_cnt)
return;
if (type != HNS3_MP_REQ_START_RXTX && type != HNS3_MP_REQ_STOP_RXTX) {
hns3_err(hw, "port %u unknown request (req_type %d)",