Any other comments ? This is a basis for promoting some helpers to full ODP APIs and correctly isolating helpers as users of ODP and the OS they are implemented for. I'd like to establish a start on that goal with this patch and iterate towards completely tidying up the helpers rather than dump a huge change in one go which will necessarily in some cases alter the API.
To further elaborate on the direction here is a snippet from a discussion with Petri, "but odph_linux_cpumask_default() actually seems to fit better the proper API (default/optimal mask is HW dependent) => consider moving it. Actually helper code (ring.c and linux.c) should be under helper == common to all implementations. Those should use ODP (or linux), not be part of it. That in mind helpers could be expected to be delivered always (at least that common, non-optimized version of those)." On 7 April 2015 at 12:37, Mike Holmes <[email protected]> wrote: > > On 7 April 2015 at 12:08, Maxim Uvarov <[email protected]> wrote: > >> On 04/07/15 17:12, Mike Holmes wrote: >> >>> The odph helper src files do not belong in linux-generic, move them out >>> to the helper directory. >>> From the helper directory they may be more cleanly extended to support >>> other execution environments beyond Linux. >>> Clean up checkpatch whitespace warning in the migrated code. >>> >>> Signed-off-by: Mike Holmes <[email protected]> >>> --- >>> >>> platform/linux-generic/odp_linux.c => helper/src/linux.c | 1 - >>> platform/linux-generic/odp_ring.c => helper/src/ring.c | 0 >>> platform/linux-generic/Makefile.am | 4 ++-- >>> 3 files changed, 2 insertions(+), 3 deletions(-) >>> rename platform/linux-generic/odp_linux.c => helper/src/linux.c (99%) >>> rename platform/linux-generic/odp_ring.c => helper/src/ring.c (100%) >>> >>> diff --git a/platform/linux-generic/odp_linux.c b/helper/src/linux.c >>> similarity index 99% >>> rename from platform/linux-generic/odp_linux.c >>> rename to helper/src/linux.c >>> index 6865ab1..b753e4d 100644 >>> --- a/platform/linux-generic/odp_linux.c >>> +++ b/helper/src/linux.c >>> @@ -141,7 +141,6 @@ void odph_linux_pthread_join(odph_linux_pthread_t >>> *thread_tbl, int num) >>> pthread_attr_destroy(&thread_tbl[i].attr); >>> free(thread_tbl[i].start_args); >>> } >>> - >>> } >>> diff --git a/platform/linux-generic/odp_ring.c b/helper/src/ring.c >>> similarity index 100% >>> rename from platform/linux-generic/odp_ring.c >>> rename to helper/src/ring.c >>> >> >> Mike, I think it has to be the same as linux-generic platform has. I.e. >> remove src dir and put sources one level up. >> >> > Yes that is the goal but the discussions on this left it that we start > with this first step that is very simple to break it free from > linux-generic. I have a number of follow on patches that build on this. > > The final structure requires moving more stuff and breaking out common > code. > > Second step for the src: > helper/common > helper/platform/linux > helper/platform/execution-environment-XYZ > helper/platform/ose > > > >> Thanks, >> Maxim. >> >> >> diff --git a/platform/linux-generic/Makefile.am >>> b/platform/linux-generic/Makefile.am >>> index e5558ac..aa8973b 100644 >>> --- a/platform/linux-generic/Makefile.am >>> +++ b/platform/linux-generic/Makefile.am >>> @@ -149,14 +149,14 @@ __LIB__libodp_la_SOURCES = \ >>> odp_event.c \ >>> odp_init.c \ >>> odp_impl.c \ >>> - odp_linux.c \ >>> + ../../helper/src/linux.c \ >>> odp_packet.c \ >>> odp_packet_flags.c \ >>> odp_packet_io.c \ >>> odp_packet_socket.c \ >>> odp_pool.c \ >>> odp_queue.c \ >>> - odp_ring.c \ >>> + ../../helper/src/ring.c \ >>> odp_rwlock.c \ >>> odp_schedule.c \ >>> odp_shared_memory.c \ >>> >> >> _______________________________________________ >> lng-odp mailing list >> [email protected] >> https://lists.linaro.org/mailman/listinfo/lng-odp >> > > > > -- > Mike Holmes > Technical Manager - Linaro Networking Group > Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs > > > -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
