goto error;
}
if (sh->devx) {
- uint32_t lcore = (uint32_t)rte_lcore_to_cpu_id(-1);
-
/* Query the EQN for this core. */
- err = mlx5_glue->devx_query_eqn(sh->ctx, lcore, &sh->eqn);
+ err = mlx5_glue->devx_query_eqn(sh->ctx, 0, &sh->eqn);
if (err) {
rte_errno = errno;
DRV_LOG(ERR, "Failed to query event queue number %d.",
mlx5_pci_remove(struct rte_pci_device *pci_dev)
{
uint16_t port_id;
+ int ret = 0;
RTE_ETH_FOREACH_DEV_OF(port_id, &pci_dev->device) {
/*
* call the close function explicitly for secondary process.
*/
if (rte_eal_process_type() == RTE_PROC_SECONDARY)
- mlx5_dev_close(&rte_eth_devices[port_id]);
+ ret |= mlx5_dev_close(&rte_eth_devices[port_id]);
else
- rte_eth_dev_close(port_id);
+ ret |= rte_eth_dev_close(port_id);
}
- return 0;
+ return ret == 0 ? 0 : -EIO;
}
static const struct rte_pci_id mlx5_pci_id_map[] = {