search for: skb_queue_head

Displaying 17 results from an estimated 17 matches for "skb_queue_head".

Did you mean: __skb_queue_head
2009 Sep 21
0
[PATCH 2/6] virtio: make add_buf return capacity remaining
...n_vq->vq_ops->add_buf(in_vq, sg, 0, 1, inbuf) < 0) BUG(); in_vq->vq_ops->kick(in_vq); } diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -320,7 +320,7 @@ static bool try_fill_recv_maxbufs(struct skb_queue_head(&vi->recv, skb); err = vi->rvq->vq_ops->add_buf(vi->rvq, sg, 0, num, skb); - if (err) { + if (err < 0) { skb_unlink(skb, &vi->recv); trim_pages(vi, skb); kfree_skb(skb); @@ -373,7 +373,7 @@ static bool try_fill_recv(struct virtnet skb_queue_head(&a...
2009 Sep 21
0
[PATCH 2/6] virtio: make add_buf return capacity remaining
...n_vq->vq_ops->add_buf(in_vq, sg, 0, 1, inbuf) < 0) BUG(); in_vq->vq_ops->kick(in_vq); } diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -320,7 +320,7 @@ static bool try_fill_recv_maxbufs(struct skb_queue_head(&vi->recv, skb); err = vi->rvq->vq_ops->add_buf(vi->rvq, sg, 0, num, skb); - if (err) { + if (err < 0) { skb_unlink(skb, &vi->recv); trim_pages(vi, skb); kfree_skb(skb); @@ -373,7 +373,7 @@ static bool try_fill_recv(struct virtnet skb_queue_head(&a...
2009 Aug 18
2
[PATCH 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> --- drivers/virtio/virtio_ring.c | 8 ++++++++ include/linux/virtio.h | 5 +++++ 2 files changed, 13
2009 Aug 18
2
[PATCH 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> --- drivers/virtio/virtio_ring.c | 8 ++++++++ include/linux/virtio.h | 5 +++++ 2 files changed, 13
2008 Dec 14
5
[PATCH] AF_VMCHANNEL address family for guest<->host communication.
...TSUPP; + + if (sk->sk_state != TCP_ESTABLISHED) + return -EINVAL; + + target = sock_rcvlowat(sk, flags & MSG_WAITALL, len); + + do { + spin_lock_bh(&vmc->backlog_skb_q.lock); + while ((skb = __skb_dequeue(&vmc->backlog_skb_q))) { + if (sock_queue_rcv_skb(sk, skb)) { + __skb_queue_head(&vmc->backlog_skb_q, skb); + break; + } + atomic_dec(&vmc_dev.recv_posted); + } + spin_unlock_bh(&vmc->backlog_skb_q.lock); + + BUG_ON(atomic_read(&vmc_dev.recv_posted) < 0); + + /* this will repost buffers */ + if (atomic_read(&vmc_dev.recv_posted) < max...
2008 Dec 14
5
[PATCH] AF_VMCHANNEL address family for guest<->host communication.
...TSUPP; + + if (sk->sk_state != TCP_ESTABLISHED) + return -EINVAL; + + target = sock_rcvlowat(sk, flags & MSG_WAITALL, len); + + do { + spin_lock_bh(&vmc->backlog_skb_q.lock); + while ((skb = __skb_dequeue(&vmc->backlog_skb_q))) { + if (sock_queue_rcv_skb(sk, skb)) { + __skb_queue_head(&vmc->backlog_skb_q, skb); + break; + } + atomic_dec(&vmc_dev.recv_posted); + } + spin_unlock_bh(&vmc->backlog_skb_q.lock); + + BUG_ON(atomic_read(&vmc_dev.recv_posted) < 0); + + /* this will repost buffers */ + if (atomic_read(&vmc_dev.recv_posted) < max...
2007 Jul 24
0
[PATCH] virtio_net.c gso & feature support
...tterlist sg[1+MAX_SKB_FRAGS]; int num, err; for (;;) { @@ -81,7 +153,8 @@ static void try_fill_recv(struct virtnet break; skb_put(skb, MAX_PACKET_LEN); - num = skb_to_sgvec(skb, sg, 0, skb->len); + vnet_hdr_to_sg(sg, skb); + num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; skb_queue_head(&vi->recv, skb); err = vi->vq_recv->ops->add_buf(vi->vq_recv, sg, 0, num, skb); @@ -161,7 +234,8 @@ static int start_xmit(struct sk_buff *sk { struct virtnet_info *vi = netdev_priv(dev); int num, err; - struct scatterlist sg[MAX_SKB_FRAGS]; + struct scatterlist sg[1+MAX...
2007 Jul 24
0
[PATCH] virtio_net.c gso & feature support
...tterlist sg[1+MAX_SKB_FRAGS]; int num, err; for (;;) { @@ -81,7 +153,8 @@ static void try_fill_recv(struct virtnet break; skb_put(skb, MAX_PACKET_LEN); - num = skb_to_sgvec(skb, sg, 0, skb->len); + vnet_hdr_to_sg(sg, skb); + num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; skb_queue_head(&vi->recv, skb); err = vi->vq_recv->ops->add_buf(vi->vq_recv, sg, 0, num, skb); @@ -161,7 +234,8 @@ static int start_xmit(struct sk_buff *sk { struct virtnet_info *vi = netdev_priv(dev); int num, err; - struct scatterlist sg[MAX_SKB_FRAGS]; + struct scatterlist sg[1+MAX...
2013 Jul 02
3
[PATCH RFC] xen-netback: remove guest RX path dependence on MAX_SKB_FRAGS
...l(&rxq, skb); + ring_slots_required = xen_netbk_count_skb_slots(vif, skb); - /* Filled the batch queue? */ - /* XXX FIXME: RX path dependent on MAX_SKB_FRAGS */ - if (count + MAX_SKB_FRAGS >= XEN_NETIF_RX_RING_SIZE) + if (count + ring_slots_required >= XEN_NETIF_RX_RING_SIZE) { + skb_queue_head(&netbk->rx_queue, skb); break; + } + + count += ring_slots_required; + + sco->meta_slots_used = netbk_gop_skb(skb, &npo); + + __skb_queue_tail(&rxq, skb); } BUG_ON(npo.meta_prod > ARRAY_SIZE(netbk->meta)); -- 1.7.10.4
2007 Jun 07
4
[PATCH RFC 0/3] Virtio draft II
Hi again all, It turns out that networking really wants ordered requests, which the previous patches didn't allow. This patch changes it to a callback mechanism; kudos to Avi. The downside is that locking is more complicated, and after a few dead ends I implemented the simplest solution: the struct virtio_device contains the spinlock to use, and it's held when your callbacks get
2007 Jun 07
4
[PATCH RFC 0/3] Virtio draft II
Hi again all, It turns out that networking really wants ordered requests, which the previous patches didn't allow. This patch changes it to a callback mechanism; kudos to Avi. The downside is that locking is more complicated, and after a few dead ends I implemented the simplest solution: the struct virtio_device contains the spinlock to use, and it's held when your callbacks get
2007 Jun 07
4
[PATCH RFC 0/3] Virtio draft II
Hi again all, It turns out that networking really wants ordered requests, which the previous patches didn't allow. This patch changes it to a callback mechanism; kudos to Avi. The downside is that locking is more complicated, and after a few dead ends I implemented the simplest solution: the struct virtio_device contains the spinlock to use, and it's held when your callbacks get
2007 Jul 03
6
[PATCH 1/3] Virtio draft IV
In response to Avi's excellent analysis, I've updated virtio as promised (apologies for the delay, travel got in the way). === This attempts to implement a "virtual I/O" layer which should allow common drivers to be efficiently used across most virtual I/O mechanisms. It will no-doubt need further enhancement. The details of probing the device are left to hypervisor-specific
2007 Jul 03
6
[PATCH 1/3] Virtio draft IV
In response to Avi's excellent analysis, I've updated virtio as promised (apologies for the delay, travel got in the way). === This attempts to implement a "virtual I/O" layer which should allow common drivers to be efficiently used across most virtual I/O mechanisms. It will no-doubt need further enhancement. The details of probing the device are left to hypervisor-specific
2010 Sep 15
15
xenpaging fixes for kernel and hypervisor
Patrick, there following patches fix xenpaging for me. Granttable handling is incomplete. If a page is gone, a GNTST_eagain should be returned to the caller to inidcate the hypercall has to be retried after a while, until the page is available again. Please review. Olaf _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c