search for: tmp_len

Displaying 13 results from an estimated 13 matches for "tmp_len".

2018 Dec 12
4
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...break; } - nbytes = copy_to_iter(pkt->buf, pkt->len, &iov_iter); - if (nbytes != pkt->len) { - virtio_transport_free_pkt(pkt); - vq_err(vq, "Faulted on copying pkt buf\n"); - break; + remain_len = pkt->len; + for (i = 0; i < pkt->nr_vecs; i++) { + int tmp_len; + + tmp_len = min(remain_len, pkt->vec[i].iov_len); + nbytes = copy_to_iter(pkt->vec[i].iov_base, tmp_len, &iov_iter); + if (nbytes != tmp_len) { + virtio_transport_free_pkt(pkt); + vq_err(vq, "Faulted on copying pkt buf\n"); + break; + } + + remain_len -= tm...
2018 Dec 12
4
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...break; } - nbytes = copy_to_iter(pkt->buf, pkt->len, &iov_iter); - if (nbytes != pkt->len) { - virtio_transport_free_pkt(pkt); - vq_err(vq, "Faulted on copying pkt buf\n"); - break; + remain_len = pkt->len; + for (i = 0; i < pkt->nr_vecs; i++) { + int tmp_len; + + tmp_len = min(remain_len, pkt->vec[i].iov_len); + nbytes = copy_to_iter(pkt->vec[i].iov_base, tmp_len, &iov_iter); + if (nbytes != tmp_len) { + virtio_transport_free_pkt(pkt); + vq_err(vq, "Faulted on copying pkt buf\n"); + break; + } + + remain_len -= tm...
2018 Dec 13
2
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...&iov_iter); >> - if (nbytes != pkt->len) { >> - virtio_transport_free_pkt(pkt); >> - vq_err(vq, "Faulted on copying pkt buf\n"); >> - break; >> + remain_len = pkt->len; >> + for (i = 0; i < pkt->nr_vecs; i++) { >> + int tmp_len; >> + >> + tmp_len = min(remain_len, pkt->vec[i].iov_len); >> + nbytes = copy_to_iter(pkt->vec[i].iov_base, tmp_len, &iov_iter); >> + if (nbytes != tmp_len) { >> + virtio_transport_free_pkt(pkt); >> + vq_err(vq, "Faulted on copying pkt...
2018 Dec 13
2
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...&iov_iter); >> - if (nbytes != pkt->len) { >> - virtio_transport_free_pkt(pkt); >> - vq_err(vq, "Faulted on copying pkt buf\n"); >> - break; >> + remain_len = pkt->len; >> + for (i = 0; i < pkt->nr_vecs; i++) { >> + int tmp_len; >> + >> + tmp_len = min(remain_len, pkt->vec[i].iov_len); >> + nbytes = copy_to_iter(pkt->vec[i].iov_base, tmp_len, &iov_iter); >> + if (nbytes != tmp_len) { >> + virtio_transport_free_pkt(pkt); >> + vq_err(vq, "Faulted on copying pkt...
2006 Aug 11
0
[PATCH] [4/5] SMBIOS -- generate SMBIOS tables
...n string */ + char xen_version_str[80]; + /* temporary variables used to build up Xen version string */ + char *p = NULL; /* points to next point of insertion */ + unsigned len = 0; /* length of string already composed */ + char *tmp = NULL; /* holds result of itoa() */ + unsigned tmp_len; /* length of next string to add */ + + hypercall_xen_version(XENVER_guest_handle, uuid); + + /* xen_version major and minor */ + xen_version = hypercall_xen_version(XENVER_version, NULL); + xen_major_version = (uint16_t) (xen_version >> 16); + xen_minor_version = (uint16_t) xe...
2018 Dec 12
0
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...er(pkt->buf, pkt->len, &iov_iter); > - if (nbytes != pkt->len) { > - virtio_transport_free_pkt(pkt); > - vq_err(vq, "Faulted on copying pkt buf\n"); > - break; > + remain_len = pkt->len; > + for (i = 0; i < pkt->nr_vecs; i++) { > + int tmp_len; > + > + tmp_len = min(remain_len, pkt->vec[i].iov_len); > + nbytes = copy_to_iter(pkt->vec[i].iov_base, tmp_len, &iov_iter); > + if (nbytes != tmp_len) { > + virtio_transport_free_pkt(pkt); > + vq_err(vq, "Faulted on copying pkt buf\n"); > +...
2018 Dec 13
0
[PATCH v2 3/5] VSOCK: support receive mergeable rx buffer in guest
...f (nbytes != pkt->len) { > >> - virtio_transport_free_pkt(pkt); > >> - vq_err(vq, "Faulted on copying pkt buf\n"); > >> - break; > >> + remain_len = pkt->len; > >> + for (i = 0; i < pkt->nr_vecs; i++) { > >> + int tmp_len; > >> + > >> + tmp_len = min(remain_len, pkt->vec[i].iov_len); > >> + nbytes = copy_to_iter(pkt->vec[i].iov_base, tmp_len, &iov_iter); > >> + if (nbytes != tmp_len) { > >> + virtio_transport_free_pkt(pkt); > >> + vq_err(vq,...
2007 Feb 24
2
SHA256 password patch
Hi, I made a patch against branch-1.0 for SHA256 password hashing support for Dovecot. Courier Authlib supports this hashing scheme and in order to migrate from Courier to Dovecot, I've added SHA256 support to Dovecot. The attached patch is based on BSD licensed code from Olivier Gay (http://www.ouah.org/ogay/sha2/). Changes made by me in Olivier's sha2{.h,.c} code: - Prototype for
2018 Dec 12
2
[PATCH v2 5/5] VSOCK: batch sending rx buffer to increase bandwidth
...len, &in, + likely(vsock->mergeable) ? UIO_MAXIOV : 1); if (headcount <= 0) { spin_lock_bh(&vsock->send_pkt_list_lock); list_add(&pkt->list, &vsock->send_pkt_list); @@ -238,8 +241,12 @@ static int get_rx_bufs(struct vhost_virtqueue *vq, remain_len -= tmp_len; } - vhost_add_used_n(vq, vq->heads, headcount); - added = true; + batch_count += headcount; + if (batch_count > VHOST_VSOCK_BATCH) { + vhost_add_used_and_signal_n(&vsock->dev, vq, + vq->heads, batch_count); + batch_count = 0; + } if (pkt->reply) { int va...
2018 Dec 12
2
[PATCH v2 5/5] VSOCK: batch sending rx buffer to increase bandwidth
...len, &in, + likely(vsock->mergeable) ? UIO_MAXIOV : 1); if (headcount <= 0) { spin_lock_bh(&vsock->send_pkt_list_lock); list_add(&pkt->list, &vsock->send_pkt_list); @@ -238,8 +241,12 @@ static int get_rx_bufs(struct vhost_virtqueue *vq, remain_len -= tmp_len; } - vhost_add_used_n(vq, vq->heads, headcount); - added = true; + batch_count += headcount; + if (batch_count > VHOST_VSOCK_BATCH) { + vhost_add_used_and_signal_n(&vsock->dev, vq, + vq->heads, batch_count); + batch_count = 0; + } if (pkt->reply) { int va...
2009 Nov 05
0
[PATCH] Add VirtIO Frame Buffer Support
...+ struct scatterlist *sglist; > + struct page *pg; > + int nr_pages = (length+PAGE_SIZE-1)/PAGE_SIZE; Spaces are needed around +, - > + int sg_entries; > + int i; > + > + /* unaligned */ > + if ((ulong)virt & ~PAGE_MASK) { Use offset_in_page here and below? > + int tmp_len = length - (PAGE_SIZE - ((ulong)virt & ~PAGE_MASK)); > + /* how long would it be without the first non-aligned chunk? */ > + nr_pages = (tmp_len+PAGE_SIZE-1)/PAGE_SIZE; Spaces are needed around +, - Also, is this just PAGE_ALIGN? > + /* add the first chunk */ > + nr_pages++; &...
2009 Nov 05
0
[PATCH] Add VirtIO Frame Buffer Support
...+ struct scatterlist *sglist; > + struct page *pg; > + int nr_pages = (length+PAGE_SIZE-1)/PAGE_SIZE; Spaces are needed around +, - > + int sg_entries; > + int i; > + > + /* unaligned */ > + if ((ulong)virt & ~PAGE_MASK) { Use offset_in_page here and below? > + int tmp_len = length - (PAGE_SIZE - ((ulong)virt & ~PAGE_MASK)); > + /* how long would it be without the first non-aligned chunk? */ > + nr_pages = (tmp_len+PAGE_SIZE-1)/PAGE_SIZE; Spaces are needed around +, - Also, is this just PAGE_ALIGN? > + /* add the first chunk */ > + nr_pages++; &...
2020 Sep 25
20
[RFC PATCH 00/19] vhost-user-rpmb (Replay Protected Memory Block)
Hi, This is an initial implementation of a vhost-user backend for the VirtIO RPMB device. The device is currently in the draft of the next VirtIO specification and describes block device which uses combination of a key, nonce, hashing and a persistent write counter to prevent replay attacks (hence Replay Protected Memory Block). It is implemented as a vhost-user device because we want to