DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: ferruh.yigit@intel.com
Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH] net/octeontx: use eventdev attributes to get count
Date: Tue, 10 Oct 2017 20:26:15 +0530	[thread overview]
Message-ID: <1507647375-12820-1-git-send-email-pbhagavatula@caviumnetworks.com> (raw)

Use the event device get attribute function to fetch the event
port and queue count

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index d41904f..1e72d65 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -1242,8 +1242,10 @@ octeontx_probe(struct rte_vdev_device *dev)
 	if (res < 0)
 		goto parse_error;
 
-	qnum = rte_event_queue_count(evdev);
-	pnum = rte_event_port_count(evdev);
+	rte_event_dev_attr_get(evdev, RTE_EVENT_DEV_ATTR_PORT_COUNT,
+			(uint32_t *)&pnum);
+	rte_event_dev_attr_get(evdev, RTE_EVENT_DEV_ATTR_QUEUE_COUNT,
+			(uint32_t *)&qnum);
 	if (pnum < qnum) {
 		octeontx_log_err("too few event ports (%d) for event_q(%d)",
 				pnum, qnum);
-- 
2.7.4

             reply	other threads:[~2017-10-10 14:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 14:56 Pavan Nikhilesh [this message]
2017-10-10 18:04 ` Jerin Jacob
2017-10-10 18:16   ` Ferruh Yigit
2017-10-10 19:38     ` Ferruh Yigit
2017-10-10 19:33 ` Ferruh Yigit
2017-10-11  1:20   ` Ferruh Yigit

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=1507647375-12820-1-git-send-email-pbhagavatula@caviumnetworks.com \
    --to=pbhagavatula@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@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).