DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] app/eventdev: add option to set global dequeue tmo
Date: Thu, 28 Mar 2019 05:26:23 +0000	[thread overview]
Message-ID: <68594552a1a978e4d395964e55ceb23036cf411c.camel@marvell.com> (raw)
Message-ID: <20190328052623.w7cGZxHHwV55Z-BdxhqjjkaPVR26dxT7wiVlxRcTW0c@z> (raw)
In-Reply-To: <20190327170640.7096-1-pbhagavatula@marvell.com>

On Wed, 2019-03-27 at 17:07 +0000, Pavan Nikhilesh Bhagavatula wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Add option to provide a global dequeue timeout that is used to create
> the eventdev.
> The dequeue timeout provided will be common across all the worker
> ports. If the eventdev hardware supports power management through
> dequeue timeout then this option can be used for verifying power
> demands at various packet rates.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
> 
> +
> +	rte_event_dev_info_get(opt->dev_id, &info);
> +	if (opt->deq_tmo_nsec) {
> +		if (opt->deq_tmo_nsec < info.min_dequeue_timeout_ns) {
> +			opt->deq_tmo_nsec =
> info.min_dequeue_timeout_ns;
> +			evt_info("dequeue_timeout_ns too low, using
> %d",
> +					opt->deq_tmo_nsec);
> +		}
> +		if (opt->deq_tmo_nsec > info.max_dequeue_timeout_ns) {
> +			opt->deq_tmo_nsec =
> info.max_dequeue_timeout_ns;
> +			evt_info("dequeue_timeout_ns too high, using
> %d",
> +					opt->deq_tmo_nsec);
> +		}
> +	}

This code is repeating in multiple palaces, Move this as a function as
use everywhere. Other than this, it looks good to me.






  parent reply	other threads:[~2019-03-28  5:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19  6:21 [dpdk-dev] [PATCH] " Pavan Nikhilesh Bhagavatula
2019-03-19  6:21 ` Pavan Nikhilesh Bhagavatula
2019-03-19  9:45 ` Jerin Jacob Kollanukkaran
2019-03-19  9:45   ` Jerin Jacob Kollanukkaran
2019-03-25  9:47   ` Pavan Nikhilesh Bhagavatula
2019-03-25  9:47     ` Pavan Nikhilesh Bhagavatula
2019-03-27 17:07 ` [dpdk-dev] [PATCH v2] " Pavan Nikhilesh Bhagavatula
2019-03-27 17:07   ` Pavan Nikhilesh Bhagavatula
2019-03-28  5:26   ` Jerin Jacob Kollanukkaran [this message]
2019-03-28  5:26     ` Jerin Jacob Kollanukkaran
2019-03-28 13:16     ` Pavan Nikhilesh Bhagavatula
2019-03-28 13:16       ` Pavan Nikhilesh Bhagavatula
2019-03-29  7:11 ` [dpdk-dev] [PATCH v3] " Pavan Nikhilesh Bhagavatula
2019-03-29  7:11   ` Pavan Nikhilesh Bhagavatula
2019-03-31 11:31   ` Jerin Jacob Kollanukkaran
2019-03-31 11:31     ` Jerin Jacob Kollanukkaran

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=68594552a1a978e4d395964e55ceb23036cf411c.camel@marvell.com \
    --to=jerinj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=pbhagavatula@marvell.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).