This commit adds a warning message if the service cores are not available. This warning notifies a user about potential issues with ntnic services. There in no error because the service cores may be added by application itself after the pcie_probe.
Signed-off-by: Serhii Iliushyk <[email protected]> --- drivers/net/ntnic/ntnic_ethdev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c index d98c0289cc..40a8d2b2dc 100644 --- a/drivers/net/ntnic/ntnic_ethdev.c +++ b/drivers/net/ntnic/ntnic_ethdev.c @@ -2608,6 +2608,14 @@ nthw_pci_dev_init(struct rte_pci_device *pci_dev) } } + uint32_t cores[RTE_MAX_LCORE] = {0}; + int32_t lcore_count = rte_service_lcore_list(cores, RTE_MAX_LCORE); + + if (lcore_count <= 0) { + NT_LOG(WRN, NTNIC, "No service cores available. " + "Please check if all NTNIC services are started"); + } + return 0; } -- 2.45.0

