search for: out_num

Displaying 20 results from an estimated 402 matches for "out_num".

2013 Dec 10
11
[PATCH net-next 1/3] virtio_net: set multicast filter list to host
...Hemminger <stephen at networkplumber.org> --- a/drivers/net/virtio_net.c 2013-12-09 16:12:03.897891975 -0800 +++ b/drivers/net/virtio_net.c 2013-12-09 16:12:36.353164803 -0800 @@ -893,7 +893,7 @@ static bool virtnet_send_command(struct sg_init_one(&hdr, &ctrl, sizeof(ctrl)); sgs[out_num++] = &hdr; - if (out) + for (; out; out = sg_next(out)) sgs[out_num++] = out; if (in) sgs[out_num + in_num++] = in;
2013 Dec 10
11
[PATCH net-next 1/3] virtio_net: set multicast filter list to host
...Hemminger <stephen at networkplumber.org> --- a/drivers/net/virtio_net.c 2013-12-09 16:12:03.897891975 -0800 +++ b/drivers/net/virtio_net.c 2013-12-09 16:12:36.353164803 -0800 @@ -893,7 +893,7 @@ static bool virtnet_send_command(struct sg_init_one(&hdr, &ctrl, sizeof(ctrl)); sgs[out_num++] = &hdr; - if (out) + for (; out; out = sg_next(out)) sgs[out_num++] = out; if (in) sgs[out_num + in_num++] = in;
2013 Dec 10
0
[PATCH net-next 2/3] virtio_net: remove unused parameter to send_command
...*/ static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd, - struct scatterlist *out, - struct scatterlist *in) + struct scatterlist *out) { struct scatterlist *sgs[4], hdr, stat; struct virtio_net_ctrl_hdr ctrl; virtio_net_ctrl_ack status = ~0; - unsigned out_num = 0, in_num = 0, tmp; + unsigned out_num = 0, tmp; /* Caller should know better */ BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ)); @@ -895,16 +894,13 @@ static bool virtnet_send_command(struct for (; out; out = sg_next(out)) sgs[out_num++] = out; - if (in) - sgs[out_nu...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 6/13] [Mostly resend] virtio additions
...struct net_device *dev; struct napi_struct napi; + /* TX coalescing. */ + struct hrtimer tx_timer; + /* Number of input buffers, and max we've ever had. */ unsigned int num, max; + /* Number of queued output buffers, and max we've ever had. */ + unsigned int out_num, out_max; + /* Receive & send queues. */ struct sk_buff_head recv; struct sk_buff_head send; @@ -223,6 +230,20 @@ static void free_old_xmit_skbs(struct virtnet_info *vi) } } +static enum hrtimer_restart kick_xmit(struct hrtimer *t) +{ + struct virtnet_info *vi = contai...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 6/13] [Mostly resend] virtio additions
...struct net_device *dev; struct napi_struct napi; + /* TX coalescing. */ + struct hrtimer tx_timer; + /* Number of input buffers, and max we've ever had. */ unsigned int num, max; + /* Number of queued output buffers, and max we've ever had. */ + unsigned int out_num, out_max; + /* Receive & send queues. */ struct sk_buff_head recv; struct sk_buff_head send; @@ -223,6 +230,20 @@ static void free_old_xmit_skbs(struct virtnet_info *vi) } } +static enum hrtimer_restart kick_xmit(struct hrtimer *t) +{ + struct virtnet_info *vi = contai...
2020 Jun 03
2
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...scriptor number found, or vq->num (which is > - * never a valid descriptor number) if none was found. A negative code is > - * returned on error. */ > -int vhost_get_vq_desc(struct vhost_virtqueue *vq, > - struct iovec iov[], unsigned int iov_size, > - unsigned int *out_num, unsigned int *in_num, > - struct vhost_log *log, unsigned int *log_num) > + * This function returns a value > 0 if a descriptor was found, or 0 if none were found. > + * A negative code is returned on error. */ > +int vhost_get_avail_buf(struct vhost_virtqueue *vq, struct vho...
2020 Jun 03
2
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...scriptor number found, or vq->num (which is > - * never a valid descriptor number) if none was found. A negative code is > - * returned on error. */ > -int vhost_get_vq_desc(struct vhost_virtqueue *vq, > - struct iovec iov[], unsigned int iov_size, > - unsigned int *out_num, unsigned int *in_num, > - struct vhost_log *log, unsigned int *log_num) > + * This function returns a value > 0 if a descriptor was found, or 0 if none were found. > + * A negative code is returned on error. */ > +int vhost_get_avail_buf(struct vhost_virtqueue *vq, struct vho...
2018 May 16
0
[RFC V4 PATCH 7/8] vhost: packed ring support
...q, + struct vring_desc *desc) { unsigned int next; @@ -1813,11 +1845,17 @@ static unsigned next_desc(struct vhost_virtqueue *vq, struct vring_desc *desc) return next; } -static int get_indirect(struct vhost_virtqueue *vq, - struct iovec iov[], unsigned int iov_size, - unsigned int *out_num, unsigned int *in_num, - struct vhost_log *log, unsigned int *log_num, - struct vring_desc *indirect) +static unsigned next_desc_packed(struct vhost_virtqueue *vq, + struct vring_desc_packed *desc) +{ + return desc->flags & cpu_to_vhost16(vq, VRING_DESC_F_NEXT); +} + +static int get_...
2016 Jul 28
2
[PATCH 6/7] qemu: Implement virtio-pstore device
...On Thu, Jul 28, 2016 at 03:02:54AM +0300, Michael S. Tsirkin wrote: > > On Thu, Jul 28, 2016 at 12:08:30AM +0900, Namhyung Kim wrote: > > > +static ssize_t virtio_pstore_do_write(VirtIOPstore *s, struct iovec *out_sg, > > > + unsigned int out_num, > > > + struct virtio_pstore_req *req) > > > +{ > > > + char path[PATH_MAX]; > > > + int fd; > > > + ssize_t len; > > > + unsigned short type; > > > + int flags = O_WRONLY | O_CREAT;...
2016 Jul 28
2
[PATCH 6/7] qemu: Implement virtio-pstore device
...On Thu, Jul 28, 2016 at 03:02:54AM +0300, Michael S. Tsirkin wrote: > > On Thu, Jul 28, 2016 at 12:08:30AM +0900, Namhyung Kim wrote: > > > +static ssize_t virtio_pstore_do_write(VirtIOPstore *s, struct iovec *out_sg, > > > + unsigned int out_num, > > > + struct virtio_pstore_req *req) > > > +{ > > > + char path[PATH_MAX]; > > > + int fd; > > > + ssize_t len; > > > + unsigned short type; > > > + int flags = O_WRONLY | O_CREAT;...
2020 Apr 07
0
[PATCH v7 18/19] vhost: use batched version by default
...44 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -2038,253 +2038,6 @@ static unsigned next_desc(struct vhost_virtqueue *vq, struct vring_desc *desc) return next; } -static int get_indirect(struct vhost_virtqueue *vq, - struct iovec iov[], unsigned int iov_size, - unsigned int *out_num, unsigned int *in_num, - struct vhost_log *log, unsigned int *log_num, - struct vring_desc *indirect) -{ - struct vring_desc desc; - unsigned int i = 0, count, found = 0; - u32 len = vhost32_to_cpu(vq, indirect->len); - struct iov_iter from; - int ret, access; - - /* Sanity check */ - if (un...
2020 Apr 07
0
[PATCH v8 18/19] vhost: use batched version by default
...44 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -2038,253 +2038,6 @@ static unsigned next_desc(struct vhost_virtqueue *vq, struct vring_desc *desc) return next; } -static int get_indirect(struct vhost_virtqueue *vq, - struct iovec iov[], unsigned int iov_size, - unsigned int *out_num, unsigned int *in_num, - struct vhost_log *log, unsigned int *log_num, - struct vring_desc *indirect) -{ - struct vring_desc desc; - unsigned int i = 0, count, found = 0; - u32 len = vhost32_to_cpu(vq, indirect->len); - struct iov_iter from; - int ret, access; - - /* Sanity check */ - if (un...
2020 Jun 02
0
[PATCH RFC 02/13] vhost: use batched version by default
...44 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -2038,253 +2038,6 @@ static unsigned next_desc(struct vhost_virtqueue *vq, struct vring_desc *desc) return next; } -static int get_indirect(struct vhost_virtqueue *vq, - struct iovec iov[], unsigned int iov_size, - unsigned int *out_num, unsigned int *in_num, - struct vhost_log *log, unsigned int *log_num, - struct vring_desc *indirect) -{ - struct vring_desc desc; - unsigned int i = 0, count, found = 0; - u32 len = vhost32_to_cpu(vq, indirect->len); - struct iov_iter from; - int ret, access; - - /* Sanity check */ - if (un...
2016 Jul 30
2
[Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device
...54AM +0300, Michael S. Tsirkin wrote: > > > > On Thu, Jul 28, 2016 at 12:08:30AM +0900, Namhyung Kim wrote: > > > > > +static ssize_t virtio_pstore_do_write(VirtIOPstore *s, struct iovec *out_sg, > > > > > + unsigned int out_num, > > > > > + struct virtio_pstore_req *req) > > > > > +{ > > > > > + char path[PATH_MAX]; > > > > > + int fd; > > > > > + ssize_t len; > > > > > + unsigned shor...
2016 Jul 30
2
[Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device
...54AM +0300, Michael S. Tsirkin wrote: > > > > On Thu, Jul 28, 2016 at 12:08:30AM +0900, Namhyung Kim wrote: > > > > > +static ssize_t virtio_pstore_do_write(VirtIOPstore *s, struct iovec *out_sg, > > > > > + unsigned int out_num, > > > > > + struct virtio_pstore_req *req) > > > > > +{ > > > > > + char path[PATH_MAX]; > > > > > + int fd; > > > > > + ssize_t len; > > > > > + unsigned shor...
2020 Jun 10
2
[PATCH RFC v6 02/11] vhost: use batched get_vq_desc version
...; s.index = idx; > @@ -2078,253 +2088,6 @@ static unsigned next_desc(struct vhost_virtqueue *vq, struct vring_desc *desc) > return next; > } > > -static int get_indirect(struct vhost_virtqueue *vq, > - struct iovec iov[], unsigned int iov_size, > - unsigned int *out_num, unsigned int *in_num, > - struct vhost_log *log, unsigned int *log_num, > - struct vring_desc *indirect) > -{ > - struct vring_desc desc; > - unsigned int i = 0, count, found = 0; > - u32 len = vhost32_to_cpu(vq, indirect->len); > - struct iov_iter from; > - int ret,...
2020 Jun 10
2
[PATCH RFC v6 02/11] vhost: use batched get_vq_desc version
...; s.index = idx; > @@ -2078,253 +2088,6 @@ static unsigned next_desc(struct vhost_virtqueue *vq, struct vring_desc *desc) > return next; > } > > -static int get_indirect(struct vhost_virtqueue *vq, > - struct iovec iov[], unsigned int iov_size, > - unsigned int *out_num, unsigned int *in_num, > - struct vhost_log *log, unsigned int *log_num, > - struct vring_desc *indirect) > -{ > - struct vring_desc desc; > - unsigned int i = 0, count, found = 0; > - u32 len = vhost32_to_cpu(vq, indirect->len); > - struct iov_iter from; > - int ret,...
2015 Oct 28
2
[PATCH v2 1/3] virtio_net: Stop doing DMA from the stack
..._command(struct virtnet_info *vi, u8 class, u8 cmd, struct scatterlist *out) { struct scatterlist *sgs[4], hdr, stat; - struct virtio_net_ctrl_hdr ctrl; - virtio_net_ctrl_ack status = ~0; + + struct { + struct virtio_net_ctrl_hdr ctrl; + virtio_net_ctrl_ack status; + } *buf; + unsigned out_num = 0, tmp; + bool ret; /* Caller should know better */ BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ)); - ctrl.class = class; - ctrl.cmd = cmd; + buf = kmalloc(sizeof(*buf), GFP_ATOMIC); + if (!buf) + return false; + buf->status = ~0; + + buf->ctrl.class = class; + buf-...
2015 Oct 28
2
[PATCH v2 1/3] virtio_net: Stop doing DMA from the stack
..._command(struct virtnet_info *vi, u8 class, u8 cmd, struct scatterlist *out) { struct scatterlist *sgs[4], hdr, stat; - struct virtio_net_ctrl_hdr ctrl; - virtio_net_ctrl_ack status = ~0; + + struct { + struct virtio_net_ctrl_hdr ctrl; + virtio_net_ctrl_ack status; + } *buf; + unsigned out_num = 0, tmp; + bool ret; /* Caller should know better */ BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ)); - ctrl.class = class; - ctrl.cmd = cmd; + buf = kmalloc(sizeof(*buf), GFP_ATOMIC); + if (!buf) + return false; + buf->status = ~0; + + buf->ctrl.class = class; + buf-...
2018 Feb 27
1
[PATCH RFC 2/2] vhost: packed ring support
...pu_to_vhost16(vq, DESC_USED); > + } > + > + desc->flags = flags; The `desc->flags` is restored after the change. > +} > + > +static int vhost_get_vq_desc_packed(struct vhost_virtqueue *vq, > + struct iovec iov[], unsigned int iov_size, > + unsigned int *out_num, unsigned int *in_num, > + struct vhost_log *log, > + unsigned int *log_num) > +{ > + struct vring_desc_packed desc; > + int ret, access, i; > + u16 avail_idx = vq->last_avail_idx; > + > + /* When we start there are none of either input nor output. */ > +...