You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
vhost: move vhost-net zerocopy fields to net.c
On top of 'vhost: Allow device specific fields per vq', we can move device specific fields to device virt queue from vhost virt queue. Signed-off-by: Asias He <asias@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
f2f0173d6a
commit
2839400f8f
@@ -54,18 +54,6 @@ struct vhost_log {
|
||||
|
||||
struct vhost_virtqueue;
|
||||
|
||||
struct vhost_ubuf_ref {
|
||||
struct kref kref;
|
||||
wait_queue_head_t wait;
|
||||
struct vhost_virtqueue *vq;
|
||||
};
|
||||
|
||||
struct vhost_ubuf_ref *vhost_ubuf_alloc(struct vhost_virtqueue *, bool zcopy);
|
||||
void vhost_ubuf_put(struct vhost_ubuf_ref *);
|
||||
void vhost_ubuf_put_and_wait(struct vhost_ubuf_ref *);
|
||||
|
||||
struct ubuf_info;
|
||||
|
||||
/* The virtqueue structure describes a queue attached to a device. */
|
||||
struct vhost_virtqueue {
|
||||
struct vhost_dev *dev;
|
||||
@@ -130,16 +118,6 @@ struct vhost_virtqueue {
|
||||
/* Log write descriptors */
|
||||
void __user *log_base;
|
||||
struct vhost_log *log;
|
||||
/* vhost zerocopy support fields below: */
|
||||
/* last used idx for outstanding DMA zerocopy buffers */
|
||||
int upend_idx;
|
||||
/* first used idx for DMA done zerocopy buffers */
|
||||
int done_idx;
|
||||
/* an array of userspace buffers info */
|
||||
struct ubuf_info *ubuf_info;
|
||||
/* Reference counting for outstanding ubufs.
|
||||
* Protected by vq mutex. Writers must also take device mutex. */
|
||||
struct vhost_ubuf_ref *ubufs;
|
||||
};
|
||||
|
||||
struct vhost_dev {
|
||||
|
||||
Reference in New Issue
Block a user