I have considered unsched also, but really don’t like that since it would define the queue type by what it is not (instead of what it is). It would be also problematic term, if we’d need to define a third type in the future (e.g. sorted queue, etc).
This queue type provides the basic (or plain) set of queue features. Also I’d not call it “normal queue”, since sched queue may be the norm for one application and this for another. Term “basic” could have the same problem: e.g. atomic queue maybe the basic queue type for an application. In RFC, I used term “direct queue”, but I’d want to reserve the term “direct” for e.g. “direct pktio” mode and other direct accesses APIs (to other ODP blocks). When these plain (or scheduled) queues are connected to pktio, it’s an in-direction compared to the direct access. After these patches the (commonly spoken) terminology would be · Plain queues · Parallel queues · Atomic queues · Ordered queues … and potentially in the future · Sorted queues, etc (queues with advanced features) … /** * Queue create * * Create a queue according to the queue parameters. Queue type is specified by * queue parameter 'type'. Use odp_queue_param_init() to initialize parameters * into their default values. Default values are also used when 'param' pointer * is NULL. The default queue type is ODP_QUEUE_TYPE_PLAIN. * * @param name Queue name * @param param Queue parameters. Uses defaults if NULL. * * @return Queue handle * @retval ODP_QUEUE_INVALID on failure */ odp_queue_t odp_queue_create(const char *name, const odp_queue_param_t *param); The default type is already documented. If user sets param to NULL or passes an initialized param (without any changes), the result is the same - the default settings. The type would be PLAIN in both cases. -Petri From: EXT Bill Fischofer [mailto:bill.fischo...@linaro.org] Sent: Friday, January 29, 2016 5:21 AM To: Savolainen, Petri (Nokia - FI/Espoo) Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [API-NEXT PATCH 0/6] Rename queue types This looks good, however PLAIN doesn't seem very intuitive as it's not descriptive of how the queue behaves. How about simply QUEUE_TYPE_UNSCHED to contrast with QUEUE_TYPE_SCHED? The real distinction here is whether the ODP scheduler or the application is managing the queue, i.e., whether the queue is scheduled or unscheduled. Encoding that in the name would make that distinction very clear. With the move of the type parameter into the odp_queue_param_t struct, omitting this struct on odp_queue_create() would default to creating an unscheduled queue. Other than that, for this series: Reviewed-and-tested-by: Bill Fischofer <bill.fischo...@linaro.org<mailto:bill.fischo...@linaro.org>> On Thu, Jan 28, 2016 at 7:24 AM, Petri Savolainen <petri.savolai...@nokia.com<mailto:petri.savolai...@nokia.com>> wrote: This patch set renames queue types and pktio modes with commonly used and descriptive terms. Type of odp_queue_type_t is defined as enum and included into queue parameters. Queue type and defines parameter usage (which params are considered e.g. in queue creation), and is inline with other create APIs (pool, timer, tm, ...). These modifications are preparation for removal of PKTIN and PKOUT queue types, and the single queue pktio API (odp_pktio_inq_setdef(), etc). Petri Savolainen (6): api: sched: rename SCHED_SYNC_NONE to _PARALLEL api: queue: rename QUEUE_TYPE_POLL to _PLAIN api: pktio: rename pktio modes api: queue: define queue type as enum api: queue: moved queue type into queue parameters linux-generic: use term plain queue instead of poll example/classifier/odp_classifier.c | 16 ++-- example/generator/odp_generator.c | 9 ++- example/ipsec/odp_ipsec.c | 43 ++++++----- example/packet/odp_pktio.c | 14 ++-- example/time/time_global_test.c | 8 +- example/timer/odp_timer_test.c | 5 +- include/odp/api/packet_io.h | 26 +++---- include/odp/api/queue.h | 68 +++++++++------- include/odp/api/schedule_types.h | 12 +-- .../linux-generic/include/odp/plat/queue_types.h | 8 -- .../include/odp/plat/schedule_types.h | 2 +- platform/linux-generic/odp_packet_io.c | 37 +++++---- platform/linux-generic/odp_queue.c | 13 +++- platform/linux-generic/odp_schedule.c | 5 +- platform/linux-generic/pktio/loop.c | 2 +- platform/linux-generic/pktio/netmap.c | 3 +- test/performance/odp_l2fwd.c | 54 ++++++------- test/performance/odp_pktio_perf.c | 32 ++++---- test/performance/odp_scheduling.c | 20 ++--- .../classification/odp_classification_common.c | 11 +-- .../classification/odp_classification_test_pmr.c | 13 ++-- .../classification/odp_classification_tests.c | 51 ++++++------ test/validation/crypto/crypto.c | 3 +- test/validation/pktio/pktio.c | 90 +++++++++++----------- test/validation/pktio/pktio.h | 4 +- test/validation/queue/queue.c | 48 ++++++------ test/validation/scheduler/scheduler.c | 89 +++++++++++---------- test/validation/timer/timer.c | 6 +- 28 files changed, 353 insertions(+), 339 deletions(-) -- 2.6.3 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org<mailto: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