Message ID | 1428415951-9065-1-git-send-email-mike.holmes@linaro.org |
---|---|
State | Superseded |
Headers | show |
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 <mike.holmes@linaro.org> > --- > > 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. 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 \
On 7 April 2015 at 12:08, Maxim Uvarov <maxim.uvarov@linaro.org> 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 <mike.holmes@linaro.org> >> --- >> >> 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 > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
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 <mike.holmes@linaro.org> wrote: > > On 7 April 2015 at 12:08, Maxim Uvarov <maxim.uvarov@linaro.org> 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 <mike.holmes@linaro.org> >>> --- >>> >>> 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 >> lng-odp@lists.linaro.org >> 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 > > >
On 2015-04-07 10: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 <mike.holmes@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> > --- > > 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 > 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 \ > -- > 2.1.0 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
Well, helpers are quite confusing to me... For instance, I don't see why the a checksum algorythm would be in helpers while a crypto would be in ODP. both are condidate for HW acceleration. The thread part should also belong to ODP. But some part make more sense, like the definition of the ethertype. At least, the separation you are trying to achieve will enlighten these problems, so I am rather favorable to this patch. But eventually, I an afraid we'll have to go through the whole helper API and sort it out. On 13 April 2015 at 20:45, Anders Roxell <anders.roxell@linaro.org> wrote: > On 2015-04-07 10: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 <mike.holmes@linaro.org> > > Reviewed-by: Anders Roxell <anders.roxell@linaro.org> > > > --- > > > > 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 > > 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 \ > > -- > > 2.1.0 > > > > _______________________________________________ > > lng-odp mailing list > > lng-odp@lists.linaro.org > > https://lists.linaro.org/mailman/listinfo/lng-odp > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
On 14 April 2015 at 08:49, Christophe Milard <christophe.milard@linaro.org> wrote: > Well, helpers are quite confusing to me... > For instance, I don't see why the a checksum algorythm would be in helpers > while a crypto would be in ODP. both are condidate for HW acceleration. > Checksumming generation and verification as part of transmission and reception is often done by HW. ODP can benefit from HW checksum verification for the different calls in packet_flags.h, a packet with a valid header implicitly must have a valid associated checksum. AFAIK we don't have any way for the application to require certain checksums to automatically be generated and inserted on transmission (unless this is implicit and undocumented in the odp_packet_has_xxx calls). For e.g. TCP and UDP this would make a lot of sense, for IPv4 header less so. The ones complement checksum isn't compute intensive so there is no need for that reason to offload it to HW, unlike crypto. The overhead of passing the back to and fro some asynchronous checksum calculator would likely dwarf the overhead of computing the checksum in SW. The thread part should also belong to ODP. But some part make more sense, > like the definition of the ethertype. > ODP is (or least originally was) a networking SoC abstraction, not an OS abstraction. ODP should facilitate porting between different HW, not between different SW (e.g. OS) environments. We can change the scope of ODP but providing OS abstraction is an open-ended problem. Also I don't want to mandate a specific implementation of SW concepts such as threading. What if the application wants to use C11 or C++11 threads and not pthreads? That is none of ODP's business. > At least, the separation you are trying to achieve will enlighten these > problems, so I am rather favorable to this patch. > But eventually, I an afraid we'll have to go through the whole helper API > and sort it out. > > On 13 April 2015 at 20:45, Anders Roxell <anders.roxell@linaro.org> wrote: > >> On 2015-04-07 10: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 <mike.holmes@linaro.org> >> >> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> >> >> > --- >> > >> > 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 >> > 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 \ >> > -- >> > 2.1.0 >> > >> > _______________________________________________ >> > lng-odp mailing list >> > lng-odp@lists.linaro.org >> > https://lists.linaro.org/mailman/listinfo/lng-odp >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> https://lists.linaro.org/mailman/listinfo/lng-odp >> > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp > >
On 14 April 2015 at 02:49, Christophe Milard <christophe.milard@linaro.org> wrote: > Well, helpers are quite confusing to me... > For instance, I don't see why the a checksum algorythm would be in helpers > while a crypto would be in ODP. both are condidate for HW acceleration. The > thread part should also belong to ODP. But some part make more sense, like > the definition of the ethertype. > At least, the separation you are trying to achieve will enlighten these > problems, so I am rather favorable to this patch. > But eventually, I an afraid we'll have to go through the whole helper API > and sort it out. > I am sure we will have to go though it. I think we got some clarity on today's call though. > > On 13 April 2015 at 20:45, Anders Roxell <anders.roxell@linaro.org> wrote: > >> On 2015-04-07 10: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 <mike.holmes@linaro.org> >> >> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> >> >> > --- >> > >> > 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 >> > 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 \ >> > -- >> > 2.1.0 >> > >> > _______________________________________________ >> > lng-odp mailing list >> > lng-odp@lists.linaro.org >> > https://lists.linaro.org/mailman/listinfo/lng-odp >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> https://lists.linaro.org/mailman/listinfo/lng-odp >> > >
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 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 \
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 <mike.holmes@linaro.org> --- 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%)