After I register a platform driver, a segment fault occurs when the program
call rte_eal_cleanup.
The code that causes this problem is at drivers/bus/platform/platform.c:615, as
follows:
static int
platform_bus_cleanup(void)
{
struct rte_platform_device *pdev, *tmp;
RTE_TAILQ_FOREACH_SAFE(pdev, &platform_bus.device_list, next, tmp) {
platform_bus_unplug(&pdev->device);
TAILQ_REMOVE(&platform_bus.device_list, pdev, next);
}
return 0;
}
To fix this, modify it as follows:
static int
platform_bus_cleanup(void)
{
struct rte_platform_device *pdev, *tmp;
RTE_TAILQ_FOREACH_SAFE(pdev, &platform_bus.device_list, next, tmp) {
TAILQ_REMOVE(&platform_bus.device_list, pdev, next);
platform_bus_unplug(&pdev->device);
}
return 0;
}
I'm lazy, that's all.
After I register a platform driver, a segment fault occurs when the program call rte_eal_cleanup. The code that causes this problem is at drivers/bus/platform/platform.c:615, as follows: static int platform_bus_cleanup(void) { struct rte_platform_device *pdev, *tmp; RTE_TAILQ_FOREACH_SAFE(pdev, &platform_bus.device_list, next, tmp) { platform_bus_unplug(&pdev->device); TAILQ_REMOVE(&platform_bus.device_list, pdev, next); } return 0; } To fix this, modify it as follows: static int platform_bus_cleanup(void) { struct rte_platform_device *pdev, *tmp; RTE_TAILQ_FOREACH_SAFE(pdev, &platform_bus.device_list, next, tmp) { TAILQ_REMOVE(&platform_bus.device_list, pdev, next); platform_bus_unplug(&pdev->device); } return 0; } I'm lazy, that's all.