On 14 April 2015 at 08:49, Christophe Milard <[email protected]> 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 <[email protected]> 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 <[email protected]> >> >> Reviewed-by: Anders Roxell <[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 >> > 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 >> > [email protected] >> > https://lists.linaro.org/mailman/listinfo/lng-odp >> _______________________________________________ >> lng-odp mailing list >> [email protected] >> https://lists.linaro.org/mailman/listinfo/lng-odp >> > > > _______________________________________________ > lng-odp mailing list > [email protected] > https://lists.linaro.org/mailman/listinfo/lng-odp > >
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
