Re: [lng-odp] [API-NEXT PATCH 4/4] linux-gen: sched: remove unused sched interface functions

2017-07-05 Thread Savolainen, Petri (Nokia - FI/Espoo)
> >  platform/linux-generic/include/odp_schedule_if.h |  7 +--
> >  platform/linux-generic/odp_queue.c   | 21 +
> 
> >  platform/linux-generic/odp_schedule_iquery.c |  4 +---
> >  3 files changed, 3 insertions(+), 29 deletions(-)
> >
> > diff --git a/platform/linux-generic/include/odp_schedule_if.h
> b/platform/linux-generic/include/odp_schedule_if.h
> > index 5abbb732..b514c88a 100644
> > --- a/platform/linux-generic/include/odp_schedule_if.h
> > +++ b/platform/linux-generic/include/odp_schedule_if.h
> > @@ -35,7 +35,7 @@ typedef int (*schedule_term_local_fn_t)(void);
> >  typedef void (*schedule_order_lock_fn_t)(void);
> >  typedef void (*schedule_order_unlock_fn_t)(void);
> >  typedef unsigned (*schedule_max_ordered_locks_fn_t)(void);
> > -typedef void (*schedule_save_context_fn_t)(uint32_t queue_index, void
> *ptr);
> > +typedef void (*schedule_save_context_fn_t)(uint32_t queue_index);
> >
> >  typedef struct schedule_fn_t {
> > int status_sync;
> > @@ -68,11 +68,6 @@ extern const schedule_fn_t *sched_fn;
> >  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);
> > -int sched_cb_num_queues(void);
> > -int sched_cb_queue_prio(uint32_t queue_index);
> > -int sched_cb_queue_grp(uint32_t queue_index);
> > -int sched_cb_queue_is_ordered(uint32_t queue_index);
> > -int sched_cb_queue_is_atomic(uint32_t queue_index);
> These changes are captured by Joyce's patch already.

No, Joyce did not remove these, but just moved around.

This patch can remove these as unused, due to all other changes I made.


-Petri



Re: [lng-odp] [API-NEXT PATCH 4/4] linux-gen: sched: remove unused sched interface functions

2017-07-04 Thread Honnappa Nagarahalli
On 30 June 2017 at 09:10, Petri Savolainen  wrote:
> Removed functions that are no longer used. Also removed unused
> parameter from save_context function.
>
> Signed-off-by: Petri Savolainen 
> ---
>  platform/linux-generic/include/odp_schedule_if.h |  7 +--
>  platform/linux-generic/odp_queue.c   | 21 +
>  platform/linux-generic/odp_schedule_iquery.c |  4 +---
>  3 files changed, 3 insertions(+), 29 deletions(-)
>
> diff --git a/platform/linux-generic/include/odp_schedule_if.h 
> b/platform/linux-generic/include/odp_schedule_if.h
> index 5abbb732..b514c88a 100644
> --- a/platform/linux-generic/include/odp_schedule_if.h
> +++ b/platform/linux-generic/include/odp_schedule_if.h
> @@ -35,7 +35,7 @@ typedef int (*schedule_term_local_fn_t)(void);
>  typedef void (*schedule_order_lock_fn_t)(void);
>  typedef void (*schedule_order_unlock_fn_t)(void);
>  typedef unsigned (*schedule_max_ordered_locks_fn_t)(void);
> -typedef void (*schedule_save_context_fn_t)(uint32_t queue_index, void *ptr);
> +typedef void (*schedule_save_context_fn_t)(uint32_t queue_index);
>
>  typedef struct schedule_fn_t {
> int status_sync;
> @@ -68,11 +68,6 @@ extern const schedule_fn_t *sched_fn;
>  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);
> -int sched_cb_num_queues(void);
> -int sched_cb_queue_prio(uint32_t queue_index);
> -int sched_cb_queue_grp(uint32_t queue_index);
> -int sched_cb_queue_is_ordered(uint32_t queue_index);
> -int sched_cb_queue_is_atomic(uint32_t queue_index);
These changes are captured by Joyce's patch already.

>  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);
> diff --git a/platform/linux-generic/odp_queue.c 
> b/platform/linux-generic/odp_queue.c
> index d907779b..4c85027b 100644
> --- a/platform/linux-generic/odp_queue.c
> +++ b/platform/linux-generic/odp_queue.c
> @@ -520,7 +520,7 @@ static inline int deq_multi(queue_t q_int, 
> odp_buffer_hdr_t *buf_hdr[],
> queue->s.tail = NULL;
>
> if (status_sync && queue->s.type == ODP_QUEUE_TYPE_SCHED)
> -   sched_fn->save_context(queue->s.index, queue);
> +   sched_fn->save_context(queue->s.index);
>
> UNLOCK(>s.lock);
>
> @@ -672,25 +672,6 @@ static int queue_info(odp_queue_t handle, 
> odp_queue_info_t *info)
> return 0;
>  }
>
> -int sched_cb_num_queues(void)
> -{
> -   return ODP_CONFIG_QUEUES;
> -}
> -
> -int sched_cb_queue_prio(uint32_t queue_index)
> -{
> -   queue_entry_t *qe = get_qentry(queue_index);
> -
> -   return qe->s.param.sched.prio;
> -}
> -
> -int sched_cb_queue_grp(uint32_t queue_index)
> -{
> -   queue_entry_t *qe = get_qentry(queue_index);
> -
> -   return qe->s.param.sched.group;
> -}
> -
>  odp_queue_t sched_cb_queue_handle(uint32_t queue_index)
>  {
> return queue_from_id(queue_index);
> diff --git a/platform/linux-generic/odp_schedule_iquery.c 
> b/platform/linux-generic/odp_schedule_iquery.c
> index f315a4f0..9605edc7 100644
> --- a/platform/linux-generic/odp_schedule_iquery.c
> +++ b/platform/linux-generic/odp_schedule_iquery.c
> @@ -1308,10 +1308,8 @@ static inline bool is_ordered_queue(unsigned int 
> queue_index)
> return (sched->queues[queue_index].sync == ODP_SCHED_SYNC_ORDERED);
>  }
>
> -static void schedule_save_context(uint32_t queue_index, void *ptr)
> +static void schedule_save_context(uint32_t queue_index)
>  {
> -   (void)ptr;
> -
> if (is_atomic_queue(queue_index)) {
> thread_local.atomic = >availables[queue_index];
> } else if (is_ordered_queue(queue_index)) {
> --
> 2.13.0
>