On 15 January 2015 at 12:58, Stuart Haslam <[email protected]> wrote:
> When using odp_pktio_recv() call directly it's not necessary for an > input queue to be associated with a pktio. > > Signed-off-by: Stuart Haslam <[email protected]> > Reviewed-by: Alexandru Badicioiu <[email protected]> > --- > (This code contribution is provided under the terms of agreement > LES-LTM-21309) > > example/packet/odp_pktio.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c > index b162fac..fe8efb0 100644 > --- a/example/packet/odp_pktio.c > +++ b/example/packet/odp_pktio.c > @@ -99,7 +99,8 @@ static void parse_args(int argc, char *argv[], > appl_args_t *appl_args); > static void print_info(char *progname, appl_args_t *appl_args); > static void usage(char *progname); > > -static odp_pktio_t create_pktio(const char *dev, odp_buffer_pool_t pool) > +static odp_pktio_t create_pktio(const char *dev, odp_buffer_pool_t pool, > + int mode) > { > odp_pktio_t pktio; > odp_queue_t inq_def; > @@ -112,6 +113,10 @@ static odp_pktio_t create_pktio(const char *dev, > odp_buffer_pool_t pool) > if (pktio == ODP_PKTIO_INVALID) > EXAMPLE_ABORT("Error: pktio create failed for %s\n", dev); > > + /* no further setup needed for burst mode */ > + if (mode == APPL_MODE_PKT_BURST) > + return pktio; > + > qparam.sched.prio = ODP_SCHED_PRIO_DEFAULT; > qparam.sched.sync = ODP_SCHED_SYNC_ATOMIC; > qparam.sched.group = ODP_SCHED_GROUP_DEFAULT; > @@ -344,7 +349,7 @@ int main(int argc, char *argv[]) > > /* Create a pktio instance for each interface */ > for (i = 0; i < args->appl.if_count; ++i) > - create_pktio(args->appl.if_names[i], pool); > + create_pktio(args->appl.if_names[i], pool, > args->appl.mode); > > /* Create and init worker threads */ > memset(thread_tbl, 0, sizeof(thread_tbl)); > -- > 2.1.1 > > > > _______________________________________________ > lng-odp mailing list > [email protected] > http://lists.linaro.org/mailman/listinfo/lng-odp >
_______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
