DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: <dev@dpdk.org>
Cc: <bruce.richardson@intel.com>, <hemant.agrawal@nxp.com>,
	<gage.eads@intel.com>, <harry.van.haaren@intel.com>,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH 1/4] eventdev: fix event driver name to eventdev lookup
Date: Mon, 6 Feb 2017 10:53:37 +0530	[thread overview]
Message-ID: <1486358620-4075-2-git-send-email-jerin.jacob@caviumnetworks.com> (raw)
In-Reply-To: <1486358620-4075-1-git-send-email-jerin.jacob@caviumnetworks.com>

- Removed uninitialized max_devs value
- Corrected dev assignment

Fixes: 8ca610e0487c ("eventdev: implement the northbound APIs")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 lib/librte_eventdev/rte_eventdev_pmd.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index 15843c6..4eea618 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -149,7 +149,6 @@ struct rte_eventdev_driver {
 /** Global structure used for maintaining state of allocated event devices */
 struct rte_eventdev_global {
 	uint8_t nb_devs;	/**< Number of devices found */
-	uint8_t max_devs;	/**< Max number of devices */
 };
 
 extern struct rte_eventdev_global *rte_eventdev_globals;
@@ -175,8 +174,8 @@ rte_event_pmd_get_named_dev(const char *name)
 	if (name == NULL)
 		return NULL;
 
-	for (i = 0, dev = &rte_eventdevs[i];
-			i < rte_eventdev_globals->max_devs; i++) {
+	for (i = 0; i < RTE_EVENT_MAX_DEVS; i++) {
+		dev = &rte_eventdevs[i];
 		if ((dev->attached == RTE_EVENTDEV_ATTACHED) &&
 				(strcmp(dev->data->name, name) == 0))
 			return dev;
-- 
2.5.5

  reply	other threads:[~2017-02-06  5:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-06  5:23 [dpdk-dev] [PATCH 0/4] add eventdev vdev uninit support Jerin Jacob
2017-02-06  5:23 ` Jerin Jacob [this message]
2017-02-07 15:04   ` [dpdk-dev] [PATCH 1/4] eventdev: fix event driver name to eventdev lookup Van Haaren, Harry
2017-02-08 14:38     ` Jerin Jacob
2017-02-06  5:23 ` [dpdk-dev] [PATCH 2/4] evendev: add vdev uninit support Jerin Jacob
2017-02-07 15:11   ` Van Haaren, Harry
2017-02-08 14:39     ` Jerin Jacob
2017-02-06  5:23 ` [dpdk-dev] [PATCH 3/4] event/skeleton: " Jerin Jacob
2017-02-07 15:11   ` Van Haaren, Harry
2017-02-08 14:40     ` Jerin Jacob
2017-02-06  5:23 ` [dpdk-dev] [PATCH 4/4] app/test: unit test case to exercise eventdev vdev uninit Jerin Jacob
2017-02-07 15:17   ` Van Haaren, Harry
2017-02-08 12:30     ` Jerin Jacob

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=1486358620-4075-2-git-send-email-jerin.jacob@caviumnetworks.com \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.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).