DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/octeontx: use eventdev attributes to get count
@ 2017-10-10 14:56 Pavan Nikhilesh
  2017-10-10 18:04 ` Jerin Jacob
  2017-10-10 19:33 ` Ferruh Yigit
  0 siblings, 2 replies; 6+ messages in thread
From: Pavan Nikhilesh @ 2017-10-10 14:56 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Pavan Nikhilesh

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-11  1:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-10 14:56 [dpdk-dev] [PATCH] net/octeontx: use eventdev attributes to get count Pavan Nikhilesh
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

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).