DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: "Van Haaren, Harry" <harry.van.haaren@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] eventdev: add dev id checks to config functions
Date: Wed, 6 Sep 2017 20:27:06 +0530	[thread overview]
Message-ID: <20170906145705.GA30064@jerin> (raw)
In-Reply-To: <E923DB57A917B54B9182A2E928D00FA640C756FA@IRSMSX102.ger.corp.intel.com>

-----Original Message-----
> Date: Wed, 6 Sep 2017 14:45:29 +0000
> From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> CC: "dev@dpdk.org" <dev@dpdk.org>
> Subject: RE: [PATCH] eventdev: add dev id checks to config functions
> 
> > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> > Sent: Monday, September 4, 2017 6:21 AM
> > To: Van Haaren, Harry <harry.van.haaren@intel.com>
> > Cc: dev@dpdk.org
> > Subject: Re: [PATCH] eventdev: add dev id checks to config functions
> > 
> > -----Original Message-----
> > > Date: Mon, 24 Jul 2017 13:48:20 +0100
> > > From: Harry van Haaren <harry.van.haaren@intel.com>
> > > To: dev@dpdk.org
> > > CC: jerin.jacob@caviumnetworks.com, Harry van Haaren
> > >  <harry.van.haaren@intel.com>
> > > Subject: [PATCH] eventdev: add dev id checks to config functions
> > > X-Mailer: git-send-email 2.7.4
> > >
> > > This commit adds checks to verify the device ID is valid
> > > to the following functions. Given that they are non-datapath,
> > > these checks are always performed.
> > 
> > Makes sense.
> 
> Great - lets discuss implementation ;)
> 
> 
> > > This commit also updates the event/octeontx test-cases to
> > > have the correct signed-ness, as the API has changes this
> > > change is required in order to compile.
> > >
> > > Suggested-by: Jesse Bruni <jesse.bruni@intel.com>
> > > Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
> > >
> > > ---
> > > @@ -1288,9 +1293,10 @@ worker_ordered_flow_producer(void *arg)
> > >  static inline int
> > >  test_producer_consumer_ingress_order_test(int (*fn)(void *))
> > >  {
> > > -	uint8_t nr_ports;
> > > +	int16_t nr_ports;
> > >
> > > -	nr_ports = RTE_MIN(rte_event_port_count(evdev), rte_lcore_count() - 1);
> > > +	nr_ports = RTE_MIN(rte_event_port_count(evdev),
> > > +			(int)rte_lcore_count() - 1);
> > 
> > While I agree on the problem statement, I am trying to see
> > 1/ an API symmetrical to ethdev APIs. Similar problem solved in a differently in
> > ethdev. see rte_eth_dev_adjust_nb_rx_tx_desc().
> > Just want to make sure, all the APIs across ethdev, eventdev looks same
> > 
> > 2/ How to get rid of above typecasting
> > 
> > Considering above two points and following the
> > rte_eth_dev_adjust_nb_rx_tx_desc() pattern. How about,
> > 
> > Removing,
> > rte_event_port_dequeue_depth()
> > rte_event_port_enqueue_depth()
> > rte_event_port_count()
> > 
> > rte_event_queue_count()
> > rte_event_queue_priority()
> > 
> > and change to,
> > 
> > int rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id,
> > uint8_t *enqueue_depth /*out */, uint8_t *dequeue_depth /* out*/, uin8_t *count /*out*/);
> > 
> > int rte_event_queue_attr_get(uint8_t dev_id, uint8_t port_id,
> > uin8_t *prio /* out */, uint8_t *count /*out */);
> > 
> > or something similar.
> 
> Hmm, I don't like that we'd have to break ABI every time we want to add an item to attr_get().. so adding a parameter "attr_id" would allow adding events in future. This solution feels a bit like a re-implementation of the xstats API..
> 
> Thoughts? -H
> 
> 
> enum {
>   PORT_COUNT,
>   PORT_DEQUEUE_DEPTH,
>   PORT_ENQUEUE_DEPTH,
> }
> 
> /* retrieve value of port 
> int rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id, uint32_t attr_id, uint32_t *attr_value /* out */);

Looks good to me.

> 
> 

  reply	other threads:[~2017-09-06 14:57 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24 12:48 Harry van Haaren
2017-09-04  5:20 ` Jerin Jacob
2017-09-06 14:45   ` Van Haaren, Harry
2017-09-06 14:57     ` Jerin Jacob [this message]
2017-09-08 15:18 ` [dpdk-dev] [PATCH v2 0/3] eventdev: add attribute based get APIs Harry van Haaren
2017-09-08 15:18   ` [dpdk-dev] [PATCH v2 1/4] eventdev: add port attribute function Harry van Haaren
2017-09-08 15:18   ` [dpdk-dev] [PATCH v2 2/4] eventdev: add dev attribute get function Harry van Haaren
2017-09-08 15:18   ` [dpdk-dev] [PATCH v2 3/4] eventdev: add queue attribute function Harry van Haaren
2017-09-08 15:18   ` [dpdk-dev] [PATCH v2 4/4] eventdev: add device started attribute Harry van Haaren
2017-09-08 15:36   ` [dpdk-dev] [PATCH v3 0/4] eventdev: add attribute based get APIs Harry van Haaren
2017-09-08 15:36     ` [dpdk-dev] [PATCH v3 1/4] eventdev: add port attribute function Harry van Haaren
2017-09-11 16:35       ` Jerin Jacob
2017-09-08 15:36     ` [dpdk-dev] [PATCH v3 2/4] eventdev: add dev attribute get function Harry van Haaren
2017-09-11 16:51       ` Jerin Jacob
2017-09-08 15:36     ` [dpdk-dev] [PATCH v3 3/4] eventdev: add queue attribute function Harry van Haaren
2017-09-11 17:36       ` Jerin Jacob
2017-09-08 15:36     ` [dpdk-dev] [PATCH v3 4/4] eventdev: add device started attribute Harry van Haaren
2017-09-11 17:52       ` Jerin Jacob
2017-09-12  8:07         ` Van Haaren, Harry
2017-09-11 16:16     ` [dpdk-dev] [PATCH v3 0/4] eventdev: add attribute based get APIs Jerin Jacob
2017-09-14 16:08     ` [dpdk-dev] [PATCH v4 " Harry van Haaren
2017-09-14 16:09       ` [dpdk-dev] [PATCH v4 1/4] eventdev: add port attribute function Harry van Haaren
2017-09-14 16:19         ` Van Haaren, Harry
2017-09-14 16:09       ` [dpdk-dev] [PATCH v4 2/4] eventdev: add dev attribute get function Harry van Haaren
2017-09-14 16:09       ` [dpdk-dev] [PATCH v4 3/4] eventdev: add queue attribute function Harry van Haaren
2017-09-14 16:09       ` [dpdk-dev] [PATCH v4 4/4] eventdev: add device started attribute Harry van Haaren
2017-09-15  6:14       ` [dpdk-dev] [PATCH v4 0/4] eventdev: add attribute based get APIs Nipun Gupta
2017-09-21  9:57         ` Jerin Jacob
2017-09-15 12:33       ` Jerin Jacob
2017-09-20 13:35       ` [dpdk-dev] [PATCH v5 0/5] Harry van Haaren
2017-09-20 13:35         ` [dpdk-dev] [PATCH v5 1/5] eventdev: add port attribute function Harry van Haaren
2017-09-20 13:36         ` [dpdk-dev] [PATCH v5 2/5] eventdev: add dev attribute get function Harry van Haaren
2017-09-20 13:36         ` [dpdk-dev] [PATCH v5 3/5] eventdev: add queue attribute function Harry van Haaren
2017-09-20 13:36         ` [dpdk-dev] [PATCH v5 4/5] eventdev: add device started attribute Harry van Haaren
2017-09-20 13:36         ` [dpdk-dev] [PATCH v5 5/5] eventdev: bump library version Harry van Haaren

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=20170906145705.GA30064@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.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).