Re: [PATCH v1 2/3] Provides multiple submits and asynchronousnotifications.

From: Michael S. Tsirkin
Date: Sun Mar 07 2010 - 06:26:45 EST

> +/* 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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at