lkml.org 
[lkml]   [2016]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/2] cxl: Add mechanism for delivering AFU driver specific events
From
Date
Hi Vaibhav,

Le 09/03/2016 15:37, Vaibhav Jain a écrit :

> I would propose these two apis.
>
> /*
> * fetches an event from the driver event queue. NULL means that queue
> * is empty. Can sleep if needed. The memory for cxl_event is allocated
> * by module being called. Hence it can be potentially be larger then
> * sizeof(struct cxl_event). Multiple calls to this should return same
> * pointer untill ack_event is called.
> */
> struct cxl_event * fetch_event(struct cxl_context * ctx);
>
> /*
> * Returns and acknowledge the struct cxl_event * back to the driver
> * which can then free it or maybe put it back in a kmem_cache. This
> * should be called once we have completely returned the current
> * struct cxl_event from the readcall
> */
> void ack_event(struct cxl_context * ctx, struct cxl_event *);


How would you implement polling on those APIs?
How would you implement afu_read? There are several sources of events.

Fred

\
 
 \ /
  Last update: 2016-03-09 18:41    [W:0.097 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site