On Wed, Aug 26, 2015 at 04:27:13PM +0300, Maxim Uvarov wrote:
> On 08/26/15 16:10, Stuart Haslam wrote:
> >On Wed, Aug 26, 2015 at 12:10:37PM +0300, Maxim Uvarov wrote:
> >>After open pktio remains stopped. Inside worker thread (after all
> >>configuration done it should be started.) In that patch I just start
> >>it everywhere to keep original logic and be easy for review. Putting
> >>it inside worker threads will require thread arguments change and
> >>understanding logic of current app. It's better to do further changes
> >>in separate patches per app.
> >>
> >>Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org>
> >>---
> >>  example/classifier/odp_classifier.c                       | 1 +
> >>  example/generator/odp_generator.c                         | 2 +-
> >>  example/ipsec/odp_ipsec.c                                 | 1 +
> >>  example/packet/odp_pktio.c                                | 1 +
> >>  platform/linux-generic/pktio/loop.c                       | 2 +-
> >>  platform/linux-generic/pktio/socket.c                     | 2 +-
> >>  platform/linux-generic/pktio/socket_mmap.c                | 2 +-
> >>  test/performance/odp_l2fwd.c                              | 1 +
> >>  test/performance/odp_pktio_perf.c                         | 2 +-
> >>  test/validation/classification/odp_classification_tests.c | 1 +
> >>  test/validation/pktio/pktio.c                             | 1 +
> >>  11 files changed, 11 insertions(+), 5 deletions(-)
> >>
> >>diff --git a/example/classifier/odp_classifier.c 
> >>b/example/classifier/odp_classifier.c
> >>index ac204af..ffa39f8 100644
> >>--- a/example/classifier/odp_classifier.c
> >>+++ b/example/classifier/odp_classifier.c
> >>@@ -210,6 +210,7 @@ static odp_pktio_t create_pktio(const char *dev, 
> >>odp_pool_t pool)
> >>            EXAMPLE_ERR("pktio create failed for %s\n", dev);
> >>            exit(EXIT_FAILURE);
> >>    }
> >>+   odp_pktio_start(pktio); /* @todo: move to worker thread */
> >This should be moved into main(), after the classifier has been
> >configured but before the workers have started.
> I just put start after open to keep original behavior and added
> @todo. Planned to send clean patches for that
> later. Will it work?
> 
> Maxim.

The @todo isn't right though, we don't want it in the worker thread.

I think it's important that the examples are correct from the start, and
in all cases I looked at it's only moving the call a few lines further
down so I don't think it needs to be deferred.

-- 
Stuart.
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to