search for: sg_set_buf

Displaying 20 results from an estimated 294 matches for "sg_set_buf".

2016 May 24
2
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...vb->start_pfn, BITS_PER_LONG); > > > > + end_pfn = roundup(vb->end_pfn, BITS_PER_LONG); > > > > + bmap_len = (end_pfn - start_pfn) / BITS_PER_LONG * > > > sizeof(long); > > > > + > > > > + sg_init_table(sg, 5); > > > > + sg_set_buf(&sg[0], &flags, sizeof(flags)); > > > > + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); > > > > + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); > > > > + sg_set_buf(&sg[3], &bmap_len, sizeof(bmap_len)); > > &gt...
2016 May 24
2
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...vb->start_pfn, BITS_PER_LONG); > > > > + end_pfn = roundup(vb->end_pfn, BITS_PER_LONG); > > > > + bmap_len = (end_pfn - start_pfn) / BITS_PER_LONG * > > > sizeof(long); > > > > + > > > > + sg_init_table(sg, 5); > > > > + sg_set_buf(&sg[0], &flags, sizeof(flags)); > > > > + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); > > > > + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); > > > > + sg_set_buf(&sg[3], &bmap_len, sizeof(bmap_len)); > > &gt...
2016 May 24
3
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...rlist sg[5]; > > + > > + start_pfn = rounddown(vb->start_pfn, BITS_PER_LONG); > > + end_pfn = roundup(vb->end_pfn, BITS_PER_LONG); > > + bmap_len = (end_pfn - start_pfn) / BITS_PER_LONG * > sizeof(long); > > + > > + sg_init_table(sg, 5); > > + sg_set_buf(&sg[0], &flags, sizeof(flags)); > > + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); > > + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); > > + sg_set_buf(&sg[3], &bmap_len, sizeof(bmap_len)); > > + sg_set_buf(&sg[4], vb->...
2016 May 24
3
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...rlist sg[5]; > > + > > + start_pfn = rounddown(vb->start_pfn, BITS_PER_LONG); > > + end_pfn = roundup(vb->end_pfn, BITS_PER_LONG); > > + bmap_len = (end_pfn - start_pfn) / BITS_PER_LONG * > sizeof(long); > > + > > + sg_init_table(sg, 5); > > + sg_set_buf(&sg[0], &flags, sizeof(flags)); > > + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); > > + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); > > + sg_set_buf(&sg[3], &bmap_len, sizeof(bmap_len)); > > + sg_set_buf(&sg[4], vb->...
2014 Sep 05
2
[PATCH 1/3] virtio_net: pass well-formed sgs to virtqueue_add_*()
Il 03/09/2014 06:29, Rusty Russell ha scritto: > + sg_init_table(rq->sg, MAX_SKB_FRAGS + 2); I think 2 is enough here. That said... > sg_set_buf(rq->sg, &hdr->hdr, sizeof hdr->hdr); > - > skb_to_sgvec(skb, rq->sg + 1, 0, skb->len); > > err = virtqueue_add_inbuf(rq->vq, rq->sg, 2, skb, gfp); ... skb_to_sgvec will already make the sg well formed, so the sg_init_table is _almost_ redundant; it is onl...
2014 Sep 05
2
[PATCH 1/3] virtio_net: pass well-formed sgs to virtqueue_add_*()
Il 03/09/2014 06:29, Rusty Russell ha scritto: > + sg_init_table(rq->sg, MAX_SKB_FRAGS + 2); I think 2 is enough here. That said... > sg_set_buf(rq->sg, &hdr->hdr, sizeof hdr->hdr); > - > skb_to_sgvec(skb, rq->sg + 1, 0, skb->len); > > err = virtqueue_add_inbuf(rq->vq, rq->sg, 2, skb, gfp); ... skb_to_sgvec will already make the sg well formed, so the sg_init_table is _almost_ redundant; it is onl...
2016 May 24
0
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...G); > > > > > + end_pfn = roundup(vb->end_pfn, BITS_PER_LONG); > > > > > + bmap_len = (end_pfn - start_pfn) / BITS_PER_LONG * > > > > sizeof(long); > > > > > + > > > > > + sg_init_table(sg, 5); > > > > > + sg_set_buf(&sg[0], &flags, sizeof(flags)); > > > > > + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); > > > > > + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); > > > > > + sg_set_buf(&sg[3], &bmap_len, sizeof(bmap_len))...
2016 May 20
6
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...+ unsigned long start_pfn, end_pfn, flags = 0, bmap_len; + struct scatterlist sg[5]; + + start_pfn = rounddown(vb->start_pfn, BITS_PER_LONG); + end_pfn = roundup(vb->end_pfn, BITS_PER_LONG); + bmap_len = (end_pfn - start_pfn) / BITS_PER_LONG * sizeof(long); + + sg_init_table(sg, 5); + sg_set_buf(&sg[0], &flags, sizeof(flags)); + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); + sg_set_buf(&sg[3], &bmap_len, sizeof(bmap_len)); + sg_set_buf(&sg[4], vb->page_bitmap + + (start_pfn / BITS_PE...
2016 May 20
6
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...+ unsigned long start_pfn, end_pfn, flags = 0, bmap_len; + struct scatterlist sg[5]; + + start_pfn = rounddown(vb->start_pfn, BITS_PER_LONG); + end_pfn = roundup(vb->end_pfn, BITS_PER_LONG); + bmap_len = (end_pfn - start_pfn) / BITS_PER_LONG * sizeof(long); + + sg_init_table(sg, 5); + sg_set_buf(&sg[0], &flags, sizeof(flags)); + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); + sg_set_buf(&sg[3], &bmap_len, sizeof(bmap_len)); + sg_set_buf(&sg[4], vb->page_bitmap + + (start_pfn / BITS_PE...
2014 Sep 07
0
[PATCH 1/3] virtio_net: pass well-formed sgs to virtqueue_add_*()
On Fri, Sep 05, 2014 at 12:40:50PM +0200, Paolo Bonzini wrote: > Il 03/09/2014 06:29, Rusty Russell ha scritto: > > + sg_init_table(rq->sg, MAX_SKB_FRAGS + 2); > > I think 2 is enough here. That said... > > > sg_set_buf(rq->sg, &hdr->hdr, sizeof hdr->hdr); > > - > > skb_to_sgvec(skb, rq->sg + 1, 0, skb->len); > > > > err = virtqueue_add_inbuf(rq->vq, rq->sg, 2, skb, gfp); > > ... skb_to_sgvec will already make the sg well formed, so the > sg_init_tab...
2013 Jan 02
0
[PATCH] virtio: use chained scatterlists
...r->sg, out, in, vbr, + if (unlikely(virtqueue_add_buf(vblk->vq, out, in, vbr, GFP_ATOMIC) < 0)) { spin_unlock_irq(vblk->disk->queue->queue_lock); virtblk_add_buf_wait(vblk, vbr, out, in); @@ -154,7 +155,11 @@ static int virtblk_bio_send_flush(struct virtblk_req *vbr) sg_set_buf(&vbr->sg[out++], &vbr->out_hdr, sizeof(vbr->out_hdr)); sg_set_buf(&vbr->sg[out + in++], &vbr->status, sizeof(vbr->status)); - virtblk_add_req(vbr, out, in); + sg_unset_end_markers(vbr->sg, out + in); + sg_mark_end(&vbr->sg[out - 1]); + sg_mark_end(&am...
2013 Jan 02
0
[PATCH] virtio: use chained scatterlists
...r->sg, out, in, vbr, + if (unlikely(virtqueue_add_buf(vblk->vq, out, in, vbr, GFP_ATOMIC) < 0)) { spin_unlock_irq(vblk->disk->queue->queue_lock); virtblk_add_buf_wait(vblk, vbr, out, in); @@ -154,7 +155,11 @@ static int virtblk_bio_send_flush(struct virtblk_req *vbr) sg_set_buf(&vbr->sg[out++], &vbr->out_hdr, sizeof(vbr->out_hdr)); sg_set_buf(&vbr->sg[out + in++], &vbr->status, sizeof(vbr->status)); - virtblk_add_req(vbr, out, in); + sg_unset_end_markers(vbr->sg, out + in); + sg_mark_end(&vbr->sg[out - 1]); + sg_mark_end(&am...
2016 May 20
0
[PATCH RFC kernel] balloon: speed up inflating/deflating process
On 20/05/2016 11:59, Liang Li wrote: > + > + sg_init_table(sg, 5); > + sg_set_buf(&sg[0], &flags, sizeof(flags)); > + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); > + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); > + sg_set_buf(&sg[3], &bmap_len, sizeof(bmap_len)); These four should probably be placed in a single struct a...
2016 May 24
0
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...> + start_pfn = rounddown(vb->start_pfn, BITS_PER_LONG); > > > + end_pfn = roundup(vb->end_pfn, BITS_PER_LONG); > > > + bmap_len = (end_pfn - start_pfn) / BITS_PER_LONG * > > sizeof(long); > > > + > > > + sg_init_table(sg, 5); > > > + sg_set_buf(&sg[0], &flags, sizeof(flags)); > > > + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); > > > + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); > > > + sg_set_buf(&sg[3], &bmap_len, sizeof(bmap_len)); > > > + sg_set_buf...
2016 May 25
1
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...vb->start_pfn, BITS_PER_LONG); > > > > + end_pfn = roundup(vb->end_pfn, BITS_PER_LONG); > > > > + bmap_len = (end_pfn - start_pfn) / BITS_PER_LONG * > > > sizeof(long); > > > > + > > > > + sg_init_table(sg, 5); > > > > + sg_set_buf(&sg[0], &flags, sizeof(flags)); > > > > + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); > > > > + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); > > > > + sg_set_buf(&sg[3], &bmap_len, sizeof(bmap_len)); > > &gt...
2016 May 25
1
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...vb->start_pfn, BITS_PER_LONG); > > > > + end_pfn = roundup(vb->end_pfn, BITS_PER_LONG); > > > > + bmap_len = (end_pfn - start_pfn) / BITS_PER_LONG * > > > sizeof(long); > > > > + > > > > + sg_init_table(sg, 5); > > > > + sg_set_buf(&sg[0], &flags, sizeof(flags)); > > > > + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); > > > > + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); > > > > + sg_set_buf(&sg[3], &bmap_len, sizeof(bmap_len)); > > &gt...
2016 May 20
0
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...ags = 0, bmap_len; > + struct scatterlist sg[5]; > + > + start_pfn = rounddown(vb->start_pfn, BITS_PER_LONG); > + end_pfn = roundup(vb->end_pfn, BITS_PER_LONG); > + bmap_len = (end_pfn - start_pfn) / BITS_PER_LONG * sizeof(long); > + > + sg_init_table(sg, 5); > + sg_set_buf(&sg[0], &flags, sizeof(flags)); > + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); > + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); > + sg_set_buf(&sg[3], &bmap_len, sizeof(bmap_len)); > + sg_set_buf(&sg[4], vb->page_bitmap + > +...
2016 May 24
4
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...rlist sg[5]; > > + > > + start_pfn = rounddown(vb->start_pfn, BITS_PER_LONG); > > + end_pfn = roundup(vb->end_pfn, BITS_PER_LONG); > > + bmap_len = (end_pfn - start_pfn) / BITS_PER_LONG * > sizeof(long); > > + > > + sg_init_table(sg, 5); > > + sg_set_buf(&sg[0], &flags, sizeof(flags)); > > + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); > > + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); > > + sg_set_buf(&sg[3], &bmap_len, sizeof(bmap_len)); > > + sg_set_buf(&sg[4], vb->...
2016 May 24
4
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...rlist sg[5]; > > + > > + start_pfn = rounddown(vb->start_pfn, BITS_PER_LONG); > > + end_pfn = roundup(vb->end_pfn, BITS_PER_LONG); > > + bmap_len = (end_pfn - start_pfn) / BITS_PER_LONG * > sizeof(long); > > + > > + sg_init_table(sg, 5); > > + sg_set_buf(&sg[0], &flags, sizeof(flags)); > > + sg_set_buf(&sg[1], &start_pfn, sizeof(start_pfn)); > > + sg_set_buf(&sg[2], &page_shift, sizeof(page_shift)); > > + sg_set_buf(&sg[3], &bmap_len, sizeof(bmap_len)); > > + sg_set_buf(&sg[4], vb->...
2013 Jan 10
8
[RFC PATCH 0/2] make mac programming for virtio net more robust
From: Amos Kong <akong at redhat.com> Currenly mac is programmed byte by byte. This means that we have an intermediate step where mac is wrong. Second patch introduced a new vq control command to set mac address in one time. Amos Kong (2): move virtnet_send_command() above virtnet_set_mac_address() virtio-net: introduce a new control to set macaddr drivers/net/virtio_net.c |