Re: [dpdk-dev] [PATCH] eal: check for interrupt context

2019-11-18 Thread Burakov, Anatoly
On 17-Nov-19 7:36 PM, Harman Kalra wrote: Added an API to check if current execution is in interrupt context. This will be helpful to handle nested interrupt cases. Signed-off-by: Harman Kalra --- This is a great idea. It would be nice to add checks for is_intr() inside rte_malloc routines,

Re: [dpdk-dev] [PATCH] eal: check for interrupt context

2019-11-17 Thread Stephen Hemminger
On Sun, 17 Nov 2019 19:36:11 + Harman Kalra wrote: > Added an API to check if current execution is in interrupt > context. This will be helpful to handle nested interrupt cases. > > Signed-off-by: Harman Kalra Please add a user of this routine. Unused code is added burden.

Re: [dpdk-dev] [PATCH] eal: check for interrupt context

2019-11-17 Thread Stephen Hemminger
On Sun, 17 Nov 2019 19:36:11 + Harman Kalra wrote: > +int rte_thread_is_intr(void) > +{ > + if (pthread_equal(intr_thread, pthread_self())) > + return true; > + else > + return false; > +} A couple of things here. 1. true/false implies that this is of type bo

[dpdk-dev] [PATCH] eal: check for interrupt context

2019-11-17 Thread Harman Kalra
Added an API to check if current execution is in interrupt context. This will be helpful to handle nested interrupt cases. Signed-off-by: Harman Kalra --- lib/librte_eal/common/include/rte_interrupts.h | 13 + lib/librte_eal/freebsd/eal/eal_interrupts.c| 8 lib/librte_e