On 17 July 2017 at 14:46, Bill Fischofer <bill.fischo...@linaro.org> wrote:
> On Mon, Jul 17, 2017 at 4:23 AM, Elo, Matias (Nokia - FI/Espoo) <
> matias....@nokia.com> wrote:
>
>> Does this patch fix some real problem? At leas for me it only makes the
>> scheduler interface harder to follow by spreading the functions into
>> multiple headers.
>>
>
> Is this perhaps related to Yi's modular framework? Since that is providing
> a more fundamental structure, I'd like to see how we get to that. In any
> event, I'll add this to the agenda for tomorrow's public call. Joyce, can
> you join us for that at 15:00 UTC?
>
Joyce will not be able to join the call. We can discuss on next Monday
(7/24) if required.
>
>>
>> -Matias
>>
>>
>> > On 17 Jul 2017, at 10:26, Joyce Kong <joyce.k...@arm.com> wrote:
>> >
>> > The modular scheduler interface in odp_schedule_if.h includes functions
>> from
>> > pktio and queue. It needs to be cleaned up.
>> >
>> > Signed-off-by: Joyce Kong <joyce.k...@arm.com>
>> > ---
>> > platform/linux-generic/Makefile.am                 |  2 ++
>> > platform/linux-generic/include/odp_packet_io_if.h  | 23
>> +++++++++++++++++++++
>> > .../linux-generic/include/odp_queue_sched_if.h     | 24
>> ++++++++++++++++++++++
>> > platform/linux-generic/include/odp_schedule_if.h   |  9 --------
>> > platform/linux-generic/odp_packet_io.c             |  1 +
>> > platform/linux-generic/odp_queue.c                 |  1 +
>> > platform/linux-generic/odp_schedule.c              |  2 ++
>> > platform/linux-generic/odp_schedule_iquery.c       |  2 ++
>> > platform/linux-generic/odp_schedule_sp.c           |  2 ++
>> > 9 files changed, 57 insertions(+), 9 deletions(-)
>> > create mode 100644 platform/linux-generic/include/odp_packet_io_if.h
>> > create mode 100644 platform/linux-generic/include/odp_queue_sched_if.h
>> >
>> > diff --git a/platform/linux-generic/Makefile.am
>> b/platform/linux-generic/Makefile.am
>> > index 26eba28..5295abb 100644
>> > --- a/platform/linux-generic/Makefile.am
>> > +++ b/platform/linux-generic/Makefile.am
>> > @@ -150,6 +150,7 @@ noinst_HEADERS = \
>> >                 ${srcdir}/include/odp_packet_io_internal.h \
>> >                 ${srcdir}/include/odp_packet_io_ipc_internal.h \
>> >                 ${srcdir}/include/odp_packet_io_ring_internal.h \
>> > +               ${srcdir}/include/odp_packet_io_if.h \
>> >                 ${srcdir}/include/odp_packet_netmap.h \
>> >                 ${srcdir}/include/odp_packet_dpdk.h \
>> >                 ${srcdir}/include/odp_packet_socket.h \
>> > @@ -160,6 +161,7 @@ noinst_HEADERS = \
>> >                 ${srcdir}/include/odp_queue_internal.h \
>> >                 ${srcdir}/include/odp_ring_internal.h \
>> >                 ${srcdir}/include/odp_queue_if.h \
>> > +               ${srcdir}/include/odp_queue_sched_if.h \
>> >                 ${srcdir}/include/odp_schedule_if.h \
>> >                 ${srcdir}/include/odp_sorted_list_internal.h \
>> >                 ${srcdir}/include/odp_shm_internal.h \
>> > diff --git a/platform/linux-generic/include/odp_packet_io_if.h
>> b/platform/linux-generic/include/odp_packet_io_if.h
>> > new file mode 100644
>> > index 0000000..e574f22
>> > --- /dev/null
>> > +++ b/platform/linux-generic/include/odp_packet_io_if.h
>> > @@ -0,0 +1,23 @@
>> > +/* Copyright (c) 2017, ARM Limited
>> > + * All rights reserved.
>> > + *
>> > + *SPDX-License-Identifier:   BSD-3-Clause
>> > + */
>> > +
>> > +#ifndef ODP_PACKET_IO_IF_H_
>> > +#define ODP_PACKET_IO_IF_H_
>> > +
>> > +#ifdef __cplusplus
>> > +extern "C" {
>> > +#endif
>> > +
>> > +/* Interface for the scheduler */
>> > +int sched_cb_pktin_poll(int pktio_index, int num_queue, int index[]);
>> > +void sched_cb_pktio_stop_finalize(int pktio_index);
>> > +int sched_cb_num_pktio(void);
>> > +
>> > +#ifdef __cplusplus
>> > +}
>> > +#endif
>> > +
>> > +#endif
>> > diff --git a/platform/linux-generic/include/odp_queue_sched_if.h
>> b/platform/linux-generic/include/odp_queue_sched_if.h
>> > new file mode 100644
>> > index 0000000..4a301f4
>> > --- /dev/null
>> > +++ b/platform/linux-generic/include/odp_queue_sched_if.h
>> > @@ -0,0 +1,24 @@
>> > +/* Copyright (c) 2017, ARM Limited
>> > + * All rights reserved.
>> > + *
>> > + *SPDX-License-Identifier:   BSD-3-Clause
>> > + */
>> > +
>> > +#ifndef ODP_QUEUE_SCHED_IF_H_
>> > +#define ODP_QUEUE_SCHED_IF_H_
>> > +
>> > +#ifdef __cplusplus
>> > +extern "C" {
>> > +#endif
>> > +
>> > +/* Interface for the scheduler */
>> > +odp_queue_t sched_cb_queue_handle(uint32_t queue_index);
>> > +void sched_cb_queue_destroy_finalize(uint32_t queue_index);
>> > +int sched_cb_queue_deq_multi(uint32_t queue_index, odp_event_t ev[],
>> int num);
>> > +int sched_cb_queue_empty(uint32_t queue_index);
>> > +
>> > +#ifdef __cplusplus
>> > +}
>> > +#endif
>> > +
>> > +#endif
>> > diff --git a/platform/linux-generic/include/odp_schedule_if.h
>> b/platform/linux-generic/include/odp_schedule_if.h
>> > index 4cd8c3e..9a1f3ff 100644
>> > --- a/platform/linux-generic/include/odp_schedule_if.h
>> > +++ b/platform/linux-generic/include/odp_schedule_if.h
>> > @@ -64,15 +64,6 @@ typedef struct schedule_fn_t {
>> > /* Interface towards the scheduler */
>> > extern const schedule_fn_t *sched_fn;
>> >
>> > -/* Interface for the scheduler */
>> > -int sched_cb_pktin_poll(int pktio_index, int num_queue, int index[]);
>> > -void sched_cb_pktio_stop_finalize(int pktio_index);
>> > -int sched_cb_num_pktio(void);
>> > -odp_queue_t sched_cb_queue_handle(uint32_t queue_index);
>> > -void sched_cb_queue_destroy_finalize(uint32_t queue_index);
>> > -int sched_cb_queue_deq_multi(uint32_t queue_index, odp_event_t ev[],
>> int num);
>> > -int sched_cb_queue_empty(uint32_t queue_index);
>> > -
>> > /* API functions */
>> > typedef struct {
>> >       uint64_t (*schedule_wait_time)(uint64_t);
>> > diff --git a/platform/linux-generic/odp_packet_io.c
>> b/platform/linux-generic/odp_packet_io.c
>> > index 6a181f5..8a14c85 100644
>> > --- a/platform/linux-generic/odp_packet_io.c
>> > +++ b/platform/linux-generic/odp_packet_io.c
>> > @@ -7,6 +7,7 @@
>> >
>> > #include <odp/api/packet_io.h>
>> > #include <odp_packet_io_internal.h>
>> > +#include <odp_packet_io_if.h>
>> > #include <odp/api/packet.h>
>> > #include <odp_packet_internal.h>
>> > #include <odp_internal.h>
>> > diff --git a/platform/linux-generic/odp_queue.c
>> b/platform/linux-generic/odp_queue.c
>> > index d52814b..67b3a07 100644
>> > --- a/platform/linux-generic/odp_queue.c
>> > +++ b/platform/linux-generic/odp_queue.c
>> > @@ -7,6 +7,7 @@
>> > #include <odp/api/queue.h>
>> > #include <odp_queue_internal.h>
>> > #include <odp_queue_if.h>
>> > +#include <odp_queue_sched_if.h>
>> > #include <odp/api/std_types.h>
>> > #include <odp/api/align.h>
>> > #include <odp/api/buffer.h>
>> > diff --git a/platform/linux-generic/odp_schedule.c
>> b/platform/linux-generic/odp_schedule.c
>> > index bbcc85a..c8e4d30 100644
>> > --- a/platform/linux-generic/odp_schedule.c
>> > +++ b/platform/linux-generic/odp_schedule.c
>> > @@ -23,6 +23,8 @@
>> > #include <odp/api/packet_io.h>
>> > #include <odp_ring_internal.h>
>> > #include <odp_timer_internal.h>
>> > +#include <odp_packet_io_if.h>
>> > +#include <odp_queue_sched_if.h>
>> >
>> > /* Should remove this dependency */
>> > #include <odp_queue_internal.h>
>> > diff --git a/platform/linux-generic/odp_schedule_iquery.c
>> b/platform/linux-generic/odp_schedule_iquery.c
>> > index d374ded..e5a9532 100644
>> > --- a/platform/linux-generic/odp_schedule_iquery.c
>> > +++ b/platform/linux-generic/odp_schedule_iquery.c
>> > @@ -22,6 +22,8 @@
>> > #include <odp/api/thrmask.h>
>> > #include <odp/api/packet_io.h>
>> > #include <odp_config_internal.h>
>> > +#include <odp_packet_io_if.h>
>> > +#include <odp_queue_sched_if.h>
>> >
>> > /* Should remove this dependency */
>> > #include <odp_queue_internal.h>
>> > diff --git a/platform/linux-generic/odp_schedule_sp.c
>> b/platform/linux-generic/odp_schedule_sp.c
>> > index d2ba539..585b1e1 100644
>> > --- a/platform/linux-generic/odp_schedule_sp.c
>> > +++ b/platform/linux-generic/odp_schedule_sp.c
>> > @@ -15,6 +15,8 @@
>> > #include <odp_align_internal.h>
>> > #include <odp_config_internal.h>
>> > #include <odp_ring_internal.h>
>> > +#include <odp_packet_io_if.h>
>> > +#include <odp_queue_sched_if.h>
>> >
>> > #define NUM_THREAD        ODP_THREAD_COUNT_MAX
>> > #define NUM_QUEUE         ODP_CONFIG_QUEUES
>> > --
>> > 2.7.4
>> >
>>
>>

Reply via email to