search for: skb_frag_t

Displaying 20 results from an estimated 45 matches for "skb_frag_t".

2011 Oct 05
0
[PATCH 3/8] xen: netfront: convert to SKB paged frag API.
...t_foreign_access_ref(ref, np->xbdev->otherend_id, mfn, GNTMAP_readonly); @@ -762,23 +762,22 @@ static RING_IDX xennet_fill_frags(struct netfront_info *np, struct skb_shared_info *shinfo = skb_shinfo(skb); int nr_frags = shinfo->nr_frags; RING_IDX cons = np->rx.rsp_cons; - skb_frag_t *frag = shinfo->frags + nr_frags; struct sk_buff *nskb; while ((nskb = __skb_dequeue(list))) { struct xen_netif_rx_response *rx = RING_GET_RESPONSE(&np->rx, ++cons); + skb_frag_t *nfrag = &skb_shinfo(nskb)->frags[0]; - frag->page = skb_shinfo(nskb)->frags[0]....
2013 Oct 31
6
[PATCH net-next 1/2] net: introduce skb_coalesce_rx_frag()
...100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -476,6 +476,19 @@ void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off, } EXPORT_SYMBOL(skb_add_rx_frag); +void skb_coalesce_rx_frag(struct sk_buff *skb, int i, int off, int size, + unsigned int truesize) +{ + skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; + + skb_frag_size_add(frag, size); + skb->len += size; + skb->data_len += size; + skb->truesize += truesize; + skb_frag_unref(skb, i); +} +EXPORT_SYMBOL(skb_coalesce_rx_frag); + static void skb_drop_list(struct sk_buff **listp) { kfree_skb_lis...
2013 Oct 31
6
[PATCH net-next 1/2] net: introduce skb_coalesce_rx_frag()
...100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -476,6 +476,19 @@ void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off, } EXPORT_SYMBOL(skb_add_rx_frag); +void skb_coalesce_rx_frag(struct sk_buff *skb, int i, int off, int size, + unsigned int truesize) +{ + skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; + + skb_frag_size_add(frag, size); + skb->len += size; + skb->data_len += size; + skb->truesize += truesize; + skb_frag_unref(skb, i); +} +EXPORT_SYMBOL(skb_coalesce_rx_frag); + static void skb_drop_list(struct sk_buff **listp) { kfree_skb_lis...
2013 Oct 31
4
[PATCH net-next V2 1/2] net: introduce skb_coalesce_rx_frag()
.....87670e1 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -476,6 +476,19 @@ void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off, } EXPORT_SYMBOL(skb_add_rx_frag); +void skb_coalesce_rx_frag(struct sk_buff *skb, int i, int size, + unsigned int truesize) +{ + skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; + + skb_frag_size_add(frag, size); + skb->len += size; + skb->data_len += size; + skb->truesize += truesize; + skb_frag_unref(skb, i); +} +EXPORT_SYMBOL(skb_coalesce_rx_frag); + static void skb_drop_list(struct sk_buff **listp) { kfree_skb_lis...
2013 Oct 31
4
[PATCH net-next V2 1/2] net: introduce skb_coalesce_rx_frag()
.....87670e1 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -476,6 +476,19 @@ void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off, } EXPORT_SYMBOL(skb_add_rx_frag); +void skb_coalesce_rx_frag(struct sk_buff *skb, int i, int size, + unsigned int truesize) +{ + skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; + + skb_frag_size_add(frag, size); + skb->len += size; + skb->data_len += size; + skb->truesize += truesize; + skb_frag_unref(skb, i); +} +EXPORT_SYMBOL(skb_coalesce_rx_frag); + static void skb_drop_list(struct sk_buff **listp) { kfree_skb_lis...
2013 Oct 31
0
[PATCH net-next 1/2] net: introduce skb_coalesce_rx_frag()
...i, struct page *page, int off, >> > } >> > EXPORT_SYMBOL(skb_add_rx_frag); >> > >> > +void skb_coalesce_rx_frag(struct sk_buff *skb, int i, int off, int size, >> > + unsigned int truesize) >> > +{ >> > + skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; >> > + >> > + skb_frag_size_add(frag, size); >> > + skb->len += size; >> > + skb->data_len += size; >> > + skb->truesize += truesize; >> > + skb_frag_unref(skb, i)...
2013 Oct 31
0
[PATCH net-next 1/2] net: introduce skb_coalesce_rx_frag()
...-476,6 +476,19 @@ void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off, > } > EXPORT_SYMBOL(skb_add_rx_frag); > > +void skb_coalesce_rx_frag(struct sk_buff *skb, int i, int off, int size, > + unsigned int truesize) > +{ > + skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; > + > + skb_frag_size_add(frag, size); > + skb->len += size; > + skb->data_len += size; > + skb->truesize += truesize; > + skb_frag_unref(skb, i); > +} I didn't see you use "off" i...
2013 Oct 31
0
[PATCH net-next 1/2] net: introduce skb_coalesce_rx_frag()
...-476,6 +476,19 @@ void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off, > } > EXPORT_SYMBOL(skb_add_rx_frag); > > +void skb_coalesce_rx_frag(struct sk_buff *skb, int i, int off, int size, > + unsigned int truesize) > +{ > + skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; > + > + skb_frag_size_add(frag, size); > + skb->len += size; > + skb->data_len += size; > + skb->truesize += truesize; > + skb_frag_unref(skb, i); > +} I didn't see you use "off" i...
2013 Oct 31
0
[PATCH net-next V2 1/2] net: introduce skb_coalesce_rx_frag()
...+++ b/net/core/skbuff.c > @@ -476,6 +476,19 @@ void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off, > } > EXPORT_SYMBOL(skb_add_rx_frag); > > +void skb_coalesce_rx_frag(struct sk_buff *skb, int i, int size, > + unsigned int truesize) > +{ > + skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; > + > + skb_frag_size_add(frag, size); > + skb->len += size; > + skb->data_len += size; > + skb->truesize += truesize; > + skb_frag_unref(skb, i); This unref is not logical, or should at least be __skb_frag_unref(frag); But...
2009 Aug 19
1
[PATCH v2 1/2] virtio: Add a can_add_buf helper
This helper returns 1 if a call to add_buf will not fail with -ENOSPC. This will help callers that do while(1) { alloc() if (add_buf()) { free(); break; } } This will result in one less alloc/free exercise. Signed-off-by: Amit Shah <amit.shah at redhat.com> --- v2: return true/false instead of 1/0 drivers/virtio/virtio_ring.c | 8 ++++++++ include/linux/virtio.h |
2009 Aug 19
1
[PATCH v2 1/2] virtio: Add a can_add_buf helper
This helper returns 1 if a call to add_buf will not fail with -ENOSPC. This will help callers that do while(1) { alloc() if (add_buf()) { free(); break; } } This will result in one less alloc/free exercise. Signed-off-by: Amit Shah <amit.shah at redhat.com> --- v2: return true/false instead of 1/0 drivers/virtio/virtio_ring.c | 8 ++++++++ include/linux/virtio.h |
2023 Aug 22
0
[PATCH net-next v6 2/4] vsock/virtio: support to send non-linear skb
...ata in the head buffer (only the header). Is that constraint enforced somewhere else? Otherwise a WARN_ON_ONCE(skb_headlen(skb) > sizeof(*virtio_vsock_hdr(skb)) could be helpful to catch early possible bugs. Thanks! Paolo > + > + for (i = 0; i < si->nr_frags; i++) { > + skb_frag_t *skb_frag = &si->frags[i]; > + void *va; > > - sg_init_one(&hdr, virtio_vsock_hdr(skb), sizeof(*virtio_vsock_hdr(skb))); > - sgs[out_sg++] = &hdr; > - if (skb->len > 0) { > - sg_init_one(&buf, skb->data, skb->len); > - sgs[out_sg++] =...
2013 Nov 01
5
[PATCH net-next V3 1/2] net: introduce skb_coalesce_rx_frag()
.....a729b97 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -476,6 +476,18 @@ void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off, } EXPORT_SYMBOL(skb_add_rx_frag); +void skb_coalesce_rx_frag(struct sk_buff *skb, int i, int size, + unsigned int truesize) +{ + skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; + + skb_frag_size_add(frag, size); + skb->len += size; + skb->data_len += size; + skb->truesize += truesize; +} +EXPORT_SYMBOL(skb_coalesce_rx_frag); + static void skb_drop_list(struct sk_buff **listp) { kfree_skb_list(*listp); -- 1.8.1.2
2013 Nov 01
5
[PATCH net-next V3 1/2] net: introduce skb_coalesce_rx_frag()
.....a729b97 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -476,6 +476,18 @@ void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off, } EXPORT_SYMBOL(skb_add_rx_frag); +void skb_coalesce_rx_frag(struct sk_buff *skb, int i, int size, + unsigned int truesize) +{ + skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; + + skb_frag_size_add(frag, size); + skb->len += size; + skb->data_len += size; + skb->truesize += truesize; +} +EXPORT_SYMBOL(skb_coalesce_rx_frag); + static void skb_drop_list(struct sk_buff **listp) { kfree_skb_list(*listp); -- 1.8.1.2
2007 May 09
3
[patch 7/9] lguest: the net driver
...(i = seg = 0; i < headlen; seg++, i += rest_of_page(skb->data+i)) { + dma->addr[seg] = virt_to_phys(skb->data + i); + dma->len[seg] = min((unsigned)(headlen - i), + rest_of_page(skb->data + i)); + } + for (i = 0; i < skb_shinfo(skb)->nr_frags; i++, seg++) { + const skb_frag_t *f = &skb_shinfo(skb)->frags[i]; + /* Should not happen with MTU less than 64k - 2 * PAGE_SIZE. */ + if (seg == LGUEST_MAX_DMA_SECTIONS) { + printk("Woah dude! Megapacket!\n"); + break; + } + dma->addr[seg] = page_to_phys(f->page) + f->page_offset; + dma->len[...
2007 May 09
3
[patch 7/9] lguest: the net driver
...(i = seg = 0; i < headlen; seg++, i += rest_of_page(skb->data+i)) { + dma->addr[seg] = virt_to_phys(skb->data + i); + dma->len[seg] = min((unsigned)(headlen - i), + rest_of_page(skb->data + i)); + } + for (i = 0; i < skb_shinfo(skb)->nr_frags; i++, seg++) { + const skb_frag_t *f = &skb_shinfo(skb)->frags[i]; + /* Should not happen with MTU less than 64k - 2 * PAGE_SIZE. */ + if (seg == LGUEST_MAX_DMA_SECTIONS) { + printk("Woah dude! Megapacket!\n"); + break; + } + dma->addr[seg] = page_to_phys(f->page) + f->page_offset; + dma->len[...
2009 Aug 10
6
[PATCH 2/2] vhost_net: a kernel-level virtio server
What it is: vhost net is a character device that can be used to reduce the number of system calls involved in virtio networking. Existing virtio net code is used in the guest without modification. There's similarity with vringfd, with some differences and reduced scope - uses eventfd for signalling - structures can be moved around in memory at any time (good for migration) - support memory
2009 Aug 10
6
[PATCH 2/2] vhost_net: a kernel-level virtio server
What it is: vhost net is a character device that can be used to reduce the number of system calls involved in virtio networking. Existing virtio net code is used in the guest without modification. There's similarity with vringfd, with some differences and reduced scope - uses eventfd for signalling - structures can be moved around in memory at any time (good for migration) - support memory
2007 Apr 18
24
[patch 00/24] Xen-paravirt_ops: Xen guest implementation for paravirt_ops interface
Hi Andi, This patch series implements the Linux Xen guest as a paravirt_ops backend. The features in implemented this patch series are: * domU only * UP only (most code is SMP-safe, but there's no way to create a new vcpu) * writable pagetables, with late pinning/early unpinning (no shadow pagetable support) * supports both PAE and non-PAE modes * xen hvc console (console=hvc0) *
2007 Apr 18
24
[patch 00/24] Xen-paravirt_ops: Xen guest implementation for paravirt_ops interface
Hi Andi, This patch series implements the Linux Xen guest as a paravirt_ops backend. The features in implemented this patch series are: * domU only * UP only (most code is SMP-safe, but there's no way to create a new vcpu) * writable pagetables, with late pinning/early unpinning (no shadow pagetable support) * supports both PAE and non-PAE modes * xen hvc console (console=hvc0) *