Thread (10 messages) read the whole thread 10 messages, 3 authors, 2017-07-01

Re: [PATCH 2/5] eventdev: introduce specialized enqueue new op variant

From: Jerin Jacob <hidden>
Date: 2017-06-30 09:12:15

-----Original Message-----
Date: Fri, 30 Jun 2017 08:40:06 +0000
From: "Van Haaren, Harry" <redacted>
To: Jerin Jacob <redacted>, "dev@dpdk.org"
 [off-list ref]
CC: "Richardson, Bruce" <redacted>,
 "hemant.agrawal@nxp.com" [off-list ref], "Eads, Gage"
 [off-list ref], "nipun.gupta@nxp.com" [off-list ref],
 "Vangati, Narender" [off-list ref], "Rao, Nikhil"
 [off-list ref]
Subject: RE: [dpdk-dev] [PATCH 2/5] eventdev: introduce specialized enqueue
 new op variant
quoted
From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
Sent: Thursday, June 29, 2017 3:20 PM
To: dev@dpdk.org
<snip>
quoted
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index 8dc7b2ef8..0d0c6a186 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -158,6 +158,7 @@ ssovf_fastpath_fns_set(struct rte_eventdev *dev)
 	dev->schedule      = NULL;
 	dev->enqueue       = ssows_enq;
 	dev->enqueue_burst = ssows_enq_burst;
+	dev->enqueue_new_burst = ssows_enq_burst;
 	dev->dequeue       = ssows_deq;
 	dev->dequeue_burst = ssows_deq_burst;
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index fe2a61e2f..951ad1b33 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -796,6 +796,7 @@ sw_probe(struct rte_vdev_device *vdev)
 	dev->dev_ops = &evdev_sw_ops;
 	dev->enqueue = sw_event_enqueue;
 	dev->enqueue_burst = sw_event_enqueue_burst;
+	dev->enqueue_new_burst = sw_event_enqueue_burst;
 	dev->dequeue = sw_event_dequeue;
 	dev->dequeue_burst = sw_event_dequeue_burst;
 	dev->schedule = sw_event_schedule;

I think it is possible to do this pointer-setting of new_burst() in eventdev.c, instead of adding the new_burst() to each PMD individually?
During rte_eventdev_configure(), if the dev->enqueue_new_burst() function is NULL, just point it at the ordinary one;
I thought so, But it will break in multi process use case as on probe() we are
updating the callbacks for secondary process. Doing it in probe() may be very
early as some PMD may update the callback anywhere on or before rte_eventdev_start().

Thoughts?
if (!dev->enqueue_new_burst)
    dev->enqueue_new_burst = dev->enqueue_burst;


This saves per-PMD changes for adding new parallel function pointers - and avoids PMDs accidentally not being updated. With that change;

Acked-by: Harry van Haaren <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help