From patchwork Tue Feb 2 15:05:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 61028 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp788457lbb; Tue, 2 Feb 2016 07:05:34 -0800 (PST) X-Received: by 10.140.30.197 with SMTP id d63mr35375602qgd.81.1454425534181; Tue, 02 Feb 2016 07:05:34 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l10si1340136qgf.68.2016.02.02.07.05.33; Tue, 02 Feb 2016 07:05:34 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 94C24616B0; Tue, 2 Feb 2016 15:05:33 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=IwdPsTRN; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,T_DKIM_INVALID,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 463AE61611; Tue, 2 Feb 2016 15:05:27 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 423E36162B; Tue, 2 Feb 2016 15:05:23 +0000 (UTC) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) by lists.linaro.org (Postfix) with ESMTPS id 9B9D5615FD for ; Tue, 2 Feb 2016 15:05:21 +0000 (UTC) Received: by mail-lb0-f172.google.com with SMTP id x4so97349767lbm.0 for ; Tue, 02 Feb 2016 07:05:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=Aa2r8HMcwfnFeJwyvEDdeL70RvDnxk+qhHJ6UOPylYs=; b=IwdPsTRNlrjW+czSj0U727ssF92MHuJ3JRYmI4sny+qpuIErN/ftoRYKiBSgvUZcpY 3Dj87RvOPXwwqpcWW3u2O1zHfyJV10uO2QxwxXm/Kw1pGE3q5JpY6rQOodOwnss1hb70 ZiliKAXGU4OyzBa4oV7lMERAJXxJr5RWQ588M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=Aa2r8HMcwfnFeJwyvEDdeL70RvDnxk+qhHJ6UOPylYs=; b=X0/fCmYq8gGTn80sxAXmzjQl6OF6SGNWk0QAsMwvIZbj85Vwt/p9Ex/lDdX8NjkaL3 BoULsjau5KRSNFc9MDJ+k5WvP0wrCfmvB54DedZAuvTnfn26x/1qI6cX/i3+uvHDcBYA FHYNsbMpUb4tciXDbT8d6yWioMU94Zn8uG6JFn7ZMFSy47WJZjLP7ncxwsWB0sWxBr0u aNU0q7yNAENkuWmx1TtfHBYw+3DvoBTLwJmrI9A8C/ZGSs5JnISPDcrsckfZ/RP0NZG0 CIVL5JBbRBmzkkvYPmp4qlpERmuODQd3HUilr8RTVsaaCu8dh8fV0vysiIaE1tOmzPKY mxfw== X-Gm-Message-State: AG10YORM1vBBYZFXhQkhaIqQ9E6k9pHdnQ9XQxUzFIVA32F74jWFENgXXIsi4kp9dk2xp+GLAXE= X-Received: by 10.112.46.35 with SMTP id s3mr11188502lbm.115.1454425520187; Tue, 02 Feb 2016 07:05:20 -0800 (PST) Received: from [193.168.1.37] (ppp91-76-173-134.pppoe.mtu-net.ru. [91.76.173.134]) by smtp.gmail.com with ESMTPSA id 140sm278490lfz.21.2016.02.02.07.05.19 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Feb 2016 07:05:19 -0800 (PST) To: Bill Fischofer , "Savolainen, Petri (Nokia - FI/Espoo)" References: <1453987481-11387-1-git-send-email-petri.savolainen@nokia.com> <56B09A97.2070906@linaro.org> From: Maxim Uvarov Message-ID: <56B0C5AE.3050706@linaro.org> Date: Tue, 2 Feb 2016 18:05:18 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: X-Topics: patch Cc: "lng-odp@lists.linaro.org" Subject: Re: [lng-odp] [API-NEXT PATCH 0/6] Rename queue types X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" On 02/02/2016 16:01, Bill Fischofer wrote: > i agree. Best to get these changes out sooner rather than later. > > On Tue, Feb 2, 2016 at 6:31 AM, Savolainen, Petri (Nokia - FI/Espoo) > > wrote: > > It would be great to get it in v1.7. Otherwise, master and > api-next would have lots of conflicting (example/validation) lines > and merge would be more difficult in the next release. > > -Petri > > > > -----Original Message----- > > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org > ] On Behalf Of EXT > > Maxim Uvarov > > Sent: Tuesday, February 02, 2016 2:01 PM > > To: lng-odp@lists.linaro.org > > Subject: Re: [lng-odp] [API-NEXT PATCH 0/6] Rename queue types > > > > Petri, > > > > that looks like also good to go to 1.7. Validation tests should > be there > > because it's only rename. > > What do you think? > > > > Maxim. > > > > > > On 01/29/2016 19:00, Bill Fischofer wrote: > > > Thanks for the further explanation. Yes, UNSCHED implies a > dichotomy > > > that may be limiting. I guess the real distinction is that > certain > > > queues are managed by ODP while others are managed by the > application > > > itself (alternately, queues are either system managed, with > various > > > ODP-defined attributes, or user managed). I don't suppose either > > > ODP_QUEUE_TYPE_APPLICATION or ODP_QUEUE_TYPE_USER appeals? > > > > > > On Fri, Jan 29, 2016 at 2:12 AM, Savolainen, Petri (Nokia - > FI/Espoo) > > > > >> wrote: > > > > > > 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.fischofer@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 > > > > >> > > > > > > On Thu, Jan 28, 2016 at 7:24 AM, Petri Savolainen > > > > >> > > > 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 > > > > > 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 > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp > > --- a/test/validation/pktio/pktio.c +++ b/test/validation/pktio/pktio.c @@ -814,7 +814,7 @@ int pktio_check_statistics_counters(void) const char *iface = iface_name[0]; odp_pktio_param_init(&pktio_param); - pktio_param.in_mode = ODP_QUEUE_TYPE_SCHED; + pktio_param.in_mode = ODP_PKTIN_MODE_SCHED; pktio = odp_pktio_open(iface, pool[0], &pktio_param); if (pktio == ODP_PKTIO_INVALID)