DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Pavan Nikhilesh Bhagavatula <pbhagavatula@caviumnetworks.com>
Cc: "Van Haaren, Harry" <harry.van.haaren@intel.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 1/3] evendev: fix inconsistency in event queue config
Date: Sat, 21 Oct 2017 22:57:58 +0530	[thread overview]
Message-ID: <20171021172757.GA1468@jerin> (raw)
In-Reply-To: <20171020190927.GA18722@PBHAGAVATULA-LT>

-----Original Message-----
> Date: Sat, 21 Oct 2017 00:39:28 +0530
> From: Pavan Nikhilesh Bhagavatula <pbhagavatula@caviumnetworks.com>
> To: "Van Haaren, Harry" <harry.van.haaren@intel.com>
> CC: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/3] evendev: fix inconsistency in event
>  queue config
> User-Agent: Mutt/1.5.24 (2015-08-30)
> 
> On Fri, Oct 20, 2017 at 04:38:57PM +0000, Van Haaren, Harry wrote:
> > > From: Pavan Nikhilesh Bhagavatula [mailto:pbhagavatula@caviumnetworks.com]
> > > Sent: Friday, October 20, 2017 11:31 AM
> > > To: Van Haaren, Harry <harry.van.haaren@intel.com>
> > > Cc: dev@dpdk.org
> > > Subject: Re: [dpdk-dev] [PATCH 1/3] evendev: fix inconsistency in event
> > > queue config
> > >
> > > On Fri, Oct 20, 2017 at 09:54:36AM +0000, Van Haaren, Harry wrote:
> > > > > From: Pavan Nikhilesh [mailto:pbhagavatula@caviumnetworks.com]
> > > > > Sent: Thursday, October 12, 2017 2:16 PM
> > > > > To: jerin.jacob@caviumnetworks.com; hemant.agrawal@nxp.com; Van Haaren,
> > > > > Harry <harry.van.haaren@intel.com>
> > > > > Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > > > > Subject: [dpdk-dev] [PATCH 1/3] evendev: fix inconsistency in event
> > > queue
> > > > > config
> > > > >
> 
> <snip>
> 
> > > > > -	}
> > > > > -	return ret;
> > > > > -}
> > > >
> > > >
> > > > We should note here, that SCHED_TYPE are integer values:
> > > > #define RTE_SCHED_TYPE_ORDERED          0
> > > > #define RTE_SCHED_TYPE_ATOMIC           1
> > > > #define RTE_SCHED_TYPE_PARALLEL         2
> > > >
> > > > While the EVENT_QUEUE_CFG_ types were bitmasks (before being removed in
> > > this patch)
> > > > #define RTE_EVENT_QUEUE_CFG_ATOMIC_ONLY        (1ULL << 0)
> > > > #define RTE_EVENT_QUEUE_CFG_ORDERED_ONLY       (2ULL << 0)
> > > > #define RTE_EVENT_QUEUE_CFG_PARALLEL_ONLY      (3ULL << 0)
> > > > #define RTE_EVENT_QUEUE_CFG_SINGLE_LINK        (1ULL << 2)
> > > >
> > > >
> > > > I'm not against this change - but we must be careful that if there was any
> > > bit-masking being used previously,
> > > > that that will subtly have broken if we change to sched types. I'm
> > > reviewing with that in mind..
> > > >
> > > > The RTE_EVENT_QUEUE_CFG_ALL_TYPES  config flag now means that all
> > > SCHED_TYPEs
> > > > are valid. Previously this was contained in the bitmask.. this may lead to
> > > issues.
> > > >
> > > > See patch 2/3, where *only* the schedule_type is read, and returned. What
> > > if it the "ALL_TYPES" flag is
> > > > set on the queue? It will be reported wrongly. Currently there is no
> > > integer value for "ALL_TYPES",
> > > > so we cannot represent "ALL TYPES" in the return value from get_attr().
> > > >
> > > > Am I explaining my reasoning clearly enough?
> > > >
> > >
> > > Hey Harry,
> > >
> > > I do understand what you mean, my initial thought was to include "ALL_TYPES"
> > > as
> > > a schedule_type in queue config but this would just complicate things.
> > >
> > > As these values are only used in config phase we could have a check to see
> > > if
> > > event_queue_cfg is not "ALL_TYPES" and only then return the value of
> > > sched_type
> > > else return a error value in case of get_attr().
> > >
> > > I think most of the places this specific check is handled, one such missed
> > > place would be get_attr(). If we could come to a conclusion to fix it in a
> > > correct way I will send out a v2.
> >
> >
> > Sure, I see two sane-ish options:
> >
> > 1) Return an error code from get_attr(), which actually means "ALL TYPES". Feels a bit weird, because an error value is really a valid return.
> >
> > 2) Return UINT_MAX (aka, -1) as the scheduling value. Applications that use/care about the scheduling type must check, others can ignore it.
> >
> > I'm not sure which of these is the better/less-bad solution. Opinions? -H
> >
> 
> I think 1st option would be good, we could use ENOTUNIQ to represent that the
> queue type is "ALL TYPE".
> 
> Thoughts?

If we were to choose between option 1 and option 2, I think,
option 1 is better instead of special interpretation of option 2.

Looks like ENOTUNIQ is not available for freebsd. Choose a errno that
works for linux and freebsd

https://www.freebsd.org/cgi/man.cgi?query=errno&sektion=2
http://man7.org/linux/man-pages/man3/errno.3.html

  reply	other threads:[~2017-10-21 17:28 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 13:15 Pavan Nikhilesh
2017-10-12 13:15 ` [dpdk-dev] [PATCH 2/3] eventdev: extend queue attribute get function Pavan Nikhilesh
2017-10-12 13:15 ` [dpdk-dev] [PATCH 3/3] doc: update eventdev programmers guide Pavan Nikhilesh
2017-10-20  9:54 ` [dpdk-dev] [PATCH 1/3] evendev: fix inconsistency in event queue config Van Haaren, Harry
2017-10-20 10:30   ` Pavan Nikhilesh Bhagavatula
2017-10-20 16:38     ` Van Haaren, Harry
2017-10-20 19:09       ` Pavan Nikhilesh Bhagavatula
2017-10-21 17:27         ` Jerin Jacob [this message]
2017-10-23  8:04         ` Van Haaren, Harry
2017-10-23  8:41           ` Pavan Nikhilesh Bhagavatula
2017-10-23 14:45             ` Van Haaren, Harry
2017-10-23 14:54               ` Pavan Nikhilesh Bhagavatula
2017-10-21 15:05       ` Jerin Jacob
2017-10-23 16:29 ` [dpdk-dev] [PATCH v2 " Pavan Nikhilesh
2017-10-23 16:29   ` [dpdk-dev] [PATCH v2 2/3] eventdev: extend queue attribute get function Pavan Nikhilesh
2017-10-23 16:29   ` [dpdk-dev] [PATCH v2 3/3] doc: update eventdev programmers guide Pavan Nikhilesh
2017-10-23 17:40 ` [dpdk-dev] [PATCH v3 1/3] evendev: fix inconsistency in event queue config Pavan Nikhilesh
2017-10-23 17:40   ` [dpdk-dev] [PATCH v3 2/3] eventdev: extend queue attribute get function Pavan Nikhilesh
2017-10-25 13:43     ` Van Haaren, Harry
2017-10-25 13:58       ` Pavan Nikhilesh Bhagavatula
2017-10-23 17:40   ` [dpdk-dev] [PATCH v3 3/3] doc: update eventdev programmers guide Pavan Nikhilesh
2017-10-25 13:43     ` Van Haaren, Harry
2017-10-25 13:42   ` [dpdk-dev] [PATCH v3 1/3] evendev: fix inconsistency in event queue config Van Haaren, Harry
2017-10-25 14:21 ` [dpdk-dev] [PATCH v4 " Pavan Nikhilesh
2017-10-25 14:21   ` [dpdk-dev] [PATCH v4 2/3] eventdev: extend queue attribute get function Pavan Nikhilesh
2017-10-25 14:21   ` [dpdk-dev] [PATCH v4 3/3] doc: update eventdev programmers guide Pavan Nikhilesh
2017-10-26 22:26   ` [dpdk-dev] [PATCH v4 1/3] evendev: fix inconsistency in event queue config Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171021172757.GA1468@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=pbhagavatula@caviumnetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).