| a95d7054 | 05-Apr-2022 |
David Marchand <[email protected]> |
eal: factorize lcore main loop
All OS implementations provide the same main loop. Introduce helpers (shared for Linux and FreeBSD) to handle synchronisation between main and threads and factorize th
eal: factorize lcore main loop
All OS implementations provide the same main loop. Introduce helpers (shared for Linux and FreeBSD) to handle synchronisation between main and threads and factorize the rest as common code. Thread id are now logged as string in a common format across OS.
Note: - this change also fixes Windows EAL: worker threads cpu affinity was incorrectly reported in log.
- libabigail flags this change as breaking ABI in clang builds: 1 function with some indirect sub-type change:
[C] 'function int rte_eal_remote_launch(int (void*)*, void*, unsigned int)' at eal_common_launch.c:35:1 has some indirect sub-type changes: parameter 1 of type 'int (void*)*' changed: in pointed to type 'function type int (void*)' at rte_launch.h:31:1: entity changed from 'function type int (void*)' to 'typedef lcore_function_t' at rte_launch.h:31:1 type size hasn't changed
This is being investigated on libabigail side. For now, we don't have much choice but to waive reports on this symbol.
Signed-off-by: David Marchand <[email protected]> Acked-by: Morten Brørup <[email protected]> Acked-by: Tyler Retzlaff <[email protected]>
show more ...
|
| 449e7dbc | 05-Apr-2022 |
David Marchand <[email protected]> |
eal: cleanup lcore ID hand-over
So far, a worker thread has been using its thread_id to discover which lcore has been assigned to it.
On the other hand, as noted by Tyler, the pthread API does not
eal: cleanup lcore ID hand-over
So far, a worker thread has been using its thread_id to discover which lcore has been assigned to it.
On the other hand, as noted by Tyler, the pthread API does not strictly guarantee that a new thread won't start running eal_thread_loop before pthread_create writes to &lcore_config[xx].thread_id.
Though all OS implementations supported in DPDK (recently) ensure this property, it is more robust to have the main thread directly pass the worker thread lcore.
Signed-off-by: David Marchand <[email protected]>
show more ...
|
| 7e71c4dc | 26-Jan-2022 |
Jie Zhou <[email protected]> |
eal/windows: fix error code for not supported API
UT memory_autotest on Windows has 2 failed cases on EAL APIs eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2 APIs are not suppor
eal/windows: fix error code for not supported API
UT memory_autotest on Windows has 2 failed cases on EAL APIs eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2 APIs are not supported on Windows yet. Should return ENOTSUP such that in test_memory.c these 2 ENOTSUP cases will not be marked as failures, same as other ENOTSUP cases.
Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management") Cc: [email protected]
Signed-off-by: Jie Zhou <[email protected]> Acked-by: Dmitry Kozlyuk <[email protected]>
show more ...
|
| 0c8fc83a | 25-Oct-2021 |
Dmitry Kozlyuk <[email protected]> |
eal/windows: fix IOVA mode detection and handling
Windows EAL did not detect IOVA mode and worked incorrectly if physical addresses could not be obtained (if virt2phys driver was missing or inaccess
eal/windows: fix IOVA mode detection and handling
Windows EAL did not detect IOVA mode and worked incorrectly if physical addresses could not be obtained (if virt2phys driver was missing or inaccessible). In this case, rte_mem_virt2iova() reported RTE_BAD_IOVA for any address. Inability to obtain IOVA, be it PA or VA, should cause a failure for the DPDK allocator, but it was hidden by the implementation, so allocations did not fail when they should. The mode when DPDK cannot obtain PA but can work is IOVA-as-VA mode. However, rte_eal_iova_mode() always returned RTE_IOVA_DC (while it should only ever return RTE_IOVA_PA or RTE_IOVA_VA), because IOVA mode detection was not implemented.
Implement IOVA mode detection: 1. Always allow to force --iova-mode=va. 2. Allow to force --iova-mode=pa only if virt2phys is available. 3. If no mode is forced and virt2phys is available, select the mode according to bus requests, default to PA. 4. If no mode is forced but virt2phys is unavailable, default to VA. Fix rte_mem_virt2iova() by returning VA when using IOVA-as-VA. Fix rte_eal_iova_mode() by returning the selected mode.
Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management") Cc: [email protected]
Reported-by: Tal Shnaiderman <[email protected]> Signed-off-by: Dmitry Kozlyuk <[email protected]> Tested-by: Pallavi Kadam <[email protected]> Acked-by: Pallavi Kadam <[email protected]>
show more ...
|
| 35965370 | 25-Oct-2021 |
Honnappa Nagarahalli <[email protected]> |
eal: fix memory ordering around lcore task accesses
Ensure that the memory operations before the call to rte_eal_remote_launch are visible to the worker thread. Use the function pointer to execute i
eal: fix memory ordering around lcore task accesses
Ensure that the memory operations before the call to rte_eal_remote_launch are visible to the worker thread. Use the function pointer to execute in worker thread as the guard variable.
Ensure that the memory operations in worker thread, that happen before it returns the status of the assigned function, are visible to the main thread. Use the variable containing the lcore's state as the guard variable.
Signed-off-by: Honnappa Nagarahalli <[email protected]> Reviewed-by: Ola Liljedahl <[email protected]> Reviewed-by: Feifei Wang <[email protected]>
show more ...
|
| d47dd941 | 01-Oct-2021 |
Dmitry Kozlyuk <[email protected]> |
eal/windows: do not install virt2phys header
The header was not intended to be a public one. DPDK users should use `rte_mem_virt2iova()` to translate addresses. Other virt2phys users should use the
eal/windows: do not install virt2phys header
The header was not intended to be a public one. DPDK users should use `rte_mem_virt2iova()` to translate addresses. Other virt2phys users should use the header from the driver instead.
Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management") Cc: [email protected]
Signed-off-by: Dmitry Kozlyuk <[email protected]>
show more ...
|