The l2fwd application in api-next is already ported to use the new multi-queue pktio api. This fix is relevant to that version only.
-Matias From: EXT Mike Holmes [mailto:[email protected]] Sent: Wednesday, February 03, 2016 2:53 PM To: Elo, Matias (Nokia - FI/Espoo) <[email protected]> Cc: [email protected] Subject: Re: [lng-odp] [API-NEXT PATCH] test: l2fwd: fix test getting stuck in DIRECT_RECV/POLL_QUEUE mode This can go straight to master, there is no ODP api change. On 3 February 2016 at 02:51, Elo, Matias (Nokia - FI/Espoo) <[email protected]<mailto:[email protected]>> wrote: ping > -----Original Message----- > From: lng-odp > [mailto:[email protected]<mailto:[email protected]>] > On Behalf Of EXT Matias > Elo > Sent: Thursday, January 28, 2016 11:05 AM > To: [email protected]<mailto:[email protected]> > Subject: [lng-odp] [API-NEXT PATCH] test: l2fwd: fix test getting stuck in > DIRECT_RECV/POLL_QUEUE mode > > Test thread would get stuck if there were more than one > interface per thread and no traffic was received from one of > these interfaces. > > Signed-off-by: Matias Elo <[email protected]<mailto:[email protected]>> > --- > test/performance/odp_l2fwd.c | 37 ++++++++++++++++++------------------- > 1 file changed, 18 insertions(+), 19 deletions(-) > > diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c > index 3c2d296..e392f34 100644 > --- a/test/performance/odp_l2fwd.c > +++ b/test/performance/odp_l2fwd.c > @@ -370,6 +370,15 @@ static void *run_worker_poll_mode(void *arg) > odp_event_t event[MAX_PKT_BURST]; > int i; > > + if (num_pktio > 1) { > + dst_idx = thr_args->pktio[pktio].tx_idx; > + queue = thr_args->pktio[pktio].rx_queue; > + pktout = thr_args->pktio[pktio].pktout; > + pktio++; > + if (pktio == num_pktio) > + pktio = 0; > + } > + > pkts = odp_queue_deq_multi(queue, event, MAX_PKT_BURST); > if (odp_unlikely(pkts <= 0)) > continue; > @@ -410,15 +419,6 @@ static void *run_worker_poll_mode(void *arg) > } > > stats->s.packets += pkts; > - > - if (num_pktio > 1) { > - dst_idx = thr_args->pktio[pktio].tx_idx; > - queue = thr_args->pktio[pktio].rx_queue; > - pktout = thr_args->pktio[pktio].pktout; > - pktio++; > - if (pktio == num_pktio) > - pktio = 0; > - } > } > > /* Make sure that latest stat writes are visible to other threads */ > @@ -459,6 +459,15 @@ static void *run_worker_direct_mode(void *arg) > int sent; > unsigned tx_drops; > > + if (num_pktio > 1) { > + dst_idx = thr_args->pktio[pktio].tx_idx; > + pktin = thr_args->pktio[pktio].pktin; > + pktout = thr_args->pktio[pktio].pktout; > + pktio++; > + if (pktio == num_pktio) > + pktio = 0; > + } > + > pkts = odp_pktio_recv_queue(pktin, pkt_tbl, MAX_PKT_BURST); > if (odp_unlikely(pkts <= 0)) > continue; > @@ -496,16 +505,6 @@ static void *run_worker_direct_mode(void *arg) > } > > stats->s.packets += pkts; > - > - if (num_pktio > 1) { > - dst_idx = thr_args->pktio[pktio].tx_idx; > - pktin = thr_args->pktio[pktio].pktin; > - pktout = thr_args->pktio[pktio].pktout; > - pktio++; > - if (pktio == num_pktio) > - pktio = 0; > - } > - > } > > /* Make sure that latest stat writes are visible to other threads */ > -- > 1.9.1 > > _______________________________________________ > lng-odp mailing list > [email protected]<mailto:[email protected]> > https://lists.linaro.org/mailman/listinfo/lng-odp _______________________________________________ lng-odp mailing list [email protected]<mailto:[email protected]> https://lists.linaro.org/mailman/listinfo/lng-odp -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org<http://www.linaro.org/> │ Open source software for ARM SoCs "Work should be fun and collborative, the rest follows"
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
