[lkml]   [2010]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: [PATCH v1 2/3] Provides multiple submits and asynchronous notifications.
>> +/* The structure to notify the virtqueue for async socket */
>> +struct vhost_notifier {
>> + struct list_head list;
> >+ struct vhost_virtqueue *vq;
> >+ int head;
> >+ int size;
> >+ int log;
> >+ void *ctrl;
> >+ void (*dtor)(struct vhost_notifier *);
> >+};
> >+

>So IMO, this is not the best interface between vhost
>and your driver, exposing them to each other unnecessarily.
>If you think about it, your driver should not care about this structure.
>It could get e.g. a kiocb (sendmsg already gets one), and call ki_dtor
>on completion. vhost could save it's state in ki_user_data. If your
>driver needs to add more data to do more tracking, I think it can put
>skb pointer in the private pointer.

Then if I remove the struct vhost_notifier, and just use struct kiocb, but don't use the one got from sendmsg or recvmsg, but allocated within the page_info structure, and don't implement any aio logic related to it, is that ok?

Sorry, I made a patch, but don't know how to reply mail with a good formatted patch here....


 \ /
  Last update: 2010-03-15 09:51    [W:0.074 / U:1.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site