search for: tmp_bytes

Displaying 5 results from an estimated 5 matches for "tmp_bytes".

Did you mean: op_bytes
2018 Nov 05
2
[PATCH 3/5] VSOCK: support receive mergeable rx buffer in guest
...vsk, */ spin_unlock_bh(&vvs->rx_lock); - err = memcpy_to_msg(msg, pkt->buf + pkt->off, bytes); - if (err) - goto out; + if (pkt->mergeable) { + struct virtio_vsock_mrg_rxbuf *buf = pkt->mrg_rxbuf; + size_t mrg_copy_bytes, last_buf_total = 0, rxbuf_off; + size_t tmp_bytes = bytes; + int i; + + for (i = 0; i < le16_to_cpu(pkt->mrg_rxbuf_hdr.num_buffers); i++) { + if (pkt->off > last_buf_total + buf[i].len) { + last_buf_total += buf[i].len; + continue; + } + + rxbuf_off = pkt->off - last_buf_total; + mrg_copy_bytes = min(buf[i].l...
2018 Nov 05
2
[PATCH 3/5] VSOCK: support receive mergeable rx buffer in guest
...vsk, */ spin_unlock_bh(&vvs->rx_lock); - err = memcpy_to_msg(msg, pkt->buf + pkt->off, bytes); - if (err) - goto out; + if (pkt->mergeable) { + struct virtio_vsock_mrg_rxbuf *buf = pkt->mrg_rxbuf; + size_t mrg_copy_bytes, last_buf_total = 0, rxbuf_off; + size_t tmp_bytes = bytes; + int i; + + for (i = 0; i < le16_to_cpu(pkt->mrg_rxbuf_hdr.num_buffers); i++) { + if (pkt->off > last_buf_total + buf[i].len) { + last_buf_total += buf[i].len; + continue; + } + + rxbuf_off = pkt->off - last_buf_total; + mrg_copy_bytes = min(buf[i].l...
2018 Nov 06
0
[PATCH 3/5] VSOCK: support receive mergeable rx buffer in guest
...>rx_lock); > > - err = memcpy_to_msg(msg, pkt->buf + pkt->off, bytes); > - if (err) > - goto out; > + if (pkt->mergeable) { > + struct virtio_vsock_mrg_rxbuf *buf = pkt->mrg_rxbuf; > + size_t mrg_copy_bytes, last_buf_total = 0, rxbuf_off; > + size_t tmp_bytes = bytes; > + int i; > + > + for (i = 0; i < le16_to_cpu(pkt->mrg_rxbuf_hdr.num_buffers); i++) { > + if (pkt->off > last_buf_total + buf[i].len) { > + last_buf_total += buf[i].len; > + continue; > + } > + > + rxbuf_off = pkt->off - last_...
2018 Nov 06
2
[PATCH 3/5] VSOCK: support receive mergeable rx buffer in guest
...t;off, bytes); >> - if (err) >> - goto out; >> + if (pkt->mergeable) { >> + struct virtio_vsock_mrg_rxbuf *buf = pkt->mrg_rxbuf; >> + size_t mrg_copy_bytes, last_buf_total = 0, rxbuf_off; >> + size_t tmp_bytes = bytes; >> + int i; >> + >> + for (i = 0; i < le16_to_cpu(pkt->mrg_rxbuf_hdr.num_buffers); i++) { >> + if (pkt->off > last_buf_total + buf[i].len) { >> + last_buf_total += buf[i].len; >> +...
2018 Nov 06
2
[PATCH 3/5] VSOCK: support receive mergeable rx buffer in guest
...t;off, bytes); >> - if (err) >> - goto out; >> + if (pkt->mergeable) { >> + struct virtio_vsock_mrg_rxbuf *buf = pkt->mrg_rxbuf; >> + size_t mrg_copy_bytes, last_buf_total = 0, rxbuf_off; >> + size_t tmp_bytes = bytes; >> + int i; >> + >> + for (i = 0; i < le16_to_cpu(pkt->mrg_rxbuf_hdr.num_buffers); i++) { >> + if (pkt->off > last_buf_total + buf[i].len) { >> + last_buf_total += buf[i].len; >> +...