Message ID | 20171212100826.20550-1-nikhil.agarwal@linaro.org |
---|---|
State | New |
Headers | show |
Series | [1/4] examples/l3fwd-power: fix non Rx intr supported platform | expand |
On 12/12/2017 10:08 AM, Nikhil Agarwal wrote: > This existing code cause the platform to start receiving packet > immediately irrespective of interrupts available or not. > If the platform does not support Rx interrupt, it shall not start > receiving packets immediately. It shall let the timer management work. > > Fixes: aee3bc79cc34 ("examples/l3fwd-power: enable one-shot Rx interrupt and polling switch") > Cc: stable@dpdk.org > Cc: Danny Zhou <danny.zhou@intel.com> > Cc: Cunming Liang <cunming.liang@intel.com> > > Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org> > --- ---snip--- Acked-by: David Hunt <david.hunt@intel.com>
13/12/2017 15:21, Hunt, David: > On 12/12/2017 10:08 AM, Nikhil Agarwal wrote: > > This existing code cause the platform to start receiving packet > > immediately irrespective of interrupts available or not. > > If the platform does not support Rx interrupt, it shall not start > > receiving packets immediately. It shall let the timer management work. > > > > Fixes: aee3bc79cc34 ("examples/l3fwd-power: enable one-shot Rx interrupt and polling switch") > > Cc: stable@dpdk.org > > Cc: Danny Zhou <danny.zhou@intel.com> > > Cc: Cunming Liang <cunming.liang@intel.com> > > > > Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org> > > --- > > ---snip--- > > Acked-by: David Hunt <david.hunt@intel.com> Series applied, thanks
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 0a4ed14..d335b0d 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1051,9 +1051,11 @@ main_loop(__attribute__((unused)) void *dummy) turn_on_intr(qconf); sleep_until_rx_interrupt( qconf->n_rx_queue); + /** + * start receiving packets immediately + */ + goto start_rx; } - /* start receiving packets immediately */ - goto start_rx; } stats[lcore_id].sleep_time += lcore_idle_hint; }
This existing code cause the platform to start receiving packet immediately irrespective of interrupts available or not. If the platform does not support Rx interrupt, it shall not start receiving packets immediately. It shall let the timer management work. Fixes: aee3bc79cc34 ("examples/l3fwd-power: enable one-shot Rx interrupt and polling switch") Cc: stable@dpdk.org Cc: Danny Zhou <danny.zhou@intel.com> Cc: Cunming Liang <cunming.liang@intel.com> Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org> --- examples/l3fwd-power/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.7.4