On Wed, 2022-02-16 at 20:14 +0800, Hao Xu wrote: > > > > Hi Olivier, > I've write something to express my idea, it would be great if you can > try it. > It's totally untested and only does polling in sqthread, won't be > hard > to expand it to cqring_wait. My original idea is to poll all the napi > device but seems that may be not efficient. so for a request, just > do napi polling for one napi. > There is still one problem: when to delete the polled NAPIs. > I think that I have found an elegant solution to the remaining problem! Are you ok if I send out a patch to Jens that contains your code if I put your name as a co-author? > > > + ne = kmalloc(sizeof(*ne), GFP_KERNEL); > + if (!ne) > + return; > + > + list_add_tail(&ne->list, &ctx->napi_list); > +} ne->napi_id is not initialized before returning from the function!